commit:     e3cb7d3ab70a3469598d4b2e691f3aa84d23af1e
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 21 20:39:33 2015 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Wed Oct 21 20:39:33 2015 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=e3cb7d3a

Firefox 42.0b8, nspr-4.10.10, nss-3.20.1

Bumped firefox to latest beta, and added newest versions of nspr and nss to 
support it.

Note mozilla upstream does not want nss/nspr to be officially distributed until 
Nov.3rd,
for whatever reason, so please do not push them into the main gentoo repo until 
then.

 dev-libs/nspr/Manifest                             |   1 +
 dev-libs/nspr/files/nspr-4.10.6-solaris.patch      |  32 ++
 dev-libs/nspr/files/nspr-4.6.1-lang.patch          |  41 +++
 dev-libs/nspr/files/nspr-4.7.0-prtime.patch        |  26 ++
 dev-libs/nspr/files/nspr-4.7.1-solaris.patch       |  14 +
 dev-libs/nspr/files/nspr-4.7.4-solaris.patch       |  62 ++++
 .../files/nspr-4.8.4-darwin-install_name.patch     |  25 ++
 dev-libs/nspr/files/nspr-4.8.9-link-flags.patch    |  28 ++
 dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch   |  12 +
 dev-libs/nspr/nspr-4.10.10.ebuild                  | 120 ++++++++
 dev-libs/nss/Manifest                              |   1 +
 dev-libs/nss/nss-3.20.1.ebuild                     | 326 +++++++++++++++++++++
 ...42.0_beta6.ebuild => firefox-42.0_beta8.ebuild} |   4 +-
 13 files changed, 690 insertions(+), 2 deletions(-)

diff --git a/dev-libs/nspr/Manifest b/dev-libs/nspr/Manifest
new file mode 100644
index 0000000..68289c3
--- /dev/null
+++ b/dev-libs/nspr/Manifest
@@ -0,0 +1 @@
+DIST nspr-4.10.10.tar.gz 1134164 SHA256 
343614971c30520d0fa55f4af0a72578e2d8674bb71caf7187490c3379523107 SHA512 
60e035c4bd037bbf4bfacc97e2b1097ea78a179969fccead6a964069d826e917f07aaa35a26f123b7297521910728c11e27556fc9bbc09e385c1e8aef9dbf376
 WHIRLPOOL 
db63a6d1e0c9d57dfa059aecf8eeff8e36d0385f598290665d525a85eb6fe173cd899bba017c82b26815d894d8ea6e728dbb7a77483036551c06c78c900d7ee3

diff --git a/dev-libs/nspr/files/nspr-4.10.6-solaris.patch 
b/dev-libs/nspr/files/nspr-4.10.6-solaris.patch
new file mode 100644
index 0000000..3ae8052
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.10.6-solaris.patch
@@ -0,0 +1,32 @@
+* drop Solaris linker stuff
+
+--- nspr-4.7.4/mozilla/nsprpub/configure.in
++++ nspr-4.7.4/mozilla/nsprpub/configure.in
+@@ -1988,26 +1988,14 @@
+     CPU_ARCH=`uname -p`
+     MDCPUCFG_H=_solaris.cfg
+     PR_MD_CSRCS=solaris.c
+-    LD=/usr/ccs/bin/ld
+     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+     RESOLVE_LINK_SYMBOLS=1
+-    case "${OS_RELEASE}" in
+-    5.8|5.9)
+-        ;;
+-    *)
+-        # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
+-        USE_B_DIRECT=1
+-        ;;
+-    esac
+     if test -n "$GNU_CC"; then
+         DSO_CFLAGS=-fPIC
+         if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+             GCC_USE_GNU_LD=1
+         fi
+-        DSO_LDOPTS='-shared -Wl,-h,$(notdir 
$@),-z,combreloc,-z,defs,-z,ignore' 
+-        if test -n "$USE_B_DIRECT"; then
+-            DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
+-        fi
++              DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+     else
+         DSO_CFLAGS=-KPIC
+         DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'

