Blame SOURCES/nsspem-use-system-freebl.patch

f57139
diff -up nss/lib/ckfw/pem/config.mk.systemfreebl nss/lib/ckfw/pem/config.mk
f57139
--- nss/lib/ckfw/pem/config.mk.systemfreebl	2012-08-11 09:06:59.000000000 -0700
f57139
+++ nss/lib/ckfw/pem/config.mk	2013-04-04 16:02:33.805744145 -0700
f57139
@@ -41,6 +41,11 @@ CONFIG_CVS_ID = "@(#) $RCSfile: config.m
f57139
 #  are specifed as dependencies within rules.mk.
f57139
 #
f57139
 
f57139
+
f57139
+EXTRA_LIBS += \
f57139
+	$(SOFTOKEN_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) \
f57139
+	$(NULL)
f57139
+
f57139
 TARGETS        = $(SHARED_LIBRARY)
f57139
 LIBRARY        =
f57139
 IMPORT_LIBRARY =
f57139
@@ -69,3 +74,22 @@ ifeq ($(OS_TARGET),SunOS)
f57139
 MKSHLIB += -R '$$ORIGIN'
f57139
 endif
f57139
 
f57139
+# If a platform has a system nssutil, set USE_SYSTEM_NSSUTIL to 1 and
f57139
+# NSSUTIL_LIBS to the linker command-line arguments for the system nssutil
f57139
+# (for example, -lnssutil3 on fedora) in the platform's config file in coreconf.
f57139
+ifdef USE_SYSTEM_NSSUTIL
f57139
+OS_LIBS += $(NSSUTIL_LIBS)
f57139
+else
f57139
+NSSUTIL_LIBS = $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX)
f57139
+EXTRA_LIBS += $(NSSUTIL_LIBS)
f57139
+endif
f57139
+# If a platform has a system freebl, set USE_SYSTEM_FREEBL to 1 and
f57139
+# FREEBL_LIBS to the linker command-line arguments for the system nssutil
f57139
+# (for example, -lfreebl3 on fedora) in the platform's config file in coreconf.
f57139
+ifdef USE_SYSTEM_FREEBL
f57139
+OS_LIBS += $(FREEBL_LIBS)
f57139
+else
f57139
+FREEBL_LIBS = $(DIST)/lib/$(LIB_PREFIX)freebl3.$(LIB_SUFFIX)
f57139
+EXTRA_LIBS += $(FREEBL_LIBS)
f57139
+endif
f57139
+
f57139
diff -up nss/lib/ckfw/pem/Makefile.systemfreebl nss/lib/ckfw/pem/Makefile
f57139
--- nss/lib/ckfw/pem/Makefile.systemfreebl	2012-08-11 09:06:59.000000000 -0700
f57139
+++ nss/lib/ckfw/pem/Makefile	2013-04-04 16:02:33.806744154 -0700
f57139
@@ -43,8 +43,7 @@ include config.mk
f57139
 EXTRA_LIBS = \
f57139
 	$(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \
f57139
 	$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
f57139
-	$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) \
f57139
-	$(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
f57139
+	$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) \
f57139
 	$(NULL)
f57139
 
f57139
 # can't do this in manifest.mn because OS_TARGET isn't defined there.
f57139
@@ -56,6 +55,9 @@ EXTRA_LIBS += \
f57139
 	-lplc4 \
f57139
 	-lplds4 \
f57139
 	-lnspr4 \
f57139
+	-L$(NSSUTIL_LIB_DIR) \
f57139
+	-lnssutil3 \
f57139
+	-lfreebl3
f57139
 	$(NULL)
f57139
 else 
f57139
 EXTRA_SHARED_LIBS += \
f57139
@@ -74,6 +76,9 @@ EXTRA_LIBS += \
f57139
 	-lplc4 \
f57139
 	-lplds4 \
f57139
 	-lnspr4 \
f57139
+	-L$(NSSUTIL_LIB_DIR) \
f57139
+	-lnssutil3 \
f57139
+	-lfreebl3 \
f57139
 	$(NULL)
f57139
 endif
f57139
 
f57139
diff -up nss/lib/ckfw/pem/manifest.mn.systemfreebl nss/lib/ckfw/pem/manifest.mn
f57139
--- nss/lib/ckfw/pem/manifest.mn.systemfreebl	2012-08-11 09:06:59.000000000 -0700
f57139
+++ nss/lib/ckfw/pem/manifest.mn	2013-04-04 16:02:33.807744163 -0700
f57139
@@ -65,4 +65,4 @@ REQUIRES = nspr
f57139
 
f57139
 LIBRARY_NAME = nsspem
f57139
 
f57139
-#EXTRA_SHARED_LIBS = -L$(DIST)/lib -lnssckfw -lnssb -lplc4 -lplds4
f57139
+EXTRA_SHARED_LIBS = -L$(DIST)/lib -lnssckfw -lnssb -lplc4 -lplds4 -L$(NSS_LIB_DIR) -lnssutil3 -lfreebl3 -lsoftokn3