/[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.13 - (hide annotations) (download)
Sun Oct 28 09:43:49 2012 UTC (23 months, 3 weeks ago) by pacho
Branch: MAIN
Changes since 1.12: +9 -1 lines
Do not hardcode lib32, bug #429726 by SpanKY.

1 axs 1.11 # Copyright 1999-2012 Gentoo Foundation
2 kingtaco 1.1 # Distributed under the terms of the GNU General Public License v2
3 pacho 1.12 # $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.11 2012/09/27 16:35:41 axs 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.13 inherit multilib versionator
12 pacho 1.6
13     if version_is_at_least 20110129; then
14     IUSE="development"
15     else
16     IUSE=""
17     fi
18    
19 pacho 1.9 case "${EAPI:-0}" in
20     0|1)
21     EXPORT_FUNCTIONS src_unpack src_install
22     ;;
23 axs 1.11 2|3|4|5)
24 pacho 1.9 EXPORT_FUNCTIONS src_unpack src_prepare src_install
25     ;;
26     *) die "EAPI=${EAPI} is not supported" ;;
27     esac
28 kingtaco 1.1
29 pacho 1.9 if version_is_at_least 20110722; then
30     SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz"
31 pacho 1.8 else
32 pacho 1.9 if version_is_at_least 20110129; then
33     SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2"
34     else
35     SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2"
36     fi
37 pacho 1.8 fi
38 kingtaco 1.1
39     DESCRIPTION="Provides precompiled 32bit libraries"
40 pacho 1.5 #HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
41     HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
42 kingtaco 1.1
43     RESTRICT="strip"
44 kingtaco 1.3 S=${WORKDIR}
45 kingtaco 1.1
46 pacho 1.12 QA_PREBUILT="*"
47    
48 kingtaco 1.1 SLOT="0"
49    
50     DEPEND=">=sys-apps/findutils-4.2.26"
51     RDEPEND=""
52    
53     emul-linux-x86_src_unpack() {
54     unpack ${A}
55     cd "${S}"
56 pacho 1.9 has ${EAPI:-0} 0 1 && emul-linux-x86_src_prepare
57     }
58 kingtaco 1.1
59 pacho 1.9 emul-linux-x86_src_prepare() {
60 pacho 1.7 ALLOWED=${ALLOWED:-^${S}/etc/env.d}
61 pacho 1.6 has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
62 kingtaco 1.1 find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
63     }
64    
65     emul-linux-x86_src_install() {
66 pacho 1.9 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
67 kingtaco 1.1 for dir in etc/env.d etc/revdep-rebuild ; do
68     if [[ -d "${S}"/${dir} ]] ; then
69     for f in "${S}"/${dir}/* ; do
70     mv -f "$f"{,-emul}
71     done
72     fi
73     done
74    
75     # remove void directories
76     find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
77    
78 pacho 1.9 cp -pPR "${S}"/* "${ED}"/ || die "copying files failed!"
79 pacho 1.13
80     # Do not hardcode lib32, bug #429726
81     local x86_libdir=$(get_abi_LIBDIR x86)
82     if [[ ${x86_libdir} != "lib32" ]] ; then
83     ewarn "Moving lib32/ to ${x86_libdir}/; some libs might not work"
84     mv "${D}"/usr/lib32 "${D}"/usr/${x86_libdir} || die
85     mv "${D}"/lib32 "${D}"/${x86_libdir} || die
86     fi
87 kingtaco 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20