summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch')
-rw-r--r--gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch b/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch
new file mode 100644
index 0000000000..a3f2852515
--- /dev/null
+++ b/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch
@@ -0,0 +1,34 @@
+From 7a86f357ffa2339a67991e5f4f5610a218e80693 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Mon, 3 Aug 2020 17:43:19 -0400
+Subject: [PATCH 2/2] build.mak.in: Filter out 3rd party libraries from
+ PJ_INSTALL_LDFLAGS.
+
+This is done so users of the installed pjproject libraries do not get
+directives (provided via pkg-config file of pjproject) to link against
+pjproject's own library dependencies.
+
+* build.mak.in (THIRD_PARTY_LIBRARIES): New variable.
+(PJ_INSTALL_LDFLAGS): Filter out THIRD_PARTY_LIBRARIES.
+---
+ build.mak.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build.mak.in b/build.mak.in
+index a9078bb25..86fd1ec30 100644
+--- a/build.mak.in
++++ b/build.mak.in
+@@ -314,8 +314,9 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FILES)
+
+ # And here are the variables to use if application is using the
+ # library from the install location (i.e. --prefix)
++THIRD_PARTY_LIBRARIES := $(APP_THIRD_PARTY_LIBS) $(APP_THIRD_PARTY_EXT) @LIBS@
+ export PJ_INSTALL_DIR := @prefix@
+ export PJ_INSTALL_INC_DIR := @includedir@
+ export PJ_INSTALL_LIB_DIR := @libdir@
+ export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @ac_cflags@
+-export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDXXLIBS)
++export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(filter-out $(THIRD_PARTY_LIBRARIES),$(APP_LDXXLIBS))
+--
+2.27.0
+