From c3f52be6af2a0d1068b57de47c64de45e0287214 Mon Sep 17 00:00:00 2001 From: Serkan Kenar Date: Mon, 30 Mar 2026 12:44:35 +0100 Subject: [PATCH 1/5] Update zlib to 1.3.2. --- ...id-inclusions-when-HAVE_-is-set-to-0.patch | 53 ------------------ ...0002-build-static-or-shared-not-both.patch | 54 ------------------- ports/zlib/0003-android-and-mingw-fixes.patch | 30 ----------- ports/zlib/portfile.cmake | 9 +--- ports/zlib/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/z-/zlib.json | 5 ++ 7 files changed, 8 insertions(+), 147 deletions(-) delete mode 100644 ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch delete mode 100644 ports/zlib/0002-build-static-or-shared-not-both.patch delete mode 100644 ports/zlib/0003-android-and-mingw-fixes.patch diff --git a/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch b/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch deleted file mode 100644 index 8fe2b2f5a6683c..00000000000000 --- a/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/zconf.h.cmakein b/zconf.h.cmakein -index a7f24cc..a1b359b 100644 ---- a/zconf.h.cmakein -+++ b/zconf.h.cmakein -@@ -434,11 +434,19 @@ typedef uLong FAR uLongf; - #endif - - #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ --# define Z_HAVE_UNISTD_H -+# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 -+# define Z_HAVE_UNISTD_H -+# elif HAVE_UNISTD_H != 0 -+# define Z_HAVE_UNISTD_H -+# endif - #endif - - #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ --# define Z_HAVE_STDARG_H -+# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 -+# define Z_HAVE_STDARG_H -+# elif HAVE_STDARG_H != 0 -+# define Z_HAVE_STDARG_H -+# endif - #endif - - #ifdef STDC -diff --git a/zconf.h.in b/zconf.h.in -index 5e1d68a..32f53c8 100644 ---- a/zconf.h.in -+++ b/zconf.h.in -@@ -432,11 +432,19 @@ typedef uLong FAR uLongf; - #endif - - #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ --# define Z_HAVE_UNISTD_H -+# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 -+# define Z_HAVE_UNISTD_H -+# elif HAVE_UNISTD_H != 0 -+# define Z_HAVE_UNISTD_H -+# endif - #endif - - #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ --# define Z_HAVE_STDARG_H -+# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 -+# define Z_HAVE_STDARG_H -+# elif HAVE_STDARG_H != 0 -+# define Z_HAVE_STDARG_H -+# endif - #endif - - #ifdef STDC - diff --git a/ports/zlib/0002-build-static-or-shared-not-both.patch b/ports/zlib/0002-build-static-or-shared-not-both.patch deleted file mode 100644 index 60e3f8d39d93b9..00000000000000 --- a/ports/zlib/0002-build-static-or-shared-not-both.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -123,9 +123,11 @@ set(ZLIB_SRCS - ) - - if(NOT MINGW) -+ if(BUILD_SHARED_LIBS) - set(ZLIB_DLL_SRCS - win32/zlib1.rc # If present will override custom build rule below. - ) -+ endif() - endif() - - # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION -@@ -146,15 +148,17 @@ if(MINGW) - -I ${CMAKE_CURRENT_BINARY_DIR} - -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj - -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) -+ if(BUILD_SHARED_LIBS) - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) -+ endif() - endif(MINGW) - --add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) --add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) --target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -+if (BUILD_SHARED_LIBS) - set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) - set_target_properties(zlib PROPERTIES SOVERSION 1) -+endif() - - if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version -@@ -169,7 +173,7 @@ endif() - - if(UNIX) - # On unix-like platforms the library is almost always called libz -- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) -+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) - if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) - set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") - endif() -@@ -179,7 +183,7 @@ elseif(BUILD_SHARED_LIBS AND WIN32) - endif() - - if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) -- install(TARGETS zlib zlibstatic -+ install(TARGETS zlib - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) diff --git a/ports/zlib/0003-android-and-mingw-fixes.patch b/ports/zlib/0003-android-and-mingw-fixes.patch deleted file mode 100644 index a051372ca51100..00000000000000 --- a/ports/zlib/0003-android-and-mingw-fixes.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -58,7 +58,7 @@ endif() - # - check_include_file(unistd.h Z_HAVE_UNISTD_H) - --if(MSVC) -+if(WIN32) - set(CMAKE_DEBUG_POSTFIX "d") - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) -@@ -135,7 +135,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) - string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" - "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) - --if(MINGW) -+if(MINGW AND NOT ANDROID) - # This gets us DLL resource information when compiling on MinGW. - if(NOT CMAKE_RC_COMPILER) - set(CMAKE_RC_COMPILER windres.exe) -@@ -151,7 +151,7 @@ if(MINGW) - if(BUILD_SHARED_LIBS) - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) - endif() --endif(MINGW) -+endif(MINGW AND NOT ANDROID) - - add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 61733a4b2ea798..706ee757a01f1e 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -3,17 +3,10 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO madler/zlib REF v${VERSION} - SHA512 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088 + SHA512 16fea4df307a68cf0035858abe2fd550250618a97590e202037acd18a666f57afc10f8836cbbd472d54a0e76539d0e558cb26f059d53de52ff90634bbf4f47d4 HEAD_REF master - PATCHES - 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch - 0002-build-static-or-shared-not-both.patch - 0003-android-and-mingw-fixes.patch ) -# This is generated during the cmake build -file(REMOVE "${SOURCE_PATH}/zconf.h") - vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/ports/zlib/vcpkg.json b/ports/zlib/vcpkg.json index f54a99d43e600c..1235acdfae486f 100644 --- a/ports/zlib/vcpkg.json +++ b/ports/zlib/vcpkg.json @@ -1,6 +1,6 @@ { "name": "zlib", - "version": "1.3.1", + "version": "1.3.2", "description": "A compression library", "homepage": "https://www.zlib.net/", "license": "Zlib", diff --git a/versions/baseline.json b/versions/baseline.json index c8dbe15e5a21b1..b1eb1e3647c8bd 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -11101,7 +11101,7 @@ "port-version": 5 }, "zlib": { - "baseline": "1.3.1", + "baseline": "1.3.2", "port-version": 0 }, "zlib-ng": { diff --git a/versions/z-/zlib.json b/versions/z-/zlib.json index a994f3607a1c3c..f034a5f6f975a8 100644 --- a/versions/z-/zlib.json +++ b/versions/z-/zlib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ee5008276c679a9ebf40c3d373d2a1a793ef0fb8", + "version": "1.3.2", + "port-version": 0 + }, { "git-tree": "3f05e04b9aededb96786a911a16193cdb711f0c9", "version": "1.3.1", From 9daf050f5c311db1651366304668b53d3f20535d Mon Sep 17 00:00:00 2001 From: Serkan Kenar Date: Mon, 30 Mar 2026 14:16:46 +0100 Subject: [PATCH 2/5] Remove unused macros, rename changed. --- ports/zlib/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 706ee757a01f1e..fb7bddbbac8d62 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -10,10 +10,8 @@ vcpkg_from_github( vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DSKIP_INSTALL_FILES=ON - -DZLIB_BUILD_EXAMPLES=OFF + -DZLIB_BUILD_TESTING=OFF OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON ) vcpkg_cmake_install() From 42d351cb17c3453408678706003d05f2db392872 Mon Sep 17 00:00:00 2001 From: Serkan Kenar Date: Mon, 30 Mar 2026 14:21:28 +0100 Subject: [PATCH 3/5] Update version. --- versions/z-/zlib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zlib.json b/versions/z-/zlib.json index f034a5f6f975a8..de015b7b0a125e 100644 --- a/versions/z-/zlib.json +++ b/versions/z-/zlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ee5008276c679a9ebf40c3d373d2a1a793ef0fb8", + "git-tree": "cfafcf4e0108067c1dd3a8b0bf06d17c0503926b", "version": "1.3.2", "port-version": 0 }, From 89d8091dff285fc9f6dd2a941605979d343222db Mon Sep 17 00:00:00 2001 From: Serkan Kenar Date: Mon, 30 Mar 2026 15:32:32 +0100 Subject: [PATCH 4/5] Fix cmake warnings. --- ports/zlib/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index fb7bddbbac8d62..f98108838fac43 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -11,7 +11,6 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DZLIB_BUILD_TESTING=OFF - OPTIONS_DEBUG ) vcpkg_cmake_install() @@ -32,6 +31,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup() vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -42,3 +42,5 @@ endif() file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") From 4f80aaead12998ac45c38eacf4e6334e2fad7169 Mon Sep 17 00:00:00 2001 From: Serkan Kenar Date: Mon, 30 Mar 2026 15:50:09 +0100 Subject: [PATCH 5/5] Fix cmake install fixup. --- ports/zlib/portfile.cmake | 2 +- ports/zlib/vcpkg.json | 4 ++++ versions/z-/zlib.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index f98108838fac43..46a591a7c1a873 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -31,7 +31,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() vcpkg_fixup_pkgconfig() -vcpkg_cmake_config_fixup() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/zlib") vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/zlib/vcpkg.json b/ports/zlib/vcpkg.json index 1235acdfae486f..67a73aba1ec4fa 100644 --- a/ports/zlib/vcpkg.json +++ b/ports/zlib/vcpkg.json @@ -8,6 +8,10 @@ { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } diff --git a/versions/z-/zlib.json b/versions/z-/zlib.json index de015b7b0a125e..b9c9d070458007 100644 --- a/versions/z-/zlib.json +++ b/versions/z-/zlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cfafcf4e0108067c1dd3a8b0bf06d17c0503926b", + "git-tree": "9e9d5bdeb3178e155814654bd8243d08f2872794", "version": "1.3.2", "port-version": 0 },