Hi all,
I recently worked on the app-emulation/emul-linux-x86-* packages and
used almost identical code snipplets in them, so I realized I might as
well put together an eclass and drop the duplication. The eclass would
provide a common template for the following packages:
app-emulation/emul-linux-x86-baselibs
app-emulation/emul-linux-x86-compat
app-emulation/emul-linux-x86-gtklibs
app-emulation/emul-linux-x86-medialibs
app-emulation/emul-linux-x86-qtlibs
app-emulation/emul-linux-x86-sdl
app-emulation/emul-linux-x86-soundlibs
app-emulation/emul-linux-x86-xlibs
Thanks for any feedback,
--
Kind Regards,
Simon Stelling
Gentoo/AMD64 developer
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Original Author: Simon Stelling <[EMAIL PROTECTED]>
# Purpose: Providing a template for the app-emulation/emul-linux-* packages
#
ECLASS="emul-libs"
EXPORT_FUNCTIONS src_unpack src_install
DESCRIPTION="Provides precompiled 32bit libraries"
HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
RESTRICT="nostrip"
S=${WORKDIR}
SLOT="0"
IUSE=""
DEPEND=""
emul-libs_src_unpack() {
einfo "Note: You can safely ignore the 'trailing garbage after EOF'"
einfo " warnings below"
unpack ${A}
cd "${S}"
ALLOWED=${ALLOWED:-^${S}/etc/env.d}
find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs
-d '
' rm -f || die 'failed to remove everything but *.so*'
}
emul-libs_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 | xargs rmdir 2&>/dev/null
cp -a "${S}"/* "${D}"/ || die "copying files failed!"
}