[csw-devel] SF.net SVN: gar:[7402] csw/mgar/pkg/nss/branches/upstream-work
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Nov 24 09:54:15 CET 2009
Revision: 7402
http://gar.svn.sourceforge.net/gar/?rev=7402&view=rev
Author: wahwah
Date: 2009-11-24 08:54:15 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
nss: Switched to OPT build, added nss.pc
Modified Paths:
--------------
csw/mgar/pkg/nss/branches/upstream-work/Makefile
csw/mgar/pkg/nss/branches/upstream-work/checksums
Added Paths:
-----------
csw/mgar/pkg/nss/branches/upstream-work/files/nss.pc
Modified: csw/mgar/pkg/nss/branches/upstream-work/Makefile
===================================================================
--- csw/mgar/pkg/nss/branches/upstream-work/Makefile 2009-11-23 23:01:32 UTC (rev 7401)
+++ csw/mgar/pkg/nss/branches/upstream-work/Makefile 2009-11-24 08:54:15 UTC (rev 7402)
@@ -1,19 +1,24 @@
# Copyright 2009 OpenCSW
# Distributed under the terms of the GNU General Public License v2
# $Id$
-
-
+#
# Based on the following resources:
# - http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/nss/nss-3.12.4-r1.ebuild?view=markup
# - https://developer.mozilla.org/en/NSS_reference/Building_and_installing_NSS/Build_instructions
# - https://developer.mozilla.org/en/NSS_reference/NSS_environment_variables
# - https://developer.mozilla.org/en/NSS_reference/Building_and_installing_NSS/Installation_guide
+#
+# A discussion:
+# - https://groups.google.com/group/mozilla.dev.tech.crypto/browse_thread/thread/709646e32fc4fad0#
+#
+# TODO: nss-config
+# TODO: a better nss.pc
-# Debugging mode, this is work in progress.
-GARFLAVOR = DBG
-
GARNAME = nss
-GARVERSION = 3.12.4
+MAJOR_VERSION = 3
+MINOR_VERSION = 12
+PATCHLEVEL = 4
+GARVERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCHLEVEL)
CATEGORIES = lib
DESCRIPTION = Network Security Services library, implements PKI support
define BLURB
@@ -23,8 +28,8 @@
RTM_NAME = NSS_3_12_4_RTM
MASTER_SITES = http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/$(RTM_NAME)/src/
DIST_SUFFIX = -with-nspr-4.8
-DISTFILES = $(GARNAME)-$(GARVERSION)$(DIST_SUFFIX).tar.gz
-DISTNAME = $(GARNAME)-$(GARVERSION)$(DIST_SUFFIX)
+DISTFILES = $(GARNAME)-$(GARVERSION)$(DIST_SUFFIX).tar.gz
+DISTNAME = $(GARNAME)-$(GARVERSION)$(DIST_SUFFIX)
UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*)$(DIST_SUFFIX).tar.gz
REQUIRED_PKGS = CSWnspr CSWsqlite3
PREREQUISITE_PKGS = $(REQUIRED_PKGS) CSWnspr-devel CSWsqlite3devel
@@ -34,29 +39,46 @@
TEST_SCRIPTS =
BUILD64 = 1
+libdir_install = $(prefix)/lib/nss
+# libdir = $(prefix)/lib/nss
+includedir = $(prefix)/include/nss
+
ifeq (OPT,$(GARFLAVOR))
BUILD_OPT = 1
+ export BUILD_OPT
endif
# NSPR is installed in /opt/csw/lib/nspr, nspr.pc is in /opt/csw/lib/pkgconfig
NSPR_INCLUDE_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --cflags-only-I nspr | gsed 's/-I//')
export NSPR_INCLUDE_DIR
-NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//' | tr -d ' ')
-export NSPR_LIB_DIR
+# To consider in the future.
+# NSS_ENABLE_ECC = 1
+# export NSS_ENABLE_ECC
+
# 64-bit suppport
ifeq ($(MODULATION),isa-sparcv9)
USE_64 = 1
+ NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//' | tr -d ' ')/64
export USE_64
-endif
+else
ifeq ($(MODULATION),isa-amd64)
USE_64 = 1
+ NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//' | tr -d ' ')/64
export USE_64
+else
+ NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//' | tr -d ' ')
endif
+endif
+export NSPR_LIB_DIR
+# For DBG builds
+PATCHFILES = whoami.patch
+
include gar/category.mk
build-nss: build-coreconf build-dbm build-nss-compile
+ @$(MAKECOOKIE)
build-coreconf:
(cd $(WORKSRC)/mozilla/security/coreconf \
@@ -81,3 +103,50 @@
&& \
gmake -j1 CC="$(CC)")
@$(MAKECOOKIE)
+
+install-nss:
+ ginstall -d -m 755 $(DESTDIR)$(libdir)
+ for f in $(WORKSRC)/mozilla/dist/SunOS5*/lib/*.so; do \
+ ginstall -m 755 $${f} $(DESTDIR)$(libdir); \
+ done
+ ginstall -d -m 755 $(DESTDIR)$(bindir)
+ # TODO: nss-config
+ # gcp -a $(WORKSRC)/mozilla/dist/*/bin/nss-config $(DESTDIR)$(bindir)
+ ginstall -d -m 755 $(DESTDIR)$(includedir)
+ for f in \
+ $(WORKSRC)/mozilla/dist/private/nss/*.h \
+ $(WORKSRC)/mozilla/dist/public/nss/*.h; \
+ do \
+ ginstall -m 644 $${f} $(DESTDIR)$(includedir); \
+ done
+ cd $(DESTDIR)$(libdir) && for file in *.so; do \
+ if [ ! -h $${file} ]; then \
+ gmv -v $${file} $${file}.$(MINOR_VERSION); \
+ gln -s $${file}.$(MINOR_VERSION) $${file}; \
+ fi; \
+ done
+ for file in $(WORKSRC)/mozilla/dist/*/bin/* ; do \
+ ginstall -m 755 $${file} $(DESTDIR)$(bindir)/nss`basename $${file}`; \
+ done
+ # Asserting that we have the right version in the .pc file
+ ggrep "Version: $(GARVERSION)" $(FILEDIR)/nss.pc \
+ || ( \
+ echo "Please adjust nss version in $(FILEDIR)/nss.pc" \
+ && \
+ false \
+ )
+ ginstall -d -m 755 $(DESTDIR)$(prefix)/lib/pkgconfig
+ ginstall -m 644 \
+ $(FILEDIR)/nss.pc \
+ $(DESTDIR)$(prefix)/lib/pkgconfig
+ @$(MAKECOOKIE)
+
+# Create symlinks allowing to use -L/opt/csw/lib/nss/64 for 64-bit
+# architectures.
+post-merge:
+ if [ "$(GARCH)" = sparc ]; then \
+ gln -sf sparcv9 $(PKGROOT)$(libdir)/64; \
+ elif [ "$(GARCH)" = i386 ]; then \
+ gln -sf amd64 $(PKGROOT)$(libdir)/64; \
+ fi
+ @$(MAKECOOKIE)
Modified: csw/mgar/pkg/nss/branches/upstream-work/checksums
===================================================================
--- csw/mgar/pkg/nss/branches/upstream-work/checksums 2009-11-23 23:01:32 UTC (rev 7401)
+++ csw/mgar/pkg/nss/branches/upstream-work/checksums 2009-11-24 08:54:15 UTC (rev 7402)
@@ -1,7 +1,2 @@
8f76e381bf2339d731bfd5b8116c25a4 nss-3.12.4-with-nspr-4.8.tar.gz
-39b9d2431d4ff717d103b742fcaefb81 nss-3.12.4.patch
-f0f40bd021423ab1680b4d87cd19c1db platlibs-sqlite3.patch
-441f12a9396a89841d384d8c89a052ff platlibs-sunos.patch
-d41d8cd98f00b204e9800998ecf8427e runtime-search-path.patch
-90b4d32437b3e3fdadcf4f16339aa2ed shared-libs.patch
221646aa1954b4a255ac03e7d8b0225d whoami.patch
Added: csw/mgar/pkg/nss/branches/upstream-work/files/nss.pc
===================================================================
--- csw/mgar/pkg/nss/branches/upstream-work/files/nss.pc (rev 0)
+++ csw/mgar/pkg/nss/branches/upstream-work/files/nss.pc 2009-11-24 08:54:15 UTC (rev 7402)
@@ -0,0 +1,11 @@
+prefix=/opt/csw
+exec_prefix=${prefix}
+libdir=${prefix}/lib/nss
+includedir=${prefix}/include/nss
+
+Name: NSS
+Description: Network Security Services
+Version: 3.12.4
+Requires: nspr >= 4.8.0
+Libs: -L${libdir} -lssl3 -lsmime3 -lnssutil3 -lnss3 -R${libdir}
+Cflags: -I${includedir}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list