mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 09:29:07 +08:00
[hiredis] Update to 1.0.2 (#20724)
* Update hiredis to 1.0.2 * Update CI baseline * Fix static builds of examples * Update git-tree hash Co-authored-by: chausner <chausner@users.noreply.github.com>
This commit is contained in:
parent
e47ab01d40
commit
1e421cc5d3
@ -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)
|
||||
|
11
ports/hiredis/fix-ssize_t.patch
Normal file
11
ports/hiredis/fix-ssize_t.patch
Normal file
@ -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 <stdint.h> /* uintXX_t, etc */
|
||||
#include "sds.h" /* for sds */
|
@ -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)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "934af68bcc045c77d7b46cef46b6a8cdf97ce2b8",
|
||||
"version": "1.0.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "3ce136eecabedaebd15eb4a454c2ecf89f90e9c3",
|
||||
"version": "1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user