git: ad47cbd7d792 - main - devel/cmake-core: add patch for ZLIB 1.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Sep 2023 20:24:33 UTC
The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=ad47cbd7d792ef98d1de157ba9bc9d564044f17e commit ad47cbd7d792ef98d1de157ba9bc9d564044f17e Author: Adriaan de Groot <adridg@FreeBSD.org> AuthorDate: 2023-09-18 19:25:05 +0000 Commit: Adriaan de Groot <adridg@FreeBSD.org> CommitDate: 2023-09-18 20:24:13 +0000 devel/cmake-core: add patch for ZLIB 1.3 Add upstream patch (which is in 3.27.4, but we don't have a CMake update going on right now) that fixes finding ZLIB 1.3 -- which is necessary for FreeBSD 14. PR: 273915 --- devel/cmake-core/Makefile | 2 +- ...t-903439495033da40f798db9ec064d9b16ea672fc.diff | 47 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/devel/cmake-core/Makefile b/devel/cmake-core/Makefile index d00726e36fec..018e73febdff 100644 --- a/devel/cmake-core/Makefile +++ b/devel/cmake-core/Makefile @@ -1,7 +1,7 @@ PORTNAME= cmake # Remember to update devel/cmake-doc and devel/cmake-gui as well. DISTVERSION= ${_CMAKE_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PKGNAMESUFFIX= -core diff --git a/devel/cmake-core/files/patch-git-903439495033da40f798db9ec064d9b16ea672fc.diff b/devel/cmake-core/files/patch-git-903439495033da40f798db9ec064d9b16ea672fc.diff new file mode 100644 index 000000000000..8047db8d925e --- /dev/null +++ b/devel/cmake-core/files/patch-git-903439495033da40f798db9ec064d9b16ea672fc.diff @@ -0,0 +1,47 @@ +diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake +index d0deb8778d0143c9d9b7dfe6d7ff1b40ff2056da..4e7d5d665aae8730cd74fc35c1763afe5b6a0397 100644 +--- Modules/FindZLIB.cmake ++++ Modules/FindZLIB.cmake +@@ -175,25 +175,24 @@ unset(ZLIB_NAMES_DEBUG) + mark_as_advanced(ZLIB_INCLUDE_DIR) + + if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") +- file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$") +- +- string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}") +- string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}") +- string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}") +- set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}") +- +- # only append a TWEAK version if it exists: ++ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$") ++ if(ZLIB_H MATCHES "ZLIB_VERSION \"(([0-9]+)\\.([0-9]+)(\\.([0-9]+)(\\.([0-9]+))?)?)") ++ set(ZLIB_VERSION_STRING "${CMAKE_MATCH_1}") ++ set(ZLIB_VERSION_MAJOR "${CMAKE_MATCH_2}") ++ set(ZLIB_VERSION_MINOR "${CMAKE_MATCH_3}") ++ set(ZLIB_VERSION_PATCH "${CMAKE_MATCH_5}") ++ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_7}") ++ else() ++ set(ZLIB_VERSION_STRING "") ++ set(ZLIB_VERSION_MAJOR "") ++ set(ZLIB_VERSION_MINOR "") ++ set(ZLIB_VERSION_PATCH "") + set(ZLIB_VERSION_TWEAK "") +- if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)") +- set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}") +- string(APPEND ZLIB_VERSION_STRING ".${ZLIB_VERSION_TWEAK}") +- endif() +- +- set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}") +- set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}") +- set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}") +- +- set(ZLIB_VERSION ${ZLIB_VERSION_STRING}) ++ endif() ++ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}") ++ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}") ++ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}") ++ set(ZLIB_VERSION "${ZLIB_VERSION_STRING}") + endif() + + include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)