[csw-devel] SF.net SVN: gar:[7379] csw/mgar/pkg/nss/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Nov 22 13:04:52 CET 2009


Revision: 7379
          http://gar.svn.sourceforge.net/gar/?rev=7379&view=rev
Author:   wahwah
Date:     2009-11-22 12:04:52 +0000 (Sun, 22 Nov 2009)

Log Message:
-----------
nss: Adding runtime search paths via gsed. It still aborts. Help\!

Modified Paths:
--------------
    csw/mgar/pkg/nss/trunk/Makefile
    csw/mgar/pkg/nss/trunk/checksums
    csw/mgar/pkg/nss/trunk/files/shared-libs.patch

Added Paths:
-----------
    csw/mgar/pkg/nss/trunk/files/runtime-search-path.patch
    csw/mgar/pkg/nss/trunk/files/whoami.patch

Modified: csw/mgar/pkg/nss/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nss/trunk/Makefile	2009-11-22 02:04:18 UTC (rev 7378)
+++ csw/mgar/pkg/nss/trunk/Makefile	2009-11-22 12:04:52 UTC (rev 7379)
@@ -2,6 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
+GARFLAVOR = DBG
+
 ## This file contains comments to guide you through various GAR settings.
 ## Please remove unnecessary comments before committing your code to the code
 ## repository. The comments to remove are marked with double hashes.
@@ -13,6 +15,12 @@
 ##
 # Based on:
 # http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/nss/nss-3.12.4-r1.ebuild?view=markup
+# and
+# https://developer.mozilla.org/en/NSS_reference/Building_and_installing_NSS/Build_instructions
+# and
+# https://developer.mozilla.org/en/NSS_reference/NSS_environment_variables
+# and
+# https://developer.mozilla.org/en/NSS_reference/Building_and_installing_NSS/Installation_guide
 GARNAME = nss
 GARVERSION = 3.12.4
 # http://www.gentoo-portage.com/AJAX/Ebuild/96014
@@ -58,6 +66,8 @@
 PATCHFILES  = nss-3.12.4.patch
 PATCHFILES += shared-libs.patch
 PATCHFILES += platlibs-sqlite3.patch
+PATCHFILES += whoami.patch
+PATCHFILES += runtime-search-path.patch
 ## PATCHFILES = freebl.patch
 ##
 ## Whitespace-separated list of files which comprise this build. mGAR will look
@@ -190,10 +200,12 @@
 ##
 
 EXTRA_PKG_CONFIG_DIRS = $(prefix)/X11/lib
-BUILD_OPT = 1
+ifeq (OPT,$(GARFLAVOR))
+	BUILD_OPT = 1
+endif
 NSS_USE_SYSTEM_SQLITE = 1
 NSPR_INCLUDE_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --cflags-only-I nspr | gsed 's/-I//')
-NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//')
+NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//' | tr -d ' ')
 USE_SYSTEM_ZLIB = 1
 ZLIB_LIBS = -lz
 NSDISTMODE = copy
@@ -202,6 +214,7 @@
 FREEBL_NO_DEPEND = 1
 # DSO_LDOPTS = -R/opt/csw/lib/$$$$ISALIST -L/opt/csw/lib
 # export DSO_LDOPTS
+LDOPTS = $(LD_OPTIONS)
 ifeq ($(MODULATION),isa-sparcv9)
 	USE_64 = 1
 	export USE_64
@@ -215,16 +228,40 @@
 
 include gar/category.mk
 
-configure-nss:
+configure-nss: respect-ldflags add-runtime-search-path
+	@$(MAKECOOKIE)
+
+respect-ldflags:
 	(cd $(WORKSRC)/mozilla/security/coreconf \
 		&& \
 	gsed -e 's:SOURCE_PREFIX = $$(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $$(CORE_DEPTH)/dist:' \
 		-i source.mk \
 		&& \
-	gsed -i -e 's/\$$(MKSHLIB) -o/\$$(MKSHLIB) \$$(LDFLAGS) -o/g' rules.mk \
-	)
+	gsed -i -e 's/\$$(MKSHLIB) -o/\$$(MKSHLIB) \$$(LDFLAGS) -o/g' rules.mk)
 	@$(MAKECOOKIE)
 
+add-runtime-search-path:
+	for f in \
+			mozilla/security/nss/cmd/pk11mode/Makefile \
+			mozilla/security/nss/cmd/platlibs.mk \
+			mozilla/security/nss/cmd/shlibsign/Makefile \
+			mozilla/security/nss/cmd/shlibsign/mangle/Makefile \
+			mozilla/security/nss/lib/ckfw/builtins/Makefile \
+			mozilla/security/nss/lib/ckfw/capi/Makefile \
+			mozilla/security/nss/lib/ckfw/nssmkey/Makefile \
+			mozilla/security/nss/lib/freebl/config.mk \
+			mozilla/security/nss/lib/nss/config.mk \
+			mozilla/security/nss/lib/smime/config.mk \
+			mozilla/security/nss/lib/softoken/config.mk \
+			mozilla/security/nss/lib/softoken/legacydb/config.mk \
+			mozilla/security/nss/lib/ssl/config.mk \
+			mozilla/security/nss/lib/util/config.mk; do \
+		gsed -i -e 's|-L\$$(NSPR_LIB_DIR)|-L$$(NSPR_LIB_DIR) -R$$(NSPR_LIB_DIR)/$$$$ISALIST|' $(WORKSRC)/$$f; \
+	done;
+	# A form of assert
+	ggrep -- -R $(WORKSRC)/mozilla/security/nss/lib/freebl/config.mk
+	@$(MAKECOOKIE)
+
 build-nss: build-coreconf build-dbm build-nss-compile
 
 build-coreconf:
