summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-22 08:35:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-22 08:52:17 +0200
commit5110964b590f5e6af70ed190e34320567c655793 (patch)
tree07281df48255e6df06ba472aff0aa79a1d1910d1 /nss
parente4d8eaab8c9413fa102a56364c5f3c632e3ca43e (diff)
Fix nss library paths for Mac OS X
nss uses hard-coded @executable_path (which is wrong, consider e.g. the case of the URE uno executable), so patch it to use @_..._OOO instead (and no need to set --prefix), and pass the resulting libs through macosx-change-install-names (which requires the generated libs to be writable). Change-Id: I0f04533f0f0581ee7b9dfd8929b8629c0842cc1b (cherry picked from commit 2bb3500284182756116890e24fa12be8dace0753)
Diffstat (limited to 'nss')
-rw-r--r--nss/ExternalProject_nss.mk14
-rw-r--r--nss/nss_macosx.patch55
2 files changed, 68 insertions, 1 deletions
diff --git a/nss/ExternalProject_nss.mk b/nss/ExternalProject_nss.mk
index 5bd53613f028..8a1d489addbb 100644
--- a/nss/ExternalProject_nss.mk
+++ b/nss/ExternalProject_nss.mk
@@ -20,7 +20,6 @@ $(call gb_ExternalProject_get_state_target,nss,configure):
mozilla/nsprpub/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter MSCX,$(COM)$(CPU)),--enable-64bit) \
- $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
&& sed -e 's%@prefix@%$(OUTDIR)%' \
-e 's%@includedir@%$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss%' \
-e 's%@MOD_MAJOR_VERSION@%$(NSS_MAJOR)%' \
@@ -73,6 +72,19 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject
NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py") \
NSDISTMODE=copy \
$(MAKE) -j1 nss_build_all \
+ $(if $(filter MACOSX,$(OS)),&& $(PERL) \
+ $(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libfreebl3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libnspr4.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libnss3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libnssckbi.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libnssdbm3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libnssutil3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libplc4.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libplds4.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libsmime3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libsoftokn3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/mozilla/dist/out/lib/libssl3.dylib) \
,mozilla/security/nss)
endif
diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch
index ac6fe7138e3e..6b5096072f5c 100644
--- a/nss/nss_macosx.patch
+++ b/nss/nss_macosx.patch
@@ -10,3 +10,58 @@
ifdef USE_DEBUG_RTL
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
+--- misc/nss-3.13.5/mozilla/nsprpub/configure
++++ misc/build/nss-3.13.5/mozilla/nsprpub/configure
+@@ -3888,7 +3889,7 @@
+ fi
+
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
+ _OPTIMIZE_FLAGS=-O2
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
+--- misc/nss-3.13.5/mozilla/nsprpub/lib/ds/Makefile.in
++++ misc/build/nss-3.13.5/mozilla/nsprpub/lib/ds/Makefile.in
+@@ -143,7 +143,7 @@
+
+ export:: $(TARGETS)
+ $(INSTALL) -m 444 $(HEADERS) $(dist_includedir)
+- $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
++ $(INSTALL) -m 664 $(TARGETS) $(dist_libdir)
+ ifdef SHARED_LIBRARY
+ ifeq ($(OS_ARCH),HP-UX)
+ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
+--- misc/nss-3.13.5/mozilla/nsprpub/lib/libc/src/Makefile.in
++++ misc/build/nss-3.13.5/mozilla/nsprpub/lib/libc/src/Makefile.in
+@@ -144,7 +144,7 @@
+ #
+
+ export:: $(TARGETS)
+- $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
++ $(INSTALL) -m 664 $(TARGETS) $(dist_libdir)
+ ifdef SHARED_LIBRARY
+ ifeq ($(OS_ARCH),HP-UX)
+ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
+--- misc/nss-3.13.5/mozilla/nsprpub/pr/src/Makefile.in
++++ misc/build/nss-3.13.5/mozilla/nsprpub/pr/src/Makefile.in
+@@ -365,7 +365,7 @@
+ #
+
+ build:: $(TARGETS)
+- $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
++ $(INSTALL) -m 664 $(TARGETS) $(dist_libdir)
+ ifdef SHARED_LIBRARY
+ ifeq ($(OS_ARCH),HP-UX)
+ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
+--- misc/nss-3.13.5/mozilla/security/coreconf/Darwin.mk
++++ misc/build/nss-3.13.5/mozilla/security/coreconf/Darwin.mk
+@@ -150,7 +150,7 @@
+ # May override this with different compatibility and current version numbers.
+ DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
+ # May override this with -bundle to create a loadable module.
+-DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
++DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @__________________________________________________OOO/$(notdir $@) -headerpad_max_install_names
+
+ MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
+ DLL_SUFFIX = dylib