Skip to content

Commit 5cb0b7c

Browse files
committed
Map zlib to zlib-ng
Remove the zlib port implementation and instead create an empty zlib port that depends on zlib-ng.
1 parent e82dce6 commit 5cb0b7c

File tree

5 files changed

+13
-52
lines changed

5 files changed

+13
-52
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ jobs:
4444
- name: Read zlib config
4545
if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure'
4646
continue-on-error: true
47-
run: Get-Content ./buildtrees/zlib/config-${{ matrix.triplet }}-out.log
47+
run: Get-Content ./buildtrees/zlib-ng/config-${{ matrix.triplet }}-out.log
4848
- name: Read zlib debug build log
4949
if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure'
5050
continue-on-error: true
51-
run: Get-Content ./buildtrees/zlib/install-${{ matrix.triplet }}-dbg-out.log
51+
run: Get-Content ./buildtrees/zlib-ng/install-${{ matrix.triplet }}-dbg-out.log
5252
- name: Read zlib release build log
5353
if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure'
5454
continue-on-error: true
55-
run: Get-Content ./buildtrees/zlib/install-${{ matrix.triplet }}-rel-out.log
55+
run: Get-Content ./buildtrees/zlib-ng/install-${{ matrix.triplet }}-rel-out.log
5656

5757
- name: Build brotli
5858
id: brotli

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
| Library | Version | Release Date |
2323
|---|:---:|:---:|
2424
| [icu](http://site.icu-project.org) | 76.1 | 2024-10-24 |
25-
| [zlib](https://github.com/zlib-ng/zlib-ng) | 2.2.2 | 2024-09-17 |
2625
| [curl](https://curl.se) | 8.11.0 | 2024-11-05 |
2726
| [libxml2](http://xmlsoft.org) | 2.13.5 | 2024-11-12 |
2827
| [sqlite](http://sqlite.org) | 3.47.0 | 2024-10-21 |

ports/zlib/portfile.cmake

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,2 @@
1-
set(VERSION 2.2.2)
2-
3-
set(FILENAME "zlib-ng-${VERSION}.zip")
4-
set(URLS "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${VERSION}.zip")
5-
6-
# Get archive
7-
vcpkg_download_distfile(ARCHIVE
8-
URLS ${URLS}
9-
FILENAME ${FILENAME}
10-
SHA512 98586b3ce67bf481ccb94f3263340dffde10c3735218b0c60173a91fe931f4e40a772691c7d19b691a167ae9709f62efcc247c2711d15cf19ca3bd318cab9689
11-
)
12-
13-
# Extract archive
14-
vcpkg_extract_source_archive_ex(
15-
OUT_SOURCE_PATH SOURCE_PATH
16-
ARCHIVE ${ARCHIVE}
17-
REF ${VERSION}
18-
PATCHES ${PATCHES}
19-
)
20-
21-
# Run CMake build
22-
vcpkg_cmake_configure(
23-
SOURCE_PATH ${SOURCE_PATH}
24-
OPTIONS
25-
-DZLIB_COMPAT=ON
26-
-DZLIB_ENABLE_TESTS=OFF
27-
OPTIONS_DEBUG
28-
-DSKIP_INSTALL_HEADERS=ON
29-
)
30-
31-
vcpkg_cmake_install()
32-
vcpkg_copy_pdbs()
33-
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZLIB)
34-
vcpkg_fixup_pkgconfig()
35-
36-
# Prepare distribution
37-
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
38-
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright)
39-
file(WRITE ${CURRENT_PACKAGES_DIR}/share/zlib/version "${VERSION}")
1+
# Mapping zlib-ng to zlib
2+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

ports/zlib/vcpkg.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
22
"name": "zlib",
3-
"version": "2.2.2",
3+
"version-string": "zlib-ng",
44
"description": "A compression library",
55
"homepage": "https://github.com/zlib-ng/zlib-ng",
66
"license": "Zlib",
77
"dependencies": [
8-
{
9-
"name": "vcpkg-cmake",
10-
"host": true
11-
},
12-
{
13-
"name": "vcpkg-cmake-config",
14-
"host": true
15-
}
8+
"zlib-ng"
169
]
1710
}

triplets/x64-windows-webkit.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ if (PORT STREQUAL "highway")
88
elseif (PORT STREQUAL "pixman")
99
set(VCPKG_LIBRARY_LINKAGE static)
1010
endif ()
11+
12+
# Turn on zlib compatibility
13+
if (PORT STREQUAL "zlib-ng")
14+
set(ZLIB_COMPAT ON)
15+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DZLIB_COMPAT=${ZLIB_COMPAT}")
16+
endif ()

0 commit comments

Comments
 (0)