diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-01-28 04:37:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-01-28 04:37:36 +0000 |
commit | 6b9cf96171388f4ad189248c9420843eaba61031 (patch) | |
tree | 07aac801ff6521c88842d3ed27ae729e9cf49575 /dev-libs/nspr | |
parent | use -l to set the macro dir when using autoconf-2.13 #448986 by Ryan Sleevi (diff) | |
download | gentoo-2-6b9cf96171388f4ad189248c9420843eaba61031.tar.gz gentoo-2-6b9cf96171388f4ad189248c9420843eaba61031.tar.bz2 gentoo-2-6b9cf96171388f4ad189248c9420843eaba61031.zip |
Clean up toolchain/cross-compiling logic.
(Portage version: 2.2.0_alpha159/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'dev-libs/nspr')
-rw-r--r-- | dev-libs/nspr/ChangeLog | 16 | ||||
-rw-r--r-- | dev-libs/nspr/nspr-4.9.4.ebuild | 43 |
2 files changed, 23 insertions, 36 deletions
diff --git a/dev-libs/nspr/ChangeLog b/dev-libs/nspr/ChangeLog index 2cc171c68b90..c46baf71a049 100644 --- a/dev-libs/nspr/ChangeLog +++ b/dev-libs/nspr/ChangeLog @@ -1,21 +1,9 @@ # ChangeLog for dev-libs/nspr # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.212 2013/01/21 16:27:50 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.213 2013/01/28 04:37:36 vapier Exp $ 21 Jan 2013; Agostino Sarubbo <ago@gentoo.org> nspr-4.9.4.ebuild: - Stable for sparc, wrt bug #450940 - - 21 Jan 2013; Agostino Sarubbo <ago@gentoo.org> nspr-4.9.4.ebuild: - Stable for ppc, wrt bug #450940 - - 21 Jan 2013; Agostino Sarubbo <ago@gentoo.org> nspr-4.9.4.ebuild: - Stable for ppc64, wrt bug #450940 - - 20 Jan 2013; Agostino Sarubbo <ago@gentoo.org> nspr-4.9.4.ebuild: - Stable for x86, wrt bug #450940 - - 20 Jan 2013; Agostino Sarubbo <ago@gentoo.org> nspr-4.9.4.ebuild: - Stable for amd64, wrt bug #450940 + Stable for sparc/ppc/ppc64/x86/amd64, wrt bug #450940 16 Jan 2013; Lars Wendler <polynomial-c@gentoo.org> nspr-4.9.1.ebuild, nspr-4.9.2.ebuild, nspr-4.9.2-r1.ebuild, nspr-4.9.4.ebuild: diff --git a/dev-libs/nspr/nspr-4.9.4.ebuild b/dev-libs/nspr/nspr-4.9.4.ebuild index 656ad6335eda..c6ae0fb6cb69 100644 --- a/dev-libs/nspr/nspr-4.9.4.ebuild +++ b/dev-libs/nspr/nspr-4.9.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.9.4.ebuild,v 1.9 2013/01/21 16:27:50 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.9.4.ebuild,v 1.10 2013/01/28 04:37:36 vapier Exp $ EAPI=3 WANT_AUTOCONF="2.1" @@ -47,35 +47,36 @@ src_prepare() { src_configure() { cd "${S}"/build + # We use the standard BUILD_xxx but nspr uses HOST_xxx + tc-export_build_env BUILD_CC + export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS} + tc-export AR CC CXX RANLIB + [[ ${CBUILD} != ${CHOST} ]] \ + && export CROSS_COMPILE=1 \ + || unset CROSS_COMPILE + + local myconf echo > "${T}"/test.c - $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o + ${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die case $(file "${T}"/test.o) in - *32-bit*x86-64*|*64-bit*|*ppc64*|*x86_64*) myconf="${myconf} --enable-64bit";; + *32-bit*x86-64*|*64-bit*|*ppc64*|*x86_64*) myconf+=" --enable-64bit";; *32-bit*|*ppc*|*i386*) ;; *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; esac - myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" - LC_ALL="C" ECONF_SOURCE="../mozilla/nsprpub" econf \ + # Ancient autoconf needs help finding the right tools. + LC_ALL="C" ECONF_SOURCE="../mozilla/nsprpub" \ + ac_cv_path_AR="${AR}" \ + econf \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ $(use_enable debug) \ $(use_enable !debug optimize) \ - ${myconf} || die "econf failed" + ${myconf} } src_compile() { cd "${S}"/build - if tc-is-cross-compiler; then - $(tc-getBUILD_CC) $BUILD_CFLAGS -DXP_UNIX ../mozilla/nsprpub/config/nsinstall.c \ - -o config/native-nsinstall || die "failed to build nsinstall" - $(tc-getBUILD_CC) $BUILD_CFLAGS -DXP_UNIX ../mozilla/nsprpub/config/now.c \ - -o config/native-now || die "failed to build now" - sed -s 's#/nsinstall$#/native-nsinstall#' -i config/autoconf.mk - for d in pr/src lib/libc/src lib/ds; do - sed -s 's#/now$#/native-now#' -i ${d}/Makefile - done - fi - emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \ - AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "failed to build" + emake || die "failed to build" } src_install () { @@ -85,10 +86,8 @@ src_install () { emake DESTDIR="${D}" install || die "emake install failed" cd "${ED}"/usr/$(get_libdir) - for file in *.a; do - einfo "removing static libraries as upstream has requested!" - rm -f ${file} || die "failed to remove static libraries." - done + einfo "removing static libraries as upstream has requested!" + rm -f *.a || die "failed to remove static libraries." local n= # aix-soname.patch does this already |