summaryrefslogtreecommitdiff
path: root/package/libnl
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-07 12:40:19 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-15 18:09:17 +0100
commit155b219245bca431819a4d6886712ce39d71d813 (patch)
tree3437e9e779e42bf17bc2cd497e58047cc1d97f41 /package/libnl
parent25c3fe8d1c37bee8619b3e50f2102da35e76fc08 (diff)
libnl: add patch to add Libs.private in libnl-3.0.pc
Having a properly defined Libs.private field allows to make sure static linking against libnl-3.0 works fine, at least as long as pkg-config is used. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Diffstat (limited to 'package/libnl')
-rw-r--r--package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch b/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch
new file mode 100644
index 000000000..845a59376
--- /dev/null
+++ b/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch
@@ -0,0 +1,30 @@
+From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 7 Mar 2015 11:34:42 +0100
+Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file
+
+In order to support static linking, the libnl pkg-config file should
+indicate in its Libs.private field the libraries that libnl-3.0.a
+requires. The LIBS variable contains the appropriate list of
+libraries: -lm in all cases, and -lpthread when pthread support is
+enabled. This allows to statically link applications against libnl
+properly.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ libnl-3.0.pc.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libnl-3.0.pc.in b/libnl-3.0.pc.in
+index b87e3dc..ddbc999 100644
+--- a/libnl-3.0.pc.in
++++ b/libnl-3.0.pc.in
+@@ -7,4 +7,5 @@ Name: libnl
+ Description: Convenience library for netlink sockets
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lnl-@MAJ_VERSION@
++Libs.private: @LIBS@
+ Cflags: -I${includedir}/libnl@MAJ_VERSION@
+--
+2.1.0
+