/[gentoo-x86]/eclass/emul-linux-x86.eclass
Gentoo

Contents of /eclass/emul-linux-x86.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sun Jan 30 00:23:33 2011 UTC (3 years, 6 months ago) by pacho
Branch: MAIN
Changes since 1.6: +2 -2 lines
Fix 'development' handling.

1 kingtaco 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pacho 1.7 # $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.6 2011/01/29 21:46:33 pacho Exp $
4 kingtaco 1.1
5     #
6     # Original Author: Mike Doty <kingtaco@gentoo.org>
7     # Adapted from emul-libs.eclass
8     # Purpose: Providing a template for the app-emulation/emul-linux-* packages
9     #
10    
11 pacho 1.6 inherit versionator
12    
13     if version_is_at_least 20110129; then
14     IUSE="development"
15     else
16     IUSE=""
17     fi
18    
19 kingtaco 1.1 EXPORT_FUNCTIONS src_unpack src_install
20    
21 pacho 1.6 SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2"
22 kingtaco 1.1
23     DESCRIPTION="Provides precompiled 32bit libraries"
24 pacho 1.5 #HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
25     HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
26 kingtaco 1.1
27     RESTRICT="strip"
28 kingtaco 1.3 S=${WORKDIR}
29 kingtaco 1.1
30     SLOT="0"
31    
32     DEPEND=">=sys-apps/findutils-4.2.26"
33     RDEPEND=""
34    
35     emul-linux-x86_src_unpack() {
36     unpack ${A}
37     cd "${S}"
38    
39 pacho 1.7 ALLOWED=${ALLOWED:-^${S}/etc/env.d}
40 pacho 1.6 has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
41 kingtaco 1.1 find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
42     }
43    
44     emul-linux-x86_src_install() {
45     for dir in etc/env.d etc/revdep-rebuild ; do
46     if [[ -d "${S}"/${dir} ]] ; then
47     for f in "${S}"/${dir}/* ; do
48     mv -f "$f"{,-emul}
49     done
50     fi
51     done
52    
53     # remove void directories
54     find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
55    
56     cp -pPR "${S}"/* "${D}"/ || die "copying files failed!"
57     }

  ViewVC Help
Powered by ViewVC 1.1.20