diff options
| author | Kevin Lalumiere <klalumiere@coveo.com> | 2020-11-30 13:17:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-30 10:17:12 -0800 |
| commit | 0c9285e53468f98b820ce31606043c12e12660b3 (patch) | |
| tree | bd9dcd5e63b0a15d2eb9a468a6eb1d6b5d8866a5 | |
| parent | e7343e50b1baed629afe5f0164c3652641bbfbda (diff) | |
| download | vcpkg-0c9285e53468f98b820ce31606043c12e12660b3.tar.gz vcpkg-0c9285e53468f98b820ce31606043c12e12660b3.zip | |
[hiredis] update to 1.0.0 (Fix #13256) (#14734)
* Update to version 1.0.0
Some patches were removed since they are no longer required. Indeed, the
repository https://github.com/redis/hiredis@v1.0.0 fixes many of the
issues our patches were adressing.
* Fix cmake targets for ssl feature
| -rw-r--r-- | ports/hiredis/CONTROL | 4 | ||||
| -rw-r--r-- | ports/hiredis/fix-feature-example.patch | 49 | ||||
| -rw-r--r-- | ports/hiredis/fix-pthread.h-not-found-on-windows.patch | 16 | ||||
| -rw-r--r-- | ports/hiredis/portfile.cmake | 11 | ||||
| -rw-r--r-- | ports/hiredis/support-static-in-win.patch | 23 |
5 files changed, 22 insertions, 81 deletions
diff --git a/ports/hiredis/CONTROL b/ports/hiredis/CONTROL index b16d54e57..a331b1735 100644 --- a/ports/hiredis/CONTROL +++ b/ports/hiredis/CONTROL @@ -1,6 +1,6 @@ Source: hiredis -Version: 2019-11-2 -Port-Version: 2 +Version: 1.0.0 +Port-Version: 0 Homepage: https://github.com/redis/hiredis Description: Hiredis is a minimalistic C client library for the Redis database. diff --git a/ports/hiredis/fix-feature-example.patch b/ports/hiredis/fix-feature-example.patch index 4f36087c6..2e5259930 100644 --- a/ports/hiredis/fix-feature-example.patch +++ b/ports/hiredis/fix-feature-example.patch @@ -37,7 +37,7 @@ index dd3a313..8c69d3a 100644 ENDIF()
IF (APPLE)
-@@ -38,9 +52,21 @@ IF (APPLE)
+@@ -38,12 +52,24 @@ IF (APPLE)
ENDIF()
IF (ENABLE_SSL)
@@ -54,54 +54,13 @@ index dd3a313..8c69d3a 100644 + if(WIN32)
+ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS} crypt32.lib)
+ else()
-+ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS})
++ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS})
+ endif()
ENDIF()
ADD_EXECUTABLE(example example.c)
-TARGET_LINK_LIBRARIES(example hiredis)
+TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBS})
-diff --git a/examples/example-libuv.c b/examples/example-libuv.c
-index a5462d4..9b7ca3e 100644
---- a/examples/example-libuv.c
-+++ b/examples/example-libuv.c
-@@ -33,7 +33,9 @@ void disconnectCallback(const redisAsyncContext *c, int status) {
- }
-
- int main (int argc, char **argv) {
-+#ifndef _WIN32
- signal(SIGPIPE, SIG_IGN);
-+#endif
- uv_loop_t* loop = uv_default_loop();
-
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
-diff --git a/examples/example-ssl.c b/examples/example-ssl.c
-index 81f4648..9f42923 100644
---- a/examples/example-ssl.c
-+++ b/examples/example-ssl.c
-@@ -1,6 +1,10 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef _WIN32
-+#include <Winsock2.h>
-+#include <Windows.h>
-+#endif
-
- #include <hiredis.h>
- #include <hiredis_ssl.h>
-diff --git a/examples/example.c b/examples/example.c
-index 0e93fc8..339e322 100644
---- a/examples/example.c
-+++ b/examples/example.c
-@@ -1,6 +1,10 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef _WIN32
-+#include <Winsock2.h>
-+#include <Windows.h>
-+#endif
-
- #include <hiredis.h>
+ ADD_EXECUTABLE(example-push example-push.c)
+ TARGET_LINK_LIBRARIES(example-push hiredis)
diff --git a/ports/hiredis/fix-pthread.h-not-found-on-windows.patch b/ports/hiredis/fix-pthread.h-not-found-on-windows.patch deleted file mode 100644 index e927bc431..000000000 --- a/ports/hiredis/fix-pthread.h-not-found-on-windows.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/ssl.c b/ssl.c
-index 78ab9e4..768f304 100644
---- a/ssl.c
-+++ b/ssl.c
-@@ -34,7 +34,11 @@
- #include "async.h"
-
- #include <assert.h>
-+#ifdef _WIN32
-+#include <windows.h>
-+#else
- #include <pthread.h>
-+#endif
- #include <errno.h>
- #include <string.h>
-
diff --git a/ports/hiredis/portfile.cmake b/ports/hiredis/portfile.cmake index 4d3a97c7e..0c72c8330 100644 --- a/ports/hiredis/portfile.cmake +++ b/ports/hiredis/portfile.cmake @@ -5,18 +5,17 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO redis/hiredis - REF e777b0295eeeda89ee2ecef6ec5cb54889033d94 - SHA512 9486ce3e40580ca6a1da8a31c3e139eb8b5e17ac1b94bd0987f2435aeb2465ad271784d5e8e83dc6cbaf362f95c9e175efa5fbe80a63c56070ceb212d3d68470 + REF v1.0.0 + SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69 HEAD_REF master PATCHES fix-feature-example.patch support-static-in-win.patch fix-timeval.patch - fix-pthread.h-not-found-on-windows.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - ssl ENABLE_SSL + ssl ENABLE_SSL example ENABLE_EXAMPLES ) @@ -31,6 +30,10 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets() +if("ssl" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/hiredis_ssl TARGET_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 diff --git a/ports/hiredis/support-static-in-win.patch b/ports/hiredis/support-static-in-win.patch index 94e6ebe9d..47ea4bef6 100644 --- a/ports/hiredis/support-static-in-win.patch +++ b/ports/hiredis/support-static-in-win.patch @@ -2,21 +2,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e78894..87aba5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -22,7 +22,7 @@ PROJECT(hiredis VERSION "${VERSION}") +@@ -22,4 +22,4 @@ PROJECT(hiredis VERSION "${VERSION}") + ENDIF() - SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples") +-ADD_LIBRARY(hiredis SHARED ${hiredis_sources}) ++ADD_LIBRARY(hiredis ${hiredis_sources}) --ADD_LIBRARY(hiredis SHARED -+ADD_LIBRARY(hiredis - async.c - dict.c - hiredis.c -@@ -60,7 +60,7 @@ IF(ENABLE_SSL) - ENDIF() - ENDIF() - FIND_PACKAGE(OpenSSL REQUIRED) +@@ -60,5 +60,5 @@ IF(ENABLE_SSL) + SET(hiredis_ssl_sources + ssl.c) - ADD_LIBRARY(hiredis_ssl SHARED + ADD_LIBRARY(hiredis_ssl - ssl.c) - TARGET_INCLUDE_DIRECTORIES(hiredis_ssl PRIVATE "${OPENSSL_INCLUDE_DIR}") - TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE ${OPENSSL_LIBRARIES}) + ${hiredis_ssl_sources}) + |
