summaryrefslogtreecommitdiff
path: root/extra/lftp
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-08-05 14:16:59 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-08-05 14:16:59 +0200
commitc5acd40a763f8688aa564679643e6d5458425d4d (patch)
treee0800adf2874ec36ab00f58ccf7e600e7d6c6470 /extra/lftp
parent3c4d46227f477bcac2d83f48df5ae1c3b969598a (diff)
Use a patch from Gentoo to fix lftp build.
Diffstat (limited to 'extra/lftp')
-rw-r--r--extra/lftp/PKGBUILD8
-rw-r--r--extra/lftp/lftp-4.3.8-gets.patch15
2 files changed, 21 insertions, 2 deletions
diff --git a/extra/lftp/PKGBUILD b/extra/lftp/PKGBUILD
index 9afb5e56f..53c5482b6 100644
--- a/extra/lftp/PKGBUILD
+++ b/extra/lftp/PKGBUILD
@@ -12,11 +12,15 @@ depends=('gcc-libs' 'readline>=6.2' "gnutls" "expat>=2.0.1-4" 'sh')
optdepends=('perl: needed for convert-netscape-cookies and verify-file')
url="http://lftp.yar.ru/"
backup=('etc/lftp.conf')
-source=(http://ftp.yars.free.net/pub/source/lftp/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('adced9c3e0f6b96821811dc87c0a1eeb')
+source=(http://ftp.yars.free.net/pub/source/lftp/${pkgname}-${pkgver}.tar.bz2
+ lftp-4.3.8-gets.patch)
+md5sums=('adced9c3e0f6b96821811dc87c0a1eeb'
+ '932db2d498846be7ba90780ee4fcb158')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+ # A patch from Gentoo fixing build with newer glibc.
+ patch -Np1 -i "$srcdir/lftp-4.3.8-gets.patch"
./configure --prefix=/usr --with-gnutls \
--without-openssl --disable-static
make
diff --git a/extra/lftp/lftp-4.3.8-gets.patch b/extra/lftp/lftp-4.3.8-gets.patch
new file mode 100644
index 000000000..0c2cb7c8a
--- /dev/null
+++ b/extra/lftp/lftp-4.3.8-gets.patch
@@ -0,0 +1,15 @@
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -702,10 +702,12 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning; besides, C11
+ removed it. */
++#ifdef gets
+ #undef gets
+ #if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@