aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch
blob: a3f2852515b70cdb3cdcd190dffbbf14a68da194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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