@@ -250,3 +287,4 @@
 		&& \
 	gmake -j1 CC="$(CC)")
 	@$(MAKECOOKIE)
+

Modified: csw/mgar/pkg/nss/trunk/checksums
===================================================================
--- csw/mgar/pkg/nss/trunk/checksums	2009-11-22 02:04:18 UTC (rev 7378)
+++ csw/mgar/pkg/nss/trunk/checksums	2009-11-22 12:04:52 UTC (rev 7379)
@@ -1,4 +1,6 @@
 8f76e381bf2339d731bfd5b8116c25a4  nss-3.12.4-with-nspr-4.8.tar.gz
 39b9d2431d4ff717d103b742fcaefb81  nss-3.12.4.patch
 f0f40bd021423ab1680b4d87cd19c1db  platlibs-sqlite3.patch
-31aeaf6718c269812c445fb3e86f6ac6  shared-libs.patch
+d41d8cd98f00b204e9800998ecf8427e  runtime-search-path.patch
+90b4d32437b3e3fdadcf4f16339aa2ed  shared-libs.patch
+221646aa1954b4a255ac03e7d8b0225d  whoami.patch

Modified: csw/mgar/pkg/nss/trunk/files/shared-libs.patch
===================================================================
--- csw/mgar/pkg/nss/trunk/files/shared-libs.patch	2009-11-22 02:04:18 UTC (rev 7378)
+++ csw/mgar/pkg/nss/trunk/files/shared-libs.patch	2009-11-22 12:04:52 UTC (rev 7379)
@@ -1,20 +1,32 @@
---- nss-3.12.4-with-nspr-4.8/mozilla/security/nss/lib/softoken/config.mk.orig	2009-11-21 21:00:43.881431583 +0100
-+++ nss-3.12.4-with-nspr-4.8/mozilla/security/nss/lib/softoken/config.mk	2009-11-21 21:01:18.985608134 +0100
-@@ -54,6 +54,8 @@
+--- nss-3.12.4-with-nspr-4.8/mozilla/security/nss/lib/softoken/config.mk.orig	2009-11-22 11:39:49.492474635 +0100
++++ nss-3.12.4-with-nspr-4.8/mozilla/security/nss/lib/softoken/config.mk	2009-11-22 11:40:51.857227138 +0100
+@@ -54,10 +54,14 @@
  
  ifdef NS_USE_GCC
  EXTRA_SHARED_LIBS += \
 +	-R/opt/csw/lib/$$ISALIST \
 +	-L/opt/csw/lib \
  	-L$(DIST)/lib \
++	-R$(NSSUTIL_LIB_DIR)/$$ISALIST \
  	-L$(NSSUTIL_LIB_DIR) \
  	-lnssutil3 \
-@@ -80,6 +82,8 @@
+ 	-lsqlite3 \
++	-R$(NSPR_LIB_DIR)/$$ISALIST \
+ 	-L$(NSPR_LIB_DIR) \
+ 	-lplc4 \
+ 	-lplds4 \
+@@ -80,10 +84,14 @@
  # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
  # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
  EXTRA_SHARED_LIBS += \
 +	-R/opt/csw/lib/$$ISALIST \
 +	-L/opt/csw/lib \
  	-L$(DIST)/lib \
++	-R$(NSSUTIL_LIB_DIR)/$$ISALIST \
  	-L$(NSSUTIL_LIB_DIR) \
  	-lnssutil3 \
+ 	-lsqlite3 \
++	-R$(NSPR_LIB_DIR)/$$ISALIST \
+ 	-L$(NSPR_LIB_DIR) \
+ 	-lplc4 \
+ 	-lplds4 \

Added: csw/mgar/pkg/nss/trunk/files/whoami.patch
===================================================================
--- csw/mgar/pkg/nss/trunk/files/whoami.patch	                        (rev 0)
+++ csw/mgar/pkg/nss/trunk/files/whoami.patch	2009-11-22 12:04:52 UTC (rev 7379)
@@ -0,0 +1,11 @@
+--- nss-3.12.4-with-nspr-4.8/mozilla/security/coreconf/UNIX.mk.orig	2009-11-22 02:25:17.411354784 +0100
++++ nss-3.12.4-with-nspr-4.8/mozilla/security/coreconf/UNIX.mk	2009-11-22 02:25:24.833876220 +0100
+@@ -46,7 +46,7 @@
+ 	DEFINES    += -UDEBUG -DNDEBUG
+ else
+ 	OPTIMIZER  += -g
+-	USERNAME   := $(shell whoami)
++	USERNAME   := $(shell gwhoami)
+ 	USERNAME   := $(subst -,_,$(USERNAME))
+ 	DEFINES    += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME)
+ endif


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