diff --git a/ports/hiredis/fix-feature-example.patch b/ports/hiredis/fix-feature-example.patch index 2e5259930f..eecca4086b 100644 --- a/ports/hiredis/fix-feature-example.patch +++ b/ports/hiredis/fix-feature-example.patch @@ -2,7 +2,7 @@ diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index dd3a313..8c69d3a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt -@@ -19,16 +19,30 @@ if (LIBEV) +@@ -19,16 +19,25 @@ if (LIBEV) TARGET_LINK_LIBRARIES(example-libev hiredis ev) ENDIF() @@ -10,15 +10,10 @@ index dd3a313..8c69d3a 100644 -if (LIBEVENT) +FIND_PACKAGE(Libevent CONFIG REQUIRED) +FIND_PATH(LIBEVENT_INCLUDES evutil.h) -+if (BUILD_SHARED_LIBS) -+ set(LIBEVENT_LIBS ${LIBEVENT_SHARED_LIBRARIES}) -+else() -+ set(LIBEVENT_LIBS ${LIBEVENT_STATIC_LIBRARIES}) -+endif() +if (UNIX) ADD_EXECUTABLE(example-libevent example-libevent) - TARGET_LINK_LIBRARIES(example-libevent hiredis event) -+ TARGET_LINK_LIBRARIES(example-libevent hiredis ${LIBEVENT_LIBS}) ++ TARGET_LINK_LIBRARIES(example-libevent hiredis ${LIBEVENT_LIBRARIES}) + TARGET_INCLUDE_DIRECTORIES(example-libevent PRIVATE ${LIBEVENT_INCLUDES}) ENDIF() @@ -60,7 +55,7 @@ index dd3a313..8c69d3a 100644 ADD_EXECUTABLE(example example.c) -TARGET_LINK_LIBRARIES(example hiredis) -+TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBS}) ++TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBRARIES}) ADD_EXECUTABLE(example-push example-push.c) TARGET_LINK_LIBRARIES(example-push hiredis) diff --git a/ports/hiredis/fix-ssize_t.patch b/ports/hiredis/fix-ssize_t.patch new file mode 100644 index 0000000000..521313a687 --- /dev/null +++ b/ports/hiredis/fix-ssize_t.patch @@ -0,0 +1,11 @@ +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/portfile.cmake b/ports/hiredis/portfile.cmake index d0b273c771..ebd8179b34 100644 --- a/ports/hiredis/portfile.cmake +++ b/ports/hiredis/portfile.cmake @@ -5,36 +5,37 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO redis/hiredis - REF v1.0.0 - SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69 + REF v1.0.2 + SHA512 86497a1c21869bbe535378885eee6dbd594ef96325966511a3513f81e501af0f5ac7fed864f3230372f3ac7a23c05bad477fa5aa90b9747c9fb1408028174f9b HEAD_REF master PATCHES fix-feature-example.patch support-static-in-win.patch fix-timeval.patch fix-include-path.patch + fix-ssize_t.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - ssl ENABLE_SSL - example ENABLE_EXAMPLES + FEATURES + ssl ENABLE_SSL + example ENABLE_EXAMPLES ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() if("ssl" IN_LIST FEATURES) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/hiredis_ssl TARGET_PATH share/hiredis_ssl) + vcpkg_cmake_config_fixup(PACKAGE_NAME hiredis_ssl CONFIG_PATH share/hiredis_ssl) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/hiredis/vcpkg.json b/ports/hiredis/vcpkg.json index 862214eb8b..68627dc901 100644 --- a/ports/hiredis/vcpkg.json +++ b/ports/hiredis/vcpkg.json @@ -1,9 +1,19 @@ { "name": "hiredis", - "version": "1.0.0", - "port-version": 1, + "version": "1.0.2", "description": "Hiredis is a minimalistic C client library for the Redis database.", "homepage": "https://github.com/redis/hiredis", + "supports": "!(windows & !static)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "example": { "description": "Build example", diff --git a/versions/baseline.json b/versions/baseline.json index 48fd0e34ea..a305901fe9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2657,8 +2657,8 @@ "port-version": 0 }, "hiredis": { - "baseline": "1.0.0", - "port-version": 1 + "baseline": "1.0.2", + "port-version": 0 }, "hpx": { "baseline": "1.7.1", diff --git a/versions/h-/hiredis.json b/versions/h-/hiredis.json index 50d4361ee4..92fd218b80 100644 --- a/versions/h-/hiredis.json +++ b/versions/h-/hiredis.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "934af68bcc045c77d7b46cef46b6a8cdf97ce2b8", + "version": "1.0.2", + "port-version": 0 + }, { "git-tree": "3ce136eecabedaebd15eb4a454c2ecf89f90e9c3", "version": "1.0.0",