summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Doty <kingtaco@gentoo.org>2007-11-14 03:42:12 +0000
committerMike Doty <kingtaco@gentoo.org>2007-11-14 03:42:12 +0000
commit7899c1c8c9b2e8db9f0b52ba0bcaf9bb91d8e829 (patch)
treec73087b0d1988d0cd7e614cdfecf2fd695c16cca /eclass/emul-linux-x86.eclass
parentamd64 stable, bug 196803 (diff)
downloadgentoo-2-7899c1c8c9b2e8db9f0b52ba0bcaf9bb91d8e829.tar.gz
gentoo-2-7899c1c8c9b2e8db9f0b52ba0bcaf9bb91d8e829.tar.bz2
gentoo-2-7899c1c8c9b2e8db9f0b52ba0bcaf9bb91d8e829.zip
new app-emulation eclass for amd64
Diffstat (limited to 'eclass/emul-linux-x86.eclass')
-rw-r--r--eclass/emul-linux-x86.eclass48
1 files changed, 48 insertions, 0 deletions
diff --git a/eclass/emul-linux-x86.eclass b/eclass/emul-linux-x86.eclass
new file mode 100644
index 000000000000..f86e0fc56611
--- /dev/null
+++ b/eclass/emul-linux-x86.eclass
@@ -0,0 +1,48 @@
+# 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.1 2007/11/14 03:42:12 kingtaco Exp $
+
+#
+# Original Author: Mike Doty <kingtaco@gentoo.org>
+# Adapted from emul-libs.eclass
+# Purpose: Providing a template for the app-emulation/emul-linux-* packages
+#
+
+EXPORT_FUNCTIONS src_unpack src_install
+
+SRC_URI="mirror://gentoo/${PN}-${PVR}.tar.bz2"
+
+DESCRIPTION="Provides precompiled 32bit libraries"
+HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
+
+RESTRICT="strip"
+S=${WORKDIR}
+
+SLOT="0"
+IUSE=""
+
+DEPEND=">=sys-apps/findutils-4.2.26"
+RDEPEND=""
+
+emul-linux-x86_src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ ALLOWED=${ALLOWED:-^${S}/etc/env.d}
+ 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() {
+ for dir in etc/env.d etc/revdep-rebuild ; do
+ if [[ -d "${S}"/${dir} ]] ; then
+ for f in "${S}"/${dir}/* ; do
+ mv -f "$f"{,-emul}
+ done
+ fi
+ done
+
+ # remove void directories
+ find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
+
+ cp -pPR "${S}"/* "${D}"/ || die "copying files failed!"
+}