gnome-base/gnome: Updated meta
[phenriksson.git] / local-misc / net-libs / xulrunner / files / 302_honour-native-nss-nspr.patch
blob55f558534dbc39ba2b5ef126e42c755f3f696429
1 Add proper support for xulrunner-1.9.2 system nss/nspr
3 --- xulrunner/installer/libxul-embedding.pc.in 2009-11-11 11:20:38.000000000 -0600
4 +++ xulrunner/installer/libxul-embedding.pc.in 2009-11-11 11:22:10.000000000 -0600
5 @@ -7,4 +7,4 @@
6 Description: Static library for version-independent embedding of the Mozilla runtime
7 Version: %MOZILLA_VERSION%
8 Libs: -L${sdkdir}/lib -lxpcomglue
9 -Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
10 +Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% %FULL_NSPR_CFLAGS%
11 --- xulrunner/installer/Makefile.in 2009-11-11 11:20:38.000000000 -0600
12 +++ xulrunner/installer/Makefile.in 2009-11-11 11:26:56.000000000 -0600
13 @@ -94,19 +94,28 @@
14 ifdef MOZ_NATIVE_NSPR
15 NSPR_NAME=nspr
16 NSPR_VERSION=$(shell $(NSPR_CONFIG) --version)
17 +FULL_NSPR_CFLAGS=$(shell $(NSPR_CONFIG) --cflags)
18 +FULL_NSPR_LIBS=$(shell $(NSPR_CONFIG) --libs)
19 else
20 -pkg_config_files += mozilla-nspr.pc
21 NSPR_NAME=mozilla-nspr
22 FULL_NSPR_CFLAGS=-I\$${includedir}
23 FULL_NSPR_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
24 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
25 endif
26 +pkg_config_files += mozilla-nspr.pc
28 $(warning FULL_NSPR_CFLAGS=$(FULL_NSPR_CFLAGS))
30 -ifndef MOZ_NATIVE_NSS
31 -pkg_config_files += mozilla-nss.pc
32 +ifdef MOZ_NATIVE_NSS
33 +NSS_VERSION=$(shell $(NSS_CONFIG) --version)
34 +FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
35 +FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
36 +else
37 +NSS_VERSION=$(shell $(DEPTH)/nsprpub/config/nss-config --version)
38 +FULL_NSS_CFLAGS=-I\$${includedir}/stable
39 +FULL_NSS_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nss-config --libs))
40 endif
41 +pkg_config_files += mozilla-nss.pc
43 ifdef MOZ_OJI
44 OJIDEF=-DOJI
45 @@ -127,7 +136,10 @@
46 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
47 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
48 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
49 - -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
50 + -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
51 + -e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
52 + -e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
53 + -e "s|%NSS_VERSION%|$(NSS_VERSION)|" > $@
54 chmod 644 $@
56 install:: $(pkg_config_files)
57 --- xulrunner/installer/mozilla-nss.pc.in 2009-11-11 11:20:38.000000000 -0600
58 +++ xulrunner/installer/mozilla-nss.pc.in 2009-11-11 11:22:13.000000000 -0600
59 @@ -4,7 +4,7 @@
61 Name: NSS
62 Description: Mozilla Network Security Services
63 -Version: %MOZILLA_VERSION%
64 +Version: %NSS_VERSION%
65 Requires: %NSPR_NAME% >= %NSPR_VERSION%
66 -Libs: -L${sdkdir}/lib -lsmime3 -lssl3 -lnss3 -lnssutil3
67 -Cflags: -I${includedir}
68 +Libs: %FULL_NSS_LIBS%
69 +Cflags: %FULL_NSS_CFLAGS%