summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-01-05 11:20:30 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-01-05 11:20:30 +0000
commit4d2e4f1e36a4c86b21a43828d374ad9c8aeb03cd (patch)
treefd0cad964c0f2c705e37f0c550dd474713bd5b44 /sys-libs
parentChange patch names to fix compiling, bug 117841 (diff)
downloadgentoo-2-4d2e4f1e36a4c86b21a43828d374ad9c8aeb03cd.tar.gz
gentoo-2-4d2e4f1e36a4c86b21a43828d374ad9c8aeb03cd.tar.bz2
gentoo-2-4d2e4f1e36a4c86b21a43828d374ad9c8aeb03cd.zip
Add patch to complete rlfe linking when openpty() is in libutil.
(Portage version: 2529-svn)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/readline/ChangeLog8
-rw-r--r--sys-libs/readline/files/readline-5.1-rlfe-libutil.patch66
-rw-r--r--sys-libs/readline/readline-5.1-r2.ebuild3
3 files changed, 74 insertions, 3 deletions
diff --git a/sys-libs/readline/ChangeLog b/sys-libs/readline/ChangeLog
index bf0528c6d8b4..a09b540c346c 100644
--- a/sys-libs/readline/ChangeLog
+++ b/sys-libs/readline/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/readline
-# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/ChangeLog,v 1.58 2005/12/27 04:55:15 kanaka Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/ChangeLog,v 1.59 2006/01/05 11:20:30 flameeyes Exp $
+
+ 05 Jan 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/readline-5.1-rlfe-libutil.patch, readline-5.1-r2.ebuild:
+ Add patch to complete rlfe linking when openpty() is in libutil.
27 Dec 2005; Joel Martin <kanaka@gentoo.org> readline-5.1-r2.ebuild:
Cross-compile fix was partially backed out, put it back in.
diff --git a/sys-libs/readline/files/readline-5.1-rlfe-libutil.patch b/sys-libs/readline/files/readline-5.1-rlfe-libutil.patch
new file mode 100644
index 000000000000..14a1a155c1b9
--- /dev/null
+++ b/sys-libs/readline/files/readline-5.1-rlfe-libutil.patch
@@ -0,0 +1,66 @@
+On FreeBSD the openpty() function is provided by libutil. For this rason, it
+has to be linked in the final executable. The current test is broken because
+it sets LIBS but that variable never gets into the Makefile. To make simpler
+its handling, just set a LIBUTIL variable that would be empty where it's not
+needed and contains -lutil where needed.
+
+Index: readline-5.1/examples/rlfe/Makefile.in
+===================================================================
+--- readline-5.1.orig/examples/rlfe/Makefile.in
++++ readline-5.1/examples/rlfe/Makefile.in
+@@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+ #LDFLAGS = -L$(READLINE_DIR)
+ LDFLAGS = @LDFLAGS@ -L../..
+-LIBS = -lreadline -lhistory -lncurses
++LIBS = -lreadline -lhistory -lncurses @LIBUTIL@
+
+ CPP=@CPP@
+ CPP_DEPEND=$(CC) -MM
+Index: readline-5.1/examples/rlfe/configure.in
+===================================================================
+--- readline-5.1.orig/examples/rlfe/configure.in
++++ readline-5.1/examples/rlfe/configure.in
+@@ -251,9 +251,11 @@ AC_CHECK_FUNCS(getpt)
+ dnl check for openpty()
+ if test -z "$sysvr4ptys"; then
+ AC_CHECK_FUNCS(openpty,,
+-[AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
++[AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBUTIL="-lutil"])])
+ fi
+
++AC_SUBST(LIBUTIL)
++
+ AC_CHECKING(for ptyranges)
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+Index: readline-5.1/examples/rlfe/configure
+===================================================================
+--- readline-5.1.orig/examples/rlfe/configure
++++ readline-5.1/examples/rlfe/configure
+@@ -272,7 +272,7 @@ PACKAGE_STRING=
+ PACKAGE_BUGREPORT=
+
+ ac_unique_file="rlfe.c"
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK LIBUTIL WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -3805,7 +3805,7 @@ if test $ac_cv_lib_util_openpty = yes; t
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_OPENPTY 1
+ _ACEOF
+- LIBS="$LIBS -lutil"
++ LIBUTIL="-lutil"
+ fi
+
+ fi
+@@ -4908,6 +4908,7 @@ s,@OBJEXT@,$OBJEXT,;t t
+ s,@CPP@,$CPP,;t t
+ s,@EGREP@,$EGREP,;t t
+ s,@AWK@,$AWK,;t t
++s,@LIBUTIL@,$LIBUTIL,;t t
+ s,@WRITEPATH@,$WRITEPATH,;t t
+ s,@XTERMPATH@,$XTERMPATH,;t t
+ s,@LIBOBJS@,$LIBOBJS,;t t
diff --git a/sys-libs/readline/readline-5.1-r2.ebuild b/sys-libs/readline/readline-5.1-r2.ebuild
index 2a3a928d611f..809f5cf01f72 100644
--- a/sys-libs/readline/readline-5.1-r2.ebuild
+++ b/sys-libs/readline/readline-5.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-5.1-r2.ebuild,v 1.7 2006/01/03 06:34:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-5.1-r2.ebuild,v 1.8 2006/01/05 11:20:30 flameeyes Exp $
inherit eutils multilib toolchain-funcs
@@ -43,6 +43,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-cleanups.patch
epatch "${FILESDIR}"/${P}-rlfe-build.patch #116483
epatch "${FILESDIR}"/${P}-rlfe-uclibc.patch
+ epatch "${FILESDIR}/${P}-rlfe-libutil.patch"
ln -s ../.. examples/rlfe/readline