From 29bf33dad9a2dd58efcb8fc3b7e2453cdf79ae55 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 14 Aug 2013 15:25:29 +0200 Subject: [PATCH] bird: fixed to build when using separated ncurses libs ncurses can be build as separate libraries, thus it is possible to have a separated libtinfo which has the symbol for tgetent. This patch is changing the order of library checks to find tgetent, thus that tinfo libs get checked before ncurses, so birdc will be linked against libtinfo and not libncurses which leads to linking problems. --- network/bird/0001-tgetent.patch | 39 +++++++++++++++++++++++++++++++++ network/bird/bird.conf | 5 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 network/bird/0001-tgetent.patch diff --git a/network/bird/0001-tgetent.patch b/network/bird/0001-tgetent.patch new file mode 100644 index 000000000..3167cf6ba --- /dev/null +++ b/network/bird/0001-tgetent.patch @@ -0,0 +1,39 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../bird/0001-tgetent.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +ncurses can be build as separate libraries, thus it is possible to have a +separated libtinfo which has the symbol for tgetent. +This patch is changing the order of library checks to find tgetent, thus +that tinfo libs get checked before ncurses, so birdc will be linked against +libtinfo and not libncurses which leads to linking problems. + +--- a/configure.in.orig 2013-08-14 14:50:49.234782556 +0200 ++++ b/configure.in 2013-08-14 14:53:21.847226753 +0200 +@@ -238,10 +238,10 @@ + if test "$enable_client" = yes ; then + CLIENT=birdc + AC_CHECK_LIB(history, add_history, CLIENT_LIBS="-lhistory") +- AC_CHECK_LIB(ncurses, tgetent, USE_TERMCAP_LIB=-lncurses, +- AC_CHECK_LIB(curses, tgetent, USE_TERMCAP_LIB=-lcurses, +- AC_CHECK_LIB(tinfow, tgetent, USE_TERMCAP_LIB=-ltinfow, +- AC_CHECK_LIB(tinfo, tgetent, USE_TERMCAP_LIB=-ltinfo ++ AC_CHECK_LIB(tinfow, tgetent, USE_TERMCAP_LIB=-ltinfow, ++ AC_CHECK_LIB(tinfo, tgetent, USE_TERMCAP_LIB=-ltinfo, ++ AC_CHECK_LIB(ncurses, tgetent, USE_TERMCAP_LIB=-lncurses, ++ AC_CHECK_LIB(curses, tgetent, USE_TERMCAP_LIB=-lcurses, + AC_CHECK_LIB(termcap, tgetent, USE_TERMCAP_LIB=-ltermcap))))) + AC_CHECK_LIB(readline, rl_callback_read_char, CLIENT_LIBS="-lreadline $CLIENT_LIBS $USE_TERMCAP_LIB", + AC_MSG_ERROR([[The client requires GNU readline library 2.1 or newer. Either install the library or use --disable-client to compile without the client.]]), $USE_TERMCAP_LIB) diff --git a/network/bird/bird.conf b/network/bird/bird.conf index a6af13f6d..f76eae0c0 100644 --- a/network/bird/bird.conf +++ b/network/bird/bird.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../bird/bird.conf -# Copyright (C) 2010 The OpenSDE Project +# Copyright (C) 2010 - 2013 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -12,6 +12,9 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +# we patch configure.in so tgetent() gets detected in libtinfo +hook_add preconf 9 'autoconf' + # disable the client if no readline package is available if ! pkginstalled readline; then echo_warning "Disabling BIRD client (readline not found)"