Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/gawk/files: gawk-4.1.3-bsd_configure_readline.patch
Date: Tue, 30 Jun 2015 20:31:57
Message-Id: 20150630203153.BFB7B74B@oystercatcher.gentoo.org
1 polynomial-c 15/06/30 20:31:53
2
3 Added: gawk-4.1.3-bsd_configure_readline.patch
4 Log:
5 Fixed build with readline support on bsd (bug #507468)
6
7 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.1 sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch?rev=1.1&content-type=text/plain
14
15 Index: gawk-4.1.3-bsd_configure_readline.patch
16 ===================================================================
17 http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=ac0ef52fe407b89c7968b927c7b2b513cc13963a
18
19 --- gawk-4.1.3/configure 2015-05-19 09:38:35.000000000 -0400
20 +++ gawk-4.1.3/configure 2015-05-19 09:38:35.000000000 -0400
21 @@ -10832,7 +10832,46 @@
22
23 if test $_found_readline = yes ; then
24 case $host_os in
25 - *bsd* ) _combo="$_combo -ltermcap"
26 + *bsd* ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
27 +$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
28 +if ${ac_cv_lib_termcap_tgetent+:} false; then :
29 + $as_echo_n "(cached) " >&6
30 +else
31 + ac_check_lib_save_LIBS=$LIBS
32 +LIBS="-ltermcap $LIBS"
33 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34 +/* end confdefs.h. */
35 +
36 +/* Override any GCC internal prototype to avoid an error.
37 + Use char because int might match the return type of a GCC
38 + builtin and then its argument prototype would still apply. */
39 +#ifdef __cplusplus
40 +extern "C"
41 +#endif
42 +char tgetent ();
43 +int
44 +main ()
45 +{
46 +return tgetent ();
47 + ;
48 + return 0;
49 +}
50 +_ACEOF
51 +if ac_fn_c_try_link "$LINENO"; then :
52 + ac_cv_lib_termcap_tgetent=yes
53 +else
54 + ac_cv_lib_termcap_tgetent=no
55 +fi
56 +rm -f core conftest.err conftest.$ac_objext \
57 + conftest$ac_exeext conftest.$ac_ext
58 +LIBS=$ac_check_lib_save_LIBS
59 +fi
60 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
61 +$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
62 +if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
63 + _combo="$_combo -ltermcap"
64 +fi
65 +
66 ;;
67 esac
68
69 --- gawk-4.1.3/m4/readline.m4 2015-04-05 06:19:19.000000000 -0400
70 +++ gawk-4.1.3/m4/readline.m4 2015-04-05 06:19:19.000000000 -0400
71 @@ -92,7 +92,7 @@
72
73 if test $_found_readline = yes ; then
74 case $host_os in
75 - *bsd* ) _combo="$_combo -ltermcap"
76 + *bsd* ) AC_CHECK_LIB(termcap, tgetent, _combo="$_combo -ltermcap")
77 ;;
78 esac
79 AC_DEFINE(HAVE_LIBREADLINE,1,