Skip to content

Commit

Permalink
[zlib-ng] add flags in pkgconfig (#34903)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Nov 9, 2023
1 parent 7c5a86f commit 69600a0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
24 changes: 24 additions & 0 deletions ports/zlib-ng/fix-cflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a645ad6e..fbc2bdba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1159,6 +1159,9 @@ else()
endif()

set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib${SUFFIX}.pc)
+if(WITH_GZFILEOP)
+ set(PKG_CONFIG_CFLAGS "-DWITH_GZFILEOP")
+endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
${ZLIB_PC} @ONLY)
configure_file(${CMAKE_CURRENT_BINARY_DIR}/zconf${SUFFIX}.h.cmakein
diff --git a/zlib.pc.cmakein b/zlib.pc.cmakein
index 3d440ce6..df8bf9f0 100644
--- a/zlib.pc.cmakein
+++ b/zlib.pc.cmakein
@@ -11,4 +11,4 @@ Version: @ZLIB_FULL_VERSION@

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz@SUFFIX@
-Cflags: -I${includedir}
+Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@
2 changes: 2 additions & 0 deletions ports/zlib-ng/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF "${VERSION}"
SHA512 cb987c0b20a11fca5361dce94e53dead7364e739a984545c38ad4bf0c7fedd83d5d62530d979eca2182da88d7507a9bec8d3f5abff41e92ab5a63ac61001502e
HEAD_REF develop
PATCHES
fix-cflags.patch
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/zlib-ng/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "zlib-ng",
"version": "2.1.3",
"port-version": 1,
"description": "zlib replacement with optimizations for 'next generation' systems",
"homepage": "https://github.com/zlib-ng/zlib-ng",
"license": "Zlib",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9302,7 +9302,7 @@
},
"zlib-ng": {
"baseline": "2.1.3",
"port-version": 0
"port-version": 1
},
"zlmediakit": {
"baseline": "2023-08-12",
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": "48a2a573758db5e1b96e889043fffaf453fa9cf4",
"version": "2.1.3",
"port-version": 1
},
{
"git-tree": "b5618019c0972a9e8bb9422609352679cf248f85",
"version": "2.1.3",
Expand Down

0 comments on commit 69600a0

Please sign in to comment.