summaryrefslogtreecommitdiff
path: root/sys-libs/readline
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-14 01:05:40 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-14 01:05:40 +0100
commit76cba73c47c8694e74377004634daca18f2d9c08 (patch)
tree468603ebdc189bcfae77696162761b3be936baea /sys-libs/readline
parent6957f5c65b02bba533954eabc0b62f5de36be206 (diff)
gentoo resync : 14.04.2018
Diffstat (limited to 'sys-libs/readline')
-rw-r--r--sys-libs/readline/Manifest8
-rw-r--r--sys-libs/readline/files/readline-5.0-no_rpath.patch4
-rw-r--r--sys-libs/readline/files/readline-7.0-headers.patch4
-rw-r--r--sys-libs/readline/files/readline-7.0-mingw.patch152
-rw-r--r--sys-libs/readline/files/readline-7.0-missing-echo-proto.patch4
-rw-r--r--sys-libs/readline/readline-7.0_p3-r1.ebuild174
6 files changed, 337 insertions, 9 deletions
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
index b17ceef2a4ad..00366193d5c4 100644
--- a/sys-libs/readline/Manifest
+++ b/sys-libs/readline/Manifest
@@ -1,9 +1,10 @@
-AUX readline-5.0-no_rpath.patch 363 BLAKE2B fdb69d78351c67123fe48dfaff35f97878ec29a06a788a706c957ac0edd197acd1c96426f44885d8aebe7f5e7c1c91304fbd6d0606d21edefb59a1be05ffc8f1 SHA512 c0344c5b831433ad3a8499a91d36615e849a9b520f8ca35cd9cae6d5bc55729adbf97d003e335d210cb3806b2f39af273b4b5f98380dac371dc184053e245bb2
+AUX readline-5.0-no_rpath.patch 367 BLAKE2B a39663c6222f604acf0ea0a5b6e4a4c99097257727644d2e8b814377b0f9472a6cdba8ed6edacc61629a39458fb5905bb873474e72dd44ab3e7e78b330f451c5 SHA512 ce4a03fe5b60a1e785f35b6717c5e267a815e8fd1a1d59e527aa88f35709c457c1d7c505c34f63f0d32f8f1633eb66661e05e151e218ae5b74cec1d9ddc4ab92
AUX readline-6.2-rlfe-tgoto.patch 379 BLAKE2B 363dee5501fa9449eeee0647f1ae65106e28ad06af16c8aefe372a081eb5cd62b01a7cf2109ce5b3fc6577b6056f3a0206e3cc53f22d0a69f4d273930e3e2ab6 SHA512 1d2c3aafc949d92fdf6abbee60a60c80f0327f81694d5d8f3a166f1c24d37346caca3e72c9971106b96b2758a9a01269346954fe20bc381eb9da2e6a2737fc3c
AUX readline-6.3-fix-long-prompt-vi-search.patch 736 BLAKE2B 1439a22ce82d51dd7cfb4bd1436475dce1d566fb2cc592e8161400e62e2790eff4a21c0634ef99f5da75efb21583514b90d47bb574b97374239fbd7ebb13fde8 SHA512 ad5bb44ba00f6f5e355b95078209e2e51f8d8ba9a924d00ef6aa3286e09c15fe0024efa0817f9e6d86b7aecb73150fcd69d0051a0f7fb37475921478f62ce0e0
AUX readline-6.3-read-eof.patch 1913 BLAKE2B 85cbba295d21de00af7cfa361d7976aabfb1110d860256224138a1844288f869f5225c296800aba5f637c892a988f834dddf184d06d308ae3da94cccb00ee5c4 SHA512 99728e35d64b466e2bea570412eec719c70841d205a5190c0000bcae55cf3ac2d659ae18e57b4c332525261d83e160054800cd89f4009ce3c76d1c3b4ac27223
-AUX readline-7.0-headers.patch 576 BLAKE2B 21acf9f2b830bf9082e41043e9fac79e27c6aa1da153cdbf50a5c6a4e768a753a3b18a5ebaeffa80a32cf285a364940782a91ccef41072b0d50025a61c7d42f4 SHA512 51b7acaed6078ffe4bc4f3c2565d21c426d4507e9ae59b03bbbd5d4eeb956896e07929528d4070285c92e022f0eecb9fad86eadb694d845e3d49dc791b0b20ff
-AUX readline-7.0-missing-echo-proto.patch 492 BLAKE2B 024ce483d7eb9ac670adefb28cda1b0da995f33826335c3f79ebb1eff322e3d7682656a57119459037425c7fe09f7d6975a7fb9f0505105f1e559448ce661413 SHA512 481ff7fb7dbe5eaea24b378d12deb78b6cb3f80ef89239b9ac1bcf6fa4bf1d05bfc93c1bf24da0983bee6b4c2e2665bac6788ba23b74208d5ae67ec4c4a76d88
+AUX readline-7.0-headers.patch 550 BLAKE2B 82949940cda6d042923b3dde777fbd66643d80f4c2fd984eb11ef7f0fb48776ba8938d1c8be23087b328ce9b3ad0acd668f5bb4f0bda77b4a992119688a37191 SHA512 fec3d20e1581f35609a9d9f9ee1f48df8f9aa781e1a2cdcde2edf7d149624b5770867feb65a7ba142276d95a3133b768f5589e8041049aa0cf30068d0637b938
+AUX readline-7.0-mingw.patch 4464 BLAKE2B 00ca79f7ee128a78d76c3e0adcb8b51f6d3027718cc3a7b2b11660cd4aa9c61b4da15c893c9ad0595becf2c393c0d9e7597b5a772085bfc82974568c30f5b381 SHA512 f416f265c51f4cb05467c29c29abcaabf40ae29d66bb5d3288d35403ccc26903f2a22afef43382e39d7b13ba62732082c60d8f8d10abf7cf7955ee50fc23531b
+AUX readline-7.0-missing-echo-proto.patch 466 BLAKE2B 251660f1321a36231774d5f03fea971a047688918a8f6498e019cadca43314097aee89ef8a96b104a5382ba0baa1037d500143f4d66e881da76d23f9385faaa9 SHA512 a8458bf62c73f79b980f375b98b33a6fbef59dec28386cd5266e4742a9cf70673e567f999d5682e538a2a47388d6f123d8a4fe4cfe34f19c28d4dafd93a9e10a
DIST readline-4.3.tar.gz 961662 BLAKE2B a7267200b79c8010d08f8aaa4e0ed357eaddb970287b262404074a1e50b0d7865bcee5492730808dc998799a1b64685d3bd91fb7098d1da778e40a2364f16126 SHA512 4dbc4d9f16a453f8cf6adefb5723b0f35ef79b8db7dcdfcdd2d6465cb62ca961035e5e9547bfa46d4cb1370d738b042e0e10f9233c3751925c6bccab41e7d182
DIST readline-5.2.tar.gz 2037705 BLAKE2B df1012925f7cac8aa5d513097de97fa55c801993fbcf651e64468c0255cb27f7a2357613f8ab67791ab7799def57bde34376d3c41e65285689318f4b9cbedf84 SHA512 74318b32c56e888716bda2507228ecc374a24e85b2faeec4778227a9f04eb19de1fc8468c78746954c84f9e616a06dd0f8a4332ba4b438fefb7e222699baa379
DIST readline-6.3.tar.gz 2468560 BLAKE2B 24488ec141734c050ba985a93423692396f105619bae3ce5b109bc68a4f43862bcf3a6fb8d82fec1145d665cdb408765e179379bb35f008d09c441fa2e5739df SHA512 f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401
@@ -41,5 +42,6 @@ DIST readline70-003 1294 BLAKE2B 9473e18b582fba69cea83e3f5b9fa278dd8b05443254393
EBUILD readline-4.3_p5.ebuild 1541 BLAKE2B 15f7b523780d1b2b48ffec6ce2a9b18152c67efa28557f67b17f23dfd55a5a0712333f47b0348183a345a947aef53f184170b8c6470669bf7da58cedc05241b8 SHA512 3675fb0346094bf360035c5a9e3ffe1577b284024b0d5287a121999db7f81b5c40caddd9f71ec76c76d63216df6b094c98aeac0eb5ccbf9bde6d265506d0df03
EBUILD readline-5.2_p14.ebuild 1598 BLAKE2B c3ecb5f6130c10718b55db1a3e1d092cfce68d9b0f3cea3ccdf5fe673ebb5ed8efd043d0bf6d6800f432bb03d2c820debcadb6f7df1a0aa3580529bde04b5073 SHA512 bfcfdba85b3d11a3e977007e20ca5d023723aaaf62b03b216db86d8484ffaeeb268bf247f6fc3cb6222c67a9ad1591ef03e020dde08366c8c043e83b337af887
EBUILD readline-6.3_p8-r3.ebuild 4524 BLAKE2B 352f23a25d9b045ac18f91efee5f3482a2c5a77c6b5883acc971c5df1ecdb5d8ddeed02334760a715bd9d088a7a05352a3d8f6422da08943c5b1f41cf6d43dda SHA512 8ea86f96e4edf7255df8264d62fdd15c29682163512845d9df26a8e7c5961a98f5f7f00df5c8f2c659d690eacfe24d9cce35b1fa3a15ff7eb964d7f2d9357767
+EBUILD readline-7.0_p3-r1.ebuild 4853 BLAKE2B afc37cd6a51635a00add5b5b93e8df8dede30297fb9e4bd8a8ca27dc8ec447900c4437c0a5cea194c7ca064ee4d3a97871512ee514b2630db2d9551f14a69f52 SHA512 0d7d193777b82239531082564ca0d24012cdcd2f71e374a30a4230a809ba7dea8ddba0e2a4ec7fcee0b4600de2ae862180229d353795ecc6415d70b15d5e31ea
EBUILD readline-7.0_p3.ebuild 4611 BLAKE2B 46af5c49a46b96ee46508fa51d57f0398eb6c3c88a96b96a1226122340b66a72afecb8b0a008dfdfdb5cc773e41f9951e7c86b2388d6a244b1e1ef703a8a5268 SHA512 03d4d0cc432f642d42972587b436f56e4ddf165f7fd545d09e87da583ad5f234d97bc1f88471b5810b7e9442dd722b50390ba28167c5ebdd638e95b151700efa
MISC metadata.xml 394 BLAKE2B e4fee9daaa3d2c66a9425c988c855768ddb74af714f9e259fad1e3a470ab10af041ec8ca82d106fd967317e555a492b35723d60fa913ffac200212af14ca5ae1 SHA512 e27930a59d80535721eda0d3c481b1d13a66915c6d9552d960c9ac788f3dcdb0ef3fc411803a36cc98441ebbb8a4e0c1086bc2bda01511549fbf2921a7017784
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 624b2d7dea2b..befad63e4253 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-7.0-headers.patch b/sys-libs/readline/files/readline-7.0-headers.patch
index dfe4e22ad1ae..892ec21f51e5 100644
--- a/sys-libs/readline/files/readline-7.0-headers.patch
+++ b/sys-libs/readline/files/readline-7.0-headers.patch
@@ -9,8 +9,8 @@ Subject: [PATCH] include ctype.h for isdigit usage
diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
index 46a99aa62e30..13248db83048 100644
---- a/lib/readline/histexpand.c
-+++ b/lib/readline/histexpand.c
+--- a/histexpand.c
++++ b/histexpand.c
@@ -26,6 +26,7 @@
#endif
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 000000000000..f003038d2c0f
--- /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
index fe945be72530..cad3c8ca2c44 100644
--- a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch
+++ b/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch
@@ -2,8 +2,8 @@ https://lists.gnu.org/archive/html/bug-readline/2016-11/msg00000.html
fix from upstream
---- a/lib/readline/readline.h
-+++ b/lib/readline/readline.h
+--- 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));
diff --git a/sys-libs/readline/readline-7.0_p3-r1.ebuild b/sys-libs/readline/readline-7.0_p3-r1.ebuild
new file mode 100644
index 000000000000..ceeb39505bdc
--- /dev/null
+++ b/sys-libs/readline/readline-7.0_p3-r1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic multilib-minimal toolchain-funcs
+
+# 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
+
+LICENSE="GPL-3"
+SLOT="0/7" # subslot matches SONAME major
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+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
+)
+
+# Needed because we don't want the patches being unpacked
+# (which emits annoying and useless error messages)
+src_unpack() {
+ 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() {
+ # 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.
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --cache-file="${BUILD_DIR}"/config.cache
+ --with-curses
+ $(use_enable static-libs static)
+ )
+ 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() {
+ emake
+
+ 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
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ 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
+}
+pkg_preinst() {
+ # bug #29865
+ # Reappeared in #595324 with paludis so keeping this for now...
+ preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6}
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6}
+}