lftp: Build cleanup and two more bin/sh patches

This commit is contained in:
Fredrik Fornwall 2017-08-20 22:32:51 +02:00
parent 2087626916
commit c4b67a1c2b
5 changed files with 31 additions and 19 deletions

View 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
}

View File

@ -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@:>@

View File

@ -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);

View File

@ -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);