2022-02-03 10:26:27 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://valgrind.org/
|
2017-12-05 22:33:04 +01:00
|
|
|
TERMUX_PKG_DESCRIPTION="Instrumentation framework for building dynamic analysis tools"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-01-02 11:44:08 +01:00
|
|
|
TERMUX_PKG_VERSION=3.18.1
|
2020-01-13 02:00:07 +01:00
|
|
|
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/valgrind/valgrind-${TERMUX_PKG_VERSION}.tar.bz2
|
2022-01-02 11:44:08 +01:00
|
|
|
TERMUX_PKG_SHA256=00859aa13a772eddf7822225f4b46ee0d39afbe071d32778da4d99984081f7f5
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_BREAKS="valgrind-dev"
|
|
|
|
TERMUX_PKG_REPLACES="valgrind-dev"
|
2016-07-28 23:50:42 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-tmpdir=$TERMUX_PREFIX/tmp"
|
2016-07-26 23:54:55 +02:00
|
|
|
|
2017-01-19 18:40:53 +01:00
|
|
|
termux_step_pre_configure() {
|
2022-01-02 12:54:10 +01:00
|
|
|
CFLAGS=${CFLAGS/-fstack-protector-strong/}
|
|
|
|
|
2018-08-19 02:45:18 +02:00
|
|
|
if [ "$TERMUX_ARCH" == "aarch64" ]; then
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/aarch64-setjmp.S $TERMUX_PKG_SRCDIR
|
2022-02-10 06:50:18 +01:00
|
|
|
patch --silent -p1 < $TERMUX_PKG_BUILDER_DIR/coregrindmake.am.diff
|
|
|
|
patch --silent -p1 < $TERMUX_PKG_BUILDER_DIR/memcheckmake.am.diff
|
2019-02-17 21:34:26 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-only64bit"
|
2019-08-06 19:29:31 +02:00
|
|
|
elif [ "$TERMUX_ARCH" == "arm" ]; then
|
2017-01-19 18:40:53 +01:00
|
|
|
# valgrind doesn't like arm; armv7 works, though.
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=armv7-linux-androideabi"
|
|
|
|
# http://lists.busybox.net/pipermail/buildroot/2013-November/082270.html:
|
|
|
|
# "valgrind uses inline assembly that is not Thumb compatible":
|
|
|
|
CFLAGS=${CFLAGS/-mthumb/}
|
|
|
|
fi
|
2022-02-10 06:50:18 +01:00
|
|
|
|
|
|
|
autoreconf -fi
|
2017-01-19 18:40:53 +01:00
|
|
|
}
|
2022-02-12 09:14:24 +01:00
|
|
|
|
|
|
|
termux_step_post_massage() {
|
|
|
|
termux_download https://github.com/Lzhiyong/termux-ndk/raw/902f483485b4/patches/align_fix.py \
|
|
|
|
$TERMUX_PKG_CACHEDIR/align_fix.py \
|
|
|
|
83579beef5f0899300b2f1cb7cfad25c3ee2c90089f9b7eb83ce7472d0e730bd
|
|
|
|
python3 $TERMUX_PKG_CACHEDIR/align_fix.py bin/valgrind
|
|
|
|
}
|