Bump version to 5.0-14
[LibreOffice.git] / external / nss / nss_macosx.patch
blob40d02c955160f19a4c6b0ab27f8310afe45581d7
1 diff -ru a/nspr/configure b/nspr/configure
2 --- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100
3 +++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100
4 @@ -6577,7 +6579,7 @@
7 DSO_CFLAGS=-fPIC
8 - DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
9 + DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
10 _OPTIMIZE_FLAGS=-O2
11 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
12 STRIP="$STRIP -x -S"
13 diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
14 --- a/a/nss/coreconf/Darwin.mk 2014-09-29 16:50:22.992304799 +0100
15 +++ b/b/nss/coreconf/Darwin.mk 2014-09-29 16:51:59.214931953 +0100
16 @@ -7,8 +7,12 @@
18 DEFAULT_COMPILER = gcc
20 -CC = gcc
21 -CCC = g++
22 +# CC is taken from environment automatically.
23 +#CC = cc
24 +# Use CCC from environment.
25 +#CCC = c++
26 +CCC = $(CXX)
28 RANLIB = ranlib
30 ifndef CPU_ARCH
31 @@ -19,11 +23,15 @@
33 ifeq (,$(filter-out i%86,$(CPU_ARCH)))
34 ifdef USE_64
35 +ifeq (,$(findstring -arch ,$(CC)))
36 CC += -arch x86_64
37 +endif
38 override CPU_ARCH = x86_64
39 else
40 OS_REL_CFLAGS = -Di386
41 +ifeq (,$(findstring -arch ,$(CC)))
42 CC += -arch i386
43 +endif
44 override CPU_ARCH = x86
45 endif
46 else
47 @@ -31,12 +39,16 @@
48 endif
50 ifneq (,$(MACOS_SDK_DIR))
51 + CLANG_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "clang version" | sed -e "s/^.*clang version[ ]*//" | awk '{ print $$1 }')
52 GCC_VERSION_FULL := $(shell $(CC) -dumpversion)
53 GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$1 }')
54 GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$2 }')
55 GCC_VERSION = $(GCC_VERSION_MAJOR).$(GCC_VERSION_MINOR)
56 + ifneq (,$(CLANG_VERSION_FULL))
57 + DARWIN_SDK_CFLAGS = -isysroot $(MACOS_SDK_DIR)
58 + DARWIN_SDK_SHLIBFLAGS = -isysroot $(MACOS_SDK_DIR)
60 - ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
61 + else ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
62 # GCC <= 3
63 DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
64 ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))
65 @@ -104,7 +115,7 @@
66 # May override this with different compatibility and current version numbers.
67 DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
68 # May override this with -bundle to create a loadable module.
69 -DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
70 +DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @__________________________________________________OOO/$(notdir $@) -headerpad_max_install_names
72 MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
73 DLL_SUFFIX = dylib
74 diff -ru a/nss/Makefile b/nss/Makefile
75 --- a/a/nss/Makefile 2014-09-29 16:50:22.990304789 +0100
76 +++ b/b/nss/Makefile 2014-09-29 16:51:59.207931908 +0100
77 @@ -72,6 +72,9 @@
78 ifeq ($(OS_TARGET),WIN95)
79 NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
80 endif
81 +ifdef MACOS_SDK_DIR
82 +NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
83 +endif
84 ifdef USE_DEBUG_RTL
85 NSPR_CONFIGURE_OPTS += --enable-debug-rtl
86 endif