summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/nss/ChangeLog10
-rw-r--r--dev-libs/nss/files/3.12-nss-config.in137
-rw-r--r--dev-libs/nss/files/3.12-nss.pc.in11
-rw-r--r--dev-libs/nss/files/digest-nss-3.12_beta13
-rw-r--r--dev-libs/nss/nss-3.12_beta1.ebuild116
5 files changed, 275 insertions, 2 deletions
diff --git a/dev-libs/nss/ChangeLog b/dev-libs/nss/ChangeLog
index dd9c64bf9623..fd569967df92 100644
--- a/dev-libs/nss/ChangeLog
+++ b/dev-libs/nss/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/nss
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.108 2007/12/23 12:11:30 armin76 Exp $
+# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.109 2008/01/18 21:42:42 armin76 Exp $
+
+*nss-3.12_beta1 (18 Jan 2008)
+
+ 18 Jan 2008; Raúl Porcel <armin76@gentoo.org> +files/3.12-nss.pc.in,
+ +files/3.12-nss-config.in, +nss-3.12_beta1.ebuild:
+ Version bump
*nss-3.12_alpha2_p2-r1 (23 Dec 2007)
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 000000000000..664fafeed06e
--- /dev/null
+++ b/dev-libs/nss/files/3.12-nss-config.in
@@ -0,0 +1,137 @@
+#!/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
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=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
+ ;;
+ *)
+ 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
+ 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 000000000000..1c5ac9626409
--- /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 -lnss3 -Wl,-R${libdir}
+Cflags: -I${includedir}
diff --git a/dev-libs/nss/files/digest-nss-3.12_beta1 b/dev-libs/nss/files/digest-nss-3.12_beta1
new file mode 100644
index 000000000000..b4ca34cc5629
--- /dev/null
+++ b/dev-libs/nss/files/digest-nss-3.12_beta1
@@ -0,0 +1,3 @@
+MD5 b7585c6070a7ef8290f106a8a942fa55 nss-3.12_beta1.tar.bz2 3904926
+RMD160 fe0388d27299e7005346920f1d7f741117693511 nss-3.12_beta1.tar.bz2 3904926
+SHA256 f1876a178b78db492d7e305c0b57d0dff0415d0ae0b2ac9324bfc5ff4a479e25 nss-3.12_beta1.tar.bz2 3904926
diff --git a/dev-libs/nss/nss-3.12_beta1.ebuild b/dev-libs/nss/nss-3.12_beta1.ebuild
new file mode 100644
index 000000000000..2e6d960d151d
--- /dev/null
+++ b/dev-libs/nss/nss-3.12_beta1.ebuild
@@ -0,0 +1,116 @@
+# 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_beta1.ebuild,v 1.1 2008/01/18 21:42:42 armin76 Exp $
+
+inherit eutils flag-o-matic multilib
+
+NSPR_VER="4.7.0_pre20080113"
+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="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"
+
+DEPEND=">=dev-libs/nspr-${NSPR_VER}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+
+ # hack nspr paths
+ echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm' \
+ >> "${S}"/mozilla/security/coreconf/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 "${S}"/mozilla/security/coreconf/location.mk
+
+ # modify install path
+ sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
+ -i "${S}"/mozilla/security/coreconf/source.mk
+
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-3.11-config.patch
+ epatch "${FILESDIR}"/${PN}-3.11.5-config-1.patch
+ epatch "${FILESDIR}"/${PN}-mips64.patch
+}
+
+src_compile() {
+ strip-flags
+ if use amd64 || use ppc64 || use ia64 || use s390; then
+ export USE_64=1
+ fi
+ export NSDISTMODE=copy
+ cd "${S}"/mozilla/security/coreconf
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" || die "coreconf make failed"
+ cd "${S}"/mozilla/security/dbm
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" || die "dbm make failed"
+ cd "${S}"/mozilla/security/nss
+ emake -j1 BUILD_OPT=1 XCFLAGS="${CFLAGS}" || die "nss make failed"
+}
+
+src_install () {
+ MINOR_VERSION=12
+ cd "${S}"/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 failed"
+ cp -L */lib/*.chk "${D}"/usr/$(get_libdir)/nss || die "copying chk files failed"
+ cp -L */lib/*.a "${D}"/usr/$(get_libdir)/nss || die "copying libs failed"
+
+ # all the include files
+ insinto /usr/include/nss
+ doins private/nss/*.h
+ doins public/nss/*.h
+ cd "${D}"/usr/$(get_libdir)/nss
+ for file in *.so; do
+ mv ${file} ${file}.${MINOR_VERSION}
+ ln -s ${file}.${MINOR_VERSION} ${file}
+ done
+
+ # coping with nss being in a different path. We move up priority to
+ # ensure that nss/nspr are used specifically before searching elsewhere.
+ dodir /etc/env.d
+ echo "LDPATH=/usr/$(get_libdir)/nss" > "${D}"/etc/env.d/08nss
+
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)/pkgconfig
+ cp "${FILESDIR}"/3.12-nss-config.in "${D}"/usr/bin/nss-config
+ cp "${FILESDIR}"/3.12-nss.pc.in "${D}"/usr/$(get_libdir)/pkgconfig/nss.pc
+ NSS_VMAJOR=`cat ${S}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'`
+ NSS_VMINOR=`cat ${S}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'`
+ NSS_VPATCH=`cat ${S}/mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'`
+
+ 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
+
+ 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
+
+ if use utils; then
+ cd "${S}"/mozilla/security/dist/*/bin/
+ for f in *; do
+ newbin ${f} nss${f}
+ done
+ fi
+}