1 |
commit: 6ef32f28e35c0ab7cf58ad7d11a9530f6447aa7e |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 17 20:30:43 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 17 20:30:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ef32f28 |
7 |
|
8 |
net-ftp/proftpd: backport USE=-ncurses fix |
9 |
|
10 |
Reported-by: Toralf Förster |
11 |
Closes: https://bugs.gentoo.org/777531 |
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
.../proftpd/files/proftpd-1.3.7a-no-ncurses.patch | 269 +++++++++++++++++++++ |
16 |
net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild | 1 + |
17 |
2 files changed, 270 insertions(+) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 00000000000..be18a995459 |
22 |
--- /dev/null |
23 |
+++ b/net-ftp/proftpd/files/proftpd-1.3.7a-no-ncurses.patch |
24 |
@@ -0,0 +1,269 @@ |
25 |
+https://github.com/proftpd/proftpd/commit/8fc570bc13e771d3ecafe53ab94ada0be2b6646a |
26 |
+https://bugs.gentoo.org/777531 |
27 |
+ |
28 |
+From 8fc570bc13e771d3ecafe53ab94ada0be2b6646a Mon Sep 17 00:00:00 2001 |
29 |
+From: TJ Saunders <tj@×××××××××.org> |
30 |
+Date: Tue, 23 Mar 2021 19:50:49 -0700 |
31 |
+Subject: [PATCH] Issue #1207: Properly honor the `--disable-curses`, |
32 |
+ `--disable-ncurses` configure options. |
33 |
+ |
34 |
+--- |
35 |
+ configure | 156 +++++++++++++++++++++++++++++++++++++++++++++++---- |
36 |
+ configure.in | 39 +++++++++---- |
37 |
+ 2 files changed, 172 insertions(+), 23 deletions(-) |
38 |
+ |
39 |
+diff --git a/configure b/configure |
40 |
+index 86cf1360e..59df363fa 100755 |
41 |
+--- a/configure |
42 |
++++ b/configure |
43 |
+@@ -22970,7 +22970,7 @@ $as_echo "#define SETGRENT_VOID 1" >>confdefs.h |
44 |
+ fi |
45 |
+ |
46 |
+ |
47 |
+-if test x"$ac_cv_header_curses_h" = xyes; then |
48 |
++if test x"$enable_curses" != xno ; then |
49 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 |
50 |
+ $as_echo_n "checking for initscr in -lcurses... " >&6; } |
51 |
+ if ${ac_cv_lib_curses_initscr+:} false; then : |
52 |
+@@ -23013,12 +23013,154 @@ if test "x$ac_cv_lib_curses_initscr" = xyes; then : |
53 |
+ $as_echo "#define HAVE_LIBCURSES 1" >>confdefs.h |
54 |
+ |
55 |
+ |
56 |
++$as_echo "#define PR_USE_CURSES 1" >>confdefs.h |
57 |
++ |
58 |
++ |
59 |
+ fi |
60 |
+ |
61 |
++ |
62 |
++ if test x"$enable_nls" = xyes ; then |
63 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfow" >&5 |
64 |
++$as_echo_n "checking for halfdelay in -ltinfow... " >&6; } |
65 |
++if ${ac_cv_lib_tinfow_halfdelay+:} false; then : |
66 |
++ $as_echo_n "(cached) " >&6 |
67 |
++else |
68 |
++ ac_check_lib_save_LIBS=$LIBS |
69 |
++LIBS="-ltinfow $LIBS" |
70 |
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
71 |
++/* end confdefs.h. */ |
72 |
++ |
73 |
++/* Override any GCC internal prototype to avoid an error. |
74 |
++ Use char because int might match the return type of a GCC |
75 |
++ builtin and then its argument prototype would still apply. */ |
76 |
++#ifdef __cplusplus |
77 |
++extern "C" |
78 |
++#endif |
79 |
++char halfdelay (); |
80 |
++int |
81 |
++main () |
82 |
++{ |
83 |
++return halfdelay (); |
84 |
++ ; |
85 |
++ return 0; |
86 |
++} |
87 |
++_ACEOF |
88 |
++if ac_fn_c_try_link "$LINENO"; then : |
89 |
++ ac_cv_lib_tinfow_halfdelay=yes |
90 |
++else |
91 |
++ ac_cv_lib_tinfow_halfdelay=no |
92 |
++fi |
93 |
++rm -f core conftest.err conftest.$ac_objext \ |
94 |
++ conftest$ac_exeext conftest.$ac_ext |
95 |
++LIBS=$ac_check_lib_save_LIBS |
96 |
+ fi |
97 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfow_halfdelay" >&5 |
98 |
++$as_echo "$ac_cv_lib_tinfow_halfdelay" >&6; } |
99 |
++if test "x$ac_cv_lib_tinfow_halfdelay" = xyes; then : |
100 |
++ UTILS_LIBS="$UTILS_LIBS -ltinfow" |
101 |
++ |
102 |
++$as_echo "#define HAVE_LIBTINFOW 1" >>confdefs.h |
103 |
++ |
104 |
++ |
105 |
++else |
106 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5 |
107 |
++$as_echo_n "checking for halfdelay in -ltinfo... " >&6; } |
108 |
++if ${ac_cv_lib_tinfo_halfdelay+:} false; then : |
109 |
++ $as_echo_n "(cached) " >&6 |
110 |
++else |
111 |
++ ac_check_lib_save_LIBS=$LIBS |
112 |
++LIBS="-ltinfo $LIBS" |
113 |
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
114 |
++/* end confdefs.h. */ |
115 |
++ |
116 |
++/* Override any GCC internal prototype to avoid an error. |
117 |
++ Use char because int might match the return type of a GCC |
118 |
++ builtin and then its argument prototype would still apply. */ |
119 |
++#ifdef __cplusplus |
120 |
++extern "C" |
121 |
++#endif |
122 |
++char halfdelay (); |
123 |
++int |
124 |
++main () |
125 |
++{ |
126 |
++return halfdelay (); |
127 |
++ ; |
128 |
++ return 0; |
129 |
++} |
130 |
++_ACEOF |
131 |
++if ac_fn_c_try_link "$LINENO"; then : |
132 |
++ ac_cv_lib_tinfo_halfdelay=yes |
133 |
++else |
134 |
++ ac_cv_lib_tinfo_halfdelay=no |
135 |
++fi |
136 |
++rm -f core conftest.err conftest.$ac_objext \ |
137 |
++ conftest$ac_exeext conftest.$ac_ext |
138 |
++LIBS=$ac_check_lib_save_LIBS |
139 |
++fi |
140 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_halfdelay" >&5 |
141 |
++$as_echo "$ac_cv_lib_tinfo_halfdelay" >&6; } |
142 |
++if test "x$ac_cv_lib_tinfo_halfdelay" = xyes; then : |
143 |
++ UTILS_LIBS="$UTILS_LIBS -ltinfo" |
144 |
++ |
145 |
++$as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h |
146 |
++ |
147 |
++ |
148 |
++fi |
149 |
++ |
150 |
++ |
151 |
++fi |
152 |
++ |
153 |
++ else |
154 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5 |
155 |
++$as_echo_n "checking for halfdelay in -ltinfo... " >&6; } |
156 |
++if ${ac_cv_lib_tinfo_halfdelay+:} false; then : |
157 |
++ $as_echo_n "(cached) " >&6 |
158 |
++else |
159 |
++ ac_check_lib_save_LIBS=$LIBS |
160 |
++LIBS="-ltinfo $LIBS" |
161 |
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
162 |
++/* end confdefs.h. */ |
163 |
++ |
164 |
++/* Override any GCC internal prototype to avoid an error. |
165 |
++ Use char because int might match the return type of a GCC |
166 |
++ builtin and then its argument prototype would still apply. */ |
167 |
++#ifdef __cplusplus |
168 |
++extern "C" |
169 |
++#endif |
170 |
++char halfdelay (); |
171 |
++int |
172 |
++main () |
173 |
++{ |
174 |
++return halfdelay (); |
175 |
++ ; |
176 |
++ return 0; |
177 |
++} |
178 |
++_ACEOF |
179 |
++if ac_fn_c_try_link "$LINENO"; then : |
180 |
++ ac_cv_lib_tinfo_halfdelay=yes |
181 |
++else |
182 |
++ ac_cv_lib_tinfo_halfdelay=no |
183 |
++fi |
184 |
++rm -f core conftest.err conftest.$ac_objext \ |
185 |
++ conftest$ac_exeext conftest.$ac_ext |
186 |
++LIBS=$ac_check_lib_save_LIBS |
187 |
++fi |
188 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_halfdelay" >&5 |
189 |
++$as_echo "$ac_cv_lib_tinfo_halfdelay" >&6; } |
190 |
++if test "x$ac_cv_lib_tinfo_halfdelay" = xyes; then : |
191 |
++ UTILS_LIBS="$UTILS_LIBS -ltinfo" |
192 |
++ |
193 |
++$as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h |
194 |
++ |
195 |
++ |
196 |
++fi |
197 |
++ |
198 |
++ fi |
199 |
++fi |
200 |
++ |
201 |
++if test x"$enable_ncurses" != xno ; then |
202 |
++ pr_have_ncursesw="no" |
203 |
+ |
204 |
+-pr_have_ncursesw="no" |
205 |
+-if test x"$ac_cv_header_ncurses_h" = xyes; then |
206 |
+ |
207 |
+ if test x"$enable_nls" = xyes ; then |
208 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 |
209 |
+@@ -23160,15 +23302,7 @@ $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h |
210 |
+ fi |
211 |
+ |
212 |
+ fi |
213 |
+-fi |
214 |
+ |
215 |
+-if test x"$enable_curses" != xno ; then |
216 |
+- |
217 |
+-$as_echo "#define PR_USE_CURSES 1" >>confdefs.h |
218 |
+- |
219 |
+-fi |
220 |
+- |
221 |
+-if test x"$enable_ncurses" != xno ; then |
222 |
+ |
223 |
+ if test x"$pr_have_ncursesw" = xyes ; then |
224 |
+ |
225 |
+diff --git a/configure.in b/configure.in |
226 |
+index 4bd0f7c19..01ec7863e 100644 |
227 |
+--- a/configure.in |
228 |
++++ b/configure.in |
229 |
+@@ -2749,17 +2749,38 @@ fi |
230 |
+ dnl Custom-rolled macro for checking return type of setgrent(3) |
231 |
+ PR_FUNC_SETGRENT_VOID |
232 |
+ |
233 |
+-dnl Perform checks for curses/ncurses libraries only if the corresponding |
234 |
+-dnl headers have been found. |
235 |
+-if test x"$ac_cv_header_curses_h" = xyes; then |
236 |
++if test x"$enable_curses" != xno ; then |
237 |
+ AC_CHECK_LIB(curses, initscr, |
238 |
+ [ CURSES_LIBS="-lcurses" |
239 |
+ AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have curses]) |
240 |
++ AC_DEFINE(PR_USE_CURSES, 1, [Define if using curses support]) |
241 |
+ ]) |
242 |
++ |
243 |
++ dnl Check for the libtinfo library, which contains the stdscr symbol, |
244 |
++ dnl halfdelay curses function on some systems (e.g. Gentoo); see |
245 |
++ dnl Issue #1207. Note that on some systems, this may need to be libtinfow |
246 |
++ dnl instead. |
247 |
++ if test x"$enable_nls" = xyes ; then |
248 |
++ AC_CHECK_LIB(tinfow, halfdelay, |
249 |
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfow" |
250 |
++ AC_DEFINE(HAVE_LIBTINFOW, 1, [Define if you have libtinfow]) |
251 |
++ ], |
252 |
++ [ AC_CHECK_LIB(tinfo, halfdelay, |
253 |
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo" |
254 |
++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo]) |
255 |
++ ]) |
256 |
++ ]) |
257 |
++ else |
258 |
++ AC_CHECK_LIB(tinfo, halfdelay, |
259 |
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo" |
260 |
++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo]) |
261 |
++ ]) |
262 |
++ fi |
263 |
+ fi |
264 |
+ |
265 |
+-pr_have_ncursesw="no" |
266 |
+-if test x"$ac_cv_header_ncurses_h" = xyes; then |
267 |
++if test x"$enable_ncurses" != xno ; then |
268 |
++ pr_have_ncursesw="no" |
269 |
++ |
270 |
+ dnl If NLS support has been enabled, then check for the locale-sensitive |
271 |
+ dnl libncursesw library first; if not found, or if no NLS support, then |
272 |
+ dnl check for libncurses. |
273 |
+@@ -2776,19 +2797,13 @@ if test x"$ac_cv_header_ncurses_h" = xyes; then |
274 |
+ ]) |
275 |
+ ]) |
276 |
+ |
277 |
+- else |
278 |
++ else |
279 |
+ AC_CHECK_LIB(ncurses, initscr, |
280 |
+ [ CURSES_LIBS="-lncurses" |
281 |
+ AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have ncurses]) |
282 |
+ ]) |
283 |
+ fi |
284 |
+-fi |
285 |
+- |
286 |
+-if test x"$enable_curses" != xno ; then |
287 |
+- AC_DEFINE(PR_USE_CURSES, 1, [Define if using curses support]) |
288 |
+-fi |
289 |
+ |
290 |
+-if test x"$enable_ncurses" != xno ; then |
291 |
+ dnl Check for the libtinfo library, which contains the halfdelay() curses |
292 |
+ dnl function on some systems (e.g. OpenSuSE); see Bug#3718. Note that on |
293 |
+ dnl some systems, this may need to be libtinfow instead; see Issue #1174. |
294 |
|
295 |
diff --git a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild |
296 |
index 17be3df4415..7ee4c7d7326 100644 |
297 |
--- a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild |
298 |
+++ b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild |
299 |
@@ -71,6 +71,7 @@ S="${WORKDIR}/${P/_/}" |
300 |
PATCHES=( |
301 |
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch |
302 |
"${FILESDIR}"/${P}-tinfow-segv.patch |
303 |
+ "${FILESDIR}"/${P}-no-ncurses.patch |
304 |
) |
305 |
|
306 |
RESTRICT=test # Some tests are ran in chroot. Confuse sandbox. |