2019-11-02 08:10:50 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO redis/hiredis
|
2023-06-15 03:31:04 +08:00
|
|
|
REF "v${VERSION}"
|
2023-08-01 02:31:48 +08:00
|
|
|
SHA512 f8984abb29c09e7e6b56e656616c5155f36c53da4161a2d4c85688486411cadcdf20aa1adb9bda208c500b401c750871be1c8d58ba9df5328634d00e9d1b6589
|
2019-11-02 08:10:50 +08:00
|
|
|
HEAD_REF master
|
2019-12-24 04:18:50 +08:00
|
|
|
PATCHES
|
2020-03-11 07:57:03 +08:00
|
|
|
fix-timeval.patch
|
2021-10-16 10:18:51 +08:00
|
|
|
fix-ssize_t.patch
|
2023-06-15 03:31:04 +08:00
|
|
|
support-static.patch
|
|
|
|
fix-cmake-conf-install-dir.patch
|
2019-11-02 08:10:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-10-16 10:18:51 +08:00
|
|
|
FEATURES
|
|
|
|
ssl ENABLE_SSL
|
2019-11-02 08:10:50 +08:00
|
|
|
)
|
|
|
|
|
2021-10-16 10:18:51 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-11-02 08:10:50 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2023-06-15 03:31:04 +08:00
|
|
|
-DDISABLE_TESTS=ON
|
2023-08-01 02:31:48 +08:00
|
|
|
-DBUILD_SHARED_LIBS=OFF
|
2019-11-02 08:10:50 +08:00
|
|
|
)
|
|
|
|
|
2021-10-16 10:18:51 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-11-02 08:10:50 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-12-10 10:15:15 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2021-10-16 10:18:51 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2020-12-01 02:17:12 +08:00
|
|
|
if("ssl" IN_LIST FEATURES)
|
2021-10-16 10:18:51 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME hiredis_ssl CONFIG_PATH share/hiredis_ssl)
|
2020-12-01 02:17:12 +08:00
|
|
|
endif()
|
2019-11-02 08:10:50 +08:00
|
|
|
|
2022-07-14 09:29:41 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/hiredis.h"
|
|
|
|
[[typedef long long ssize_t;
|
|
|
|
#define _SSIZE_T_ /* for compatibility with libuv */]]
|
|
|
|
[[typedef intptr_t ssize_t;]]
|
|
|
|
)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/sds.h"
|
|
|
|
[[typedef long long ssize_t;
|
|
|
|
#define SSIZE_MAX (LLONG_MAX >> 1)]]
|
|
|
|
[[typedef intptr_t ssize_t;
|
|
|
|
#define SSIZE_MAX INTPTR_MAX]]
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2019-11-02 08:10:50 +08:00
|
|
|
# Handle copyright
|
2021-10-28 06:19:28 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|