aboutsummaryrefslogtreecommitdiffstats
path: root/tools/zlib/patches/900-overridable-pc-exec-prefix.patch
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-05-24 17:01:54 +0200
committerJo-Philipp Wich <jo@mein.io>2018-05-24 17:07:10 +0200
commit4da832e201da2493b66024f234a78a2249af4aff (patch)
tree0f30314c23722faa486f0d5c6db661815f9d4f0d /tools/zlib/patches/900-overridable-pc-exec-prefix.patch
parente6b8ce4c081b0bdfbbd20477ecef18b285481b07 (diff)
downloadupstream-4da832e201da2493b66024f234a78a2249af4aff.tar.gz
upstream-4da832e201da2493b66024f234a78a2249af4aff.tar.bz2
upstream-4da832e201da2493b66024f234a78a2249af4aff.zip
tools: zlib: do not hardcode the install prefix in zlib.pc
Our pkg-config wrapper relies on the ability to redefine the $prefix and $exec_prefix variables in order to construct proper search paths relative to the build environment. Patch the .pc file template to construct libdir, sharedlibdir and includedir relative to the ${prefix} variable so that it can be overridden as needed. This also fixes the libxml2/host build issue raised at https://github.com/openwrt/packages/issues/6073 - it was caused by libxml2's configure picking up a wrong host search path through zlib.pc, letting it include the wrong endian.h, causing spurious member redeclaration errors in system headers. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tools/zlib/patches/900-overridable-pc-exec-prefix.patch')
-rw-r--r--tools/zlib/patches/900-overridable-pc-exec-prefix.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/zlib/patches/900-overridable-pc-exec-prefix.patch b/tools/zlib/patches/900-overridable-pc-exec-prefix.patch
new file mode 100644
index 0000000000..4f1e376c90
--- /dev/null
+++ b/tools/zlib/patches/900-overridable-pc-exec-prefix.patch
@@ -0,0 +1,14 @@
+--- a/zlib.pc.cmakein
++++ b/zlib.pc.cmakein
+@@ -1,8 +1,8 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+-libdir=@INSTALL_LIB_DIR@
+-sharedlibdir=@INSTALL_LIB_DIR@
+-includedir=@INSTALL_INC_DIR@
++libdir=${prefix}/lib
++sharedlibdir=${prefix}/lib
++includedir=${prefix}/include
+
+ Name: zlib
+ Description: zlib compression library