Skip to content

Commit

Permalink
Rework zlib patching
Browse files Browse the repository at this point in the history
Break CMake changes, rc mod and zlib prefixing out into separate
patches.  To make the diff more useful, incorporate file moves into the
patching process so we can diff the current zlib.h and our zlib.h.in (as
well as the same thing for zconf) rather than deleting and adding.
  • Loading branch information
starseeker committed Oct 9, 2024
1 parent ab8512e commit c2aabae
Show file tree
Hide file tree
Showing 5 changed files with 683 additions and 5,054 deletions.
6 changes: 5 additions & 1 deletion zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ if (ENABLE_ZLIB)
ExternalProject_Add(ZLIB_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/zlib"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/zlib.patch
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/zlib_cmake.patch
COMMAND ${CMAKE_COMMAND};-E;rename;<SOURCE_DIR>/zlib.h;<SOURCE_DIR>/zlib.h.in
COMMAND ${CMAKE_COMMAND};-E;rename;<SOURCE_DIR>/zconf.h;<SOURCE_DIR>/zconf.h.in
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/zlib_rc.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/zlib_prefix.patch
CMAKE_ARGS
${BUILD_TYPE_SPECIFIER}
-DZ_PREFIX_STR=${Z_PREFIX_STR}
Expand Down
Loading

0 comments on commit c2aabae

Please sign in to comment.