summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Harmon <russ@eatnumber1.com>2009-03-24 16:11:41 -0400
committerRussell Harmon <russ@eatnumber1.com>2009-03-24 16:11:41 -0400
commit80876bcb366b9d491693b3ab5e2c552954346756 (patch)
treef988bbb06a7637d1c556e00c9b15b251d30c9dbd /dev-libs
parentMoved openttd to openttd-overlay (diff)
downloadeatnumber1-80876bcb366b9d491693b3ab5e2c552954346756.tar.gz
eatnumber1-80876bcb366b9d491693b3ab5e2c552954346756.tar.bz2
eatnumber1-80876bcb366b9d491693b3ab5e2c552954346756.zip
Add ebuilds needed to compile chromium
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/nspr/Manifest6
-rw-r--r--dev-libs/nspr/files/nspr-4.6.1-config-1.patch11
-rw-r--r--dev-libs/nspr/files/nspr-4.6.1-config.patch89
-rw-r--r--dev-libs/nspr/files/nspr-4.6.1-lang.patch41
-rw-r--r--dev-libs/nspr/files/nspr-4.7.0-prtime.patch26
-rw-r--r--dev-libs/nspr/nspr-4.7.3.ebuild128
-rw-r--r--dev-libs/nss/Manifest7
-rw-r--r--dev-libs/nss/files/3.12-nss-config.in145
-rw-r--r--dev-libs/nss/files/3.12-nss.pc.in11
-rw-r--r--dev-libs/nss/files/nss-3.11-config.patch91
-rw-r--r--dev-libs/nss/files/nss-3.12-config-1.patch37
-rw-r--r--dev-libs/nss/files/nss-mips64-2.patch21
-rw-r--r--dev-libs/nss/nss-3.12.2.ebuild178
13 files changed, 791 insertions, 0 deletions
diff --git a/dev-libs/nspr/Manifest b/dev-libs/nspr/Manifest
new file mode 100644
index 0000000..3e153f2
--- /dev/null
+++ b/dev-libs/nspr/Manifest
@@ -0,0 +1,6 @@
+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.6.1-lang.patch 1718 RMD160 6c3fb440f4b4004289de3f65b996936bcfcbaa45 SHA1 a5ae7b8c95204279fbcb1ac46a242448aa5a894d SHA256 326f5f9d020e73a6ed8e949124eb075f21d856d0b099b8d04035ecc937cd35fb
+AUX nspr-4.7.0-prtime.patch 964 RMD160 a963c21fb1ce5e8913d3c41753ca37b24e80798d SHA1 b47ffa12022ea83b738e5d847e61cca026ec7f07 SHA256 3fd4f3c68257dced021c0bfa00245d0da2d6c64205135b1cc89f96a3375dffc7
+DIST nspr-4.7.3.tar.gz 1254585 RMD160 532417c8c4d04a32d6cfc09ea8f2279d5ee69e72 SHA1 351c34c8f26d11a441bc3130655cd9144e724899 SHA256 b1d2419ef1807c38944fc746fff14fda8506589e5462dc31194a9d1b494b9f49
+EBUILD nspr-4.7.3.ebuild 3187 RMD160 bf6ca85c11ce0ba973bb7af8231b7cc6c11dc5bb SHA1 42a98bd63f9c55138f7622093be9edce4a5c6d84 SHA256 6d72d7eb004660b20b6322e85cb159dd25b12c24bcd1296a11a9b43bbef270d5
diff --git a/dev-libs/nspr/files/nspr-4.6.1-config-1.patch b/dev-libs/nspr/files/nspr-4.6.1-config-1.patch
new file mode 100644
index 0000000..a7d5361
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.6.1-config-1.patch
@@ -0,0 +1,11 @@
+--- mozilla/nsprpub/configure.orig 2006-01-14 22:41:37.000000000 +0000
++++ mozilla/nsprpub/configure 2006-01-14 22:49:14.000000000 +0000
+@@ -3893,7 +3893,7 @@
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
++ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@).$(MOD_MINOR_VERSION)'
+ _OPTIMIZE_FLAGS=-O2
+ _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
+ # combo is not yet good at debugging inlined
diff --git a/dev-libs/nspr/files/nspr-4.6.1-config.patch b/dev-libs/nspr/files/nspr-4.6.1-config.patch
new file mode 100644
index 0000000..ffbbf1a
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.6.1-config.patch
@@ -0,0 +1,89 @@
+--- mozilla/nsprpub/lib/libc/src/Makefile.in.orig 2005-06-01 14:28:26.000000000 +0000
++++ mozilla/nsprpub/lib/libc/src/Makefile.in 2006-01-15 02:50:39.000000000 +0000
+@@ -112,6 +112,10 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_ARCH), Linux)
++DSO_LDOPTS +=-Wl,-R,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_ARCH),OS2)
+ MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
+ GARBAGE += $(MAPFILE)
+--- mozilla/nsprpub/lib/ds/Makefile.in.orig 2005-06-01 14:28:25.000000000 +0000
++++ mozilla/nsprpub/lib/ds/Makefile.in 2006-01-15 02:52:30.000000000 +0000
+@@ -102,6 +102,10 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_ARCH), Linux)
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_ARCH),OS2)
+ MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
+ GARBAGE += $(MAPFILE)
+--- mozilla/nsprpub/pr/src/Makefile.in.orig 2005-06-01 14:28:27.000000000 +0000
++++ mozilla/nsprpub/pr/src/Makefile.in 2006-01-15 03:29:36.000000000 +0000
+@@ -168,6 +168,7 @@
+ else
+ OS_LIBS = -ldl
+ endif
++DSO_LDOPTS +=-Wl,-R,'$$ORIGIN'
+ endif
+
+ ifeq ($(OS_ARCH),HP-UX)
+--- mozilla/nsprpub/config/Makefile.in.orig 2005-06-01 14:28:23.000000000 +0000
++++ mozilla/nsprpub/config/Makefile.in 2006-01-15 04:13:42.000000000 +0000
+@@ -54,7 +54,7 @@
+ # because it is included by every makefile.
+ DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config
+
+-RELEASE_BINS = nspr-config
++RELEASE_BINS = nspr-config nspr.pc
+
+ include $(topsrcdir)/config/config.mk
+
+@@ -139,6 +139,7 @@
+
+ export:: $(TARGETS)
+ rm -f $(dist_bindir)/nspr-config
++ rm -f $(dist_bindir)/nspr.pc
+
+ ifdef WRAP_SYSTEM_INCLUDES
+ export::
+--- mozilla/nsprpub/config/nspr.pc.in.orig 1970-01-01 00:00:00.000000000 +0000
++++ mozilla/nsprpub/config/nspr.pc.in 2006-01-15 04:12:23.000000000 +0000
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSPR
++Description: The Netscape Portable Runtime
++Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
++Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 @OS_LIBS@ -Wl,-R${libdir}
++Cflags: -I${includedir}
+--- mozilla/nsprpub/configure.orig 2006-01-15 04:17:59.000000000 +0000
++++ mozilla/nsprpub/configure 2006-01-15 04:21:35.000000000 +0000
+@@ -5899,6 +5899,7 @@
+ config/nsprincl.mk
+ config/nsprincl.sh
+ config/nspr-config
++config/nspr.pc
+ lib/Makefile
+ lib/ds/Makefile
+ lib/libc/Makefile
+--- mozilla/nsprpub/config/nspr-config.in.orig 2005-05-11 00:53:41.000000000 +0000
++++ mozilla/nsprpub/config/nspr-config.in 2006-01-15 06:37:58.000000000 +0000
+@@ -122,7 +122,7 @@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- libdirs=-L$libdir
++ libdirs="-Wl,-R$libdir -L$libdir"
+ if test -n "$lib_plds"; then
+ libdirs="$libdirs -lplds${major_version}"
+ fi
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/nspr-4.7.3.ebuild b/dev-libs/nspr/nspr-4.7.3.ebuild
new file mode 100644
index 0000000..7c2ef91
--- /dev/null
+++ b/dev-libs/nspr/nspr-4.7.3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.7.3.ebuild,v 1.2 2008/11/15 18:31:56 armin76 Exp $
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+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 ~x86-fbsd"
+IUSE="ipv6 debug multilib"
+
+EMULTILIB_PKG="true"
+
+DEPEND=">=dev-db/sqlite-3.5"
+
+pkg_setup() {
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+}
+
+setup_env() {
+ # workaround for users having FEATURES=ccache set, as ccache doesn't, play
+ # nice to multilib builds (see bug 206822)
+ filter-flags -DABI=*
+ append-flags -DABI=${ABI}
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ mkdir build inst
+ epatch "${FILESDIR}"/${PN}-4.6.1-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
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+ mozilla/nsprpub/config/rules.mk
+}
+
+src_compile() {
+ if [[ -z ${OABI} ]] && has_multilib_profile; then
+ einfo "Building multilib ${PN} for ABIs: $(get_install_abis)"
+ OABI=${ABI}
+ for ABI in $(get_install_abis); do
+ export ABI=${ABI}
+ src_compile
+ done
+ ABI=${OABI}
+ return
+ fi
+
+ myconf=""
+
+ cd "${S}"/build
+
+ ABI=${ABI:-default}
+
+ setup_env
+
+ mkdir abi-${ABI}
+ cd abi-${ABI}
+
+ case ${ABI} in
+ *amd64*) myconf="${myconf} --enable-64bit";;
+ *) ;;
+ esac
+
+ if use ipv6; then
+ myconf="${myconf} --enable-ipv6"
+ fi
+
+ myconf="${myconf} --libdir=/usr/$(get_libdir)/nspr \
+ --enable-system-sqlite"
+
+ ECONF_SOURCE="../../mozilla/nsprpub" econf \
+ $(use_enable debug) \
+ ${myconf} || die "econf for ABI ${ABI} failed"
+ make CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "make for ABI ${ABI} failed"
+}
+
+src_install () {
+ MINOR_VERSION=7
+
+ dodir /etc/env.d
+
+ for ABI in $(get_install_abis); do
+ # Their build system is royally fucked, as usual
+ cd "${S}"/build/abi-${ABI}
+ emake DESTDIR="${D}" install || die "emake install for ABI ${ABI} failed."
+
+ cd "${D}"/usr/$(get_libdir)/nspr
+ for file in *.so; do
+ mv ${file} ${file}.${MINOR_VERSION}
+ ln -s ${file}.${MINOR_VERSION} ${file}
+ done
+ # cope with libraries being in /usr/lib/nspr
+ echo "LDPATH=/usr/$(get_libdir)/nspr" > "${D}/etc/env.d/08nspr-${ABI}"
+
+ # install nspr-config
+ dobin "${S}"/build/abi-${ABI}/config/nspr-config
+
+ # create pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}"/build/abi-${ABI}/config/nspr.pc
+
+ # Remove stupid files in /usr/bin
+ rm "${D}"/usr/bin/{prerr.properties,nspr.pc}
+ done
+}
+
+pkg_preinst() {
+ for ABI in $(get_install_abis); do
+ preserve_old_lib /usr/$(get_libdir)/nspr/lib{nspr,plc,plds}4.so.6
+ done
+}
+
+pkg_postinst() {
+ for ABI in $(get_install_abis); do
+ preserve_old_lib_notify /usr/$(get_libdir)/nspr/lib{nspr,plc,plds}4.so.6
+ done
+}
diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest
new file mode 100644
index 0000000..1e197b6
--- /dev/null
+++ b/dev-libs/nss/Manifest
@@ -0,0 +1,7 @@
+AUX 3.12-nss-config.in 2400 RMD160 927a5573d72ad8c9d06a56fd094b7523d8cc0784 SHA1 0227f94c745519b67b1b530e6cc116e8069a6b43 SHA256 6d03d7c1ade80922831b90a4242bf57519d649c4ab47eaac0958ceee90c169b2
+AUX 3.12-nss.pc.in 280 RMD160 e6966434f42fdcdb71977ba80638c74ef4b2ae63 SHA1 2024da0f72759c87375459a4e521caaf97a7922c SHA256 c61ebe55abca04bf6b05024e6c160735f74fe83a1ba48b0314a4110b6828bbc9
+AUX nss-3.11-config.patch 3167 RMD160 e4b57c89a518b54070b884f40ca11224ccc60349 SHA1 78acfa3c26bf5ca8f8d741f54c00bcf044d4c82b SHA256 0947675d067f09dee55684e29dc7764834ad640b2adf52d9450fbb1b7f9b728c
+AUX nss-3.12-config-1.patch 1508 RMD160 ea2f4e2f05cc865ef41af0c39e573b8eb8801f42 SHA1 4897595a91f331ce34155e9872ece3518acb1ac8 SHA256 22d72c155d7b6aa8f1dd797959d5ec3b0975cf9a1bf4607e6b0ee2207112c2b7
+AUX nss-mips64-2.patch 540 RMD160 16c461f453470238922065068dd6530b908bb64f SHA1 27062b98164c946d5116b64a49c7c164b261fdbd SHA256 06ad64812bd49382ff4165bfa452fd697a5ca2c03e8f3ffb9aa1bcfa14499b34
+DIST nss-3.12.2.tar.bz2 3974864 RMD160 eebddb26f26268550d106301464e0f98944a5e04 SHA1 a668ddb8e80c90aaa6d958f85745c6595a493f38 SHA256 84fb75ded8db4a4a38cb12a7aeeeade4fed68ff0f5e9f069ffe021d3b36f94a4
+EBUILD nss-3.12.2.ebuild 5708 RMD160 ab138a382f7078b5f60e0438051818d651b0ef03 SHA1 3d353f8b4059b50a73564e0a66c68ee4c4f7d057 SHA256 b00ec740854e30d130845566677b1f70cd3a6a8cbeacd709a3803d79b3edfa85
diff --git a/dev-libs/nss/files/3.12-nss-config.in b/dev-libs/nss/files/3.12-nss-config.in
new file mode 100644
index 0000000..3a88aaa
--- /dev/null
+++ b/dev-libs/nss/files/3.12-nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ ssl
+ smime
+ nssutil
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=$optarg
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=$optarg
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+ exec_prefix=@exec_prefix@
+fi
+if test -z "$includedir"; then
+ includedir=@includedir@
+fi
+if test -z "$libdir"; then
+ libdir=@libdir@
+fi
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+ echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+ echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs="-Wl,-R$libdir -L$libdir"
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl${major_version}"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime${major_version}"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss${major_version}"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil${major_version}"
+ fi
+ echo $libdirs
+fi
+
diff --git a/dev-libs/nss/files/3.12-nss.pc.in b/dev-libs/nss/files/3.12-nss.pc.in
new file mode 100644
index 0000000..ab0726c
--- /dev/null
+++ b/dev-libs/nss/files/3.12-nss.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: NSS
+Description: Network Security Services
+Version: @NSS_VERSION@
+Requires: nspr >= @NSPR_VERSION@
+Libs: -L${libdir} -lssl3 -lsmime3 -lnssutil3 -lnss3 -Wl,-R${libdir}
+Cflags: -I${includedir}
diff --git a/dev-libs/nss/files/nss-3.11-config.patch b/dev-libs/nss/files/nss-3.11-config.patch
new file mode 100644
index 0000000..ac579c8
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.11-config.patch
@@ -0,0 +1,91 @@
+--- mozilla/security/nss/lib/ckfw/builtins/config.mk.orig 2005-01-20 02:25:46.000000000 +0000
++++ mozilla/security/nss/lib/ckfw/builtins/config.mk 2006-01-15 05:13:08.000000000 +0000
+@@ -69,3 +69,9 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+--- mozilla/security/nss/lib/ckfw/capi/config.mk.orig 2005-11-04 02:05:04.000000000 +0000
++++ mozilla/security/nss/lib/ckfw/capi/config.mk 2006-01-15 05:13:52.000000000 +0000
+@@ -69,3 +69,9 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+--- mozilla/security/nss/lib/freebl/Makefile.orig 2005-11-22 07:13:32.000000000 +0000
++++ mozilla/security/nss/lib/freebl/Makefile 2006-01-15 05:16:05.000000000 +0000
+@@ -132,6 +132,7 @@
+ endif
+
+ ifeq ($(OS_TARGET),Linux)
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
+ ifeq ($(CPU_ARCH),x86_64)
+ ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
+ ASFLAGS += -march=opteron -m64 -fPIC
+--- mozilla/security/nss/lib/nss/config.mk.orig 2005-07-21 23:48:28.000000000 +0000
++++ mozilla/security/nss/lib/nss/config.mk 2006-01-15 05:11:58.000000000 +0000
+@@ -122,6 +122,11 @@
+ endif
+ endif
+
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
+
+ ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
+ ifndef NS_USE_GCC
+--- mozilla/security/nss/lib/smime/config.mk.orig 2005-09-02 01:24:57.000000000 +0000
++++ mozilla/security/nss/lib/smime/config.mk 2006-01-15 05:05:53.000000000 +0000
+@@ -97,3 +97,10 @@
+ # dependencies in the same directory where it resides.
+ MKSHLIB += -R '$$ORIGIN'
+ endif
++
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+--- mozilla/security/nss/lib/softoken/config.mk.orig 2005-10-19 01:03:31.000000000 +0000
++++ mozilla/security/nss/lib/softoken/config.mk 2006-01-15 05:07:15.000000000 +0000
+@@ -93,6 +93,12 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_TARGET),WINCE)
+ DEFINES += -DDBM_USING_NSPR
+ endif
+--- mozilla/security/nss/lib/ssl/config.mk.orig 2005-10-19 01:04:16.000000000 +0000
++++ mozilla/security/nss/lib/ssl/config.mk 2006-01-15 05:10:38.000000000 +0000
+@@ -119,6 +119,12 @@
+ #EXTRA_SHARED_LIBS += -ldl -lrt -lc -z defs
+ endif
+
++ifeq ($(OS_TARGET),Linux)
++# The -R '$ORIGIN' linker option instructs this library to search for its
++# dependencies in the same directory where it resides.
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+ endif
+
+ # indicates dependency on freebl static lib
diff --git a/dev-libs/nss/files/nss-3.12-config-1.patch b/dev-libs/nss/files/nss-3.12-config-1.patch
new file mode 100644
index 0000000..26289e1
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.12-config-1.patch
@@ -0,0 +1,37 @@
+--- mozilla/security/coreconf/Linux.mk.orig 2005-09-16 17:09:23.000000000 +0000
++++ mozilla/security/coreconf/Linux.mk 2006-02-09 05:27:36.000000000 +0000
+@@ -37,6 +37,8 @@
+
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
+
++NSS_VERSION_MINOR=12
++
+ #
+ # The default implementation strategy for Linux is now pthreads
+ #
+--- mozilla/security/coreconf/Linux2.6.mk.orig 2005-09-16 17:09:23.000000000 +0000
++++ mozilla/security/coreconf/Linux2.6.mk 2006-02-09 05:38:16.000000000 +0000
+@@ -38,8 +38,7 @@
+ include $(CORE_DEPTH)/coreconf/Linux.mk
+
+ OS_REL_CFLAGS += -DLINUX2_1
+-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+-
++MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so).$(NSS_VERSION_MINOR)
+ ifdef MAPFILE
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
+ endif
+--- mozilla/security/coreconf/rules.mk.orig 2005-10-10 23:46:12.000000000 +0000
++++ mozilla/security/coreconf/rules.mk 2006-02-09 06:27:46.000000000 +0000
+@@ -113,7 +113,10 @@
+ $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR)
+ endif
+ ifdef SHARED_LIBRARY
++ mv $(SHARED_LIBRARY) $(SHARED_LIBRARY).$(NSS_VERSION_MINOR)
++ ln -s $(shell pwd)/$(SHARED_LIBRARY).$(NSS_VERSION_MINOR) $(shell pwd)/$(SHARED_LIBRARY)
+ $(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
++ $(INSTALL) -m 775 $(SHARED_LIBRARY).$(NSS_VERSION_MINOR) $(SOURCE_LIB_DIR)
+ ifdef MOZ_DEBUG_SYMBOLS
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+ $(INSTALL) -m 644 $(SHARED_LIBRARY:$(DLL_SUFFIX)=pdb) $(SOURCE_LIB_DIR)
+
diff --git a/dev-libs/nss/files/nss-mips64-2.patch b/dev-libs/nss/files/nss-mips64-2.patch
new file mode 100644
index 0000000..8257eb4
--- /dev/null
+++ b/dev-libs/nss/files/nss-mips64-2.patch
@@ -0,0 +1,21 @@
+--- mozilla/security/coreconf/Linux.mk.orig 2008-12-11 09:12:48.000000000 +0000
++++ mozilla/security/coreconf/Linux.mk 2008-12-11 09:13:51.000000000 +0000
+@@ -119,6 +119,10 @@
+ OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+ CPU_ARCH = mips
+ else
++ifeq ($(OS_TEST),mips64)
++ OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
++ CPU_ARCH = mips64
++else
+ ifeq (,$(filter-out i%86,$(OS_TEST)))
+ OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
+ CPU_ARCH = x86
+@@ -140,6 +144,7 @@
+ endif
+ endif
+ endif
++endif
+
+
+ LIBC_TAG = _glibc
diff --git a/dev-libs/nss/nss-3.12.2.ebuild b/dev-libs/nss/nss-3.12.2.ebuild
new file mode 100644
index 0000000..2ee045b
--- /dev/null
+++ b/dev-libs/nss/nss-3.12.2.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.2_rc1.ebuild,v 1.1 2008/12/11 10:39:04 armin76 Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+NSPR_VER="4.7.3"
+RTM_NAME="NSS_${PV//./_}_RTM"
+DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
+HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
+#SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz"
+SRC_URI="
+ http://dev.gentoo.org/~armin76/dist/${P}.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="utils multilib"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+DEPEND=">=dev-db/sqlite-3.6.2
+ >=dev-libs/nspr-${NSPR_VER}"
+
+pkg_setup() {
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+}
+
+setup_env() {
+ # workaround for users having FEATURES=ccache set, as ccache doesn't, play
+ # nice to multilib builds (see bug 206822)
+ filter-flags -DABI=*
+ append-flags -DABI=${ABI}
+}
+
+src_unpack() {
+ for ABI in $(get_install_abis); do
+ einfo "Unpacking for ABI ${ABI}"
+ cd "${S}"
+ ABI=${ABI:-default}
+ mkdir abi-${ABI}
+ cd abi-${ABI}
+
+ unpack ${A}
+
+ cd "${S}"/abi-${ABI}/mozilla/security/coreconf
+ # hack nspr paths
+ echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm' \
+ >> headers.mk || die "failed to append include"
+
+ # cope with nspr being in /usr/$(get_libdir)/nspr
+ sed -e 's:$(DIST)/lib:/usr/'"$(get_libdir)"/nspr':' \
+ -i location.mk
+
+ # modify install path
+ sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
+ -i source.mk
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
+
+ cd "${S}"/abi-${ABI}
+ epatch "${FILESDIR}"/${PN}-3.11-config.patch
+ epatch "${FILESDIR}"/${PN}-3.12-config-1.patch
+ epatch "${FILESDIR}"/${PN}-mips64-2.patch
+ done
+}
+
+src_compile() {
+ if [[ -z ${OABI} ]] && has_multilib_profile; then
+ strip-flags
+ einfo "Building multilib ${PN} for ABIs: $(get_install_abis)"
+ OABI=${ABI}
+ for ABI in $(get_install_abis); do
+ export ABI=${ABI}
+ src_compile
+ done
+ ABI=${OABI}
+ return
+ fi
+
+ ABI=${ABI:-default}
+
+ setup_env
+
+ case ${ABI} in
+ *amd64*) export USE_64=1;;
+ *) ;;
+ esac
+ einfo "Compiling for ABI ${ABI}"
+ export NSDISTMODE=copy
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+ cd "${S}"/abi-${ABI}/mozilla/security/coreconf
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "coreconf ABI ${ABI} make failed"
+ cd "${S}"/abi-${ABI}/mozilla/security/dbm
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "dbm ABI ${ABI} make failed"
+ cd "${S}"/abi-${ABI}/mozilla/security/nss
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "nss ABI ${ABI} make failed"
+}
+
+src_install () {
+ MINOR_VERSION=12
+
+ NSS_VMAJOR=`cat ${S}/abi-${DEFAULT_ABI}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'`
+ NSS_VMINOR=`cat ${S}/abi-${DEFAULT_ABI}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'`
+ NSS_VPATCH=`cat ${S}/abi-${DEFAULT_ABI}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'`
+
+ dodir /usr/bin
+ dodir /etc/env.d
+
+ cp "${FILESDIR}"/3.12-nss-config.in "${D}"/usr/bin/nss-config
+
+ for ABI in $(get_install_abis); do
+ einfo "Installing for ABI ${ABI}"
+ ABI=${ABI:-default}
+ cd "${S}"/abi-${ABI}/mozilla/security/dist
+
+ # put all *.a files in /usr/lib/nss (because some have conflicting names
+ # with existing libraries)
+ dodir /usr/$(get_libdir)/nss
+ cp -L */lib/*.so "${D}"/usr/$(get_libdir)/nss || die "copying shared libs for ABI ${ABI} failed"
+ cp -L */lib/*.chk "${D}"/usr/$(get_libdir)/nss || die "copying chk files for ABI ${ABI} failed"
+ cp -L */lib/*.a "${D}"/usr/$(get_libdir)/nss || die "copying libs for ABI ${ABI} failed"
+
+ cd "${D}"/usr/$(get_libdir)/nss
+ for file in *.so; do
+ mv ${file} ${file}.${MINOR_VERSION}
+ ln -s ${file}.${MINOR_VERSION} ${file}
+ done
+
+ dodir /usr/$(get_libdir)/pkgconfig
+ cp "${FILESDIR}"/3.12-nss.pc.in "${D}"/usr/$(get_libdir)/pkgconfig/nss.pc
+
+ # coping with nss being in a different path. We move up priority to
+ # ensure that nss/nspr are used specifically before searching elsewhere.
+ echo "LDPATH=/usr/$(get_libdir)/nss" > "${D}"/etc/env.d/08nss-${ABI}
+
+ if [[ ${ABI} == ${DEFAULT_ABI} ]]; then
+ cd "${S}"/abi-${ABI}/mozilla/security/dist
+ # all the include files
+ insinto /usr/include/nss
+ doins private/nss/*.h
+ doins public/nss/*.h
+
+ sed -e "s,@libdir@,/usr/"$(get_libdir)"/nss,g" \
+ -e "s,@prefix@,/usr,g" \
+ -e "s,@exec_prefix@,\$\{prefix},g" \
+ -e "s,@includedir@,\$\{prefix}/include/nss,g" \
+ -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \
+ -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \
+ -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
+ -i "${D}"/usr/bin/nss-config
+ chmod 755 "${D}"/usr/bin/nss-config
+
+ if use utils; then
+ cd "${S}"/abi-${ABI}/mozilla/security/dist/*/bin/
+ for f in *; do
+ newbin ${f} nss${f}
+ done
+ fi
+ fi
+
+ sed -e "s,@libdir@,/usr/"$(get_libdir)"/nss,g" \
+ -e "s,@prefix@,/usr,g" \
+ -e "s,@exec_prefix@,\$\{prefix},g" \
+ -e "s,@includedir@,\$\{prefix}/include/nss," \
+ -e "s,@NSPR_VERSION@,`nspr-config --version`,g" \
+ -e "s,@NSS_VERSION@,$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH,g" \
+ -i "${D}"/usr/$(get_libdir)/pkgconfig/nss.pc
+ chmod 644 "${D}"/usr/$(get_libdir)/pkgconfig/nss.pc
+ done
+}