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