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..46a591a7c1a873 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -3,24 +3,14 @@ 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 - -DSKIP_INSTALL_FILES=ON - -DZLIB_BUILD_EXAMPLES=OFF - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON + -DZLIB_BUILD_TESTING=OFF ) vcpkg_cmake_install() @@ -41,6 +31,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/zlib") vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -51,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") diff --git a/ports/zlib/vcpkg.json b/ports/zlib/vcpkg.json index f54a99d43e600c..67a73aba1ec4fa 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", @@ -8,6 +8,10 @@ { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } 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..b9c9d070458007 100644 --- a/versions/z-/zlib.json +++ b/versions/z-/zlib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9e9d5bdeb3178e155814654bd8243d08f2872794", + "version": "1.3.2", + "port-version": 0 + }, { "git-tree": "3f05e04b9aededb96786a911a16193cdb711f0c9", "version": "1.3.1",