Skip to content

Commit

Permalink
[zlib-ng] Update to 2.1.6 (#184)
Browse files Browse the repository at this point in the history
* [zlib-ng] update to 2.1.6

* [zlib-ng] update baseline

* [zlib-ng] update fix-cmake.patch
  • Loading branch information
luncliff authored Mar 26, 2024
1 parent 9134044 commit 399b1f0
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 13 deletions.
19 changes: 19 additions & 0 deletions ports/zlib-ng/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bcfaf7..3d11f12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1208,9 +1208,11 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
endif()
endif()
install(TARGETS ${ZLIB_INSTALL_LIBRARIES}
- EXPORT ${EXPORT_NAME}
- DESTINATION "${CMAKE_INSTALL_LIBDIR}")
- install(EXPORT ${EXPORT_NAME}
+ EXPORT ${EXPORT_NAME}Config
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ install(EXPORT ${EXPORT_NAME}Config
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}"
NAMESPACE ${EXPORT_NAME}::)
endif()
27 changes: 16 additions & 11 deletions ports/zlib-ng/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zlib-ng/zlib-ng
REF 2.0.7
SHA512 1c19a62bb00727ac49049c299fb70060da95b5fafa448144ae4133372ec8c3da15cef6c1303485290f269b23c580696554ca0383dba3e1f9609f65c332981988
HEAD_REF master
REF 2.1.6
SHA512 59ef586c09b9a63788475abfd6dd59ed602316b38f543f801bea802ff8bec8b55a89bee90375b8bbffa3bdebc7d92a00903f4b7c94cdc1a53a36e2e1fd71d13a
HEAD_REF develop
PATCHES
fix-cmake.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
# list(APPEND ARCH_OPTIONS)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
# list(APPEND ARCH_OPTIONS)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
# list(APPEND ARCH_OPTIONS)
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
Expand All @@ -21,8 +16,13 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${ARCH_OPTIONS} ${FEATURE_OPTIONS}
${FEATURE_OPTIONS}
-DSKIP_INSTALL_ALL=OFF
-DSKIP_INSTALL_HEADERS=OFF
-DSKIP_INSTALL_LIBRARIES=OFF
-DSKIP_INSTALL_FILES=OFF
-DZLIB_ENABLE_TESTS=OFF
-DZLIBNG_ENABLE_TESTS=OFF
-DWITH_NEW_STRATEGIES=ON
-DWITH_NATIVE_INSTRUCTIONS=OFF # `-march=native` breaks `check_c_source_compiles`
OPTIONS_DEBUG
Expand All @@ -31,6 +31,11 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig() # zlib-ng>=2.0
if("zlib-compat" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZLIB PACKAGE_NAME ZLIB)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zlib-ng PACKAGE_NAME zlib-ng)
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/include"
Expand Down
6 changes: 5 additions & 1 deletion ports/zlib-ng/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "zlib-ng",
"version": "2.0.7",
"version": "2.1.6",
"description": "zlib replacement with optimizations for 'next generation' systems",
"homepage": "https://github.com/zlib-ng/zlib-ng",
"license": "Zlib",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"port-version": 1
},
"zlib-ng": {
"baseline": "2.0.7",
"baseline": "2.1.6",
"port-version": 0
}
}
Expand Down
5 changes: 5 additions & 0 deletions versions/z-/zlib-ng.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8eeae331a085e2e8447359500c84bcb701e29eb6",
"version": "2.1.6",
"port-version": 0
},
{
"git-tree": "4ef6900d01db2348cc5fab186ba0394f237f8a47",
"version": "2.0.7",
Expand Down

0 comments on commit 399b1f0

Please sign in to comment.