[vlc-commits] Contribs: fix libssh2 linking to gpg-error

Jean-Baptiste Kempf git at videolan.org
Sun Apr 9 20:48:21 CEST 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr  9 20:47:31 2017 +0200| [415081ffc047dc617d31ef59941c0c0907bd093b] | committer: Jean-Baptiste Kempf

Contribs: fix libssh2 linking to gpg-error

Since gcrypt people refuse .pc files...

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=415081ffc047dc617d31ef59941c0c0907bd093b
---

 ...error-to-.pc-to-facilitate-static-linking.patch | 30 ++++++++++++++++++++++
 contrib/src/ssh2/rules.mak                         |  2 ++
 2 files changed, 32 insertions(+)

diff --git a/contrib/src/ssh2/0001-Add-lgpg-error-to-.pc-to-facilitate-static-linking.patch b/contrib/src/ssh2/0001-Add-lgpg-error-to-.pc-to-facilitate-static-linking.patch
new file mode 100644
index 0000000000..fa8cc9b2d2
--- /dev/null
+++ b/contrib/src/ssh2/0001-Add-lgpg-error-to-.pc-to-facilitate-static-linking.patch
@@ -0,0 +1,30 @@
+From 2fc4ef54ec61e98e757a49719b859d8ee59af952 Mon Sep 17 00:00:00 2001
+From: Mikhail Gusarov <dottedmag at dottedmag.net>
+Date: Wed, 3 Sep 2014 15:47:19 +0200
+Subject: [PATCH] Add -lgpg-error to .pc to facilitate static linking
+
+Note that this patch is Debian-specific as we know that libssh2 is linked
+to gcrypt.
+
+Patching configure.ac to add gpg-error as a dependent library is not good, as it
+would cause overlinking of libssh2, and there is no separate variable for
+"static dependencies".
+
+All this mess ought to be solved in gcrypt inself by providing .pc file,
+but it is not.
+
+---
+ libssh2.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: libssh2/libssh2.pc.in
+===================================================================
+--- libssh2.orig/libssh2.pc.in
++++ libssh2/libssh2.pc.in
+@@ -13,5 +13,5 @@ Description: Library for SSH-based commu
+ Version: @LIBSSH2VER@
+ Requires.private: @LIBSREQUIRED@
+ Libs: -L${libdir} -lssh2 @LIBS@
+-Libs.private: @LIBS@
++Libs.private: @LIBS@ -lgpg-error
+ Cflags: -I${includedir}
diff --git a/contrib/src/ssh2/rules.mak b/contrib/src/ssh2/rules.mak
index 77aafdf7be..ac7acfe2bc 100644
--- a/contrib/src/ssh2/rules.mak
+++ b/contrib/src/ssh2/rules.mak
@@ -23,6 +23,8 @@ ssh2: libssh2-$(LIBSSH2_VERSION).tar.gz .sum-ssh2
 	$(UNPACK)
 	$(APPLY) $(SRC)/ssh2/no-tests.patch
 	$(APPLY) $(SRC)/ssh2/ced924b78a40126606797ef57a74066eb3b4b83f.patch
+	$(APPLY) $(SRC)/ssh2/0001-Add-lgpg-error-to-.pc-to-facilitate-static-linking.patch
+	$(call pkg_static,"libssh2.pc.in")
 ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/ssh2/winrt-no-agent.patch
 endif



More information about the vlc-commits mailing list