diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2010-07-21 14:21:02 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2010-07-21 14:21:02 +0000 |
commit | 716883484417063c2395a9df81ca59caf3bb87a9 (patch) | |
tree | c45229f6756633cfcda3a929b65e989d9bdee5b0 /dev-libs | |
parent | x86 stable wrt bug #329265 (diff) | |
download | gentoo-2-716883484417063c2395a9df81ca59caf3bb87a9.tar.gz gentoo-2-716883484417063c2395a9df81ca59caf3bb87a9.tar.bz2 gentoo-2-716883484417063c2395a9df81ca59caf3bb87a9.zip |
Migrate changes from Gentoo Prefix overlay. Convert to EAPI3, add patch, etc. Approved by mozilla team in IRC, reference bug 328127
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/nss/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/nss/files/nss-3.12.4-solaris-gcc.patch | 33 | ||||
-rw-r--r-- | dev-libs/nss/nss-3.12.6-r2.ebuild | 59 |
3 files changed, 77 insertions, 22 deletions
diff --git a/dev-libs/nss/ChangeLog b/dev-libs/nss/ChangeLog index 3f68516efbaa..b11471b8bdf9 100644 --- a/dev-libs/nss/ChangeLog +++ b/dev-libs/nss/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/nss # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.182 2010/07/02 09:15:31 gmsoft Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.183 2010/07/21 14:21:02 darkside Exp $ + + 21 Jul 2010; Jeremy Olexa <darkside@gentoo.org> + +files/nss-3.12.4-solaris-gcc.patch, nss-3.12.6-r2.ebuild: + Migrate changes from Gentoo Prefix overlay. Convert to EAPI3, add patch, + etc. Approved by mozilla team in IRC, reference bug 328127 02 Jul 2010; Guy Martin <gmsoft@gentoo.org> nss-3.12.6-r1.ebuild: hppa stable, #324735 diff --git a/dev-libs/nss/files/nss-3.12.4-solaris-gcc.patch b/dev-libs/nss/files/nss-3.12.4-solaris-gcc.patch new file mode 100644 index 000000000000..f0a3310c3c81 --- /dev/null +++ b/dev-libs/nss/files/nss-3.12.4-solaris-gcc.patch @@ -0,0 +1,33 @@ +--- mozilla/security/coreconf/SunOS5.mk.orig 2009-10-02 10:51:26.617090950 +0200 ++++ mozilla/security/coreconf/SunOS5.mk 2009-10-02 10:53:39.756260510 +0200 +@@ -37,6 +37,9 @@ + + include $(CORE_DEPTH)/coreconf/UNIX.mk + ++NS_USE_GCC = 1 ++GCC_USE_GNU_LD = 1 ++ + # + # Temporary define for the Client; to be removed when binary release is used + # +@@ -104,7 +107,7 @@ + endif + endif + +-INCLUDES += -I/usr/dt/include -I/usr/openwin/include ++#INCLUDES += -I/usr/dt/include -I/usr/openwin/include + + RANLIB = echo + CPU_ARCH = sparc +@@ -114,11 +117,6 @@ + NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS) + + MKSHLIB = $(CC) $(DSO_LDOPTS) $(RPATH) +-ifdef NS_USE_GCC +-ifeq (GNU,$(findstring GNU,$(shell `$(CC) -print-prog-name=ld` -v 2>&1))) +- GCC_USE_GNU_LD = 1 +-endif +-endif + ifdef MAPFILE + ifdef NS_USE_GCC + ifdef GCC_USE_GNU_LD diff --git a/dev-libs/nss/nss-3.12.6-r2.ebuild b/dev-libs/nss/nss-3.12.6-r2.ebuild index 17619ce3a7ba..d9ac02cef6eb 100644 --- a/dev-libs/nss/nss-3.12.6-r2.ebuild +++ b/dev-libs/nss/nss-3.12.6-r2.ebuild @@ -1,7 +1,8 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.6-r2.ebuild,v 1.3 2010/06/21 21:08:32 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.6-r2.ebuild,v 1.4 2010/07/21 14:21:02 darkside Exp $ +EAPI=3 inherit eutils flag-o-matic multilib toolchain-funcs NSPR_VER="4.8.3-r2" @@ -12,23 +13,22 @@ SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME} LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" IUSE="utils" DEPEND="dev-util/pkgconfig" RDEPEND=">=dev-libs/nspr-${NSPR_VER} >=dev-db/sqlite-3.5" -src_unpack() { - unpack ${A} - - cd "${S}" - +src_prepare() { # Custom changes for gentoo epatch "${FILESDIR}/${PN}-3.12.5-gentoo-fixups.diff" epatch "${FILESDIR}/${PN}-3.12.6-gentoo-fixup-warnings.patch" cd "${S}"/mozilla/security/coreconf + # hack nspr paths + echo 'INCLUDES += -I'"${EPREFIX}"'/usr/include/nspr -I$(DIST)/include/dbm' \ + >> headers.mk || die "failed to append include" # modify install path sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \ @@ -39,6 +39,18 @@ src_unpack() { # Ensure we stay multilib aware sed -i -e "s:gentoo\/nss:$(get_libdir):" "${S}"/mozilla/security/nss/config/Makefile || die "Failed to fix for multilib" + + # Fix pkgconfig file for Prefix + sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \ + "${S}"/mozilla/security/nss/config/Makefile + + epatch "${FILESDIR}"/${PN}-3.12.4-solaris-gcc.patch # breaks non-gnu tools + # dirty hack + cd "${S}"/mozilla/security/nss + sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \ + lib/ssl/config.mk || die + sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \ + cmd/platlibs.mk || die } src_compile() { @@ -47,8 +59,8 @@ src_compile() { echo > "${T}"/test.c $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o case $(file "${T}"/test.o) in - *64-bit*) export USE_64=1;; - *32-bit*) ;; + *64-bit*|*ppc64*|*x86_64*) export USE_64=1;; + *32-bit*|*ppc*|*i386*) ;; *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; esac @@ -119,24 +131,29 @@ src_install () { cd "${S}"/mozilla/security/dist dodir /usr/$(get_libdir) - cp -L */lib/*.so "${D}"/usr/$(get_libdir) || die "copying shared libs failed" + cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed" # We generate these after stripping the libraries, else they don't match. - #cp -L */lib/*.chk "${D}"/usr/$(get_libdir) || die "copying chk files failed" - cp -L */lib/libcrmf.a "${D}"/usr/$(get_libdir) || die "copying libs failed" + #cp -L */lib/*.chk "${ED}"/usr/$(get_libdir) || die "copying chk files failed" + cp -L */lib/libcrmf.a "${ED}"/usr/$(get_libdir) || die "copying libs failed" # Install nss-config and pkgconfig file dodir /usr/bin - cp -L */bin/nss-config "${D}"/usr/bin + cp -L */bin/nss-config "${ED}"/usr/bin dodir /usr/$(get_libdir)/pkgconfig - cp -L */lib/pkgconfig/nss.pc "${D}"/usr/$(get_libdir)/pkgconfig + cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig # all the include files insinto /usr/include/nss doins public/nss/*.h - cd "${D}"/usr/$(get_libdir) - for file in *.so; do - mv ${file} ${file}.${MINOR_VERSION} - ln -s ${file}.${MINOR_VERSION} ${file} + cd "${ED}"/usr/$(get_libdir) + local n= + for file in *$(get_libname); do + n=${file%$(get_libname)}$(get_libname ${MINOR_VERSION}) + mv ${file} ${n} + ln -s ${n} ${file} + if [[ ${CHOST} == *-darwin* ]]; then + install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${n}" ${n} || die + fi done local nssutils @@ -161,7 +178,7 @@ src_install () { # shlibsign after prelink. declare -a libs for l in ${NSS_CHK_SIGN_LIBS} ; do - libs+=("/usr/$(get_libdir)/lib${l}.so") + libs+=("${EPREFIX}/usr/$(get_libdir)/lib${l}.so") done OLD_IFS="${IFS}" IFS=":" ; liblist="${libs[*]}" ; IFS="${OLD_IFS}" echo -e "PRELINK_PATH_MASK=${liblist}" >"${T}/90nss" @@ -177,9 +194,9 @@ pkg_postinst() { elog " links after upgrade." elog # We must re-sign the libraries AFTER they are stripped. - generate_chk "${ROOT}"/usr/bin/shlibsign "${ROOT}"/usr/$(get_libdir) + generate_chk "${EROOT}"/usr/bin/shlibsign "${ROOT}"/usr/$(get_libdir) } pkg_postrm() { - cleanup_chk "${ROOT}"/usr/$(get_libdir) + cleanup_chk "${EROOT}"/usr/$(get_libdir) } |