diff --git a/dev-libs/nspr/files/nspr-4.6.1-lang.patch 
b/dev-libs/nspr/files/nspr-4.6.1-lang.patch
new file mode 100644
index 0000000..46fe15b
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.6.1-lang.patch
@@ -0,0 +1,41 @@
+The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in 
+option parsing, it may break.
+
+http://bugs.gentoo.org/103483
+
+--- mozilla/nsprpub/configure
++++ mozilla/nsprpub/configure
+@@ -54,6 +54,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+ 
++# NLS nuisances.
++# Only set these to C if already set.  These must not be set unconditionally
++# because not all systems understand e.g. LANG=C (notably SCO).
++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
++# Non-C LC_CTYPE values break the ctype check.
++if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
++if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
++
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+@@ -452,16 +463,6 @@
+   esac
+ done
+ 
+-# NLS nuisances.
+-# Only set these to C if already set.  These must not be set unconditionally
+-# because not all systems understand e.g. LANG=C (notably SCO).
+-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+-# Non-C LC_CTYPE values break the ctype check.
+-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+-
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.

diff --git a/dev-libs/nspr/files/nspr-4.7.0-prtime.patch 
b/dev-libs/nspr/files/nspr-4.7.0-prtime.patch
new file mode 100644
index 0000000..ac509ef
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.7.0-prtime.patch
@@ -0,0 +1,26 @@
+--- mozilla/nsprpub/pr/src/misc/prtime.c.orig  2007-09-14 19:41:08.000000000 
+0200
++++ mozilla/nsprpub/pr/src/misc/prtime.c       2007-09-14 19:42:17.000000000 
+0200
+@@ -1536,7 +1536,7 @@
+                 case TT_EET: zone_offset =  2 * 60; break;
+                 case TT_JST: zone_offset =  9 * 60; break;
+                 default:
+-                  PR_ASSERT (0);
++                  return PR_FAILURE;
+                   break;
+                 }
+         }
+@@ -1578,11 +1578,12 @@
+           struct tm localTime;
+           time_t secs;
+ 
+-          PR_ASSERT(result->tm_month > -1 &&
++          if (!(result->tm_month > -1 &&
+                     result->tm_mday > 0 &&
+                     result->tm_hour > -1 &&
+                     result->tm_min > -1 &&
+-                    result->tm_sec > -1);
++                    result->tm_sec > -1))
++                  return PR_FAILURE;
+ 
+             /*
+              * To obtain time_t from a tm structure representing the local

diff --git a/dev-libs/nspr/files/nspr-4.7.1-solaris.patch 
b/dev-libs/nspr/files/nspr-4.7.1-solaris.patch
new file mode 100644
index 0000000..5d9e810
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.7.1-solaris.patch
@@ -0,0 +1,14 @@
+Same magic as haubi did for glib compilation, which works again here
+resolving a linker problem on Solaris with GNU ld.  Bug #222625
+
+--- mozilla/nsprpub/pr/src/Makefile.in.orig    2008-06-22 22:24:56.671065000 
+0200
++++ mozilla/nsprpub/pr/src/Makefile.in 2008-06-23 14:38:52.320417000 +0200
+@@ -95,7 +95,7 @@
+ endif
+ 
+ ifdef USE_PTHREADS
+-OS_LIBS                       = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
++OS_LIBS                       = -pthread ${LIBRT} -lsocket -lnsl -ldl -lc
+ else
+ ifdef LOCAL_THREADS_ONLY
+ OS_LIBS                       = -lsocket -lnsl -ldl -lc

diff --git a/dev-libs/nspr/files/nspr-4.7.4-solaris.patch 
b/dev-libs/nspr/files/nspr-4.7.4-solaris.patch
new file mode 100644
index 0000000..a0f14d5
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.7.4-solaris.patch
@@ -0,0 +1,62 @@
+* drop Solaris linker stuff
+
+--- nspr-4.7.4/mozilla/nsprpub/configure.in
++++ nspr-4.7.4/mozilla/nsprpub/configure.in
+@@ -1988,26 +1988,14 @@
+     CPU_ARCH=`uname -p`
+     MDCPUCFG_H=_solaris.cfg
+     PR_MD_CSRCS=solaris.c
+-    LD=/usr/ccs/bin/ld
+     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+     RESOLVE_LINK_SYMBOLS=1
+-    case "${OS_RELEASE}" in
+-    5.8|5.9)
+-        ;;
+-    *)
+-        # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
+-        USE_B_DIRECT=1
+-        ;;
+-    esac
+     if test -n "$GNU_CC"; then
+         DSO_CFLAGS=-fPIC
+         if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+             GCC_USE_GNU_LD=1
+         fi
+-        DSO_LDOPTS='-shared -Wl,-h,$(notdir 
$@),-z,combreloc,-z,defs,-z,ignore' 
+-        if test -n "$USE_B_DIRECT"; then
+-            DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
+-        fi
++              DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+     else
+         DSO_CFLAGS=-KPIC
+         DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
+--- nspr-4.7.4/mozilla/nsprpub/configure
++++ nspr-4.7.4/mozilla/nsprpub/configure
+@@ -4765,26 +4765,14 @@
+     CPU_ARCH=`uname -p`
+     MDCPUCFG_H=_solaris.cfg
+     PR_MD_CSRCS=solaris.c
+-    LD=/usr/ccs/bin/ld
+     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+     RESOLVE_LINK_SYMBOLS=1
+-    case "${OS_RELEASE}" in
+-    5.8|5.9)
+-        ;;
+-    *)
+-        # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
+-        USE_B_DIRECT=1
+-        ;;
+-    esac
+     if test -n "$GNU_CC"; then
+         DSO_CFLAGS=-fPIC
+         if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+             GCC_USE_GNU_LD=1
+         fi
+-        DSO_LDOPTS='-shared -Wl,-h,$(notdir 
$@),-z,combreloc,-z,defs,-z,ignore' 
+-        if test -n "$USE_B_DIRECT"; then
+-            DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
+-        fi
++              DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+     else
+         DSO_CFLAGS=-KPIC
+         DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'

diff --git a/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch 
b/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch
new file mode 100644
index 0000000..1258b60
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch
@@ -0,0 +1,25 @@
+Don't use @executable_path, it messed up linking against nspr from e.g.
+nss.
+
+--- mozilla/nsprpub/configure.in
++++ mozilla/nsprpub/configure.in
+@@ -1007,7 +1007,7 @@
+             ;;
+     esac
+     DSO_CFLAGS=-fPIC
+-    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 
-all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 
-all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
+     _OPTIMIZE_FLAGS=-O2
+     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+     STRIP="$STRIP -x -S"
+--- mozilla/nsprpub/configure
++++ mozilla/nsprpub/configure
+@@ -1007,7 +1007,7 @@
+             ;;
+     esac
+     DSO_CFLAGS=-fPIC
+-    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 
-all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 
-all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
+     _OPTIMIZE_FLAGS=-O2
+     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+     STRIP="$STRIP -x -S"

diff --git a/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch 
b/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch
new file mode 100644
index 0000000..dd3b132
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch
@@ -0,0 +1,28 @@
+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

diff --git a/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch 
b/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch
new file mode 100644
index 0000000..d4f9a7e
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch
@@ -0,0 +1,12 @@
+diff -urN a/mozilla/nsprpub/config/nspr-config.in 
b/mozilla/nsprpub/config/nspr-config.in
+--- a/mozilla/nsprpub/config/nspr-config.in    2012-03-06 07:13:39.000000000 
-0600
++++ b/mozilla/nsprpub/config/nspr-config.in    2013-02-16 20:53:53.893489345 
-0600
+@@ -126,7 +126,7 @@
+ fi
+ 
+ if test "$echo_libs" = "yes"; then
+-      libdirs=-L$libdir
++      libdirs=""
+       if test -n "$lib_plds"; then
+       libdirs="$libdirs -lplds${major_version}"
+       fi

diff --git a/dev-libs/nspr/nspr-4.10.10.ebuild 
b/dev-libs/nspr/nspr-4.10.10.ebuild
new file mode 100644
index 0000000..af321ee
--- /dev/null
+++ b/dev-libs/nspr/nspr-4.10.10.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WANT_AUTOCONF="2.5"
+
+inherit autotools eutils multilib toolchain-funcs versionator multilib-minimal
+
+MIN_PV="$(get_version_component_range 2)"
+
+DESCRIPTION="Netscape Portable Runtime"
+HOMEPAGE="http://www.mozilla.org/projects/nspr/";
+SRC_URI="http://archive.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/${P}.tar.gz";
+
+LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux 
~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug"
+
+RDEPEND="
+       abi_x86_32? (
+               !<=app-emulation/emul-linux-x86-baselibs-20140508-r12
+               !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+       )"
+
+MULTILIB_CHOST_TOOLS=(
+       /usr/bin/nspr-config
+)
+
+src_prepare() {
+       cd "${S}"/nspr || die
+       epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch
+       epatch "${FILESDIR}"/${PN}-4.7.1-solaris.patch
+       epatch "${FILESDIR}"/${PN}-4.10.6-solaris.patch
+       epatch "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
+       epatch "${FILESDIR}"/${PN}-4.8.9-link-flags.patch
+       # We do not need to pass -L$libdir via nspr-config --libs
+       epatch "${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
+
+       # rename configure.in to configure.ac for new autotools compatibility
+       if [[ -e "${S}"/nspr/configure.in ]] ; then
+               einfo "Renaming configure.in to configure.ac"
+               mv "${S}"/nspr/configure.{in,ac} || die
+       fi
+       # We must run eautoconf to regenerate configure
+       eautoconf
+
+       # make sure it won't find Perl out of Prefix
+       sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
+
+       # Respect LDFLAGS
+       sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+               "${S}"/nspr/config/rules.mk || die
+}
+
+multilib_src_configure() {
+       # 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=()
+
+       # The configure has some fancy --enable-{{n,x}32,64bit} switches
+       # that trigger some code conditional to platform & arch. This really
+       # matters for the few common arches (x86, ppc) but we pass a little
+       # more of them to be future-proof.
+
+       # use ABI first, this will work for most cases
+       case "${ABI}" in
+               alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
+               n32) myconf+=( --enable-n32 );;
+               x32) myconf+=( --enable-x32 );;
+               s390x|*64) myconf+=( --enable-64bit );;
+               default) # no abi actually set, fall back to old check
+                       einfo "Running a short build test to determine 
64bit'ness"
+                       echo > "${T}"/test.c || die
+                       ${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o 
"${T}"/test.o || die
+                       case $(file "${T}"/test.o) in
+                               *32-bit*x86-64*) myconf+=( --enable-x32 );;
+                               *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 ;;
+               *) ;;
+       esac
+
+       # Ancient autoconf needs help finding the right tools.
+       LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
+       ac_cv_path_AR="${AR}" \
+       econf \
+               --libdir="${EPREFIX}/usr/$(get_libdir)" \
+               $(use_enable debug) \
+               $(use_enable !debug optimize) \
+               "${myconf[@]}"
+}
+
+multilib_src_install() {
+       # Their build system is royally confusing, as usual
+       MINOR_VERSION=${MIN_PV} # Used for .so version
+       emake DESTDIR="${D}" install
+
+       einfo "removing static libraries as upstream has requested!"
+       rm -f "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static 
libraries."
+
+       # install nspr-config
+       dobin config/nspr-config
+
+       # Remove stupid files in /usr/bin
+       rm "${ED}"/usr/bin/prerr.properties || die
+
+       # This is used only to generate prerr.c and prerr.h at build time.
+       # No other projects use it, and we don't want to depend on perl.
+       # Talked to upstream and they agreed w/punting.
+       rm "${ED}"/usr/bin/compile-et.pl || die
+}

diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest
index a295322..443e5c4 100644
--- a/dev-libs/nss/Manifest
+++ b/dev-libs/nss/Manifest
@@ -1,3 +1,4 @@
 DIST nss-3.14.1-add_spi+cacerts_ca_certs.patch 25018 SHA256 
82ca25982828fd7153ad15fc6e81408c115476eeeb4045d3a71469380b56824b SHA512 
2aafbd972b073061bfd66a66a4b50060691957f2910f716f7a69d22d655c499f186f05db2101bea5248a00949f339327ba8bfffec024c61c8ee908766201ae00
 WHIRLPOOL 
c9fe397e316dac7983b187acf7227078ebd8f8da5df53f77f2564489e85f123c4d2afb88d56e8dc14b9ebfffe8a71ade4724b3c1ea683c5c4c487cb3a64eda43
 DIST nss-3.19.2.tar.gz 6953657 SHA256 
1306663e8f61d8449ad8cbcffab743a604dcd9f6f34232c210847c51dce2c9ae SHA512 
d3c45010f8dace58f9da9efe0f9792f8b8a69384e100663f33c949685cdd1ce70e5131f279bc82336622841c41dbc0a4d70a7cc6839a1782dbe8b3c3fd8bc59d
 WHIRLPOOL 
d69ab02e12f6b22f47df7be7925343c58e68a69b33833b85d6f2ca70f652d9d159accea45f2c141fa89245ab64dffff0f1289129427564203fe2faf3af1c11e3
+DIST nss-3.20.1.tar.gz 6958956 SHA256 
ad3c8f11dfd9570c2d04a6140d5ef7c2bdd0fe30d6c9e5548721a4251a5e8c97 SHA512 
c8db693a81b8ddb4d2a742c2fce3f23dd40736e54c55c0de072f84572fcdad8fb7646e4b8ea696e4c97ea6c9cb0fa144f573f8776c2839eb25c4075b50d01d74
 WHIRLPOOL 
3d4667b243ba6ac596ea7e9936bf9cba7aa1b9767fd19b53352c3a9a9eef0f1a0a9e7da719634dbc9dfcc087d187d5e774ae351c1e57545e8b8c1f40e41e42e6
 DIST nss-pem-015ae754dd9f6fbcd7e52030ec9732eb27fc06a8.tar.bz2 27506 SHA256 
50d9ec26a75835e900302f631456e278e13d4b435b8f98aa69f79dd439ddc6ab SHA512 
0158a140f112a905f7db5a4f4d04f49f6742db1d2665ddf6c32913c367f0b93a57f86ba13b9883a42a528aff44c48196941d7c0fd7a27005db6adaf07802e501
 WHIRLPOOL 
279ef11d2d6f0cb7c192189d64bc6971cdada7417b93a65a3ff0ba4548b736b53b9812803024c2349114e94e0864f2b58c23812687ed3f75cf28334b0f6e11ac

diff --git a/dev-libs/nss/nss-3.20.1.ebuild b/dev-libs/nss/nss-3.20.1.ebuild
new file mode 100644
index 0000000..7153cea
--- /dev/null
+++ b/dev-libs/nss/nss-3.20.1.ebuild
@@ -0,0 +1,326 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
+
+NSPR_VER="4.10.8"
+RTM_NAME="NSS_${PV//./_}_RTM"
+# Rev of https://git.fedorahosted.org/cgit/nss-pem.git
+PEM_GIT_REV="015ae754dd9f6fbcd7e52030ec9732eb27fc06a8"
+PEM_P="${PN}-pem-${PEM_GIT_REV}"
+
+DESCRIPTION="Mozilla's Network Security Services library that implements PKI 
support"
+HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/";
+SRC_URI="http://archive.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
+       cacert? ( 
https://dev.gentoo.org/~anarchy/patches/${PN}-3.14.1-add_spi+cacerts_ca_certs.patch
 )
+       nss-pem? ( 
https://git.fedorahosted.org/cgit/nss-pem.git/snapshot/${PEM_P}.tar.bz2 )"
+
+LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc 
x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris 
~x64-solaris ~x86-solaris"
+IUSE="+cacert +nss-pem utils"
+CDEPEND=">=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
+       >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND=">=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+       >=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
+       ${CDEPEND}"
+RDEPEND=">=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
+       ${CDEPEND}
+       abi_x86_32? (
+               !<=app-emulation/emul-linux-x86-baselibs-20140508-r12
+               !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+       )"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${P}/${PN}"
+
+MULTILIB_CHOST_TOOLS=(
+       /usr/bin/nss-config
+)
+
+src_unpack() {
+       unpack ${A}
+       if use nss-pem ; then
+               mv "${PEM_P}"/nss/lib/ckfw/pem/ "${S}"/lib/ckfw/ || die
+       fi
+}
+
+src_prepare() {
+       # Custom changes for gentoo
+       epatch "${FILESDIR}/${PN}-3.17.1-gentoo-fixups.patch"
+       epatch "${FILESDIR}/${PN}-3.15-gentoo-fixup-warnings.patch"
+       use cacert && epatch 
"${DISTDIR}/${PN}-3.14.1-add_spi+cacerts_ca_certs.patch"
+       use nss-pem && epatch "${FILESDIR}/${PN}-3.15.4-enable-pem.patch"
+       epatch "${FILESDIR}/nss-3.14.2-solaris-gcc.patch"
+       epatch "${FILESDIR}/${PN}-cacert-class3.patch" # 521462
+
+       pushd coreconf >/dev/null || die
+       # hack nspr paths
+       echo 'INCLUDES += -I$(DIST)/include/dbm' \
+               >> headers.mk || die "failed to append include"
+
+       # modify install path
+       sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = 
$(CORE_DEPTH)/dist:' \
+               -i source.mk || die
+
+       # Respect LDFLAGS
+       sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
+       popd >/dev/null || die
+
+       # Fix pkgconfig file for Prefix
+       sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
+               config/Makefile || die
+
+       # use host shlibsign if need be #436216
+       if tc-is-cross-compiler ; then
+               sed -i \
+                       -e 's:"${2}"/shlibsign:shlibsign:' \
+                       cmd/shlibsign/sign.sh || die
+       fi
+
+       # dirty hack
+       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
+
+       multilib_copy_sources
+
+       strip-flags
+}
+
+multilib_src_configure() {
+       # Ensure we stay multilib aware
+       sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
+}
+
+nssarch() {
+       # Most of the arches are the same as $ARCH
+       local t=${1:-${CHOST}}
+       case ${t} in
+               aarch64*)echo "aarch64";;
+               hppa*)   echo "parisc";;
+               i?86*)   echo "i686";;
+               x86_64*) echo "x86_64";;
+               *)       tc-arch ${t};;
+       esac
+}
+
+nssbits() {
+       local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
+       if [[ ${1} == BUILD_ ]]; then
+               cc=$(tc-getBUILD_CC)
+       else
+               cc=$(tc-getCC)
+       fi
+       echo > "${T}"/test.c || die
+       ${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || 
die
+       case $(file "${T}/${1}test.o") in
+               *32-bit*x86-64*) echo USE_X32=1;;
+               *64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
+               *32-bit*|*ppc*|*i386*) ;;
+               *) die "Failed to detect whether ${cc} builds 64bits or 32bits, 
disable distcc if you're using it, please";;
+       esac
+}
+
+multilib_src_compile() {
+       # use ABI to determine bit'ness, or fallback if unset
+       local buildbits mybits
+       case "${ABI}" in
+               n32) mybits="USE_N32=1";;
+               x32) mybits="USE_X32=1";;
+               s390x|*64) mybits="USE_64=1";;
+               ${DEFAULT_ABI})
+                       einfo "Running compilation test to determine bit'ness"
+                       mybits=$(nssbits)
+                       ;;
+       esac
+       # bitness of host may differ from target
+       if tc-is-cross-compiler; then
+               buildbits=$(nssbits BUILD_)
+       fi
+
+       local makeargs=(
+               CC="$(tc-getCC)"
+               AR="$(tc-getAR) rc \$@"
+               RANLIB="$(tc-getRANLIB)"
+               OPTIMIZER=
+               ${mybits}
+       )
+
+       # Take care of nspr settings #436216
+       local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
+       unset NSPR_INCLUDE_DIR
+
+       # Do not let `uname` be used.
+       if use kernel_linux ; then
+               makeargs+=(
+                       OS_TARGET=Linux
+                       OS_RELEASE=2.6
+                       OS_TEST="$(nssarch)"
+               )
+       fi
+
+       export BUILD_OPT=1
+       export NSS_USE_SYSTEM_SQLITE=1
+       export NSDISTMODE=copy
+       export NSS_ENABLE_ECC=1
+       export FREEBL_NO_DEPEND=1
+       export ASFLAGS=""
+
+       local d
+
+       # Build the host tools first.
+       LDFLAGS="${BUILD_LDFLAGS}" \
+       XCFLAGS="${BUILD_CFLAGS}" \
+       NSPR_LIB_DIR="${T}/fakedir" \
+       emake -j1 -C coreconf \
+               CC="$(tc-getBUILD_CC)" \
+               ${buildbits:-${mybits}}
+       makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
+
+       # Then build the target tools.
+       for d in . lib/dbm ; do
+               CPPFLAGS="${myCPPFLAGS}" \
+               XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
+               NSPR_LIB_DIR="${T}/fakedir" \
+               emake -j1 "${makeargs[@]}" -C ${d}
+       done
+}
+
+# Altering these 3 libraries breaks the CHK verification.
+# All of the following cause it to break:
+# - stripping
+# - prelink
+# - ELF signing
+# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
+# Either we have to NOT strip them, or we have to forcibly resign after
+# stripping.
+#local_libdir="$(get_libdir)"
+#export STRIP_MASK="
+#      */${local_libdir}/libfreebl3.so*
+#      */${local_libdir}/libnssdbm3.so*
+#      */${local_libdir}/libsoftokn3.so*"
+
+export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
+
+generate_chk() {
+       local shlibsign="$1"
+       local libdir="$2"
+       einfo "Resigning core NSS libraries for FIPS validation"
+       shift 2
+       local i
+       for i in ${NSS_CHK_SIGN_LIBS} ; do
+               local libname=lib${i}.so
+               local chkname=lib${i}.chk
+               "${shlibsign}" \
+                       -i "${libdir}"/${libname} \
+                       -o "${libdir}"/${chkname}.tmp \
+               && mv -f \
+                       "${libdir}"/${chkname}.tmp \
+                       "${libdir}"/${chkname} \
+               || die "Failed to sign ${libname}"
+       done
+}
+
+cleanup_chk() {
+       local libdir="$1"
+       shift 1
+       local i
+       for i in ${NSS_CHK_SIGN_LIBS} ; do
+               local libfname="${libdir}/lib${i}.so"
+               # If the major version has changed, then we have old chk files.
+               [ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
+                       && rm -f "${libfname}.chk"
+       done
+}
+
+multilib_src_install() {
+       pushd dist >/dev/null || die
+
+       dodir /usr/$(get_libdir)
+       cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying 
shared libs failed"
+       cp -L */lib/libcrmf.a "${ED}"/usr/$(get_libdir) || die "copying libs 
failed"
+       cp -L */lib/libfreebl.a "${ED}"/usr/$(get_libdir) || die "copying libs 
failed"
+
+       # Install nss-config and pkgconfig file
+       dodir /usr/bin
+       cp -L */bin/nss-config "${ED}"/usr/bin || die
+       dodir /usr/$(get_libdir)/pkgconfig
+       cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
+
+       # create an nss-softokn.pc from nss.pc for libfreebl and some private 
headers
+       # bug 517266
+       sed     -e 's#Libs:#Libs: -lfreebl#' \
+               -e 's#Cflags:#Cflags: -I${includedir}/private#' \
+               */lib/pkgconfig/nss.pc 
>"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
+               || die "could not create nss-softokn.pc"
+
+       # all the include files
+       insinto /usr/include/nss
+       doins public/nss/*.h
+       insinto /usr/include/nss/private
+       doins private/nss/{blapi,alghmac}.h
+
+       popd >/dev/null || die
+
+       local f nssutils
+       # Always enabled because we need it for chk generation.
+       nssutils="shlibsign"
+
+       if multilib_is_native_abi ; then
+               if use utils; then
+                       # The tests we do not need to install.
+                       #nssutils_test="bltest crmftest dbtest dertimetest
+                       #fipstest remtest sdrtest"
+                       nssutils="addbuiltin atob baddbdir btoa certcgi 
certutil checkcert
+                       cmsutil conflict crlutil derdump digest makepqg mangle 
modutil multinit
+                       nonspr10 ocspclnt oidcalc p7content p7env p7sign 
p7verify pk11mode
+                       pk12util pp rsaperf selfserv shlibsign signtool signver 
ssltap strsclnt
+                       symkeyutil tstclnt vfychain vfyserv"
+                       # install man-pages for utils (bug #516810)
+                       doman doc/nroff/*.1
+               fi
+               pushd dist/*/bin >/dev/null || die
+               for f in ${nssutils}; do
+                       dobin ${f}
+               done
+               popd >/dev/null || die
+       fi
+
+       # Prelink breaks the CHK files. We don't have any reliable way to run
+       # shlibsign after prelink.
+       local l libs=() liblist
+       for l in ${NSS_CHK_SIGN_LIBS} ; do
+               libs+=("${EPREFIX}/usr/$(get_libdir)/lib${l}.so")
+       done
+       liblist=$(printf '%s:' "${libs[@]}")
+       echo -e "PRELINK_PATH_MASK=${liblist%:}" > "${T}/90nss-${ABI}"
+       doenvd "${T}/90nss-${ABI}"
+}
+
+pkg_postinst() {
+       multilib_pkg_postinst() {
+               # We must re-sign the libraries AFTER they are stripped.
+               local shlibsign="${EROOT}/usr/bin/shlibsign"
+               # See if we can execute it (cross-compiling & such). #436216
+               "${shlibsign}" -h >&/dev/null
+               if [[ $? -gt 1 ]] ; then
+                       shlibsign="shlibsign"
+               fi
+               generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
+       }
+
+       multilib_foreach_abi multilib_pkg_postinst
+}
+
+pkg_postrm() {
+       multilib_pkg_postrm() {
+               cleanup_chk "${EROOT}"/usr/$(get_libdir)
+       }
+
+       multilib_foreach_abi multilib_pkg_postrm
+}

diff --git a/www-client/firefox/firefox-42.0_beta6.ebuild 
b/www-client/firefox/firefox-42.0_beta8.ebuild
similarity index 99%
rename from www-client/firefox/firefox-42.0_beta6.ebuild
rename to www-client/firefox/firefox-42.0_beta8.ebuild
index 88de03b..aa151b7 100644
--- a/www-client/firefox/firefox-42.0_beta6.ebuild
+++ b/www-client/firefox/firefox-42.0_beta8.ebuild
@@ -56,8 +56,8 @@ ASM_DEPEND=">=dev-lang/yasm-1.1"
 
 # Mesa 7.10 needed for WebGL + bugfixes
 RDEPEND="
-       >=dev-libs/nss-3.19.2
-       >=dev-libs/nspr-4.10.8
+       >=dev-libs/nss-3.20.1
+       >=dev-libs/nspr-4.10.10
        selinux? ( sec-policy/selinux-mozilla )"
 
 DEPEND="${RDEPEND}

Reply via email to