diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/emul-linux-x86.eclass | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/emul-linux-x86.eclass')
-rw-r--r-- | eclass/emul-linux-x86.eclass | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/eclass/emul-linux-x86.eclass b/eclass/emul-linux-x86.eclass new file mode 100644 index 000000000000..80f6faf0129c --- /dev/null +++ b/eclass/emul-linux-x86.eclass @@ -0,0 +1,96 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# +# Original Author: Mike Doty <kingtaco@gentoo.org> +# Adapted from emul-libs.eclass +# Purpose: Providing a template for the app-emulation/emul-linux-* packages +# + +inherit eutils multilib + +case "${EAPI:-0}" in + 3|4|5) + EXPORT_FUNCTIONS src_prepare src_install + ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac + +DESCRIPTION="Provides precompiled 32bit libraries" +#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml" +HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html" +SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz" + +IUSE="+development" + +RESTRICT="strip" +S=${WORKDIR} + +QA_PREBUILT="*" + +SLOT="0" + +DEPEND=">=sys-apps/findutils-4.2.26" +RDEPEND="" + +emul-linux-x86_src_prepare() { + ALLOWED=${ALLOWED:-^${S}/etc/env.d} + use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig" + find "${S}" ! -type d ! '(' -name '*.so' -o -name '*.so.[0-9]*' -o -name '*.h' ')' | 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}"/* "${ED}"/ || die "copying files failed!" + + # Do not hardcode lib32, bug #429726 + local x86_libdir=$(get_abi_LIBDIR x86) + if [[ ${x86_libdir} != "lib32" ]] ; then + ewarn "Moving lib32/ to ${x86_libdir}/; some libs might not work" + mv "${D}"/usr/lib32 "${D}"/usr/${x86_libdir} || die + if [[ -d ${D}/lib32 ]] ; then + mv "${D}"/lib32 "${D}"/${x86_libdir} || die + fi + + pushd "${D}"/usr/${x86_libdir} >/dev/null + + # Fix linker script paths. + local ldscripts + if ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) ) ; then + sed -i \ + -e "s:/lib32/:/${x86_libdir}/:" \ + "${ldscripts[@]}" || die + fi + + # Rewrite symlinks (if need be). + local sym tgt + while read sym ; do + tgt=$(readlink "${sym}") + ln -sf "${tgt/lib32/${x86_libdir}}" "${sym}" || die + done < <(find -xtype l) + + popd >/dev/null + fi + + # Since header wrapping is added as part of gx86-multilib support, + # all packages involved install their own copies of i686* headers + # when built with abi_x86_32. + if [[ -d "${D}"/usr/include ]] && use abi_x86_32; then + rm -r "${D}"/usr/include || die + fi + # The same goes for ${CHOST}- multilib tool prefixing. + if path_exists "${D}"/usr/bin/i686-pc-linux-gnu-* && use abi_x86_32; then + rm "${D}"/usr/bin/i686-pc-linux-gnu-* || die + fi +} |