Skip to content

Commit

Permalink
[hiredis] update to 1.2.0 (#32817)
Browse files Browse the repository at this point in the history
* [hiredis] update to 1.2.0

* update version
  • Loading branch information
himeno-hamster authored Jul 31, 2023
1 parent b7ba255 commit b43873a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 88 deletions.
4 changes: 2 additions & 2 deletions ports/hiredis/fix-cmake-conf-install-dir.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index fca0ee8..b67888e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,7 +134,7 @@ export(EXPORT hiredis-targets
@@ -125,7 +127,7 @@ export(EXPORT hiredis-targets
if(WIN32)
SET(CMAKE_CONF_INSTALL_DIR share/hiredis)
else()
Expand All @@ -11,7 +11,7 @@ index fca0ee8..b67888e 100644
endif()
SET(INCLUDE_INSTALL_DIR include)
include(CMakePackageConfigHelpers)
@@ -216,7 +216,7 @@ IF(ENABLE_SSL)
@@ -200,7 +204,7 @@ IF(ENABLE_SSL)
if(WIN32)
SET(CMAKE_CONF_INSTALL_DIR share/hiredis_ssl)
else()
Expand Down
13 changes: 0 additions & 13 deletions ports/hiredis/fix-include-path.patch

This file was deleted.

22 changes: 0 additions & 22 deletions ports/hiredis/fix-pdb-install.patch

This file was deleted.

5 changes: 2 additions & 3 deletions ports/hiredis/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO redis/hiredis
REF "v${VERSION}"
SHA512 9dad012c144ed24de6aa413a3a10d19a9d0d9ece18dbc388406cd86c5b98cb66c76c586cb559c601ed13a75051d8921dc2882534cc3605513fde47d57276c3bb
SHA512 f8984abb29c09e7e6b56e656616c5155f36c53da4161a2d4c85688486411cadcdf20aa1adb9bda208c500b401c750871be1c8d58ba9df5328634d00e9d1b6589
HEAD_REF master
PATCHES
fix-timeval.patch
fix-ssize_t.patch
support-static.patch
fix-pdb-install.patch
fix-cmake-conf-install-dir.patch
)

Expand All @@ -20,8 +19,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
-DENABLE_EXAMPLES=OFF
-DDISABLE_TESTS=ON
-DBUILD_SHARED_LIBS=OFF
)

vcpkg_cmake_install()
Expand Down
59 changes: 13 additions & 46 deletions ports/hiredis/support-static.patch
Original file line number Diff line number Diff line change
@@ -1,55 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d52d0c..d175f0a 100644
index b7d6ee8..8cf6c4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,14 +44,13 @@ IF(WIN32)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN)
ENDIF()
@@ -45,6 +45,8 @@ ENDIF()

-ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
+ADD_LIBRARY(hiredis ${hiredis_sources})
ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
+SET_TARGET_PROPERTIES(hiredis_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
ADD_LIBRARY(hiredis ${hiredis_sources})
ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
ADD_LIBRARY(hiredis::hiredis_static ALIAS hiredis_static)

IF(NOT MSVC)
- SET_TARGET_PROPERTIES(hiredis_static
- PROPERTIES OUTPUT_NAME hiredis)
ENDIF()

SET_TARGET_PROPERTIES(hiredis
@@ -103,7 +102,7 @@ set(CPACK_RPM_PACKAGE_AUTOREQPROV ON)

include(CPack)
+ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
+SET_TARGET_PROPERTIES(hiredis_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
set(hiredis_export_name hiredis CACHE STRING "Name of the exported target")
set_target_properties(hiredis PROPERTIES EXPORT_NAME ${hiredis_export_name})

-INSTALL(TARGETS hiredis hiredis_static
+INSTALL(TARGETS hiredis
EXPORT hiredis-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -161,13 +160,12 @@ IF(ENABLE_SSL)
FIND_PACKAGE(OpenSSL REQUIRED)
SET(hiredis_ssl_sources
@@ -156,6 +158,8 @@ IF(ENABLE_SSL)
ssl.c)
- ADD_LIBRARY(hiredis_ssl SHARED
+ ADD_LIBRARY(hiredis_ssl
${hiredis_ssl_sources})
ADD_LIBRARY(hiredis_ssl_static STATIC
${hiredis_ssl_sources})
ADD_LIBRARY(hiredis_ssl ${hiredis_ssl_sources})
ADD_LIBRARY(hiredis::hiredis_ssl ALIAS hiredis_ssl)
+ ADD_LIBRARY(hiredis_ssl_static STATIC ${hiredis_ssl_sources})
+ SET_TARGET_PROPERTIES(hiredis_ssl_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
IF(NOT MSVC)
- SET_TARGET_PROPERTIES(hiredis_ssl_static
- PROPERTIES OUTPUT_NAME hiredis_ssl)
ENDIF()

IF (APPLE)
@@ -193,7 +191,7 @@ IF(ENABLE_SSL)
ENDIF()
CONFIGURE_FILE(hiredis_ssl.pc.in hiredis_ssl.pc @ONLY)

- INSTALL(TARGETS hiredis_ssl hiredis_ssl_static
+ INSTALL(TARGETS hiredis_ssl
EXPORT hiredis_ssl-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
IF (APPLE AND BUILD_SHARED_LIBS)
SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
2 changes: 1 addition & 1 deletion ports/hiredis/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hiredis",
"version": "1.1.0",
"version": "1.2.0",
"description": "Hiredis is a minimalistic C client library for the Redis database.",
"homepage": "https://github.com/redis/hiredis",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,7 @@
"port-version": 0
},
"hiredis": {
"baseline": "1.1.0",
"baseline": "1.2.0",
"port-version": 0
},
"hnswlib": {
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hiredis.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4a9b927af18cb3f5df500b3ee1ea49ac734910cd",
"version": "1.2.0",
"port-version": 0
},
{
"git-tree": "863fe622cf3050ab1722a81950283e9a354da473",
"version": "1.1.0",
Expand Down

0 comments on commit b43873a

Please sign in to comment.