package/hiredis: bump to version 1.1.0
- Replace first patch - Drop second and third patches (already in version) https://github.com/redis/hiredis/blob/v1.1.0/CHANGELOG.md Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
b30eb2f763
commit
bd7e907798
@ -1,47 +0,0 @@
|
|||||||
From 0ce382c275b087e866517c003e565f8cc4855bdd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
Date: Sat, 29 Aug 2020 23:19:26 +0200
|
|
||||||
Subject: [PATCH] CMakeLists.txt: do not force SHARED
|
|
||||||
|
|
||||||
Allow the user to build static libraries by removing SHARED from
|
|
||||||
ADD_LIBRARY calls.
|
|
||||||
|
|
||||||
Here is an extract of
|
|
||||||
https://cmake.org/cmake/help/latest/command/add_library.html:
|
|
||||||
|
|
||||||
"If no type is given explicitly the type is STATIC or SHARED based on
|
|
||||||
whether the current value of the variable BUILD_SHARED_LIBS is ON."
|
|
||||||
|
|
||||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
[Upstream status: probably not upstreamable as is because it will
|
|
||||||
conflict with https://github.com/redis/hiredis/pull/851. So, this patch
|
|
||||||
will probably have to be reworked for 1.0.x]
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 1beccc6..fed79fd 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -40,7 +40,7 @@ IF(WIN32)
|
|
||||||
ADD_COMPILE_DEFINITIONS(_CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
-ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
|
|
||||||
+ADD_LIBRARY(hiredis ${hiredis_sources})
|
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(hiredis
|
|
||||||
PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
|
|
||||||
@@ -97,7 +97,7 @@ IF(ENABLE_SSL)
|
|
||||||
FIND_PACKAGE(OpenSSL REQUIRED)
|
|
||||||
SET(hiredis_ssl_sources
|
|
||||||
ssl.c)
|
|
||||||
- ADD_LIBRARY(hiredis_ssl SHARED
|
|
||||||
+ ADD_LIBRARY(hiredis_ssl
|
|
||||||
${hiredis_ssl_sources})
|
|
||||||
|
|
||||||
IF (APPLE)
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -0,0 +1,171 @@
|
|||||||
|
From 286ba29771611abfaf126527141cac1d406c7eaf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||||
|
Date: Thu, 22 Dec 2022 23:00:56 +0100
|
||||||
|
Subject: [PATCH] CMakeLists.txt: respect BUILD_SHARED_LIBS
|
||||||
|
|
||||||
|
To allow building hiredis on toolchain without dynamic library support,
|
||||||
|
respect standard cmake BUILD_SHARED_LIBS:
|
||||||
|
https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
|
||||||
|
|
||||||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||||
|
[Upstream status: https://github.com/redis/hiredis/pull/1147]
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 70 ++++++++++++++++++++++++++++++++++----------------
|
||||||
|
1 file changed, 48 insertions(+), 22 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 3d52d0c..66a1383 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
|
||||||
|
|
||||||
|
+OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||||
|
OPTION(ENABLE_SSL "Build hiredis_ssl for SSL support" OFF)
|
||||||
|
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF)
|
||||||
|
OPTION(ENABLE_SSL_TESTS "Should we test SSL connections" OFF)
|
||||||
|
@@ -44,35 +45,49 @@ IF(WIN32)
|
||||||
|
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
|
||||||
|
ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
|
||||||
|
-ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
|
||||||
|
ADD_LIBRARY(hiredis::hiredis_static ALIAS hiredis_static)
|
||||||
|
+SET(HIREDIS_DEFAULT_LIBRARY hiredis_static)
|
||||||
|
+SET(HIREDIS_TARGETS hiredis_static)
|
||||||
|
|
||||||
|
IF(NOT MSVC)
|
||||||
|
SET_TARGET_PROPERTIES(hiredis_static
|
||||||
|
PROPERTIES OUTPUT_NAME hiredis)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-SET_TARGET_PROPERTIES(hiredis
|
||||||
|
- PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
|
||||||
|
- VERSION "${HIREDIS_SONAME}")
|
||||||
|
+IF(BUILD_SHARED_LIBS)
|
||||||
|
+ ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
|
||||||
|
+ ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
|
||||||
|
+ SET(HIREDIS_DEFAULT_LIBRARY hiredis)
|
||||||
|
+ SET(HIREDIS_TARGETS ${HIREDIS_TARGETS} hiredis)
|
||||||
|
+ SET_TARGET_PROPERTIES(hiredis
|
||||||
|
+ PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
|
||||||
|
+ VERSION "${HIREDIS_SONAME}")
|
||||||
|
+ENDIF()
|
||||||
|
IF(MSVC)
|
||||||
|
SET_TARGET_PROPERTIES(hiredis_static
|
||||||
|
PROPERTIES COMPILE_FLAGS /Z7)
|
||||||
|
ENDIF()
|
||||||
|
IF(WIN32 OR MINGW)
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis PUBLIC ws2_32 crypt32)
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis PUBLIC ws2_32 crypt32)
|
||||||
|
+ ENDIF()
|
||||||
|
TARGET_LINK_LIBRARIES(hiredis_static PUBLIC ws2_32 crypt32)
|
||||||
|
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis PUBLIC m)
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis PUBLIC m)
|
||||||
|
+ ENDIF()
|
||||||
|
TARGET_LINK_LIBRARIES(hiredis_static PUBLIC m)
|
||||||
|
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis PUBLIC socket)
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis PUBLIC socket)
|
||||||
|
+ ENDIF()
|
||||||
|
TARGET_LINK_LIBRARIES(hiredis_static PUBLIC socket)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
+IF(BUILD_SHARED_LIBS)
|
||||||
|
+ TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
+ENDIF()
|
||||||
|
TARGET_INCLUDE_DIRECTORIES(hiredis_static PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
|
||||||
|
CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY)
|
||||||
|
@@ -103,7 +118,7 @@ set(CPACK_RPM_PACKAGE_AUTOREQPROV ON)
|
||||||
|
|
||||||
|
include(CPack)
|
||||||
|
|
||||||
|
-INSTALL(TARGETS hiredis hiredis_static
|
||||||
|
+INSTALL(TARGETS ${HIREDIS_TARGETS}
|
||||||
|
EXPORT hiredis-targets
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@@ -161,39 +176,50 @@ IF(ENABLE_SSL)
|
||||||
|
FIND_PACKAGE(OpenSSL REQUIRED)
|
||||||
|
SET(hiredis_ssl_sources
|
||||||
|
ssl.c)
|
||||||
|
- ADD_LIBRARY(hiredis_ssl SHARED
|
||||||
|
- ${hiredis_ssl_sources})
|
||||||
|
+
|
||||||
|
ADD_LIBRARY(hiredis_ssl_static STATIC
|
||||||
|
${hiredis_ssl_sources})
|
||||||
|
+ SET(HIREDIS_SSL_DEFAULT_LIBRARY hiredis_ssl_static)
|
||||||
|
+ SET(HIREDIS_SSL_TARGETS hiredis_ssl_static)
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ ADD_LIBRARY(hiredis_ssl SHARED
|
||||||
|
+ ${hiredis_ssl_sources})
|
||||||
|
+ SET(HIREDIS_SSL_DEFAULT_LIBRARY hiredis_ssl)
|
||||||
|
+ SET(HIREDIS_SSL_TARGETS ${HIREDIS_SSL_TARGETS} hiredis_ssl)
|
||||||
|
+ ENDIF()
|
||||||
|
IF(NOT MSVC)
|
||||||
|
SET_TARGET_PROPERTIES(hiredis_ssl_static
|
||||||
|
PROPERTIES OUTPUT_NAME hiredis_ssl)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
- IF (APPLE)
|
||||||
|
+ IF (APPLE AND BUILD_SHARED_LIBS)
|
||||||
|
SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
- SET_TARGET_PROPERTIES(hiredis_ssl
|
||||||
|
- PROPERTIES
|
||||||
|
- WINDOWS_EXPORT_ALL_SYMBOLS TRUE
|
||||||
|
- VERSION "${HIREDIS_SONAME}")
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ SET_TARGET_PROPERTIES(hiredis_ssl
|
||||||
|
+ PROPERTIES
|
||||||
|
+ WINDOWS_EXPORT_ALL_SYMBOLS TRUE
|
||||||
|
+ VERSION "${HIREDIS_SONAME}")
|
||||||
|
+ ENDIF()
|
||||||
|
IF(MSVC)
|
||||||
|
SET_TARGET_PROPERTIES(hiredis_ssl_static
|
||||||
|
PROPERTIES COMPILE_FLAGS /Z7)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
- TARGET_INCLUDE_DIRECTORIES(hiredis_ssl PRIVATE "${OPENSSL_INCLUDE_DIR}")
|
||||||
|
TARGET_INCLUDE_DIRECTORIES(hiredis_ssl_static PRIVATE "${OPENSSL_INCLUDE_DIR}")
|
||||||
|
+ IF(BUILD_SHARED_LIBS)
|
||||||
|
+ TARGET_INCLUDE_DIRECTORIES(hiredis_ssl PRIVATE "${OPENSSL_INCLUDE_DIR}")
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE ${OPENSSL_LIBRARIES})
|
||||||
|
+ ENDIF()
|
||||||
|
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE ${OPENSSL_LIBRARIES})
|
||||||
|
IF (WIN32 OR MINGW)
|
||||||
|
TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE hiredis)
|
||||||
|
TARGET_LINK_LIBRARIES(hiredis_ssl_static PUBLIC hiredis_static)
|
||||||
|
ENDIF()
|
||||||
|
CONFIGURE_FILE(hiredis_ssl.pc.in hiredis_ssl.pc @ONLY)
|
||||||
|
|
||||||
|
- INSTALL(TARGETS hiredis_ssl hiredis_ssl_static
|
||||||
|
+ INSTALL(TARGETS ${HIREDIS_SSL_TARGETS}
|
||||||
|
EXPORT hiredis_ssl-targets
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@@ -236,10 +262,10 @@ ENDIF()
|
||||||
|
IF(NOT DISABLE_TESTS)
|
||||||
|
ENABLE_TESTING()
|
||||||
|
ADD_EXECUTABLE(hiredis-test test.c)
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis-test hiredis)
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis-test ${HIREDIS_DEFAULT_LIBRARY})
|
||||||
|
IF(ENABLE_SSL_TESTS)
|
||||||
|
ADD_DEFINITIONS(-DHIREDIS_TEST_SSL=1)
|
||||||
|
- TARGET_LINK_LIBRARIES(hiredis-test hiredis_ssl)
|
||||||
|
+ TARGET_LINK_LIBRARIES(hiredis-test ${HIREDIS_SSL_DEFAULT_LIBRARY})
|
||||||
|
ENDIF()
|
||||||
|
IF(ENABLE_ASYNC_TESTS)
|
||||||
|
ADD_DEFINITIONS(-DHIREDIS_TEST_ASYNC=1)
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
From bb4a8937411a9e6ac2e5c12c0e7eeaa7dab251ba Mon Sep 17 00:00:00 2001
|
|
||||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
Date: Sat, 5 Sep 2020 12:54:21 +0200
|
|
||||||
Subject: [PATCH] CMakeLists.txt: allow building without a C++ compiler
|
|
||||||
|
|
||||||
Define hiredis as a C project (and use a single PROJECT statement) to
|
|
||||||
avoid the following build failure if a C++ compiler is not found:
|
|
||||||
|
|
||||||
CMake Error at CMakeLists.txt:3 (PROJECT):
|
|
||||||
The CMAKE_CXX_COMPILER:
|
|
||||||
|
|
||||||
/srv/storage/autobuild/run/instance-1/output-1/host/bin/arm-linux-g++
|
|
||||||
|
|
||||||
is not a full path to an existing compiler tool.
|
|
||||||
|
|
||||||
Tell CMake where to find the compiler by setting either the environment
|
|
||||||
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
|
|
||||||
to the compiler, or to the compiler name if it is in the PATH.
|
|
||||||
|
|
||||||
The only cpp source file is examples/example-qt.cpp which is never
|
|
||||||
compiled with cmake buildsystem. This file is compiled only with the
|
|
||||||
Makefile buildsystem so perhaps it should be removed. If it is added to
|
|
||||||
the cmake buildsystem, a call to enable_language(CXX) will have to be
|
|
||||||
added.
|
|
||||||
|
|
||||||
Fixes:
|
|
||||||
- http://autobuild.buildroot.org/results/830ec3398cd29b9fc5cde06a225ef531d7a9d850
|
|
||||||
|
|
||||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
[Upstream status: https://github.com/redis/hiredis/pull/872]
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 3 +--
|
|
||||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 4cbd438..9d65b7f 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.4.0)
|
|
||||||
INCLUDE(GNUInstallDirs)
|
|
||||||
-PROJECT(hiredis)
|
|
||||||
|
|
||||||
OPTION(ENABLE_SSL "Build hiredis_ssl for SSL support" OFF)
|
|
||||||
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF)
|
|
||||||
@@ -20,7 +19,7 @@ getVersionBit(HIREDIS_SONAME)
|
|
||||||
SET(VERSION "${HIREDIS_MAJOR}.${HIREDIS_MINOR}.${HIREDIS_PATCH}")
|
|
||||||
MESSAGE("Detected version: ${VERSION}")
|
|
||||||
|
|
||||||
-PROJECT(hiredis VERSION "${VERSION}")
|
|
||||||
+PROJECT(hiredis LANGUAGES "C" VERSION "${VERSION}")
|
|
||||||
|
|
||||||
# Hiredis requires C99
|
|
||||||
SET(CMAKE_C_STANDARD 99)
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From 13a35bdb64615e381c5e1151cdd4e78bba71a6db Mon Sep 17 00:00:00 2001
|
|
||||||
From: michael-grunder <michael.grunder@gmail.com>
|
|
||||||
Date: Fri, 28 Aug 2020 12:35:01 -0700
|
|
||||||
Subject: [PATCH] Explicitly set c99 in CMake
|
|
||||||
|
|
||||||
See #869
|
|
||||||
|
|
||||||
[Retrieved from:
|
|
||||||
https://github.com/redis/hiredis/commit/13a35bdb64615e381c5e1151cdd4e78bba71a6db]
|
|
||||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 1beccc69a..4cbd438d7 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -22,6 +22,9 @@ MESSAGE("Detected version: ${VERSION}")
|
|
||||||
|
|
||||||
PROJECT(hiredis VERSION "${VERSION}")
|
|
||||||
|
|
||||||
+# Hiredis requires C99
|
|
||||||
+SET(CMAKE_C_STANDARD 99)
|
|
||||||
+
|
|
||||||
SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples")
|
|
||||||
|
|
||||||
SET(hiredis_sources
|
|
@ -1,3 +1,3 @@
|
|||||||
# Locally computed:
|
# Locally computed:
|
||||||
sha256 e0ab696e2f07deb4252dda45b703d09854e53b9703c7d52182ce5a22616c3819 hiredis-1.0.2.tar.gz
|
sha256 fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6 hiredis-1.1.0.tar.gz
|
||||||
sha256 dca05ce8fc87a8261783b4aed0deef8becc9350b6aa770bc714d0c1833b896eb COPYING
|
sha256 dca05ce8fc87a8261783b4aed0deef8becc9350b6aa770bc714d0c1833b896eb COPYING
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
HIREDIS_VERSION_MAJOR = 1.0
|
HIREDIS_VERSION_MAJOR = 1.1
|
||||||
HIREDIS_VERSION = $(HIREDIS_VERSION_MAJOR).2
|
HIREDIS_VERSION = $(HIREDIS_VERSION_MAJOR).0
|
||||||
HIREDIS_SITE = $(call github,redis,hiredis,v$(HIREDIS_VERSION))
|
HIREDIS_SITE = $(call github,redis,hiredis,v$(HIREDIS_VERSION))
|
||||||
HIREDIS_LICENSE = BSD-3-Clause
|
HIREDIS_LICENSE = BSD-3-Clause
|
||||||
HIREDIS_LICENSE_FILES = COPYING
|
HIREDIS_LICENSE_FILES = COPYING
|
||||||
|
Loading…
Reference in New Issue
Block a user