From 779a1dd3b4b2b75183564f88a0df366b33feec4e Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 23 Sep 2017 02:24:10 +0200 Subject: [PATCH] hashdeep: Fix building pie binaries --- packages/hashdeep/build.sh | 5 ++--- packages/hashdeep/configure.ac.patch | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 packages/hashdeep/configure.ac.patch diff --git a/packages/hashdeep/build.sh b/packages/hashdeep/build.sh index 2e64ac25..4e6bb1bf 100644 --- a/packages/hashdeep/build.sh +++ b/packages/hashdeep/build.sh @@ -1,10 +1,9 @@ TERMUX_PKG_HOMEPAGE=http://md5deep.sourceforge.net/ -TERMUX_PKG_DESCRIPTION="a set of programs to compute MD5, SHA-1, SHA-256, Tiger, or Whirlpool message digests on an arbitrary number of files" +TERMUX_PKG_DESCRIPTION="Programs to compute hashsums of arbitrary number of files recursively" TERMUX_PKG_VERSION=4.4 TERMUX_PKG_SRCURL=https://github.com/jessek/hashdeep/archive/v$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=ad78d42142f9a74fe8ec0c61bc78d6588a528cbb9aede9440f50b6ff477f3a7f -TERMUX_PKG_FOLDERNAME=hashdeep-$TERMUX_PKG_VERSION termux_step_pre_configure () { - sh bootstrap.sh + sh bootstrap.sh } diff --git a/packages/hashdeep/configure.ac.patch b/packages/hashdeep/configure.ac.patch new file mode 100644 index 00000000..bcd47c9a --- /dev/null +++ b/packages/hashdeep/configure.ac.patch @@ -0,0 +1,23 @@ +Remove -MD option as that avoids pie wrapper script functionality. + +diff -u -r ../hashdeep-4.4/configure.ac ./configure.ac +--- ../hashdeep-4.4/configure.ac 2015-04-01 02:12:52.000000000 +0200 ++++ ./configure.ac 2017-09-23 02:18:08.770776322 +0200 +@@ -64,7 +64,7 @@ + ################################################################ + ### I am a glutten for punishment and this is security-critical software + # Check GCC +-WARNINGS_TO_TEST="-MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes \ ++WARNINGS_TO_TEST="-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes \ + -Wshadow -Wwrite-strings -Wcast-align -Waggregate-return \ + -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wdisabled-optimization \ + -Wfloat-equal -Wmissing-format-attribute -Wmultichar -Wc++-compat -Wmissing-noreturn -funit-at-a-time" +@@ -97,7 +97,7 @@ + # -Wcast-qual + # -Wmissing-format-attribute - can't get this one right + AC_LANG_PUSH(C++) +-WARNINGS_TO_TEST="-Wall -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith \ ++WARNINGS_TO_TEST="-Wall -D_FORTIFY_SOURCE=2 -Wpointer-arith \ + -Wshadow -Wwrite-strings -Wcast-align \ + -Wredundant-decls -Wdisabled-optimization \ + -Wfloat-equal -Wmultichar -Wmissing-noreturn \ -- 2.11.0