summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-02-28 00:37:42 +0100
committerUlrich Müller <ulm@gentoo.org>2013-02-28 00:37:42 +0100
commita146e78296f239a43494151b1665989dc1113df6 (patch)
tree88ad4b3f5c2478bfee7de839dff6b6829ed71590
parentAdd a README file that can be included with the patchset tarballs. (diff)
downloademacs-patches-a146e78296f239a43494151b1665989dc1113df6.tar.gz
emacs-patches-a146e78296f239a43494151b1665989dc1113df6.tar.bz2
emacs-patches-a146e78296f239a43494151b1665989dc1113df6.zip
Fix build failure with separate tinfo library, bug 459458.emacs-24.2-patches-3emacs-23.4-patches-8
-rw-r--r--emacs/23.4/14_all_ncurses-tinfo.patch31
-rw-r--r--emacs/24.2/08_all_ncurses-tinfo.patch35
2 files changed, 66 insertions, 0 deletions
diff --git a/emacs/23.4/14_all_ncurses-tinfo.patch b/emacs/23.4/14_all_ncurses-tinfo.patch
new file mode 100644
index 0000000..7cd6165
--- /dev/null
+++ b/emacs/23.4/14_all_ncurses-tinfo.patch
@@ -0,0 +1,31 @@
+Fix runtime failure if built with separate tinfo library.
+https://bugs.gentoo.org/459458
+
+--- emacs-23.4-orig/configure.in
++++ emacs-23.4/configure.in
+@@ -2391,7 +2391,13 @@
+ # That is because we have not set up to link ncurses in lib-src.
+ # It's better to believe a function is not available
+ # than to expect to find it in ncurses.
+-AC_CHECK_LIB(ncurses, tparm)
++AC_SEARCH_LIBS(tparm, [ncurses tinfo],
++ [AC_DEFINE(HAVE_LIBNCURSES, 1,
++ [Define to 1 if you have the ncurses or tinfo library.])])
++if test "$ac_cv_search_tparm" = "-ltinfo"; then
++ LIBS_TINFO="-ltinfo"
++fi
++AC_SUBST(LIBS_TINFO)
+
+ case "$opsys" in
+ netbsd)
+--- emacs-23.4-orig/src/Makefile.in
++++ emacs-23.4/src/Makefile.in
+@@ -919,7 +919,7 @@
+ with GCC, we might need gnulib again after them. */
+
+ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
+- LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
++ LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP @LIBS_TINFO@ \
+ LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
+ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
+ $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
diff --git a/emacs/24.2/08_all_ncurses-tinfo.patch b/emacs/24.2/08_all_ncurses-tinfo.patch
new file mode 100644
index 0000000..e4a6117
--- /dev/null
+++ b/emacs/24.2/08_all_ncurses-tinfo.patch
@@ -0,0 +1,35 @@
+Fix build failure with separate tinfo library.
+Patch taken from upstream bzr (emacs-24 branch) and backported to 24.2.
+https://bugs.gentoo.org/459458
+http://debbugs.gnu.org/9741
+
+--- emacs-24.2-orig/configure.in
++++ emacs-24.2/configure.in
+@@ -2813,7 +2813,7 @@
+ ])
+ # Maybe curses should be tried earlier?
+ # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
+-for tputs_library in '' ncurses terminfo termcap curses; do
++for tputs_library in '' tinfo ncurses terminfo termcap curses; do
+ OLIBS=$LIBS
+ if test -z "$tputs_library"; then
+ LIBS_TERMCAP=
+@@ -2833,7 +2833,8 @@
+ AC_MSG_RESULT([$msg])
+ if test "X$msg" = Xno; then
+ AC_MSG_ERROR([The required function `tputs' was not found in any library.
+-These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
++The following libraries were tried (in order):
++ libtinfo, libncurses, libterminfo, libtermcap, libcurses
+ Please try installing whichever of these libraries is most appropriate
+ for your system, together with its header files.
+ For example, a libncurses-dev(el) or similar package.])
+@@ -2865,7 +2866,7 @@
+ ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
+ if test "x$HAVE_LIBNCURSES" = "xyes"; then
+ TERMINFO=yes
+- LIBS_TERMCAP="-lncurses"
++ test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses"
+ fi
+ ;;
+