diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
commit | 17dddeeee560527a8f30d37761949d658056cb09 (patch) | |
tree | 15b0b19c55787f556eb9b42c28d173bddc5435db /gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch | |
parent | 331a09654eb7e9f6212b7e8469077fa7393e8b11 (diff) | |
parent | 6a9581741e4ee81226aeb2f1c997df76670a6aab (diff) | |
download | guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch')
-rw-r--r-- | gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch | 79 |
1 files changed, 79 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..1199d82f1e --- /dev/null +++ b/gnu/packages/patches/pjproject-fix-pkg-config-ldflags.patch @@ -0,0 +1,79 @@ +From 9bcba7fb28055550961b134e517b695a8cd05b2a 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] libpjproject.pc: Move external libraries to Libs.private. + +This is done so users of a shared pjproject library do not get link +directives (provided via pkg-config file of pjproject) to link against +pjproject's own library dependencies. + +Static linking with pjproject is preserved by moving the external +libraries link directives to the Libs.private field, which is +specifically intended for this purpose, via for example: + + $ pkg-config --static --libs libpjproject + +* build.mak.in (PJ_INSTALL_LDFLAGS_PRIVATE): New variable. +(PJ_INSTALL_LDFLAGS): Filter out PJ_INSTALL_LDFLAGS_PRIVATE entries. +* libpjproject.pc.in (Libs.private): New field. +* Makefile: Substitute PJ_INSTALL_LDFLAGS_PRIVATE as the value for the +Libs.private field. +--- + Makefile | 5 +++-- + build.mak.in | 3 ++- + libpjproject.pc.in | 1 + + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 3fd5cab40..d67badfa4 100644 +--- a/Makefile ++++ b/Makefile +@@ -54,14 +54,14 @@ doc: + exit 1; \ + fi; \ + done +- ++ + LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \ + pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \ + pjnath/lib/libpjnath-$(TARGET_NAME).a \ + pjmedia/lib/libpjmedia-$(TARGET_NAME).a \ + pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \ + pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \ +- pjsip/lib/libpjsip-$(TARGET_NAME).a \ ++ pjsip/lib/libpjsip-$(TARGET_NAME).a \ + pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \ + pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \ + pjsip/lib/libpjsua-$(TARGET_NAME).a +@@ -133,6 +133,7 @@ install: + sed -e "s!@LIBDIR@!$(libdir)!" | \ + sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \ + sed -e "s!@PJ_INSTALL_LDFLAGS@!$(PJ_INSTALL_LDFLAGS)!" | \ ++ sed -e "s!@PJ_INSTALL_LDFLAGS_PRIVATE@!$(PJ_INSTALL_LDFLAGS_PRIVATE)!" | \ + sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(libdir)/pkgconfig/libpjproject.pc + + uninstall: +diff --git a/build.mak.in b/build.mak.in +index a9078bb25..1a18a8513 100644 +--- a/build.mak.in ++++ b/build.mak.in +@@ -318,4 +318,5 @@ 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_PRIVATE := $(APP_THIRD_PARTY_LIBS) $(APP_THIRD_PARTY_EXT) @LIBS@ ++export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(filter-out $(PJ_INSTALL_LDFLAGS_PRIVATE),$(APP_LDXXLIBS)) +diff --git a/libpjproject.pc.in b/libpjproject.pc.in +index 30ea05c07..4372d5016 100644 +--- a/libpjproject.pc.in ++++ b/libpjproject.pc.in +@@ -10,4 +10,5 @@ Description: Multimedia communication library + URL: http://www.pjsip.org + Version: @PJ_VERSION@ + Libs: @PJ_INSTALL_LDFLAGS@ ++Libs.private: @PJ_INSTALL_LDFLAGS_PRIVATE@ + Cflags: @PJ_INSTALL_CFLAGS@ +-- +2.27.0 + |