Browse Source

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.
stable/0.6
Christian Wiese 11 years ago committed by Christian Wiese
parent
commit
29bf33dad9
  1. 39
      network/bird/0001-tgetent.patch
  2. 5
      network/bird/bird.conf

39
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)

5
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)"

Loading…
Cancel
Save