commit:     ca2e48ba82de7f4f4ae68742ce49463910de1988
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 23:20:21 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 23:28:13 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca2e48ba

sys-libs/readline: add multilib support to older SLOTs #563884

This makes the two old SLOTs look more like each other.  It drops the
CONF_LIBDIR hack as this seems to date back to really old versions of
portage.  There is no automatic logic in the configure scripts.

 sys-libs/readline/readline-4.3_p5.ebuild  | 26 +++++++++++++----------
 sys-libs/readline/readline-5.2_p14.ebuild | 34 ++++++++++++++-----------------
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/sys-libs/readline/readline-4.3_p5.ebuild 
b/sys-libs/readline/readline-4.3_p5.ebuild
index 986d744..416f92c 100644
--- a/sys-libs/readline/readline-4.3_p5.ebuild
+++ b/sys-libs/readline/readline-4.3_p5.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 # This version is just for the ABI .4 library
 
-inherit eutils flag-o-matic
+EAPI="5"
+
+inherit eutils multilib-minimal flag-o-matic
 
 # Official patches
 # See ftp://ftp.cwru.edu/pub/bash/readline-4.3-patches/
@@ -36,26 +38,28 @@ SLOT="${PV:0:1}"
 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
 IUSE=""
 
-RDEPEND=">=sys-libs/ncurses-5.2-r2"
+RDEPEND=">=sys-libs/ncurses-5.2-r2:0[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
 
 S=${WORKDIR}/${MY_P}
 
-src_unpack() {
-       unpack ${MY_P}.tar.gz
-       cd "${S}"
+src_prepare() {
        [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
        # force ncurses linking #71420
        sed -i -e 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncurses:' support/shobj-conf || 
die "sed"
 }
 
-src_compile() {
+multilib_src_configure() {
        append-cppflags -D_GNU_SOURCE
-       econf --with-curses --disable-static || die
-       emake -C shlib || die
+       ECONF_SOURCE=${S} \
+       econf --with-curses --disable-static
+}
+
+multilib_src_compile() {
+       emake -C shlib
 }
 
-src_install() {
-       emake -C shlib DESTDIR="${D}" install || die
+multilib_src_install() {
+       emake -C shlib DESTDIR="${D}" install
        rm -f "${D}"/usr/lib*/*.so
 }

diff --git a/sys-libs/readline/readline-5.2_p14.ebuild 
b/sys-libs/readline/readline-5.2_p14.ebuild
index 89f1802..814c028 100644
--- a/sys-libs/readline/readline-5.2_p14.ebuild
+++ b/sys-libs/readline/readline-5.2_p14.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 # This version is just for the ABI .5 library
 
-inherit eutils multilib flag-o-matic
+EAPI="5"
+
+inherit eutils multilib-minimal flag-o-matic
 
 # Official patches
 # See ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/
@@ -36,35 +38,29 @@ SLOT="${PV:0:1}"
 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 
~sparc-fbsd ~x86-fbsd"
 IUSE=""
 
-RDEPEND=">=sys-libs/ncurses-5.2-r2"
+RDEPEND=">=sys-libs/ncurses-5.2-r2:0[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
 
 S=${WORKDIR}/${MY_P}
 
-src_unpack() {
-       unpack ${MY_P}.tar.gz
-       cd "${S}"
+src_prepare() {
        [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
        epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
        # force ncurses linking #71420
        sed -i -e 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncurses:' support/shobj-conf || 
die "sed"
 }
 
-src_compile() {
-       append-flags -D_GNU_SOURCE
+multilib_src_configure() {
+       append-cppflags -D_GNU_SOURCE
+       ECONF_SOURCE=${S} \
+       econf --with-curses --disable-static
+}
 
-       # the --libdir= is needed because if lib64 is a directory, it will 
default
-       # to using that... even if CONF_LIBDIR isnt set or we're using a version
-       # of portage without CONF_LIBDIR support.
-       econf \
-               --with-curses \
-               --disable-static \
-               --libdir=/usr/$(get_libdir) \
-               || die
-       emake -C shlib || die
+multilib_src_compile() {
+       emake -C shlib
 }
 
-src_install() {
-       emake -C shlib DESTDIR="${D}" install || die
+multilib_src_install() {
+       emake -C shlib DESTDIR="${D}" install
        rm -f "${D}"/usr/lib*/*.so
 }

Reply via email to