summaryrefslogtreecommitdiff
path: root/libgit2.pc.in
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-04-05 14:39:05 +0200
committerPatrick Steinhardt <ps@pks.im>2017-04-05 14:46:23 +0200
commit22436f29453b60abcc6646333607d0d41dac96ed (patch)
treec92014b8d7e68b91ab4327af52faa7593b72837a /libgit2.pc.in
parentcaf7a7a6b14b3b2f200f88f2f8d7a18ca10fd3ac (diff)
downloadlibgit2-22436f29453b60abcc6646333607d0d41dac96ed.tar.gz
pkgconfig: fix handling of prefixes containing whitespaces
Our libgit2.pc.in file is quoting the `libdir` variable in our declared "Libs:" line. The intention is to handle whitespaces here, but pkgconfig already does so by automatically escaping whitespace with backslashes. The correct thing to do is to instead quote the prefix, as this is the one which is being substituted by CMake upon installation. As both libdir and includedir will be expanded to "${prefix}/lib" and "${prefix}/include", respectively, pkgconfig will also correctly escape whitespaces. Note that this will actually break when a user manually wants to override libdir and includedir with a path containing whitespace. But actually, this cannot be helped, as always quoting these variables will actuall break the common case of being prefixed with "${prefix}". So we just bail out here and declare this as unsupported out of the box.
Diffstat (limited to 'libgit2.pc.in')
-rw-r--r--libgit2.pc.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgit2.pc.in b/libgit2.pc.in
index 329a560a7..96b965955 100644
--- a/libgit2.pc.in
+++ b/libgit2.pc.in
@@ -1,4 +1,4 @@
-prefix=@PKGCONFIG_PREFIX@
+prefix="@PKGCONFIG_PREFIX@"
libdir=@PKGCONFIG_LIBDIR@
includedir=@PKGCONFIG_INCLUDEDIR@
@@ -6,7 +6,7 @@ Name: libgit2
Description: The git library, take 2
Version: @LIBGIT2_VERSION_STRING@
-Libs: -L"${libdir}" -lgit2
+Libs: -L${libdir} -lgit2
Libs.private: @LIBGIT2_PC_LIBS@
Requires.private: @LIBGIT2_PC_REQUIRES@