From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 627F11382C5 for ; Sat, 17 Apr 2021 20:30:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9CE67E0845; Sat, 17 Apr 2021 20:30:57 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 78807E0845 for ; Sat, 17 Apr 2021 20:30:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2567A34085A for ; Sat, 17 Apr 2021 20:30:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 88701647 for ; Sat, 17 Apr 2021 20:30:54 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1618691443.6ef32f28e35c0ab7cf58ad7d11a9530f6447aa7e.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/, net-ftp/proftpd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-ftp/proftpd/files/proftpd-1.3.7a-no-ncurses.patch net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild X-VCS-Directories: net-ftp/proftpd/files/ net-ftp/proftpd/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 6ef32f28e35c0ab7cf58ad7d11a9530f6447aa7e X-VCS-Branch: master Date: Sat, 17 Apr 2021 20:30:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6bbbfed2-f5d5-4a29-9a62-2a3a0ec131b8 X-Archives-Hash: 187c77e977827d820b15c9def07c51cc commit: 6ef32f28e35c0ab7cf58ad7d11a9530f6447aa7e Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Apr 17 20:30:43 2021 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Apr 17 20:30:43 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ef32f28 net-ftp/proftpd: backport USE=-ncurses fix Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/777531 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich gentoo.org> .../proftpd/files/proftpd-1.3.7a-no-ncurses.patch | 269 +++++++++++++++++++++ net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild | 1 + 2 files changed, 270 insertions(+) diff --git a/net-ftp/proftpd/files/proftpd-1.3.7a-no-ncurses.patch b/net-ftp/proftpd/files/proftpd-1.3.7a-no-ncurses.patch new file mode 100644 index 00000000000..be18a995459 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.7a-no-ncurses.patch @@ -0,0 +1,269 @@ +https://github.com/proftpd/proftpd/commit/8fc570bc13e771d3ecafe53ab94ada0be2b6646a +https://bugs.gentoo.org/777531 + +From 8fc570bc13e771d3ecafe53ab94ada0be2b6646a Mon Sep 17 00:00:00 2001 +From: TJ Saunders +Date: Tue, 23 Mar 2021 19:50:49 -0700 +Subject: [PATCH] Issue #1207: Properly honor the `--disable-curses`, + `--disable-ncurses` configure options. + +--- + configure | 156 +++++++++++++++++++++++++++++++++++++++++++++++---- + configure.in | 39 +++++++++---- + 2 files changed, 172 insertions(+), 23 deletions(-) + +diff --git a/configure b/configure +index 86cf1360e..59df363fa 100755 +--- a/configure ++++ b/configure +@@ -22970,7 +22970,7 @@ $as_echo "#define SETGRENT_VOID 1" >>confdefs.h + fi + + +-if test x"$ac_cv_header_curses_h" = xyes; then ++if test x"$enable_curses" != xno ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 + $as_echo_n "checking for initscr in -lcurses... " >&6; } + if ${ac_cv_lib_curses_initscr+:} false; then : +@@ -23013,12 +23013,154 @@ if test "x$ac_cv_lib_curses_initscr" = xyes; then : + $as_echo "#define HAVE_LIBCURSES 1" >>confdefs.h + + ++$as_echo "#define PR_USE_CURSES 1" >>confdefs.h ++ ++ + fi + ++ ++ if test x"$enable_nls" = xyes ; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfow" >&5 ++$as_echo_n "checking for halfdelay in -ltinfow... " >&6; } ++if ${ac_cv_lib_tinfow_halfdelay+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-ltinfow $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char halfdelay (); ++int ++main () ++{ ++return halfdelay (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_tinfow_halfdelay=yes ++else ++ ac_cv_lib_tinfow_halfdelay=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfow_halfdelay" >&5 ++$as_echo "$ac_cv_lib_tinfow_halfdelay" >&6; } ++if test "x$ac_cv_lib_tinfow_halfdelay" = xyes; then : ++ UTILS_LIBS="$UTILS_LIBS -ltinfow" ++ ++$as_echo "#define HAVE_LIBTINFOW 1" >>confdefs.h ++ ++ ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5 ++$as_echo_n "checking for halfdelay in -ltinfo... " >&6; } ++if ${ac_cv_lib_tinfo_halfdelay+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-ltinfo $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char halfdelay (); ++int ++main () ++{ ++return halfdelay (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_tinfo_halfdelay=yes ++else ++ ac_cv_lib_tinfo_halfdelay=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_halfdelay" >&5 ++$as_echo "$ac_cv_lib_tinfo_halfdelay" >&6; } ++if test "x$ac_cv_lib_tinfo_halfdelay" = xyes; then : ++ UTILS_LIBS="$UTILS_LIBS -ltinfo" ++ ++$as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h ++ ++ ++fi ++ ++ ++fi ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5 ++$as_echo_n "checking for halfdelay in -ltinfo... " >&6; } ++if ${ac_cv_lib_tinfo_halfdelay+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-ltinfo $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char halfdelay (); ++int ++main () ++{ ++return halfdelay (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_tinfo_halfdelay=yes ++else ++ ac_cv_lib_tinfo_halfdelay=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_halfdelay" >&5 ++$as_echo "$ac_cv_lib_tinfo_halfdelay" >&6; } ++if test "x$ac_cv_lib_tinfo_halfdelay" = xyes; then : ++ UTILS_LIBS="$UTILS_LIBS -ltinfo" ++ ++$as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h ++ ++ ++fi ++ ++ fi ++fi ++ ++if test x"$enable_ncurses" != xno ; then ++ pr_have_ncursesw="no" + +-pr_have_ncursesw="no" +-if test x"$ac_cv_header_ncurses_h" = xyes; then + + if test x"$enable_nls" = xyes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 +@@ -23160,15 +23302,7 @@ $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h + fi + + fi +-fi + +-if test x"$enable_curses" != xno ; then +- +-$as_echo "#define PR_USE_CURSES 1" >>confdefs.h +- +-fi +- +-if test x"$enable_ncurses" != xno ; then + + if test x"$pr_have_ncursesw" = xyes ; then + +diff --git a/configure.in b/configure.in +index 4bd0f7c19..01ec7863e 100644 +--- a/configure.in ++++ b/configure.in +@@ -2749,17 +2749,38 @@ fi + dnl Custom-rolled macro for checking return type of setgrent(3) + PR_FUNC_SETGRENT_VOID + +-dnl Perform checks for curses/ncurses libraries only if the corresponding +-dnl headers have been found. +-if test x"$ac_cv_header_curses_h" = xyes; then ++if test x"$enable_curses" != xno ; then + AC_CHECK_LIB(curses, initscr, + [ CURSES_LIBS="-lcurses" + AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have curses]) ++ AC_DEFINE(PR_USE_CURSES, 1, [Define if using curses support]) + ]) ++ ++ dnl Check for the libtinfo library, which contains the stdscr symbol, ++ dnl halfdelay curses function on some systems (e.g. Gentoo); see ++ dnl Issue #1207. Note that on some systems, this may need to be libtinfow ++ dnl instead. ++ if test x"$enable_nls" = xyes ; then ++ AC_CHECK_LIB(tinfow, halfdelay, ++ [ UTILS_LIBS="$UTILS_LIBS -ltinfow" ++ AC_DEFINE(HAVE_LIBTINFOW, 1, [Define if you have libtinfow]) ++ ], ++ [ AC_CHECK_LIB(tinfo, halfdelay, ++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo" ++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo]) ++ ]) ++ ]) ++ else ++ AC_CHECK_LIB(tinfo, halfdelay, ++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo" ++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo]) ++ ]) ++ fi + fi + +-pr_have_ncursesw="no" +-if test x"$ac_cv_header_ncurses_h" = xyes; then ++if test x"$enable_ncurses" != xno ; then ++ pr_have_ncursesw="no" ++ + dnl If NLS support has been enabled, then check for the locale-sensitive + dnl libncursesw library first; if not found, or if no NLS support, then + dnl check for libncurses. +@@ -2776,19 +2797,13 @@ if test x"$ac_cv_header_ncurses_h" = xyes; then + ]) + ]) + +- else ++ else + AC_CHECK_LIB(ncurses, initscr, + [ CURSES_LIBS="-lncurses" + AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have ncurses]) + ]) + fi +-fi +- +-if test x"$enable_curses" != xno ; then +- AC_DEFINE(PR_USE_CURSES, 1, [Define if using curses support]) +-fi + +-if test x"$enable_ncurses" != xno ; then + dnl Check for the libtinfo library, which contains the halfdelay() curses + dnl function on some systems (e.g. OpenSuSE); see Bug#3718. Note that on + dnl some systems, this may need to be libtinfow instead; see Issue #1174. diff --git a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild index 17be3df4415..7ee4c7d7326 100644 --- a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild +++ b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild @@ -71,6 +71,7 @@ S="${WORKDIR}/${P/_/}" PATCHES=( "${FILESDIR}"/${PN}-1.3.6-use-trace.patch "${FILESDIR}"/${P}-tinfow-segv.patch + "${FILESDIR}"/${P}-no-ncurses.patch ) RESTRICT=test # Some tests are ran in chroot. Confuse sandbox.