diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-07-22 18:10:54 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-07-22 18:10:54 +0000 |
commit | 0217b62c530a0427dfb6f8dc2bc44835b01ede66 (patch) | |
tree | acf51a326c3a7e005ce9c7e03e1fb9ec94b280de /eclass/emul-linux-x86.eclass | |
parent | Unmask USE='nat-pmp' and 'upnp' here. (diff) | |
download | gentoo-2-0217b62c530a0427dfb6f8dc2bc44835b01ede66.tar.gz gentoo-2-0217b62c530a0427dfb6f8dc2bc44835b01ede66.tar.bz2 gentoo-2-0217b62c530a0427dfb6f8dc2bc44835b01ede66.zip |
Support all current EAPIs and use xz as compressor for upcoming releases.
Diffstat (limited to 'eclass/emul-linux-x86.eclass')
-rw-r--r-- | eclass/emul-linux-x86.eclass | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/eclass/emul-linux-x86.eclass b/eclass/emul-linux-x86.eclass index 07c80127803c..731d2983f599 100644 --- a/eclass/emul-linux-x86.eclass +++ b/eclass/emul-linux-x86.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.8 2011/02/07 11:46:24 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.9 2011/07/22 18:10:54 pacho Exp $ # # Original Author: Mike Doty <kingtaco@gentoo.org> @@ -16,12 +16,24 @@ else IUSE="" fi -EXPORT_FUNCTIONS src_unpack src_install +case "${EAPI:-0}" in + 0|1) + EXPORT_FUNCTIONS src_unpack src_install + ;; + 2|3|4) + EXPORT_FUNCTIONS src_unpack src_prepare src_install + ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac -if version_is_at_least 20110129; then - SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2" +if version_is_at_least 20110722; then + SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz" else - SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2" + if version_is_at_least 20110129; then + SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2" + else + SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2" + fi fi DESCRIPTION="Provides precompiled 32bit libraries" @@ -39,13 +51,17 @@ RDEPEND="" emul-linux-x86_src_unpack() { unpack ${A} cd "${S}" + has ${EAPI:-0} 0 1 && emul-linux-x86_src_prepare +} +emul-linux-x86_src_prepare() { ALLOWED=${ALLOWED:-^${S}/etc/env.d} has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig" find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*' } emul-linux-x86_src_install() { + has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" for dir in etc/env.d etc/revdep-rebuild ; do if [[ -d "${S}"/${dir} ]] ; then for f in "${S}"/${dir}/* ; do @@ -57,5 +73,5 @@ emul-linux-x86_src_install() { # remove void directories find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null - cp -pPR "${S}"/* "${D}"/ || die "copying files failed!" + cp -pPR "${S}"/* "${ED}"/ || die "copying files failed!" } |