From 19e8fb19c6559dbcfba688de55528b8d16e36051 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 20 Aug 2017 22:32:51 +0200 Subject: [PATCH] lftp: Build cleanup and two more bin/sh patches --- packages/lftp/build.sh | 14 +++++++------- packages/lftp/m4-ax_check_zlib.m4.patch | 12 ------------ packages/lftp/src-Filter.cc.patch | 12 ++++++++++++ .../{ptyshell.cc.patch => src-PtyShell.cc.patch} | 0 packages/lftp/src-SysCmdJob.cc.patch | 12 ++++++++++++ 5 files changed, 31 insertions(+), 19 deletions(-) delete mode 100644 packages/lftp/m4-ax_check_zlib.m4.patch create mode 100644 packages/lftp/src-Filter.cc.patch rename packages/lftp/{ptyshell.cc.patch => src-PtyShell.cc.patch} (100%) create mode 100644 packages/lftp/src-SysCmdJob.cc.patch diff --git a/packages/lftp/build.sh b/packages/lftp/build.sh index d888ae486..effaec5e4 100644 --- a/packages/lftp/build.sh +++ b/packages/lftp/build.sh @@ -1,19 +1,19 @@ TERMUX_PKG_HOMEPAGE=https://lftp.tech/ TERMUX_PKG_DESCRIPTION="FTP/HTTP client and file transfer program" TERMUX_PKG_VERSION=4.8.0 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://lftp.tech/ftp/lftp-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=7a2880968088b4aeec43b6b6680fef0e065e1dddcce9b409390157e9766b690f # (1) Android has dn_expand, but lftp assumes that dn_skipname then exists, which it does not on android. # (2) Use --with-openssl to use openssl instead of gnutls. -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_dn_expand=no --with-openssl --with-expat=$TERMUX_PREFIX" -TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-readline=$TERMUX_PREFIX" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +ac_cv_func_dn_expand=no +--with-openssl +--with-expat=$TERMUX_PREFIX +--with-readline=$TERMUX_PREFIX +" TERMUX_PKG_DEPENDS="libexpat, openssl, readline, libutil, libidn" termux_step_pre_configure () { TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-zlib=$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr" - - # We have patched an m4 file. - aclocal - autoconf } diff --git a/packages/lftp/m4-ax_check_zlib.m4.patch b/packages/lftp/m4-ax_check_zlib.m4.patch deleted file mode 100644 index e45b7a510..000000000 --- a/packages/lftp/m4-ax_check_zlib.m4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../lftp-4.7.1/m4/ax_check_zlib.m4 ./m4/ax_check_zlib.m4 ---- ../lftp-4.7.1/m4/ax_check_zlib.m4 2016-02-20 08:57:52.000000000 -0500 -+++ ./m4/ax_check_zlib.m4 2016-05-03 13:06:09.166707065 -0400 -@@ -70,7 +70,7 @@ - # Handle user hints - # - [AC_MSG_CHECKING(if zlib is wanted) --zlib_places="/usr/local /usr /opt/local /sw" -+zlib_places="" - AC_ARG_WITH([zlib], - [ --with-zlib=DIR root directory path of zlib installation @<:@defaults to - /usr/local or /usr if not found in /usr/local@:>@ diff --git a/packages/lftp/src-Filter.cc.patch b/packages/lftp/src-Filter.cc.patch new file mode 100644 index 000000000..5c4149ba6 --- /dev/null +++ b/packages/lftp/src-Filter.cc.patch @@ -0,0 +1,12 @@ +diff -u -r ../lftp-4.8.0/src/Filter.cc ./src/Filter.cc +--- ../lftp-4.8.0/src/Filter.cc 2017-04-24 08:20:52.000000000 +0200 ++++ ./src/Filter.cc 2017-08-20 22:06:59.423505183 +0200 +@@ -209,7 +209,7 @@ + } + else + { +- execl("/bin/sh","sh","-c",name.get(),NULL); ++ execl("@TERMUX_PREFIX@/bin/sh","sh","-c",name.get(),NULL); + fprintf(stderr,_("execl(/bin/sh) failed: %s\n"),strerror(errno)); + } + fflush(stderr); diff --git a/packages/lftp/ptyshell.cc.patch b/packages/lftp/src-PtyShell.cc.patch similarity index 100% rename from packages/lftp/ptyshell.cc.patch rename to packages/lftp/src-PtyShell.cc.patch diff --git a/packages/lftp/src-SysCmdJob.cc.patch b/packages/lftp/src-SysCmdJob.cc.patch new file mode 100644 index 000000000..f7635b790 --- /dev/null +++ b/packages/lftp/src-SysCmdJob.cc.patch @@ -0,0 +1,12 @@ +diff -u -r ../lftp-4.8.0/src/SysCmdJob.cc ./src/SysCmdJob.cc +--- ../lftp-4.8.0/src/SysCmdJob.cc 2013-03-19 14:02:12.000000000 +0100 ++++ ./src/SysCmdJob.cc 2017-08-20 22:05:45.452393625 +0200 +@@ -54,7 +54,7 @@ + + const char *shell=getenv("SHELL"); + if(!shell) +- shell="/bin/sh"; ++ shell="@TERMUX_PREFIX@/bin/sh"; + + ProcWait::Signal(false); +