early-access version 2853
This commit is contained in:
61
externals/vcpkg/ports/hiredis/fix-feature-example.patch
vendored
Executable file
61
externals/vcpkg/ports/hiredis/fix-feature-example.patch
vendored
Executable file
@@ -0,0 +1,61 @@
|
||||
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,25 @@ if (LIBEV)
|
||||
TARGET_LINK_LIBRARIES(example-libev hiredis ev)
|
||||
ENDIF()
|
||||
|
||||
-FIND_PATH(LIBEVENT event.h)
|
||||
-if (LIBEVENT)
|
||||
+FIND_PACKAGE(Libevent CONFIG REQUIRED)
|
||||
+FIND_PATH(LIBEVENT_INCLUDES evutil.h)
|
||||
+if (UNIX)
|
||||
ADD_EXECUTABLE(example-libevent example-libevent)
|
||||
- TARGET_LINK_LIBRARIES(example-libevent hiredis event)
|
||||
+ TARGET_LINK_LIBRARIES(example-libevent hiredis ${LIBEVENT_LIBRARIES})
|
||||
+ TARGET_INCLUDE_DIRECTORIES(example-libevent PRIVATE ${LIBEVENT_INCLUDES})
|
||||
ENDIF()
|
||||
|
||||
+FIND_LIBRARY(UV_LIBRARY libuv)
|
||||
FIND_PATH(LIBUV uv.h)
|
||||
IF (LIBUV)
|
||||
ADD_EXECUTABLE(example-libuv example-libuv.c)
|
||||
- TARGET_LINK_LIBRARIES(example-libuv hiredis uv)
|
||||
+ if(WIN32)
|
||||
+ set(LIB_LISTS Iphlpapi.lib Psapi.lib Userenv.lib)
|
||||
+ else()
|
||||
+ set(LIB_LISTS)
|
||||
+ endif()
|
||||
+ TARGET_LINK_LIBRARIES(example-libuv hiredis ${UV_LIBRARY} ${LIB_LISTS})
|
||||
+ TARGET_INCLUDE_DIRECTORIES(example-libuv PRIVATE ${LIBUV})
|
||||
ENDIF()
|
||||
|
||||
IF (APPLE)
|
||||
@@ -38,12 +52,24 @@ IF (APPLE)
|
||||
ENDIF()
|
||||
|
||||
IF (ENABLE_SSL)
|
||||
+ FIND_PACKAGE(OpenSSL REQUIRED)
|
||||
+ IF (WIN32)
|
||||
+ FIND_PACKAGE(pthreads REQUIRED)
|
||||
+ SET(THREADS_LIBS PThreads4W::PThreads4W)
|
||||
+ ELSE()
|
||||
+ FIND_PACKAGE(Threads)
|
||||
+ SET(THREADS_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
+ ENDIF()
|
||||
ADD_EXECUTABLE(example-ssl example-ssl.c)
|
||||
- TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl)
|
||||
+ 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})
|
||||
+ endif()
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(example example.c)
|
||||
-TARGET_LINK_LIBRARIES(example hiredis)
|
||||
+TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBRARIES})
|
||||
|
||||
ADD_EXECUTABLE(example-push example-push.c)
|
||||
TARGET_LINK_LIBRARIES(example-push hiredis)
|
||||
13
externals/vcpkg/ports/hiredis/fix-include-path.patch
vendored
Executable file
13
externals/vcpkg/ports/hiredis/fix-include-path.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7eafeb8..623c586 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,7 +49,7 @@ IF(WIN32 OR MINGW)
|
||||
TARGET_LINK_LIBRARIES(hiredis PRIVATE ws2_32)
|
||||
ENDIF()
|
||||
|
||||
-TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:.> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
+TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
|
||||
CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY)
|
||||
|
||||
11
externals/vcpkg/ports/hiredis/fix-ssize_t.patch
vendored
Executable file
11
externals/vcpkg/ports/hiredis/fix-ssize_t.patch
vendored
Executable 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 */
|
||||
16
externals/vcpkg/ports/hiredis/fix-timeval.patch
vendored
Executable file
16
externals/vcpkg/ports/hiredis/fix-timeval.patch
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
diff --git a/async_private.h b/async_private.h
|
||||
index d0133ae..7760b60 100644
|
||||
--- a/async_private.h
|
||||
+++ b/async_private.h
|
||||
@@ -32,6 +32,11 @@
|
||||
#ifndef __HIREDIS_ASYNC_PRIVATE_H
|
||||
#define __HIREDIS_ASYNC_PRIVATE_H
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#include <time.h>
|
||||
+#include <windows.h>
|
||||
+#endif
|
||||
+
|
||||
#define _EL_ADD_READ(ctx) \
|
||||
do { \
|
||||
refreshTimeout(ctx); \
|
||||
43
externals/vcpkg/ports/hiredis/portfile.cmake
vendored
Executable file
43
externals/vcpkg/ports/hiredis/portfile.cmake
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(HIREDIS_PATCHES support-static.patch)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO redis/hiredis
|
||||
REF v1.0.2
|
||||
SHA512 86497a1c21869bbe535378885eee6dbd594ef96325966511a3513f81e501af0f5ac7fed864f3230372f3ac7a23c05bad477fa5aa90b9747c9fb1408028174f9b
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-feature-example.patch
|
||||
fix-timeval.patch
|
||||
fix-include-path.patch
|
||||
fix-ssize_t.patch
|
||||
${HIREDIS_PATCHES}
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
ssl ENABLE_SSL
|
||||
example ENABLE_EXAMPLES
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
vcpkg_cmake_config_fixup()
|
||||
if("ssl" IN_LIST FEATURES)
|
||||
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)
|
||||
17
externals/vcpkg/ports/hiredis/support-static.patch
vendored
Executable file
17
externals/vcpkg/ports/hiredis/support-static.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9e78894..87aba5b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -22,4 +22,4 @@ PROJECT(hiredis VERSION "${VERSION}")
|
||||
ENDIF()
|
||||
|
||||
-ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
|
||||
+ADD_LIBRARY(hiredis ${hiredis_sources})
|
||||
|
||||
@@ -60,5 +60,5 @@ IF(ENABLE_SSL)
|
||||
SET(hiredis_ssl_sources
|
||||
ssl.c)
|
||||
- ADD_LIBRARY(hiredis_ssl SHARED
|
||||
+ ADD_LIBRARY(hiredis_ssl
|
||||
${hiredis_ssl_sources})
|
||||
|
||||
33
externals/vcpkg/ports/hiredis/vcpkg.json
vendored
Executable file
33
externals/vcpkg/ports/hiredis/vcpkg.json
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "hiredis",
|
||||
"version": "1.0.2",
|
||||
"port-version": 3,
|
||||
"description": "Hiredis is a minimalistic C client library for the Redis database.",
|
||||
"homepage": "https://github.com/redis/hiredis",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"example": {
|
||||
"description": "Build example",
|
||||
"dependencies": [
|
||||
"libevent",
|
||||
"libuv",
|
||||
"pthread"
|
||||
]
|
||||
},
|
||||
"ssl": {
|
||||
"description": "Build hiredis_ssl for SSL support",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user