# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit libtool eutils flag-o-matic autotools multilib _prefix="/emul/linux/x86/usr" # this prevents this package to overwrite any 64bit version and seems to be convention among emul-linux-x86 packages. DESCRIPTION="32bit nls-disabled dev-libs/popt-1.7" HOMEPAGE="http://www.rpm.org/" SRC_URI="ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-1.7.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="~amd64" pkg_setup() { if ! has_m32 ; then eerror "Your compiler seems to be unable to compile 32bit code." eerror "Make sure you compile gcc with:" eerror " USE=multilib FEATURES=-sandbox" die "Cannot produce 32bit code" fi if has_multilib_profile ; then export ABI=x86 else append-flags -m32 || die "append-flags" append-ldflags -m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib || die "append-ldflags" fi } src_unpack() { unpack ${A} cd ${WORKDIR} mkdir ${P} # this way portage won't complain about missing directories cd "${WORKDIR}/popt-1.7" epatch "${FILESDIR}"/popt-1.7-missing-tests.patch epatch "${FILESDIR}"/popt-1.7-nls.patch eautomake elibtoolize } src_compile() { cd "${WORKDIR}/popt-1.7" econf "--prefix=${_prefix}" || die "configure failed" emake || die "emake failed" } src_install() { cd "${WORKDIR}/popt-1.7" make install DESTDIR="${D}" || die rm -R ${D}/usr/share/locale # Don't overwrite existing LC_MESSAGES with empty ones (this package is nls disabled, but a nls-aware 64bit version might be installed) }