From 640750e1aba814928825e2d337c1bb70bf1f680f Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 7 Feb 2017 12:06:41 +0100 Subject: [PATCH] zlib patch to use std name for lib. Use a standard name libz.(so|a) if we are using mingw (as we do on linux). This patch somehow deprecate the previous commit (patch) but both patches are the right thing to do. We need this one especially for others dependencies using pkg-config. The generated .pc always use the '-lz' option and so, we need the correct names for the lib. --- kiwix-build.py | 1 + patches/zlib_std_libname.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 patches/zlib_std_libname.patch diff --git a/kiwix-build.py b/kiwix-build.py index 0953bc4..a9d0dca 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -752,6 +752,7 @@ class zlib(Dependency): class Source(ReleaseDownload): archive = Remotefile('zlib-1.2.8.tar.gz', '36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d') + patches = ['zlib_std_libname.patch'] class Builder(CMakeBuilder): @property diff --git a/patches/zlib_std_libname.patch b/patches/zlib_std_libname.patch new file mode 100644 index 0000000..93623bc --- /dev/null +++ b/patches/zlib_std_libname.patch @@ -0,0 +1,15 @@ +diff -ur zlib-1.2.8/CMakeLists.txt zlib-1.2.8.std_libname/CMakeLists.txt +--- zlib-1.2.8/CMakeLists.txt 2013-04-29 00:57:10.000000000 +0200 ++++ zlib-1.2.8.std_libname/CMakeLists.txt 2017-02-07 11:56:21.826507000 +0100 +@@ -205,6 +205,9 @@ + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() ++elseif(MINGW) ++ # On unix-like platforms the library is almost always called libz ++ set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) + elseif(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version + set_target_properties(zlib PROPERTIES SUFFIX "1.dll") +Only in zlib-1.2.8: zconf.h +Only in zlib-1.2.8.std_libname: zconf.h.included