mozilla-pkgconfig.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Sun, 23 Feb 2014 13:05:04 +0100
branchesr24
changeset 706 4639b5ad4fce
parent 585 5a44d417c9b5
child 686 ab25aac2aa83
permissions -rw-r--r--
Google API key inclusion

From: Wolfgang Rosenauer
Subject: pkgconfig tuning

diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in
--- a/xulrunner/installer/Makefile.in
+++ b/xulrunner/installer/Makefile.in
@@ -39,16 +39,19 @@ ifndef MOZ_PLATFORM_MAEMO
 GENERATE_CACHE = 1
 endif
 
 include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 # Add pkg-config files to the install:: target
 
+# the apilibdir always ends with 1.9 as every patch update will provide a link
+apilibdir = $(dir $(installdir))xulrunner-18
+
 pkg_config_files = \
 	libxul.pc \
 	libxul-embedding.pc \
 	mozilla-js.pc \
 	mozilla-plugin.pc \
 	$(NULL)
 
 ifdef MOZ_NATIVE_NSPR
@@ -76,16 +79,17 @@ pkg_config_files += mozilla-nss.pc
 endif
 
 %.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
 	cat $< | sed \
 	-e "s|%prefix%|$(prefix)|" \
 	-e "s|%includedir%|$(includedir)|" \
 	-e "s|%idldir%|$(idldir)|" \
 	-e "s|%sdkdir%|$(sdkdir)|" \
+	-e "s|%libdir%|$(apilibdir)|" \
 	-e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
 	-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
 	-e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
 	-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
 	-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
 	-e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
 	-e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
 	-e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \
diff --git a/xulrunner/installer/libxul-embedding.pc.in b/xulrunner/installer/libxul-embedding.pc.in
--- a/xulrunner/installer/libxul-embedding.pc.in
+++ b/xulrunner/installer/libxul-embedding.pc.in
@@ -1,10 +1,11 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
 
 Name: libxul-embedding
 Description: Static library for version-independent embedding of the Mozilla runtime
 Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue -ldl
+Requires: %NSPR_NAME% >= %NSPR_VERSION%
+Libs: -L${sdkdir}/sdk/lib -lxpcomglue -ldl
 Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
diff --git a/xulrunner/installer/libxul.pc.in b/xulrunner/installer/libxul.pc.in
--- a/xulrunner/installer/libxul.pc.in
+++ b/xulrunner/installer/libxul.pc.in
@@ -1,10 +1,11 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
+libdir=%libdir%
 includedir=%includedir%
 idldir=%idldir%
 
 Name: libxul
 Description: The Mozilla Runtime and Embedding Engine
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${sdkdir}/lib %MOZ_XUL_LINK%
diff --git a/xulrunner/installer/mozilla-js.pc.in b/xulrunner/installer/mozilla-js.pc.in
--- a/xulrunner/installer/mozilla-js.pc.in
+++ b/xulrunner/installer/mozilla-js.pc.in
@@ -1,10 +1,11 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
+libdir=%libdir%
 includedir=%includedir%
 
 Name: JavaScript
 Description: The Mozilla JavaScript Library
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
+Libs: -Wl,-rpath,${libdir} -L${sdkdir}/lib %MOZ_JS_LINK%
 Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE