commit: 81b6cd73020f83450cdf666002a773d8c58b6f39 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Thu Dec 27 15:31:57 2018 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Thu Dec 27 15:31:57 2018 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=81b6cd73
sys-libs/readline: sync with gx86 Package-Manager: Portage-2.3.52.2-prefix, Repoman-2.3.12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> sys-libs/readline/Manifest | 6 + .../readline/files/readline-5.0-no_rpath.patch | 4 +- .../readline/files/readline-5.2-ia64hpux.patch | 4 +- .../files/readline-5.2-rlfe-aix-eff_uid.patch | 4 +- .../readline/files/readline-5.2-rlfe-hpux.patch | 4 +- .../readline/files/readline-6.0-rlfe-solaris.patch | 4 +- .../readline/files/readline-6.1-aix-expfull.patch | 6 +- .../readline/files/readline-6.1-aix-soname.patch | 6 +- sys-libs/readline/files/readline-7.0-headers.patch | 24 + sys-libs/readline/files/readline-7.0-libtool.patch | 745 +++++++++++++++++++++ sys-libs/readline/files/readline-7.0-mingw.patch | 152 +++++ .../files/readline-7.0-missing-echo-proto.patch | 14 + sys-libs/readline/readline-7.0_p5.ebuild | 215 ++++++ 13 files changed, 1174 insertions(+), 14 deletions(-) diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index 277d1db2f9..8b437c12ad 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -1,5 +1,6 @@ DIST host-libtool-0.1.0.tar.gz 388867 BLAKE2B e8bfd1212f39d6262721c4a12535799f4e3428b83f3174bac373c15813462950218dd689380ab8caaf84186b60c29a1fafadfa1c2d0e5cb7f76f6d1699bdcabc SHA512 d8764d7814abf06556fb6eb19c12c2de1d1dc9f2f325deae55606ddfcf88963d65713d6fbd1fae0ab1a0668d90f84204e1cdcbd557944660ab01ecfe3a824ca5 DIST readline-6.3.tar.gz 2468560 BLAKE2B 24488ec141734c050ba985a93423692396f105619bae3ce5b109bc68a4f43862bcf3a6fb8d82fec1145d665cdb408765e179379bb35f008d09c441fa2e5739df SHA512 f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401 +DIST readline-7.0.tar.gz 2910016 BLAKE2B 679b8aa7ce003017b729e6d8d4cb69d0f991578441a3e69005090079e61f6aa48b7ad4d0b1f34b6041528cf33254a1bf3ddb05b60db53a06e443d7922d49d0d4 SHA512 18243189d39bf0d4c8a76cddcce75243c1bae8824c686e9b6ba352667607e5b10c5feb79372a1093c1c388d821841670702e940df12eae94bcebdeed90047870 DIST readline63-001 1366 BLAKE2B 82af5be99597719329db3f1d6049e75a5654ccf6597cf557c71ad7ada0ac03be87381a7738931eb78716de65902ae87498f574b84150a69eae9cc308c4bfffdd SHA512 e70f89ca52a4eae7e1cddd70de6a7162252231ee029c89bb3fcb0f6c8c8b46c666be910c8b2eee72e96983ec2f1a23663694dc222f67228d82e8e4684f1504a2 DIST readline63-002 1297 BLAKE2B 5ace4a81381910ee48dee8cdbb2ca95a1bef2d1f8acca6d39a910c078c86de10a0fc29486939b336110ecb0281b3edb16e4b985f41e7ee161904728f289fff04 SHA512 4e23bd67433577e6e361d10a6c32768ea9e13b10e77493e565b870f56069b673fbcb0b860225f79fa9931845fc91d35c9a82c1385c23f8b757ebfd59f27851f4 DIST readline63-003 985 BLAKE2B cf2cda505b100d5f820d8bfc99eed6b50e65c92b6a495073352fc7385c6456478594e5c2dc293ce556b66853dff705050fb97982aa25fce452ae53d2cb272cf4 SHA512 6bfb84a5b980091b995e2b96bdf5680f97fe670e6cac1b8606d2d75a1ef922ff5bd4e73f029f7af98a115006b7ab7828146f2cd6986287543d8a29987c91dc12 @@ -8,3 +9,8 @@ DIST readline63-005 1664 BLAKE2B f98f62be8676aca81b91d919bc4eccfe40c382a8baab0e6 DIST readline63-006 1982 BLAKE2B ad6d16ff769eb8e367cf961ffe152c04778b046a04e4a62e0ce21d08fa16b0eca3d278dbdc274b082d24fa2ec959ffb62168ea7693b4de94b59a4526b1f0c4a2 SHA512 e9fbfa38d7b03ab2aff2e9e48918b85b4b67a729862ee47d1cc8e0aeb90c3224394a79f68829951e1377cae65742aa5385eae865f75e9c0b2e2abde42889431c DIST readline63-007 1428 BLAKE2B 60e64c2dd36457e3992cfbfbbcc261337e515be360a37d71b9de236c62c781f10f0ec37e4e196b4634e5d547edebbf915370091ca42fff873b78cd80cfe3a7f2 SHA512 abee331894846b360203a521d9a66fa02c03214120d5cafbd1cb4d680bd7bbef14321ae845dd67f7b5e8c87322801fd96fc9a5fd0ae026b41d98dc24a8949854 DIST readline63-008 1452 BLAKE2B 4e41c45be1479fba9f74bf9cedb8d1f6237e650962d5b45ea1a61cc48a8323a0fa60d76f68c011b6e7c73a1078b5ff80f9966e983b994f814d471d0efd9efde6 SHA512 8e30bbca3aa5cea8c2ee511abe0ec8f131608d74fe5ab24d68bcf452267f0f97446ed6e7cd482360876ce6c027280e4f4450cae05eb18f56046240f4c224841c +DIST readline70-001 1777 BLAKE2B ab217bd9d27f30351397db2b745cb33ac7e0ce18bbc00112bb87570da0f62ee0e8d182395c97e4ecc21af51e7e1e580ba48076de1095c556f0744475e4019821 SHA512 4402186905af8cd42c609d640c2e13b9ad61c7778e5a3fd2c2d9da301f0deab05b04d7836f31527262f44f406517823dbb18cb07f2c73931186c806b494699ec +DIST readline70-002 2953 BLAKE2B 47d729b1babe904855fe5d4f780a5b2153a743def527479c3cb82759cdee5bb4260be722e1050be680f5c0dd6dec8ca25c4c1ff557415abae6b3fac2bd481f0b SHA512 13d1489578508d4d2c3a1618024198a709dbce74a6bbf0f6d7ec67d2419c55bfec9f0ca9de0ed93f129d21d5c3a94307ccdc49408455bbb301c5e3a772b03185 +DIST readline70-003 1294 BLAKE2B 9473e18b582fba69cea83e3f5b9fa278dd8b0544325439307d2b4053cbeca8d2f008104bee181ae5d9405d702e6d3bcf26379c4d46e269906474c8544367b780 SHA512 eaf962a1480eb3870519017b81ecc5cef171e4c41fcf8c17da61ccbfd0379ed6bca85c17b03e2207ae4d51509f33fd010294c75f4bd0433a52118015d4160385 +DIST readline70-004 1501 BLAKE2B cebce69a21bee3a4d6a908de09f371d65eab6af51a8dc0f58fc915b916957db420252ce07b06703c05d984f62e1e849b6975f5444b2af6ba35ff7c939acf9d99 SHA512 7be41558eab3b88a3657f8589ecfaff0b8ee7f59083d385f50e8704fe830e05a50652a5feda19ff1f3cfd98bff4bb8e25e1637ec4dac8a618db9c8220a3d954e +DIST readline70-005 1641 BLAKE2B f720508f698b113c6328018f7e6e8775c7c79afc464047405a5c3dae017d611535017dfc2759c11483bb536fab1e9bf72c7a9d3c769b7aea3bd2cee9686bd522 SHA512 eeb27f4f9195cb905d5891f26480d58f59c885dde3457f7a30ff57760ac772e2333ee8aeae979214949f3b52030285b10db013e307ee7311abab677a4427e878 diff --git a/sys-libs/readline/files/readline-5.0-no_rpath.patch b/sys-libs/readline/files/readline-5.0-no_rpath.patch index 624b2d7dea..befad63e42 100644 --- a/sys-libs/readline/files/readline-5.0-no_rpath.patch +++ b/sys-libs/readline/files/readline-5.0-no_rpath.patch @@ -1,7 +1,7 @@ ripped from Fedora ---- support/shobj-conf -+++ support/shobj-conf +--- a/support/shobj-conf ++++ b/support/shobj-conf @@ -102,7 +102,7 @@ SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' diff --git a/sys-libs/readline/files/readline-5.2-ia64hpux.patch b/sys-libs/readline/files/readline-5.2-ia64hpux.patch index 6f0ed743ec..3c340e9f2b 100644 --- a/sys-libs/readline/files/readline-5.2-ia64hpux.patch +++ b/sys-libs/readline/files/readline-5.2-ia64hpux.patch @@ -1,5 +1,5 @@ ---- support/shobj-conf.orig 2008-02-06 09:37:12 +0100 -+++ support/shobj-conf 2008-02-06 09:38:30 +0100 +--- a/support/shobj-conf 2008-02-06 09:37:12 +0100 ++++ b/support/shobj-conf 2008-02-06 09:38:30 +0100 @@ -363,7 +363,10 @@ SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@' diff --git a/sys-libs/readline/files/readline-5.2-rlfe-aix-eff_uid.patch b/sys-libs/readline/files/readline-5.2-rlfe-aix-eff_uid.patch index 96f45b2305..cc6e730718 100644 --- a/sys-libs/readline/files/readline-5.2-rlfe-aix-eff_uid.patch +++ b/sys-libs/readline/files/readline-5.2-rlfe-aix-eff_uid.patch @@ -4,8 +4,8 @@ on pure luck that it is defined in one of the includes, just use the function that was made for this purpose of retrieving the value. ---- examples/rlfe/pty.c -+++ examples/rlfe/pty.c +--- a/examples/rlfe/pty.c ++++ b/examples/rlfe/pty.c @@ -70,7 +70,7 @@ # undef HAVE_SVR4_PTYS #endif diff --git a/sys-libs/readline/files/readline-5.2-rlfe-hpux.patch b/sys-libs/readline/files/readline-5.2-rlfe-hpux.patch index c491d39acd..2742b77217 100644 --- a/sys-libs/readline/files/readline-5.2-rlfe-hpux.patch +++ b/sys-libs/readline/files/readline-5.2-rlfe-hpux.patch @@ -1,5 +1,5 @@ ---- examples/rlfe/os.h.orig 2007-11-20 10:33:49 +0100 -+++ examples/rlfe/os.h 2007-11-20 10:36:25 +0100 +--- a/examples/rlfe/os.h 2007-11-20 10:33:49 +0100 ++++ b/examples/rlfe/os.h 2007-11-20 10:36:25 +0100 @@ -426,7 +426,7 @@ #define SIGCHLD SIGCLD #endif diff --git a/sys-libs/readline/files/readline-6.0-rlfe-solaris.patch b/sys-libs/readline/files/readline-6.0-rlfe-solaris.patch index 63fc2f32c2..cff94ebe15 100644 --- a/sys-libs/readline/files/readline-6.0-rlfe-solaris.patch +++ b/sys-libs/readline/files/readline-6.0-rlfe-solaris.patch @@ -1,8 +1,8 @@ <grob...@gentoo.org>: * Panic is just used, but never defined or included (at least not on Solaris) ---- examples/rlfe/pty.c -+++ examples/rlfe/pty.c +--- a/examples/rlfe/pty.c ++++ b/examples/rlfe/pty.c @@ -54,6 +54,11 @@ # include <sys/sysmacros.h> #endif /* sgi */ diff --git a/sys-libs/readline/files/readline-6.1-aix-expfull.patch b/sys-libs/readline/files/readline-6.1-aix-expfull.patch index b671cfe4cb..eada6fa6a7 100644 --- a/sys-libs/readline/files/readline-6.1-aix-expfull.patch +++ b/sys-libs/readline/files/readline-6.1-aix-expfull.patch @@ -1,9 +1,11 @@ +Michael Haubenwallner: + On AIX, -bexpall does not export symbols starting with '_', and we get ld: 0711-317 ERROR: Undefined symbol: _rl_echoing_p With -bexpfull, all symbols are exported. ---- support/shobj-conf.orig 2010-01-25 13:02:55 +0100 -+++ support/shobj-conf 2010-01-25 13:03:36 +0100 +--- a/support/shobj-conf 2010-01-25 13:02:55 +0100 ++++ b/support/shobj-conf 2010-01-25 13:03:36 +0100 @@ -265,7 +265,7 @@ aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by j...@cisco.com SHOBJ_CFLAGS=-fpic diff --git a/sys-libs/readline/files/readline-6.1-aix-soname.patch b/sys-libs/readline/files/readline-6.1-aix-soname.patch index 0c108e5798..82fb050978 100644 --- a/sys-libs/readline/files/readline-6.1-aix-soname.patch +++ b/sys-libs/readline/files/readline-6.1-aix-soname.patch @@ -1,10 +1,12 @@ +Michael Haubenwallner: + With a little help from my friend, the native-cctools wrapping ld to support '-soname' flag on AIX, we can provide full soname support there (#213277). However, this patch is not for upstream, as they cannot rely on that ld wrapper: They would have to do the aix-soname magic themself instead. ---- support/shobj-conf.orig 2011-02-08 11:53:20 +0100 -+++ support/shobj-conf 2011-02-08 11:57:14 +0100 +--- a/support/shobj-conf 2011-02-08 11:53:20 +0100 ++++ b/support/shobj-conf 2011-02-08 11:57:14 +0100 @@ -269,7 +269,7 @@ SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpfull' SHOBJ_XLDFLAGS='-G' diff --git a/sys-libs/readline/files/readline-7.0-headers.patch b/sys-libs/readline/files/readline-7.0-headers.patch new file mode 100644 index 0000000000..892ec21f51 --- /dev/null +++ b/sys-libs/readline/files/readline-7.0-headers.patch @@ -0,0 +1,24 @@ +From 4bc0aa68aff12a59628dd3c99a53360a9aa1ce93 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vap...@gentoo.org> +Date: Thu, 11 Aug 2016 17:49:27 +0800 +Subject: [PATCH] include ctype.h for isdigit usage + +--- + lib/readline/histexpand.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c +index 46a99aa62e30..13248db83048 100644 +--- a/histexpand.c ++++ b/histexpand.c +@@ -26,6 +26,7 @@ + #endif + + #include <stdio.h> ++#include <ctype.h> + + #if defined (HAVE_STDLIB_H) + # include <stdlib.h> +-- +2.9.0 + diff --git a/sys-libs/readline/files/readline-7.0-libtool.patch b/sys-libs/readline/files/readline-7.0-libtool.patch new file mode 100644 index 0000000000..5b436b4bdb --- /dev/null +++ b/sys-libs/readline/files/readline-7.0-libtool.patch @@ -0,0 +1,745 @@ +diff -ru readline-7.0.orig/examples/rlfe/Makefile.in readline-7.0/examples/rlfe/Makefile.in +--- readline-7.0.orig/examples/rlfe/Makefile.in 2009-02-22 23:27:18.000000000 +0000 ++++ readline-7.0/examples/rlfe/Makefile.in 2018-12-27 16:24:26.200061860 +0000 +@@ -49,7 +49,7 @@ + all: rlfe + + rlfe: $(OFILES) +- $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) ++ $(LTLINK) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OFILES) $(LIBS) + + rlfe-$(VERSION).tar.gz: + tar czf $@ $(CFILES) $(HFILES) $(EXTRA_DIST) +diff -ru readline-7.0.orig/shlib/Makefile.in readline-7.0/shlib/Makefile.in +--- readline-7.0.orig/shlib/Makefile.in 2015-07-13 00:41:58.000000000 +0000 ++++ readline-7.0/shlib/Makefile.in 2018-12-27 16:25:28.204577868 +0000 +@@ -78,14 +78,14 @@ + # changes to bash-maintain...@gnu.org. + # + SHOBJ_CC = @SHOBJ_CC@ +-SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +-SHOBJ_LD = @SHOBJ_LD@ ++SHOBJ_CFLAGS_shared = @SHOBJ_CFLAGS@ ++SHOBJ_LD_shared = @SHOBJ_LD@ + +-SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ +-SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ ++SHOBJ_LDFLAGS_shared = @SHOBJ_LDFLAGS@ ++SHOBJ_XLDFLAGS_shared = @SHOBJ_XLDFLAGS@ + SHOBJ_LIBS = @SHOBJ_LIBS@ + +-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ ++SHLIB_XLDFLAGS_shared = @SHLIB_XLDFLAGS@ + SHLIB_LIBS = @SHLIB_LIBS@ + + SHLIB_DOT = @SHLIB_DOT@ +@@ -95,7 +95,7 @@ + SHLIB_LIBVERSION = @SHLIB_LIBVERSION@ + SHLIB_DLLVERSION = @SHLIB_DLLVERSION@ + +-SHLIB_STATUS = @SHLIB_STATUS@ ++SHLIB_STATUS_shared = @SHLIB_STATUS@ + + TERMCAP_LIB = @TERMCAP_LIB@ + +@@ -109,13 +109,52 @@ + + CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) + +-.SUFFIXES: .so ++SHARED_TARGET = @SHARED_TARGET@ # using libtool when empty ++ ++SHLIB_STATUS_ = libtool ++SHLIB_STATUS = $(SHLIB_STATUS_$(SHARED_TARGET)) ++ ++SO_shared = so ++SO_ = lo # use libtool when SHARED_TARGET is empty ++SO = $(SO_$(SHARED_TARGET)) ++ ++LIBTOOL_ = libtool ++LIBTOOL = $(LIBTOOL_$(SHARED_TARGET)) ++ ++LTTAG_CC_ = --tag=CC ++LTCLEAN_ = $(LIBTOOL) --mode=clean ++LTCOMPILE_ = $(LIBTOOL) --mode=compile ++LTINSTALL_ = $(LIBTOOL) --mode=install ++LTLINK_ = $(LIBTOOL) --mode=link ++LTUNINSTALL_ = $(LIBTOOL) --mode=uninstall ++ ++SHOBJ_CFLAGS_ = ++SHOBJ_LD_ = $(SHOBJ_CC) ++SHOBJ_LDFLAGS_ = -shared -version-info `echo $(SHLIB_MAJOR)$(SHLIB_MINOR) | sed -e 's/\./:/g'` ++SHLIB_XLDFLAGS_ = -no-undefined -rpath $(libdir) ++ ++LTTAG_CC = $(LTTAG_CC_$(SHARED_TARGET)) ++LTCLEAN = $(LTCLEAN_$(SHARED_TARGET)) ++LTCOMPILE = $(LTCOMPILE_$(SHARED_TARGET)) ++LTINSTALL = $(LTINSTALL_$(SHARED_TARGET)) ++LTLINK = $(LTLINK_$(SHARED_TARGET)) ++LTUNINSTALL = $(LTUNINSTALL_$(SHARED_TARGET)) ++ ++SHOBJ_CFLAGS = $(SHOBJ_CFLAGS_$(SHARED_TARGET)) ++SHOBJ_LD = $(SHOBJ_LD_$(SHARED_TARGET)) ++SHOBJ_LDFLAGS = $(SHOBJ_LDFLAGS_$(SHARED_TARGET)) ++SHLIB_XLDFLAGS = $(LDFLAGS) $(SHLIB_XLDFLAGS_$(SHARED_TARGET)) ++ ++.SUFFIXES: .so .lo + + .c.so: + ${RM} $@ + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -o $*.o $< + $(MV) $*.o $@ + ++.c.lo: ++ $(LTCOMPILE) $(LTTAG_CC) $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -o $*.lo $< ++ + # The name of the main library target. + + SHARED_READLINE = $(SHLIB_LIBPREF)readline$(SHLIB_DOT)$(SHLIB_LIBVERSION) +@@ -147,16 +186,16 @@ + $(topdir)/rltypedefs.h $(topdir)/rlmbutil.h \ + $(topdir)/colors.h $(topdir)/parse-colors.h + +-SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so \ +- mbutil.so +-SHARED_TILDEOBJ = tilde.so +-SHARED_COLORSOBJ = colors.so parse-colors.so +-SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \ +- rltty.so complete.so bind.so isearch.so display.so signals.so \ +- util.so kill.so undo.so macro.so input.so callback.so terminal.so \ +- text.so nls.so misc.so \ ++SHARED_HISTOBJ = history.$(SO) histexpand.$(SO) histfile.$(SO) histsearch.$(SO) shell.$(SO) \ ++ mbutil.$(SO) ++SHARED_TILDEOBJ = tilde.$(SO) ++SHARED_COLORSOBJ = colors.$(SO) parse-colors.$(SO) ++SHARED_OBJ = readline.$(SO) vi_mode.$(SO) funmap.$(SO) keymaps.$(SO) parens.$(SO) search.$(SO) \ ++ rltty.$(SO) complete.$(SO) bind.$(SO) isearch.$(SO) display.$(SO) signals.$(SO) \ ++ util.$(SO) kill.$(SO) undo.$(SO) macro.$(SO) input.$(SO) callback.$(SO) terminal.$(SO) \ ++ text.$(SO) nls.$(SO) misc.$(SO) \ + $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) $(SHARED_COLORSOBJ) \ +- xmalloc.so xfree.so compat.so ++ xmalloc.$(SO) xfree.$(SO) compat.$(SO) + + ########################################################################## + +@@ -164,6 +203,8 @@ + + supported: $(SHARED_LIBS) + ++libtool: libreadline.la libhistory.la ++ + unsupported: + @echo "Your system and compiler (${host_os}-${CC}) are not supported by the" + @echo "${topdir}/support/shobj-conf script." +@@ -172,13 +213,15 @@ + @echo "Please send the changes you made to bash-maintain...@gnu.org" + @echo "for inclusion in future bash and readline releases." + ++libreadline.la \ + $(SHARED_READLINE): $(SHARED_OBJ) +- $(RM) $@ +- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS) ++ $(LTCLEAN) $(RM) $@ ++ $(LTLINK) $(LTTAG_CC) $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS) + +-$(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so xfree.so +- $(RM) $@ +- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS) ++libhistory.la \ ++$(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.$(SO) xfree.$(SO) ++ $(LTCLEAN) $(RM) $@ ++ $(LTLINK) $(LTTAG_CC) $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.$(SO) xfree.$(SO) $(SHLIB_LIBS) + + # Since tilde.c is shared between readline and bash, make sure we compile + # it with the right flags when it's built as part of readline +@@ -187,6 +230,9 @@ + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -DREADLINE_LIBRARY -c -o tilde.o $(topdir)/tilde.c + $(MV) tilde.o $@ + ++tilde.lo: tilde.c ++ $(LTCOMPILE) $(LTTAG_CC) $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -DREADLINE_LIBRARY -c -o tilde.lo $(topdir)/tilde.c ++ + installdirs: $(topdir)/support/mkdirs + -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir) + -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(bindir) +@@ -196,6 +242,10 @@ + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) + @echo install: you may need to run ldconfig + ++install-libtool: installdirs $(SHLIB_STATUS) ++ $(LTINSTALL) $(INSTALL_DATA) libhistory.la $(DESTDIR)$(libdir) ++ $(LTINSTALL) $(INSTALL_DATA) libreadline.la $(DESTDIR)$(libdir) ++ + install-unsupported: + @echo install: shared libraries not supported + +@@ -206,13 +256,17 @@ + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE) + @echo uninstall: you may need to run ldconfig + ++uninstall-libtool: ++ $(LTUNINSTALL) $(RM) $(DESTDIR)$(libdir)/libhistory.la ++ $(LTUNINSTALL) $(RM) $(DESTDIR)$(libdir)/libreadline.la ++ + uninstall-unsupported: + @echo uninstall: shared libraries not supported + + uninstall: uninstall-$(SHLIB_STATUS) + + clean mostlyclean: force +- $(RM) $(SHARED_OBJ) $(SHARED_LIBS) ++ $(LTCLEAN) $(RM) $(SHARED_OBJ) $(SHARED_LIBS) libreadline.la libhistory.la + + distclean maintainer-clean: clean + $(RM) Makefile +@@ -224,278 +278,278 @@ + .NOEXPORT: + + # Dependencies +-bind.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h +-bind.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-bind.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-bind.so: $(topdir)/rltypedefs.h +-bind.so: $(topdir)/tilde.h $(topdir)/history.h +-compat.so: ${BUILD_DIR}/config.h +-compat.so: $(topdir)/rlstdc.h $(topdir)/rltypedefs.h +-callback.so: $(topdir)/rlconf.h +-callback.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h +-callback.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-callback.so: $(topdir)/rltypedefs.h +-callback.so: $(topdir)/tilde.h +-complete.so: $(topdir)/ansi_stdlib.h $(topdir)/posixdir.h $(topdir)/posixstat.h +-complete.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-complete.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-complete.so: $(topdir)/rltypedefs.h +-complete.so: $(topdir)/tilde.h +-display.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h +-display.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-display.so: $(topdir)/tcap.h +-display.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-display.so: $(topdir)/rltypedefs.h +-display.so: $(topdir)/tilde.h $(topdir)/history.h +-funmap.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-funmap.so: $(topdir)/rltypedefs.h +-funmap.so: $(topdir)/rlconf.h $(topdir)/ansi_stdlib.h +-funmap.so: ${BUILD_DIR}/config.h $(topdir)/tilde.h +-histexpand.so: $(topdir)/ansi_stdlib.h +-histexpand.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h +-histexpand.so: ${BUILD_DIR}/config.h +-histfile.so: $(topdir)/ansi_stdlib.h +-histfile.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h +-histfile.so: ${BUILD_DIR}/config.h +-history.so: $(topdir)/ansi_stdlib.h +-history.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h +-history.so: ${BUILD_DIR}/config.h +-histsearch.so: $(topdir)/ansi_stdlib.h +-histsearch.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h +-histsearch.so: ${BUILD_DIR}/config.h +-input.so: $(topdir)/ansi_stdlib.h +-input.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-input.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-input.so: $(topdir)/rltypedefs.h +-input.so: $(topdir)/tilde.h +-isearch.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-isearch.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-isearch.so: $(topdir)/rltypedefs.h +-isearch.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h +-keymaps.so: $(topdir)/keymaps.h $(topdir)/chardefs.h $(topdir)/rlconf.h +-keymaps.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-keymaps.so: $(topdir)/rltypedefs.h +-keymaps.so: ${BUILD_DIR}/config.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h +-kill.so: $(topdir)/ansi_stdlib.h +-kill.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-kill.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-kill.so: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h +-macro.so: $(topdir)/ansi_stdlib.h +-macro.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-macro.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-macro.so: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h +-mbutil.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-mbutil.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h +-mbutil.so: $(topdir)/chardefs.h $(topdir)/rlstdc.h +-misc.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-misc.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-misc.so: $(topdir)/rltypedefs.h +-misc.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h +-nls.so: $(topdir)/ansi_stdlib.h +-nls.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++bind$(SO): $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h ++bind$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++bind$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++bind$(SO): $(topdir)/rltypedefs.h ++bind$(SO): $(topdir)/tilde.h $(topdir)/history.h ++compat$(SO): ${BUILD_DIR}/config.h ++compat$(SO): $(topdir)/rlstdc.h $(topdir)/rltypedefs.h ++callback$(SO): $(topdir)/rlconf.h ++callback$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h ++callback$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++callback$(SO): $(topdir)/rltypedefs.h ++callback$(SO): $(topdir)/tilde.h ++complete$(SO): $(topdir)/ansi_stdlib.h $(topdir)/posixdir.h $(topdir)/posixstat.h ++complete$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++complete$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++complete$(SO): $(topdir)/rltypedefs.h ++complete$(SO): $(topdir)/tilde.h ++display$(SO): $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h ++display$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++display$(SO): $(topdir)/tcap.h ++display$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++display$(SO): $(topdir)/rltypedefs.h ++display$(SO): $(topdir)/tilde.h $(topdir)/history.h ++funmap$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++funmap$(SO): $(topdir)/rltypedefs.h ++funmap$(SO): $(topdir)/rlconf.h $(topdir)/ansi_stdlib.h ++funmap$(SO): ${BUILD_DIR}/config.h $(topdir)/tilde.h ++histexpand$(SO): $(topdir)/ansi_stdlib.h ++histexpand$(SO): $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h ++histexpand$(SO): ${BUILD_DIR}/config.h ++histfile$(SO): $(topdir)/ansi_stdlib.h ++histfile$(SO): $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h ++histfile$(SO): ${BUILD_DIR}/config.h ++history$(SO): $(topdir)/ansi_stdlib.h ++history$(SO): $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h ++history$(SO): ${BUILD_DIR}/config.h ++histsearch$(SO): $(topdir)/ansi_stdlib.h ++histsearch$(SO): $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h ++histsearch$(SO): ${BUILD_DIR}/config.h ++input$(SO): $(topdir)/ansi_stdlib.h ++input$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++input$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++input$(SO): $(topdir)/rltypedefs.h ++input$(SO): $(topdir)/tilde.h ++isearch$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++isearch$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++isearch$(SO): $(topdir)/rltypedefs.h ++isearch$(SO): $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h ++keymaps$(SO): $(topdir)/keymaps.h $(topdir)/chardefs.h $(topdir)/rlconf.h ++keymaps$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++keymaps$(SO): $(topdir)/rltypedefs.h ++keymaps$(SO): ${BUILD_DIR}/config.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h ++kill$(SO): $(topdir)/ansi_stdlib.h ++kill$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++kill$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++kill$(SO): $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h ++macro$(SO): $(topdir)/ansi_stdlib.h ++macro$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++macro$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++macro$(SO): $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h ++mbutil$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++mbutil$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h ++mbutil$(SO): $(topdir)/chardefs.h $(topdir)/rlstdc.h ++misc$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++misc$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++misc$(SO): $(topdir)/rltypedefs.h ++misc$(SO): $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h ++nls$(SO): $(topdir)/ansi_stdlib.h ++nls$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h + nls.o: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h + nls.o: $(topdir)/rltypedefs.h + nls.o: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rlstdc.h +-parens.so: $(topdir)/rlconf.h ${BUILD_DIR}/config.h +-parens.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-parens.so: $(topdir)/rltypedefs.h +-parens.so: $(topdir)/tilde.h +-rltty.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-rltty.so: $(topdir)/rltty.h $(topdir)/tilde.h +-rltty.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-rltty.so: $(topdir)/rltypedefs.h +-savestring.so: ${BUILD_DIR}/config.h +-search.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-search.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-search.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h +-search.so: $(topdir)/rltypedefs.h +-signals.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-signals.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-signals.so: $(topdir)/history.h $(topdir)/tilde.h +-signals.so: $(topdir)/rltypedefs.h +-terminal.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-terminal.so: $(topdir)/tcap.h +-terminal.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-terminal.so: $(topdir)/tilde.h $(topdir)/history.h +-terminal.so: $(topdir)/rltypedefs.h +-text.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-text.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-text.so: $(topdir)/rltypedefs.h +-text.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h +-tilde.so: $(topdir)/ansi_stdlib.h ${BUILD_DIR}/config.h $(topdir)/tilde.h +-undo.so: $(topdir)/ansi_stdlib.h +-undo.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-undo.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-undo.so: $(topdir)/rltypedefs.h +-undo.so: $(topdir)/tilde.h $(topdir)/history.h +-util.so: $(topdir)/posixjmp.h $(topdir)/ansi_stdlib.h +-util.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-util.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-util.so: $(topdir)/rltypedefs.h $(topdir)/tilde.h +-vi_mode.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h +-vi_mode.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h +-vi_mode.so: $(topdir)/history.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h +-vi_mode.so: $(topdir)/rltypedefs.h +-xfree.so: ${BUILD_DIR}/config.h +-xfree.so: $(topdir)/ansi_stdlib.h +-xmalloc.so: ${BUILD_DIR}/config.h +-xmalloc.so: $(topdir)/ansi_stdlib.h +- +-bind.so: $(topdir)/rlshell.h +-histfile.so: $(topdir)/rlshell.h +-nls.so: $(topdir)/rlshell.h +-readline.so: $(topdir)/rlshell.h +-shell.so: $(topdir)/rlshell.h +-terminal.so: $(topdir)/rlshell.h +-histexpand.so: $(topdir)/rlshell.h +- +-colors.so: $(BUILD_DIR)/config.h $(topdir)/colors.h +-colors.so: $(topdir)/rlconf.h +-colors.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h +-colors.so: $(topdir)/chardefs.h $(topdir)/tilde.h $(topdir)/rlstdc.h +-colors.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h +-parse-colors.so: $(BUILD_DIR)/config.h $(topdir)/colors.h $(topdir)/parse-colors.h +-parse-colors.so: $(topdir)/rldefs.h $(topdir)/rlconf.h +-parse-colors.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h +-parse-colors.so: $(topdir)/chardefs.h $(topdir)/tilde.h $(topdir)/rlstdc.h +- +-bind.so: $(topdir)/rlprivate.h +-callback.so: $(topdir)/rlprivate.h +-complete.so: $(topdir)/rlprivate.h +-display.so: $(topdir)/rlprivate.h +-input.so: $(topdir)/rlprivate.h +-isearch.so: $(topdir)/rlprivate.h +-kill.so: $(topdir)/rlprivate.h +-macro.so: $(topdir)/rlprivate.h +-mbutil.so: $(topdir)/rlprivate.h +-misc.so: $(topdir)/rlprivate.h +-nls.so: $(topdir)/rlprivate.h +-parens.so: $(topdir)/rlprivate.h +-readline.so: $(topdir)/rlprivate.h +-rltty.so: $(topdir)/rlprivate.h +-search.so: $(topdir)/rlprivate.h +-signals.so: $(topdir)/rlprivate.h +-terminal.so: $(topdir)/rlprivate.h +-text.so: $(topdir)/rlprivate.h +-undo.so: $(topdir)/rlprivate.h +-util.so: $(topdir)/rlprivate.h +-vi_mode.so: $(topdir)/rlprivate.h +-colors.so: $(topdir)/rlprivate.h +-parse-colors.so: $(topdir)/rlprivate.h +- +-bind.so: $(topdir)/xmalloc.h +-callback.so: $(topdir)/xmalloc.h +-complete.so: $(topdir)/xmalloc.h +-display.so: $(topdir)/xmalloc.h +-funmap.so: $(topdir)/xmalloc.h +-histexpand.so: $(topdir)/xmalloc.h +-histfile.so: $(topdir)/xmalloc.h +-history.so: $(topdir)/xmalloc.h +-input.so: $(topdir)/xmalloc.h +-isearch.so: $(topdir)/xmalloc.h +-keymaps.so: $(topdir)/xmalloc.h +-kill.so: $(topdir)/xmalloc.h +-macro.so: $(topdir)/xmalloc.h +-mbutil.so: $(topdir)/xmalloc.h +-misc.so: $(topdir)/xmalloc.h +-readline.so: $(topdir)/xmalloc.h +-savestring.so: $(topdir)/xmalloc.h +-search.so: $(topdir)/xmalloc.h +-shell.so: $(topdir)/xmalloc.h +-terminal.so: $(topdir)/xmalloc.h +-text.so: $(topdir)/xmalloc.h +-tilde.so: $(topdir)/xmalloc.h +-undo.so: $(topdir)/xmalloc.h +-util.so: $(topdir)/xmalloc.h +-vi_mode.so: $(topdir)/xmalloc.h +-xfree.so: $(topdir)/xmalloc.h +-xmalloc.so: $(topdir)/xmalloc.h +-colors.so: $(topdir)/xmalloc.h +-parse-colors.so: $(topdir)/xmalloc.h +- +-complete.so: $(topdir)/rlmbutil.h +-display.so: $(topdir)/rlmbutil.h +-histexpand.so: $(topdir)/rlmbutil.h +-input.so: $(topdir)/rlmbutil.h +-isearch.so: $(topdir)/rlmbutil.h +-mbutil.so: $(topdir)/rlmbutil.h +-misc.so: $(topdir)/rlmbutil.h +-readline.so: $(topdir)/rlmbutil.h +-search.so: $(topdir)/rlmbutil.h +-text.so: $(topdir)/rlmbutil.h +-vi_mode.so: $(topdir)/rlmbutil.h +-colors.so: $(topdir)/rlmbutil.h +-parse-colors.so: $(topdir)/rlmbutil.h +- +-bind.so: $(topdir)/bind.c +-callback.so: $(topdir)/callback.c +-compat.so: $(topdir)/compat.c +-complete.so: $(topdir)/complete.c +-display.so: $(topdir)/display.c +-funmap.so: $(topdir)/funmap.c +-input.so: $(topdir)/input.c +-isearch.so: $(topdir)/isearch.c +-keymaps.so: $(topdir)/keymaps.c $(topdir)/emacs_keymap.c $(topdir)/vi_keymap.c +-kill.so: $(topdir)/kill.c +-macro.so: $(topdir)/macro.c +-mbutil.so: $(topdir)/mbutil.c +-misc.so: $(topdir)/mbutil.c +-nls.so: $(topdir)/nls.c +-parens.so: $(topdir)/parens.c +-readline.so: $(topdir)/readline.c +-rltty.so: $(topdir)/rltty.c +-savestring.so: $(topdir)/savestring.c +-search.so: $(topdir)/search.c +-shell.so: $(topdir)/shell.c +-signals.so: $(topdir)/signals.c +-terminal.so: $(topdir)/terminal.c +-text.so: $(topdir)/text.c +-tilde.so: $(topdir)/tilde.c +-undo.so: $(topdir)/undo.c +-util.so: $(topdir)/util.c +-vi_mode.so: $(topdir)/vi_mode.c +-xfree.so: $(topdir)/xfree.c +-xmalloc.so: $(topdir)/xmalloc.c +- +-histexpand.so: $(topdir)/histexpand.c +-histfile.so: $(topdir)/histfile.c +-history.so: $(topdir)/history.c +-histsearch.so: $(topdir)/histsearch.c +- +-bind.so: bind.c +-callback.so: callback.c +-comapt.so: compat.c +-complete.so: complete.c +-display.so: display.c +-funmap.so: funmap.c +-input.so: input.c +-isearch.so: isearch.c +-keymaps.so: keymaps.c emacs_keymap.c vi_keymap.c +-kill.so: kill.c +-macro.so: macro.c +-mbutil.so: mbutil.c +-misc.so: misc.c +-nls.so: nls.c +-parens.so: parens.c +-readline.so: readline.c +-rltty.so: rltty.c +-savestring.so: savestring.c +-search.so: search.c +-signals.so: signals.c +-shell.so: shell.c +-terminal.so: terminal.c +-text.so: text.c +-tilde.so: tilde.c +-undo.so: undo.c +-util.so: util.c +-vi_mode.so: vi_mode.c +-xfree.so: xfree.c +-xmalloc.so: xmalloc.c +- +-colors.so: colors.c +-parse-colors.so: parse-colors.c +- +-histexpand.so: histexpand.c +-histfile.so: histfile.c +-history.so: history.c +-histsearch.so: histsearch.c ++parens$(SO): $(topdir)/rlconf.h ${BUILD_DIR}/config.h ++parens$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++parens$(SO): $(topdir)/rltypedefs.h ++parens$(SO): $(topdir)/tilde.h ++rltty$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++rltty$(SO): $(topdir)/rltty.h $(topdir)/tilde.h ++rltty$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++rltty$(SO): $(topdir)/rltypedefs.h ++savestring$(SO): ${BUILD_DIR}/config.h ++search$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++search$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++search$(SO): $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h ++search$(SO): $(topdir)/rltypedefs.h ++signals$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++signals$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++signals$(SO): $(topdir)/history.h $(topdir)/tilde.h ++signals$(SO): $(topdir)/rltypedefs.h ++terminal$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++terminal$(SO): $(topdir)/tcap.h ++terminal$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++terminal$(SO): $(topdir)/tilde.h $(topdir)/history.h ++terminal$(SO): $(topdir)/rltypedefs.h ++text$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++text$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++text$(SO): $(topdir)/rltypedefs.h ++text$(SO): $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h ++tilde$(SO): $(topdir)/ansi_stdlib.h ${BUILD_DIR}/config.h $(topdir)/tilde.h ++undo$(SO): $(topdir)/ansi_stdlib.h ++undo$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++undo$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++undo$(SO): $(topdir)/rltypedefs.h ++undo$(SO): $(topdir)/tilde.h $(topdir)/history.h ++util$(SO): $(topdir)/posixjmp.h $(topdir)/ansi_stdlib.h ++util$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++util$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++util$(SO): $(topdir)/rltypedefs.h $(topdir)/tilde.h ++vi_mode$(SO): $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h ++vi_mode$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h ++vi_mode$(SO): $(topdir)/history.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h ++vi_mode$(SO): $(topdir)/rltypedefs.h ++xfree$(SO): ${BUILD_DIR}/config.h ++xfree$(SO): $(topdir)/ansi_stdlib.h ++xmalloc$(SO): ${BUILD_DIR}/config.h ++xmalloc$(SO): $(topdir)/ansi_stdlib.h ++ ++bind$(SO): $(topdir)/rlshell.h ++histfile$(SO): $(topdir)/rlshell.h ++nls$(SO): $(topdir)/rlshell.h ++readline$(SO): $(topdir)/rlshell.h ++shell$(SO): $(topdir)/rlshell.h ++terminal$(SO): $(topdir)/rlshell.h ++histexpand$(SO): $(topdir)/rlshell.h ++ ++colors$(SO): $(BUILD_DIR)/config.h $(topdir)/colors.h ++colors$(SO): $(topdir)/rlconf.h ++colors$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h ++colors$(SO): $(topdir)/chardefs.h $(topdir)/tilde.h $(topdir)/rlstdc.h ++colors$(SO): $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h ++parse-colors$(SO): $(BUILD_DIR)/config.h $(topdir)/colors.h $(topdir)/parse-colors.h ++parse-colors$(SO): $(topdir)/rldefs.h $(topdir)/rlconf.h ++parse-colors$(SO): $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h ++parse-colors$(SO): $(topdir)/chardefs.h $(topdir)/tilde.h $(topdir)/rlstdc.h ++ ++bind$(SO): $(topdir)/rlprivate.h ++callback$(SO): $(topdir)/rlprivate.h ++complete$(SO): $(topdir)/rlprivate.h ++display$(SO): $(topdir)/rlprivate.h ++input$(SO): $(topdir)/rlprivate.h ++isearch$(SO): $(topdir)/rlprivate.h ++kill$(SO): $(topdir)/rlprivate.h ++macro$(SO): $(topdir)/rlprivate.h ++mbutil$(SO): $(topdir)/rlprivate.h ++misc$(SO): $(topdir)/rlprivate.h ++nls$(SO): $(topdir)/rlprivate.h ++parens$(SO): $(topdir)/rlprivate.h ++readline$(SO): $(topdir)/rlprivate.h ++rltty$(SO): $(topdir)/rlprivate.h ++search$(SO): $(topdir)/rlprivate.h ++signals$(SO): $(topdir)/rlprivate.h ++terminal$(SO): $(topdir)/rlprivate.h ++text$(SO): $(topdir)/rlprivate.h ++undo$(SO): $(topdir)/rlprivate.h ++util$(SO): $(topdir)/rlprivate.h ++vi_mode$(SO): $(topdir)/rlprivate.h ++colors$(SO): $(topdir)/rlprivate.h ++parse-colors$(SO): $(topdir)/rlprivate.h ++ ++bind$(SO): $(topdir)/xmalloc.h ++callback$(SO): $(topdir)/xmalloc.h ++complete$(SO): $(topdir)/xmalloc.h ++display$(SO): $(topdir)/xmalloc.h ++funmap$(SO): $(topdir)/xmalloc.h ++histexpand$(SO): $(topdir)/xmalloc.h ++histfile$(SO): $(topdir)/xmalloc.h ++history$(SO): $(topdir)/xmalloc.h ++input$(SO): $(topdir)/xmalloc.h ++isearch$(SO): $(topdir)/xmalloc.h ++keymaps$(SO): $(topdir)/xmalloc.h ++kill$(SO): $(topdir)/xmalloc.h ++macro$(SO): $(topdir)/xmalloc.h ++mbutil$(SO): $(topdir)/xmalloc.h ++misc$(SO): $(topdir)/xmalloc.h ++readline$(SO): $(topdir)/xmalloc.h ++savestring$(SO): $(topdir)/xmalloc.h ++search$(SO): $(topdir)/xmalloc.h ++shell$(SO): $(topdir)/xmalloc.h ++terminal$(SO): $(topdir)/xmalloc.h ++text$(SO): $(topdir)/xmalloc.h ++tilde$(SO): $(topdir)/xmalloc.h ++undo$(SO): $(topdir)/xmalloc.h ++util$(SO): $(topdir)/xmalloc.h ++vi_mode$(SO): $(topdir)/xmalloc.h ++xfree$(SO): $(topdir)/xmalloc.h ++xmalloc$(SO): $(topdir)/xmalloc.h ++colors$(SO): $(topdir)/xmalloc.h ++parse-colors$(SO): $(topdir)/xmalloc.h ++ ++complete$(SO): $(topdir)/rlmbutil.h ++display$(SO): $(topdir)/rlmbutil.h ++histexpand$(SO): $(topdir)/rlmbutil.h ++input$(SO): $(topdir)/rlmbutil.h ++isearch$(SO): $(topdir)/rlmbutil.h ++mbutil$(SO): $(topdir)/rlmbutil.h ++misc$(SO): $(topdir)/rlmbutil.h ++readline$(SO): $(topdir)/rlmbutil.h ++search$(SO): $(topdir)/rlmbutil.h ++text$(SO): $(topdir)/rlmbutil.h ++vi_mode$(SO): $(topdir)/rlmbutil.h ++colors$(SO): $(topdir)/rlmbutil.h ++parse-colors$(SO): $(topdir)/rlmbutil.h ++ ++bind$(SO): $(topdir)/bind.c ++callback$(SO): $(topdir)/callback.c ++compat$(SO): $(topdir)/compat.c ++complete$(SO): $(topdir)/complete.c ++display$(SO): $(topdir)/display.c ++funmap$(SO): $(topdir)/funmap.c ++input$(SO): $(topdir)/input.c ++isearch$(SO): $(topdir)/isearch.c ++keymaps$(SO): $(topdir)/keymaps.c $(topdir)/emacs_keymap.c $(topdir)/vi_keymap.c ++kill$(SO): $(topdir)/kill.c ++macro$(SO): $(topdir)/macro.c ++mbutil$(SO): $(topdir)/mbutil.c ++misc$(SO): $(topdir)/mbutil.c ++nls$(SO): $(topdir)/nls.c ++parens$(SO): $(topdir)/parens.c ++readline$(SO): $(topdir)/readline.c ++rltty$(SO): $(topdir)/rltty.c ++savestring$(SO): $(topdir)/savestring.c ++search$(SO): $(topdir)/search.c ++shell$(SO): $(topdir)/shell.c ++signals$(SO): $(topdir)/signals.c ++terminal$(SO): $(topdir)/terminal.c ++text$(SO): $(topdir)/text.c ++tilde$(SO): $(topdir)/tilde.c ++undo$(SO): $(topdir)/undo.c ++util$(SO): $(topdir)/util.c ++vi_mode$(SO): $(topdir)/vi_mode.c ++xfree$(SO): $(topdir)/xfree.c ++xmalloc$(SO): $(topdir)/xmalloc.c ++ ++histexpand$(SO): $(topdir)/histexpand.c ++histfile$(SO): $(topdir)/histfile.c ++history$(SO): $(topdir)/history.c ++histsearch$(SO): $(topdir)/histsearch.c ++ ++bind$(SO): bind.c ++callback$(SO): callback.c ++comapt$(SO): compat.c ++complete$(SO): complete.c ++display$(SO): display.c ++funmap$(SO): funmap.c ++input$(SO): input.c ++isearch$(SO): isearch.c ++keymaps$(SO): keymaps.c emacs_keymap.c vi_keymap.c ++kill$(SO): kill.c ++macro$(SO): macro.c ++mbutil$(SO): mbutil.c ++misc$(SO): misc.c ++nls$(SO): nls.c ++parens$(SO): parens.c ++readline$(SO): readline.c ++rltty$(SO): rltty.c ++savestring$(SO): savestring.c ++search$(SO): search.c ++signals$(SO): signals.c ++shell$(SO): shell.c ++terminal$(SO): terminal.c ++text$(SO): text.c ++tilde$(SO): tilde.c ++undo$(SO): undo.c ++util$(SO): util.c ++vi_mode$(SO): vi_mode.c ++xfree$(SO): xfree.c ++xmalloc$(SO): xmalloc.c ++ ++colors$(SO): colors.c ++parse-colors$(SO): parse-colors.c ++ ++histexpand$(SO): histexpand.c ++histfile$(SO): histfile.c ++history$(SO): history.c ++histsearch$(SO): histsearch.c diff --git a/sys-libs/readline/files/readline-7.0-mingw.patch b/sys-libs/readline/files/readline-7.0-mingw.patch new file mode 100644 index 0000000000..f003038d2c --- /dev/null +++ b/sys-libs/readline/files/readline-7.0-mingw.patch @@ -0,0 +1,152 @@ +--- a/colors.c ++++ b/colors.c +@@ -37,6 +37,10 @@ + #include "posixstat.h" // stat related macros (S_ISREG, ...) + #include <fcntl.h> // S_ISUID + ++#ifndef S_ISDIR ++#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++#endif ++ + // strlen() + #if defined (HAVE_STRING_H) + # include <string.h> +@@ -182,12 +186,17 @@ _rl_print_color_indicator (const char *f + if (S_ISREG (mode)) + { + colored_filetype = C_FILE; +- ++#ifdef S_ISUID + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; +- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) ++ else ++#endif ++#ifdef S_ISGID ++ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; +- else if (is_colored (C_CAP) && 0) //f->has_capability) ++ else ++#endif ++ if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; +@@ -211,12 +220,16 @@ _rl_print_color_indicator (const char *f + colored_filetype = C_STICKY; + #endif + } ++#if defined (S_ISLNK) + else if (S_ISLNK (mode)) + colored_filetype = C_LINK; ++#endif + else if (S_ISFIFO (mode)) + colored_filetype = C_FIFO; ++#if defined (S_ISSOCK) + else if (S_ISSOCK (mode)) + colored_filetype = C_SOCK; ++#endif + else if (S_ISBLK (mode)) + colored_filetype = C_BLK; + else if (S_ISCHR (mode)) +--- a/histfile.c ++++ b/histfile.c +@@ -606,12 +606,14 @@ history_truncate_file (fname, lines) + history_lines_written_to_file = 0; + } + ++#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + r = chown (filename, finfo.st_uid, finfo.st_gid); ++#endif + + xfree (filename); + FREE (tempname); +@@ -753,12 +755,14 @@ mmap_error: + history_lines_written_to_file = 0; + } + ++#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + mode = chown (histname, finfo.st_uid, finfo.st_gid); ++#endif + + FREE (histname); + FREE (tempname); +--- a/input.c ++++ b/input.c +@@ -71,6 +71,10 @@ extern int errno; + #include "rlshell.h" + #include "xmalloc.h" + ++#if defined (__MINGW32__) ++#include <conio.h> ++#endif ++ + /* What kind of non-blocking I/O do we have? */ + #if !defined (O_NDELAY) && defined (O_NONBLOCK) + # define O_NDELAY O_NONBLOCK /* Posix style */ +--- a/posixstat.h ++++ b/posixstat.h +@@ -78,30 +78,44 @@ + + #if defined (S_IFBLK) && !defined (S_ISBLK) + #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ ++#elif !defined (S_IFBLK) ++#define S_ISBLK(m) 0 + #endif + + #if defined (S_IFCHR) && !defined (S_ISCHR) + #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ ++#elif !defined (S_IFCHR) ++#define S_ISCHR(m) 0 + #endif + + #if defined (S_IFDIR) && !defined (S_ISDIR) + #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ ++#elif !defined (S_IFDIR) ++#define S_ISDIR(m) 0 + #endif + + #if defined (S_IFREG) && !defined (S_ISREG) + #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ ++#elif !defined (S_IFREG) ++#define S_ISREG(m) 0 + #endif + + #if defined (S_IFIFO) && !defined (S_ISFIFO) + #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ ++#elif !defined (S_IFIFO) ++#define S_ISFIFO(m) 0 + #endif + + #if defined (S_IFLNK) && !defined (S_ISLNK) + #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ ++#elif !defined (S_IFLNK) ++#define S_ISLNK(m) 0 + #endif + + #if defined (S_IFSOCK) && !defined (S_ISSOCK) + #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ ++#elif !defined (S_IFSOCK) ++#define S_ISSOCK(m) 0 + #endif + + /* +@@ -137,6 +151,8 @@ + /* These are non-standard, but are used in builtins.c$symbolic_umask() */ + #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) + #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) ++#if defined(S_IXUSR) && defined(S_IXOTH) + #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) ++#endif + + #endif /* _POSIXSTAT_H_ */ diff --git a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch b/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch new file mode 100644 index 0000000000..cad3c8ca2c --- /dev/null +++ b/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch @@ -0,0 +1,14 @@ +https://lists.gnu.org/archive/html/bug-readline/2016-11/msg00000.html + +fix from upstream + +--- a/readline.h ++++ b/readline.h +@@ -413,6 +413,7 @@ + extern void rl_tty_set_default_bindings PARAMS((Keymap)); + extern void rl_tty_unset_default_bindings PARAMS((Keymap)); + ++extern int rl_tty_set_echoing PARAMS((int)); + extern int rl_reset_terminal PARAMS((const char *)); + extern void rl_resize_terminal PARAMS((void)); + extern void rl_set_screen_size PARAMS((int, int)); diff --git a/sys-libs/readline/readline-7.0_p5.ebuild b/sys-libs/readline/readline-7.0_p5.ebuild new file mode 100644 index 0000000000..2e3066f283 --- /dev/null +++ b/sys-libs/readline/readline-7.0_p5.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic multilib-minimal toolchain-funcs libtool ltprune + +# Official patches +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ +PLEVEL="${PV##*_p}" +MY_PV="${PV/_p*}" +MY_PV="${MY_PV/_/-}" +MY_P="${PN}-${MY_PV}" +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + [[ ${PLEVEL} -eq 0 ]] && return 1 + local opt=$1 + eval set -- {1..${PLEVEL}} + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" + done + fi +} + +DESCRIPTION="Another cute console display library" +HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" + +case ${PV} in + *_alpha*|*_beta*|*_rc*) + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" + ;; + *) + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" + ;; +esac + +HOSTLTV="0.1.0" +HOSTLT="host-libtool-${HOSTLTV}" +HOSTLT_URI="https://github.com/haubi/host-libtool/releases/download/v${HOSTLTV}/${HOSTLT}.tar.gz" +SRC_URI+=" ${HOSTLT_URI}" +HOSTLT_S=${WORKDIR}/${HOSTLT} + +LICENSE="GPL-3" +SLOT="0/7" # subslot matches SONAME major +KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs utils" + +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-5.0-no_rpath.patch + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 + "${FILESDIR}"/${PN}-7.0-headers.patch + "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch + "${FILESDIR}"/${PN}-7.0-mingw.patch + + "${FILESDIR}"/${PN}-5.2-rlfe-aix-eff_uid.patch + "${FILESDIR}"/${PN}-5.2-rlfe-hpux.patch + "${FILESDIR}"/${PN}-5.2-ia64hpux.patch + "${FILESDIR}"/${PN}-6.0-mint.patch + "${FILESDIR}"/${PN}-6.0-rlfe-solaris.patch + "${FILESDIR}"/${PN}-6.1-aix-soname.patch + "${FILESDIR}"/${PN}-6.1-aix-expfull.patch + "${FILESDIR}"/${PN}-6.3-interix.patch + "${FILESDIR}"/${PN}-6.3-darwin-shlib-versioning.patch + + "${FILESDIR}"/${PN}-7.0-libtool.patch # this enables building via libtool +) + +# Needed because we don't want the patches being unpacked +# (which emits annoying and useless error messages) +src_unpack() { + unpack ${HOSTLT}.tar.gz + S="${HOSTLT_S}" elibtoolize + unpack ${MY_P}.tar.gz +} + +src_prepare() { + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + default + + # Force ncurses linking. #71420 + # Use pkg-config to get the right values. #457558 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) + sed -i \ + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ + support/shobj-conf || die + sed -i \ + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ + examples/rlfe/configure || die + + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated + # objformat for years, so we don't want to rely on that. + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die + + ln -s ../.. examples/rlfe/readline || die # for local readline headers +} + +src_configure() { + mkdir -p "${WORKDIR}/${HOSTLT}-${ABI}" || die + cd "${WORKDIR}/${HOSTLT}-${ABI}" || die + ECONF_SOURCE="${HOSTLT_S}" econf $(use_enable static-libs static) + cd "${BUILD_DIR}" + + export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" + export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) + + # fix implicit decls with widechar funcs + append-cppflags -D_GNU_SOURCE + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free + + # Make sure configure picks a better ar than `ar`. #484866 + export ac_cv_prog_AR=$(tc-getAR) + + # Force the test since we used sed above to force it. + export bash_cv_termcap_lib=ncurses + + # Control cross-compiling cases when we know the right answer. + # In cases where the C library doesn't support wide characters, readline + # itself won't work correctly, so forcing the answer below should be OK. + if tc-is-cross-compiler ; then + use kernel_Winnt || export bash_cv_func_sigsetjmp='present' + export bash_cv_func_ctype_nonascii='yes' + export bash_cv_wcwidth_broken='no' #503312 + fi + + # This is for rlfe, but we need to make sure LDFLAGS doesn't change + # so we can re-use the config cache file between the two. + append-ldflags -L. + export LDFLAGS="-L${BUILD_DIR}/shlib ${LDFLAGS}" # search local dirs first + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myeconfargs=( + --cache-file="${BUILD_DIR}"/config.cache + --with-curses ++ --disable-shared # use libtool instead + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + mkdir -p examples/rlfe || die + cd examples/rlfe || die + ECONF_SOURCE="${S}"/examples/rlfe \ + econf --cache-file="${BUILD_DIR}"/config.cache + fi +} + +multilib_src_compile() { + export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" + export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) + emake shared + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + cd examples/rlfe || die + local l + for l in readline history ; do + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die + ln -s ../../lib${l}.a lib${l}.a || die + done + emake LTLINK='libtool --mode=link --tag=CC' + fi +} + +multilib_src_install() { + export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" + export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) + emake DESTDIR="${D}" install-shared + + if multilib_is_native_abi ; then + gen_usr_ldscript -a readline history #4411 + + if use utils && ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi + fi +} + +multilib_src_install_all() { + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs + dodoc USAGE + docinto ps + dodoc doc/*.ps + + prune_libtool_files --all +} +pkg_preinst() { + # bug #29865 + # Reappeared in #595324 with paludis so keeping this for now... + preserve_old_lib \ + /$(get_libdir)/lib{history,readline}$(get_libname 4) \ + /$(get_libdir)/lib{history,readline}$(get_libname 5) \ + /$(get_libdir)/lib{history,readline}$(get_libname 6) +} + +pkg_postinst() { + preserve_old_lib_notify \ + /$(get_libdir)/lib{history,readline}$(get_libname 4) \ + /$(get_libdir)/lib{history,readline}$(get_libname 5) \ + /$(get_libdir)/lib{history,readline}$(get_libname 6) +}