# ChangeLog for dev-libs/nspr
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.175 2011/11/25 17:25:27 xarthisius Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.176 2012/01/10 02:14:37 anarchy Exp $
+
+*nspr-4.8.9-r1 (10 Jan 2012)
+
+ 10 Jan 2012; Jory A. Pratt <anarchy@gentoo.org> +nspr-4.8.9-r1.ebuild,
+ +files/nspr-4.8.9-link-flags.patch:
+ Ensure cflags are passed during linking, bug #365975
25 Nov 2011; Kacper Kowalik <xarthisius@gentoo.org> nspr-4.8.9.ebuild:
ppc64 stable wrt #388045
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
AUX nspr-4.6.1-config-1.patch 565 RMD160 62fef94c85f636249c83cb6f4a7cc00a71adf3f6 SHA1 51f8e14107dc2edc951377991e9a7d08757d0f91 SHA256 9ed8fd15102ef3de6d837d40ec5d73aef0ea45bf9059b4cf5ff1f47b6a519ed6
AUX nspr-4.6.1-config.patch 2722 RMD160 75701d5dbdd25a05a3bb43539bfa5f5ea850aabd SHA1 e8deaea05baf51eb6795db4e89ab89162d5d4632 SHA256 01bba00a314375cbb056c4e26e059515a6a0df92c62229799abca9f3fa9c7842
AUX nspr-4.8.3-aix-gcc.patch 3673 RMD160 01b03fb2be761c72dd3eb9c7e9f03bb9c3cf9efc SHA1 7919b736f4ebe12d8067ba400325487c06df3d04 SHA256 b801bc5e93c57e54a076f1b1ed85fc6c4d5d6f344e830929e0a2c4046930a17f
AUX nspr-4.8.3-aix-soname.patch 1164 RMD160 da8fe1e17cade02ab6a4862ef901dd6c1606a1e3 SHA1 7a919bf08fa9d7a68815cdceda9082f5db8be445 SHA256 cec2e8b1cdf9e81f6b36c7981a5cb017fbf18192586c00d3e80ad897917bfcaa
AUX nspr-4.8.4-darwin-install_name.patch 1102 RMD160 eb565bc36822129e05f2fa45aaa52284333f2aee SHA1 5f7a057a457c3176aa255dfe1503cb23b5f37f09 SHA256 ca17efc9a60f4372b5da9c29ddf1143726381b9825907f8e3162974224636fab
+AUX nspr-4.8.9-link-flags.patch 995 RMD160 68a140db428f707f9f8295757c55f343e0f774e3 SHA1 8885af906cd5d21d0d678b42e51b667568fb449a SHA256 f986c69ff6250f54eb291339ab5503e73cc5cc68af4c3c3ed5a25812bf47b610
DIST nspr-4.8.6.tar.gz 1202257 RMD160 31de6eeecd4cc2315cfb84d02cb9730cd3c09729 SHA1 54ca3cbe14cc8a2a59cb48d4961034ce35c8f223 SHA256 d9040bb01536fa63881c423c4fa831ea459696b32d2097f614842f824e1a9f6d
DIST nspr-4.8.7.tar.gz 1244150 RMD160 b9b71fad399949bb9faafa863d72483c3678ddc3 SHA1 34d9eb75b47a3d19b57ef1ed5aef2004e79b5fc4 SHA256 eb9459c31d43d1000fb1304f1e0cedab0bdac3c54c71988259c1ac10c1fe16a3
DIST nspr-4.8.8.tar.gz 1246068 RMD160 a058982a067fb3348b908eaf6f06f0ba17385c55 SHA1 f5fd346b0f5f6ceac3677ce18cb94490992717ad SHA256 92f3f4ded2ee313e396c180d5445cc3c718ff347d86c06b7bf14a1b5e049d4c9
EBUILD nspr-4.8.6.ebuild 3483 RMD160 a3736195b5aa341e925c9fa6f09df9d0e1c75b60 SHA1 a4c153ed5f97ca7d31a55b087f2423be690a48c0 SHA256 cf1ab1d37b4af5230a773400cadf3c46b0a66bceecca1c8b746328391bfff92b
EBUILD nspr-4.8.7.ebuild 3553 RMD160 62a91e0b411696afbe298416ceac40b4d125b984 SHA1 604e72352eed0d42357821a006ca46de0bee2b30 SHA256 edf7031ec2f6d8f861c695195e13c5c7c581e0b6898681e87a347301280ceada
EBUILD nspr-4.8.8.ebuild 3553 RMD160 eb3b82725a1035c5b0b1bac07fa67fbba3934a2a SHA1 a4a7d25b3d637b77c69dd03f4886922dbe0d8e4b SHA256 c178bf852a1fa2150716ff08ade3c6fb2755986bed4fbf44227f068d5e38b86c
+EBUILD nspr-4.8.9-r1.ebuild 3844 RMD160 52e80e692d4735f550396c04e4b2761a6a8e3a31 SHA1 184a163d7fd1dbcbf900e8f9f08e1d466661b7de SHA256 d0096709bcd28c5e3974e3d799b63383d6daf104d3a83da55ead9293629954c2
EBUILD nspr-4.8.9.ebuild 3784 RMD160 96ff3c68fff994bfa7f9a65ba9a71fd50c8d4e68 SHA1 07819d873d451306e6bf12270c86975dee0b8d71 SHA256 888de34db739f48ca4368827b97f91932efb81de781f686995016f346fb0607c
-MISC ChangeLog 22884 RMD160 d785b04cbd8482fef436a68a3d83cc65c774743c SHA1 0d8ba5bcc7ac503a40ad70f7654adf3af0e9b6f5 SHA256 94e61e16e0cd8abe80d9d6bdf75b90413507c4692b61925eac861c69fa92a8be
+MISC ChangeLog 23078 RMD160 ebfc0de80eb956f21da57f5563a6e0809337ce09 SHA1 5cdc5ed1b62ce1fdd2ad2ec82ccefb6fb14aef63 SHA256 300cc020bde11b4ad3d6f8dfc97aa196b4f522d5d4d91225f2efa327bed4e506
MISC metadata.xml 160 RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 SHA1 5015c07af2083f20f9552d7fb11afb5ea69af345 SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQIcBAEBCAAGBQJOz8+RAAoJEF0huFKJUZL5CTcP/jB1RbPxx0IoiUsEjNJwg68/
-m4Rp4Ly1T45oX8rx/Pc8F1DE6fkX9Y2RM57rhPmYfPew/h2/X3RWWx1p2YwONaj8
-4C7I7wQt3Od+69eSYd8I1m637a15lK4/4R9d/uhQfEmuUVFAVyCB/38vD3h8Eqo6
-lnMz22uiMU0rPaCRAavzdrGsIP1ALNey/rHeQt7o+gwgiMhML9ZYBwI1W+xlyr0i
-RyWqg3qmfAuU8a4Ra1Ntwy/pS4N1vcLim4ffCRmbJbkkHq58403BT15EQFx3iuyT
-SCQOEbo6uefWEfyKwHcjLVnfkG+OjRfn+wlprVeMyF75oRw5GeBG6ghLbzhzW3E1
-u5kByHhw+wV4hcM1j2KaEWNJDv00rNXz47O7ecA3Co/LJf6ohfq5F1GhgRBQHYqv
-HOkFnXVlJCyxSiUO0QJ/A48olhh6QAT4GvUuqE2dr0YQDMTV2GFk7h+01RCWA5KJ
-kHK8ML6gHeioEoN1OUS6Qpu/kgi1BaJiXOCvHX3La5VqlVe9udXba4KUqIfXNHaQ
-meVvqq/gNDxMDMHp32pCj+l0vnNQUgMfLHbZhqx5F/WcpieDZGfMw8m1wp7RkWuL
-I1U1RnpLF0PByfmTXX0mCSY92FBv2dBv7Br0bKKY4EcQPHGwUCx9eVW+MZ4D4h4u
-z0WfUN42yUh2rxVI91tc
-=VrRH
+iQEcBAEBAgAGBQJPC58PAAoJEIXV9xahDnCo9MEH/3rfs9IgqfvZAaNqIzI4A25o
+9GnGJpe2xIEaIN3QaJ+xPczYmh03IFpxsDmc/0RdX/hfTZHwguJYnc7X0C3AHtqT
+7L74Ym19qU6bRsdYWqEBreDgt6n8l4d4LDcwEMTbE877b8anVgXbLVv+3hxpKnFh
+lKgjvHJ8lhxy1bp3t9Ckv45vewYgyMfDxVs0+pw3l7Li8mCeTQqBjd6qIGG6V084
+VWjNbWsdT1xwG+knwFiCkEQxQhVNOPMtMOmlKUkOhpwU71RYekufkjMlktN4fqJy
+WbWT52CfneZhAUpqJ7VBpARKkKa4rjQxrrs8ZBOZwtWJs+SQ8olBmvPTmA/rtdY=
+=R/gF
-----END PGP SIGNATURE-----
--- /dev/null
+Use CFLAGS when linking. Some flags can add functionality to generated
+code that requires extra libs to be linked in (eg. libgomp when using
+autoparallelization). Other flags are required when building and linking
+(eg. -flto).
+
+https://bugs.gentoo.org/365975
+
+--- a/mozilla/nsprpub/config/autoconf.mk.in
++++ b/mozilla/nsprpub/config/autoconf.mk.in
+@@ -81,6 +81,7 @@ OS_DLLFLAGS = @OS_DLLFLAGS@
+ DLLFLAGS = @DLLFLAGS@
+ EXEFLAGS = @EXEFLAGS@
+ OPTIMIZER = @OPTIMIZER@
++LD_CFLAGS = @CFLAGS@
+
+ PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@
+ PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@
+--- a/mozilla/nsprpub/config/config.mk
++++ b/mozilla/nsprpub/config/config.mk
+@@ -72,7 +72,7 @@ NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+
+-LDFLAGS = $(OS_LDFLAGS)
++LDFLAGS = $(LD_CFLAGS) $(OS_LDFLAGS)
+
+ # Enable profile-guided optimization
+ ifdef MOZ_PROFILE_GENERATE
--- /dev/null
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.8.9-r1.ebuild,v 1.1 2012/01/10 02:14:37 anarchy Exp $
+
+EAPI=3
+
+inherit eutils multilib toolchain-funcs versionator
+
+MIN_PV="$(get_version_component_range 2)"
+
+DESCRIPTION="Netscape Portable Runtime"
+HOMEPAGE="http://www.mozilla.org/projects/nspr/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/${P}.tar.gz"
+
+LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug"
+
+src_prepare() {
+ mkdir build inst
+ epatch "${FILESDIR}"/${PN}-4.8-config.patch
+ epatch "${FILESDIR}"/${PN}-4.6.1-config-1.patch
+ epatch "${FILESDIR}"/${PN}-4.6.1-lang.patch
+ epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch
+ epatch "${FILESDIR}"/${PN}-4.8-pkgconfig-gentoo-3.patch
+ epatch "${FILESDIR}"/${PN}-4.7.1-solaris.patch
+ epatch "${FILESDIR}"/${PN}-4.7.4-solaris.patch
+ epatch "${FILESDIR}"/${PN}-4.8.3-aix-gcc.patch
+ # Patch needs updating
+ #epatch "${FILESDIR}"/${PN}-4.8.3-aix-soname.patch
+ epatch "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
+ epatch "${FILESDIR}"/${PN}-4.8.9-link-flags.patch
+ # make sure it won't find Perl out of Prefix
+ sed -i -e "s/perl5//g" mozilla/nsprpub/configure || die
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+ mozilla/nsprpub/config/rules.mk
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Fix pkgconfig for Darwin (no RPATH stuff)
+ sed -i -e 's/-Wl,-R${\?libdir}\?//' \
+ "${S}"/mozilla/nsprpub/config/nspr-config.in \
+ "${S}"/mozilla/nsprpub/config/nspr.pc.in || die
+ fi
+}
+
+src_configure() {
+ cd "${S}"/build
+
+ echo > "${T}"/test.c
+ $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o
+ case $(scanelf -BF'%M' "${T}"/test.o)$(scanmacho -BF'%M' "${T}"/test.o) in
+ ELFCLASS64*|POWERPC64*|X86_64*) myconf="${myconf} --enable-64bit";;
+ ELFCLASS32*|POWERPC*|I386*|ARM*) ;;
+ *) 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)"
+
+ ECONF_SOURCE="../mozilla/nsprpub" econf \
+ $(use_enable debug) \
+ $(use_enable !debug optimize) \
+ ${myconf} || die "econf failed"
+}
+
+src_compile() {
+ cd "${S}"/build
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "failed to build"
+}
+
+src_install () {
+ # Their build system is royally confusing, as usual
+ MINOR_VERSION=${MIN_PV} # Used for .so version
+ cd "${S}"/build
+ 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
+
+ local n=
+ # aix-soname.patch does this already
+ [[ ${CHOST} == *-aix* ]] ||
+ for file in *$(get_libname); do
+ n=${file%$(get_libname)}$(get_libname ${MINOR_VERSION})
+ mv ${file} ${n} || die "failed to mv files around"
+ ln -s ${n} ${file} || die "failed to symlink files."
+ if [[ ${CHOST} == *-darwin* ]]; then
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${n}" ${n} || die
+ fi
+ done
+
+ # install nspr-config
+ dobin "${S}"/build/config/nspr-config || die "failed to install nspr-config"
+
+ # create pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}"/build/config/nspr.pc || die "failed to insall nspr pkg-config file"
+
+ # Remove stupid files in /usr/bin
+ rm -f "${ED}"/usr/bin/prerr.properties || die "failed to cleanup unneeded files"
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "Please make sure you run revdep-rebuild after upgrade."
+ ewarn "This is *extremely* important to ensure your system nspr works properly."
+ ewarn
+}