From 1bdfd6a341e97b25f4ffe6e6ecafbd03e93ced9f Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 7 Jul 2017 08:48:26 +0200 Subject: [PATCH] unzip: Clean build a little --- packages/unzip/build.sh | 2 +- packages/unzip/unix-configure.patch | 16 +++++++++++++--- packages/unzip/unzpriv.h.patch | 16 ---------------- 3 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 packages/unzip/unzpriv.h.patch diff --git a/packages/unzip/build.sh b/packages/unzip/build.sh index 6880cfb41..4c1ffedee 100644 --- a/packages/unzip/build.sh +++ b/packages/unzip/build.sh @@ -12,7 +12,7 @@ termux_step_configure () { } termux_step_make () { - prefix=$TERMUX_PREFIX LD="$CC $LDFLAGS" CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" PREFIX=$TERMUX_PREFIX make -j $TERMUX_MAKE_PROCESSES generic + LD="$CC $LDFLAGS" CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" make -j $TERMUX_MAKE_PROCESSES generic } termux_step_make_install () { diff --git a/packages/unzip/unix-configure.patch b/packages/unzip/unix-configure.patch index a090e59b6..b4e78adba 100644 --- a/packages/unzip/unix-configure.patch +++ b/packages/unzip/unix-configure.patch @@ -1,8 +1,18 @@ diff -u -r ../unzip60/unix/configure ./unix/configure --- ../unzip60/unix/configure 2009-04-16 21:25:12.000000000 +0200 -+++ ./unix/configure 2017-07-07 02:49:13.106298790 +0200 -@@ -418,7 +370,9 @@ - [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_ERRNO" ++++ ./unix/configure 2017-07-07 08:46:56.815279304 +0200 +@@ -401,8 +401,8 @@ + rm -f "${temp_file}" + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c +-$CC -o conftest conftest.c >/dev/null 2>/dev/null ++printf "#include \nint main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++$CC -o conftest conftest.c >/dev/null + [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DZMEM" + + echo Check for errno declaration +@@ -419,6 +419,8 @@ echo Check for directory libraries cat > conftest.c << _EOF_ diff --git a/packages/unzip/unzpriv.h.patch b/packages/unzip/unzpriv.h.patch deleted file mode 100644 index 6ac1e5b84..000000000 --- a/packages/unzip/unzpriv.h.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -u -r ../unzip60/unzpriv.h ./unzpriv.h ---- ../unzip60/unzpriv.h 2009-04-19 23:59:26.000000000 +0000 -+++ ./unzpriv.h 2017-07-07 00:38:24.057603217 +0000 -@@ -1284,9 +1284,9 @@ - - #ifdef ZMEM - # undef ZMEM --# define memcmp(b1,b2,len) bcmp(b2,b1,len) --# define memcpy(dest,src,len) bcopy(src,dest,len) --# define memzero bzero -+# define memcmp(b1,b2,len) memcmp(b2,b1,len) -+# define memcpy(b1,b2,len) (void)(__builtin_memmove((b2), (b1), (len))) -+# define memzero(b,len) (void)(__builtin_memset((b), '\0', (len))) - #else - # define memzero(dest,len) memset(dest,0,len) - #endif