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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.9
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.8 2011/02/07 11:46:24 pacho Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.9 2011/07/22 18:10:54 pacho Exp $
4 4
5# 5#
6# Original Author: Mike Doty <kingtaco@gentoo.org> 6# Original Author: Mike Doty <kingtaco@gentoo.org>
7# Adapted from emul-libs.eclass 7# Adapted from emul-libs.eclass
8# Purpose: Providing a template for the app-emulation/emul-linux-* packages 8# Purpose: Providing a template for the app-emulation/emul-linux-* packages
14 IUSE="development" 14 IUSE="development"
15else 15else
16 IUSE="" 16 IUSE=""
17fi 17fi
18 18
19case "${EAPI:-0}" in
20 0|1)
19EXPORT_FUNCTIONS src_unpack src_install 21 EXPORT_FUNCTIONS src_unpack src_install
22 ;;
23 2|3|4)
24 EXPORT_FUNCTIONS src_unpack src_prepare src_install
25 ;;
26 *) die "EAPI=${EAPI} is not supported" ;;
27esac
20 28
21if version_is_at_least 20110129; then 29if version_is_at_least 20110722; then
22 SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2" 30 SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz"
23else 31else
32 if version_is_at_least 20110129; then
33 SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2"
34 else
24 SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2" 35 SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2"
36 fi
25fi 37fi
26 38
27DESCRIPTION="Provides precompiled 32bit libraries" 39DESCRIPTION="Provides precompiled 32bit libraries"
28#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml" 40#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
29HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html" 41HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
37RDEPEND="" 49RDEPEND=""
38 50
39emul-linux-x86_src_unpack() { 51emul-linux-x86_src_unpack() {
40 unpack ${A} 52 unpack ${A}
41 cd "${S}" 53 cd "${S}"
54 has ${EAPI:-0} 0 1 && emul-linux-x86_src_prepare
55}
42 56
57emul-linux-x86_src_prepare() {
43 ALLOWED=${ALLOWED:-^${S}/etc/env.d} 58 ALLOWED=${ALLOWED:-^${S}/etc/env.d}
44 has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig" 59 has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
45 find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*' 60 find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
46} 61}
47 62
48emul-linux-x86_src_install() { 63emul-linux-x86_src_install() {
64 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
49 for dir in etc/env.d etc/revdep-rebuild ; do 65 for dir in etc/env.d etc/revdep-rebuild ; do
50 if [[ -d "${S}"/${dir} ]] ; then 66 if [[ -d "${S}"/${dir} ]] ; then
51 for f in "${S}"/${dir}/* ; do 67 for f in "${S}"/${dir}/* ; do
52 mv -f "$f"{,-emul} 68 mv -f "$f"{,-emul}
53 done 69 done
55 done 71 done
56 72
57 # remove void directories 73 # remove void directories
58 find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null 74 find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
59 75
60 cp -pPR "${S}"/* "${D}"/ || die "copying files failed!" 76 cp -pPR "${S}"/* "${ED}"/ || die "copying files failed!"
61} 77}

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20