Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328127 - =dev-libs/nss-3.12.6-r2: migrate Gentoo Prefix modifications to gentoo-x86
Summary: =dev-libs/nss-3.12.6-r2: migrate Gentoo Prefix modifications to gentoo-x86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 328119
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2010-07-13 16:12 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2010-07-21 14:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nss-3.12.6-r1-prefix.patch (nss-3.12.6-r1-prefix.patch,3.90 KB, patch)
2010-07-13 16:14 UTC, Jeremy Olexa (darkside) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-13 16:12:52 UTC
This is the diff for -r1. -r2 underwent some substantial changes and will need work. I'd like to see comments on this diff first, if that is ok.

%% cvs di
Index: nss-3.12.6-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.6-r1.ebuild,v
retrieving revision 1.8
diff -u -r1.8 nss-3.12.6-r1.ebuild
--- nss-3.12.6-r1.ebuild        2 Jul 2010 09:15:31 -0000       1.8
+++ nss-3.12.6-r1.ebuild        13 Jul 2010 16:09:58 -0000
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.6-r1.ebuild,v 1.8 2010
/07/02 09:15:31 gmsoft Exp $

+EAPI=3
 inherit eutils flag-o-matic multilib toolchain-funcs

 NSPR_VER="4.8.3-r2"
@@ -12,23 +13,22 @@

 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/db
m' \
+               >> 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 @@
        # Ensure we stay multilib aware  
        sed -i -e "s:gentoo\/nss:$(get_libdir):" "${S}"/mozilla/security/nss/con
fig/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 @@
        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

@@ -74,23 +86,28 @@
        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/*.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/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared 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

        if use utils; then

Thanks for looking.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-13 16:14:34 UTC
Created attachment 238615 [details, diff]
nss-3.12.6-r1-prefix.patch

same as above
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-19 19:28:52 UTC
The mozilla team has approved this patch for inclusion into gentoo-x86. I'll get it done this week.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-21 14:21:10 UTC
+  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

Thanks again, Anarchy.