commit:     187bb1e0c5603e11b55dda915088ec4434a63cd1
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  3 15:01:17 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Jan  3 15:01:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=187bb1e0

net-ftp/ncftp: add 3.2.7

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 net-ftp/ncftp/Manifest                          |  1 +
 net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch | 66 +++++++++++++++++++++++++
 net-ftp/ncftp/ncftp-3.2.7.ebuild                | 55 +++++++++++++++++++++
 3 files changed, 122 insertions(+)

diff --git a/net-ftp/ncftp/Manifest b/net-ftp/ncftp/Manifest
index 85a2f440154c..4d5ad49ce3fc 100644
--- a/net-ftp/ncftp/Manifest
+++ b/net-ftp/ncftp/Manifest
@@ -1 +1,2 @@
 DIST ncftp-3.2.6-src.tar.xz 420564 BLAKE2B 
ce6d8d2bf06761f884e9edfe6d0bb0230f5d515078a787c4e6faf7716b760166acdd0accf3de1e1f5f3d892c8c86348cdbbefeac6be05e6806011a3e8f4c9b02
 SHA512 
8e6091ce2ea1eb463edea322d1b5dde813475fd22096d67f0bfd2f5101ae09747ff25d38816d0b9b1077e6a5a256078361691f816aa2eefa38638aa523b4b382
+DIST ncftp-3.2.7-src.tar.xz 422480 BLAKE2B 
d075be273d534b11385b8ee5839835102d9f69a6cc8fc8f661b85be32c1cad3b1c4bab2c99b8c47bc3c40d18275524b88da7d8e70985dbb0cfb7ff5ea07b70f3
 SHA512 
b755385a57ac2487625c15985f091d9e1b71073b2593faffe1f2bbba34e691cfff9ffd8448b048f223ea08428e890f30c49a903e4f938393e3c0e4ae03ddab37

diff --git a/net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch 
b/net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch
new file mode 100644
index 000000000000..d8529490cd1e
--- /dev/null
+++ b/net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch
@@ -0,0 +1,66 @@
+Fix compilation with clang-16
+
+aclocal.m4 contains code that no longer compiles: missing headers and missing
+return types.
+
+--- a/autoconf_local/aclocal.m4
++++ b/autoconf_local/aclocal.m4
+@@ -3057,6 +3057,7 @@
+ #include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <string.h>
+ ],[
+ struct sockaddr_un uaddr;
+ 
+@@ -3285,6 +3286,7 @@
+ #ifdef HAVE_RESOLV_H
+ #     include <resolv.h>
+ #endif
++#include <string.h>
+ ],[
+       /* function-body */
+       int len;
+@@ -3363,6 +3365,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+                
++                      int
+                       main(int argc, char **argv)
+                       {
+                               /* Note:  don't actually call readline,
+@@ -5145,6 +5148,7 @@
+ #ifdef HAVE_STDLIB_H
+ #     include <stdlib.h>
+ #endif
++#include <string.h>
+ 
+ #ifdef HAVE_NCURSES_H
+ #     define NCURSES_OPAQUE 0
+@@ -5176,6 +5180,7 @@
+ #endif
+ 
+  
++int
+ main(int argc, char **argv)
+ {
+       /* Note:  don't actually call curses, since it may block;
+@@ -6510,7 +6515,6 @@
+ #endif
+ #endif                        /* MG */
+ 
+-int
+ int  main(void)
+ {
+       char *data, *data2, *data3;
+@@ -6607,8 +6611,9 @@
+       AC_CACHE_CHECK(whether setvbuf arguments are reversed,
+         ac_cv_func_setvbuf_reversed,
+       [AC_TRY_RUN([#include <stdio.h>
++      $include <stdlib.h>
+       /* If setvbuf has the reversed format, exit 0. */
+-      main () {
++      int main (void) {
+         /* This call has the arguments reversed.
+            A reversed system may check and see that the address of main
+            is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */

diff --git a/net-ftp/ncftp/ncftp-3.2.7.ebuild b/net-ftp/ncftp/ncftp-3.2.7.ebuild
new file mode 100644
index 000000000000..0aa221e759bc
--- /dev/null
+++ b/net-ftp/ncftp/ncftp-3.2.7.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools toolchain-funcs
+
+DESCRIPTION="An extremely configurable ftp client"
+HOMEPAGE="https://www.ncftp.com/";
+SRC_URI="https://www.ncftp.com/public_ftp/${PN}/${P}-src.tar.xz";
+
+LICENSE="Clarified-Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc 
~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="pch"
+
+DEPEND="
+       sys-libs/ncurses:=
+"
+RDEPEND="
+       ${DEPEND}
+"
+BDEPEND="
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.7-fix-clang.patch # 875458
+)
+
+src_prepare() {
+       default
+
+       sed -i -e '/^AR=/d' autoconf_local/aclocal.m4 || die
+       # 727774
+       sed -i -e 's/STRIP=".*"/STRIP=":"/' autoconf_local/aclocal.m4 || die
+
+       AT_M4DIR=autoconf_local/ eautoreconf
+}
+
+src_configure() {
+       tc-export AR CC
+       LC_ALL="C" \
+       LIBS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
+               econf \
+               $(use_enable pch precomp) \
+               --disable-ccdv \
+               --disable-universal
+}
+
+src_install() {
+       default
+       dodoc README.txt doc/*.txt
+       docinto html
+       dodoc doc/html/*.html
+}

Reply via email to