diff --git a/ports/hiredis/fix-ssize_t.patch b/ports/hiredis/fix-ssize_t.patch deleted file mode 100644 index 521313a687..0000000000 --- a/ports/hiredis/fix-ssize_t.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/hiredis.h b/hiredis.h ---- a/hiredis.h -+++ b/hiredis.h -@@ -40,6 +40,7 @@ - #else - struct timeval; /* forward declaration */ - typedef long long ssize_t; -+#define _SSIZE_T_ /* for compatibility with libuv */ - #endif - #include /* uintXX_t, etc */ - #include "sds.h" /* for sds */ diff --git a/ports/hiredis/fix-version.patch b/ports/hiredis/fix-version.patch new file mode 100644 index 0000000000..13d1c894c5 --- /dev/null +++ b/ports/hiredis/fix-version.patch @@ -0,0 +1,15 @@ +diff --git a/hiredis.h b/hiredis.h +index 3211c20..9d655f8 100644 +--- a/hiredis.h ++++ b/hiredis.h +@@ -47,8 +47,8 @@ typedef intptr_t ssize_t; + + #define HIREDIS_MAJOR 1 + #define HIREDIS_MINOR 4 +-#define HIREDIS_PATCH 0 +-#define HIREDIS_SONAME 1.4.0 ++#define HIREDIS_PATCH 1 ++#define HIREDIS_SONAME 1.4.1 + + /* Connection type can be blocking or non-blocking and is set in the + * least significant bit of the flags field in redisContext. */ diff --git a/ports/hiredis/portfile.cmake b/ports/hiredis/portfile.cmake index 8f321c8963..95d38ca015 100644 --- a/ports/hiredis/portfile.cmake +++ b/ports/hiredis/portfile.cmake @@ -2,13 +2,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO redis/hiredis REF "v${VERSION}" - SHA512 e6e9f7e617bf1d03bdf64a80e74ed24816b6c71607b976757a9962ae02a3b65be7006d84fd353dd5a63c8d0ef1ed385c3b73851b4a119c5ed48f3f86437cf250 + SHA512 2f7a826032bedb85473b06684e075d9e57105068c44f21b00217f94a7ebbefaa8700c7bf4675c382060a7b00aceb01c90023fdfbe4024a412e05432b852d6dc2 HEAD_REF master PATCHES fix-timeval.patch - fix-ssize_t.patch support-static.patch fix-cmake-conf-install-dir.patch + fix-version.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -18,9 +18,10 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS ${FEATURE_OPTIONS} - -DDISABLE_TESTS=ON - -DBUILD_SHARED_LIBS=OFF + OPTIONS + -DDISABLE_TESTS=ON + -DBUILD_SHARED_LIBS=OFF + ${FEATURE_OPTIONS} ) vcpkg_cmake_install() @@ -29,24 +30,43 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() +if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hiredis.pc" + " -lhiredis" + " -lhiredisd" + ) + if("ssl" IN_LIST FEATURES) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hiredis_ssl.pc" + " -lhiredis_ssl" + " -lhiredis_ssld" + ) + endif() +endif() +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(APPEND + "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/hiredis.pc" + "Libs.private: -lws2_32 -lcrypt32\n" + ) + + if(NOT VCPKG_BUILD_TYPE) + file(APPEND + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hiredis.pc" + "Libs.private: -lws2_32 -lcrypt32\n" + ) + endif() +endif() + vcpkg_cmake_config_fixup() if("ssl" IN_LIST FEATURES) vcpkg_cmake_config_fixup(PACKAGE_NAME hiredis_ssl CONFIG_PATH share/hiredis_ssl) endif() -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") -# Handle copyright -file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright( + FILE_LIST + "${SOURCE_PATH}/COPYING" + "${SOURCE_PATH}/ffc.h" +) diff --git a/ports/hiredis/vcpkg.json b/ports/hiredis/vcpkg.json index c9c4789dbd..cd0585bae5 100644 --- a/ports/hiredis/vcpkg.json +++ b/ports/hiredis/vcpkg.json @@ -1,9 +1,9 @@ { "name": "hiredis", - "version": "1.3.0", + "version": "1.4.1", "description": "Hiredis is a minimalistic C client library for the Redis database.", "homepage": "https://github.com/redis/hiredis", - "license": "BSD-3-Clause", + "license": "BSD-3-Clause AND MIT", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index db7aa45670..a6db2ccca3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3877,7 +3877,7 @@ "port-version": 2 }, "hiredis": { - "baseline": "1.3.0", + "baseline": "1.4.1", "port-version": 0 }, "hjson-cpp": { diff --git a/versions/h-/hiredis.json b/versions/h-/hiredis.json index 5dd6b733bd..99f30dfdcc 100644 --- a/versions/h-/hiredis.json +++ b/versions/h-/hiredis.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f73e2a45a1388373c59a7ce7e1e1f480cd2fc964", + "version": "1.4.1", + "port-version": 0 + }, { "git-tree": "ef3092d7043f302e0b271be990cf3e9418e7c828", "version": "1.3.0",