lftp: Build cleanup and two more bin/sh patches
authorFredrik Fornwall <fredrik@fornwall.net>
Sun, 20 Aug 2017 20:32:51 +0000 (22:32 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Sun, 20 Aug 2017 20:32:51 +0000 (22:32 +0200)
packages/lftp/build.sh
packages/lftp/m4-ax_check_zlib.m4.patch [deleted file]
packages/lftp/src-Filter.cc.patch [new file with mode: 0644]
packages/lftp/src-PtyShell.cc.patch [moved from packages/lftp/ptyshell.cc.patch with 100% similarity]
packages/lftp/src-SysCmdJob.cc.patch [new file with mode: 0644]

index d888ae4..effaec5 100644 (file)
@@ -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 (file)
index e45b7a5..0000000
+++ /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 (file)
index 0000000..5c4149b
--- /dev/null
@@ -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/src-SysCmdJob.cc.patch b/packages/lftp/src-SysCmdJob.cc.patch
new file mode 100644 (file)
index 0000000..f7635b7
--- /dev/null
@@ -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);