From c5acd40a763f8688aa564679643e6d5458425d4d Mon Sep 17 00:00:00 2001 From: Michał Masłowski Date: Sun, 5 Aug 2012 14:16:59 +0200 Subject: Use a patch from Gentoo to fix lftp build. --- extra/lftp/PKGBUILD | 8 ++++++-- extra/lftp/lftp-4.3.8-gets.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 extra/lftp/lftp-4.3.8-gets.patch (limited to 'extra/lftp') 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@ -- cgit v1.2.3-54-g00ecf