2022-10-26 01:24:48 +08:00
|
|
|
# When this port is updated, the minizip port should be updated at the same time
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-07-22 13:00:32 +08:00
|
|
|
vcpkg_from_github(
|
2019-11-26 07:54:49 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO madler/zlib
|
2022-10-26 01:24:48 +08:00
|
|
|
REF v1.2.13
|
|
|
|
SHA512 44b834fbfb50cca229209b8dbe1f96b258f19a49f5df23b80970b716371d856a4adf525edb4c6e0e645b180ea949cb90f5365a1d896160f297f56794dd888659
|
2019-11-26 07:54:49 +08:00
|
|
|
HEAD_REF master
|
2020-09-25 06:15:06 +08:00
|
|
|
PATCHES
|
|
|
|
0001-remove-ifndef-NOUNCRYPT.patch
|
|
|
|
0002-add-declaration-for-mkdir.patch
|
2021-04-20 08:12:16 +08:00
|
|
|
0003-no-io64.patch
|
2023-04-26 13:40:19 +08:00
|
|
|
pkgconfig.patch
|
2017-07-22 13:00:32 +08:00
|
|
|
)
|
|
|
|
|
2019-11-26 07:54:49 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-10-26 01:24:48 +08:00
|
|
|
FEATURES
|
|
|
|
bzip2 ENABLE_BZIP2
|
2023-04-26 13:40:19 +08:00
|
|
|
INVERTED_FEATURES
|
|
|
|
tools DISABLE_INSTALL_TOOLS
|
2019-11-26 07:54:49 +08:00
|
|
|
)
|
2019-07-19 01:26:48 +08:00
|
|
|
|
2023-04-26 13:40:19 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/unofficial-minizipConfig.cmake.in"
|
|
|
|
DESTINATION "${SOURCE_PATH}/contrib/minizip"
|
|
|
|
)
|
2017-07-22 13:00:32 +08:00
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
vcpkg_cmake_configure(
|
2023-04-26 13:40:19 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}/contrib/minizip"
|
2020-09-25 06:15:06 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2023-04-26 13:40:19 +08:00
|
|
|
-DPACKAGE_VERSION=${VERSION}
|
2020-09-25 06:15:06 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
2023-04-26 13:40:19 +08:00
|
|
|
-DDISABLE_INSTALL_TOOLS=ON
|
2017-07-22 13:00:32 +08:00
|
|
|
)
|
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-07-22 13:00:32 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-04-26 13:40:19 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-minizip)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES minizip miniunz AUTO_CLEAN)
|
|
|
|
endif()
|
2019-07-19 01:26:48 +08:00
|
|
|
|
|
|
|
if ("bzip2" IN_LIST FEATURES)
|
2019-11-26 07:54:49 +08:00
|
|
|
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h")
|
|
|
|
foreach(HEADER ${HEADERS})
|
2023-04-26 13:40:19 +08:00
|
|
|
vcpkg_replace_string("${HEADER}" "#ifdef HAVE_BZIP2" "#if 1")
|
2019-11-26 07:54:49 +08:00
|
|
|
endforeach()
|
2019-07-19 01:26:48 +08:00
|
|
|
endif()
|
2017-07-24 02:46:49 +08:00
|
|
|
|
2023-04-26 13:40:19 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/minizipConfig.cmake" @ONLY)
|
2022-10-26 01:24:48 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-04-26 13:40:19 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt")
|