summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/redox-generate-pkg-config-file.patch41
-rw-r--r--patches/redox-install-pkg-config-file.patch42
2 files changed, 83 insertions, 0 deletions
diff --git a/patches/redox-generate-pkg-config-file.patch b/patches/redox-generate-pkg-config-file.patch
new file mode 100644
index 0000000..efd488b
--- /dev/null
+++ b/patches/redox-generate-pkg-config-file.patch
@@ -0,0 +1,41 @@
1From e7904da79d5360ba22fbab64b96be167b6dda5f6 Mon Sep 17 00:00:00 2001
2From: Millian Poquet <millian.poquet@inria.fr>
3Date: Fri, 7 Dec 2018 00:33:43 +0100
4Subject: [PATCH] fix generated pkg-config file
5
6---
7 CMakeLists.txt | 4 +++-
8 cmake/redox.pc.in | 4 ++--
9 2 files changed, 5 insertions(+), 3 deletions(-)
10
11diff --git a/CMakeLists.txt b/CMakeLists.txt
12index 54dfa35..3f0fa52 100644
13--- a/CMakeLists.txt
14+++ b/CMakeLists.txt
15@@ -1,4 +1,4 @@
16-cmake_minimum_required(VERSION 2.8.4)
17+cmake_minimum_required(VERSION 3.0.2)
18 project(redox)
19
20 set(REDOX_VERSION_MAJOR 0)
21@@ -194,6 +194,8 @@ if (lib)
22 # Install the dynamic library to /usr/lib[64]
23 install(TARGETS redox DESTINATION lib${LIB_SUFFIX})
24 # Generate the redox.pc pkg-config file in /usr/lib[64]/pkgconfig
25+ get_filename_component(HIREDIS_LIBRARY_DIRECTORY ${HIREDIS_LIBRARIES} DIRECTORY)
26+ get_filename_component(LIBEV_LIBRARY_DIRECTORY ${LIBEV_LIBRARIES} DIRECTORY)
27 configure_file("${CMAKE_HOME_DIRECTORY}/cmake/redox.pc.in" "${PROJECT_BINARY_DIR}/redox.pc" @ONLY)
28 install(FILES "${PROJECT_BINARY_DIR}/redox.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/)
29 endif()
30diff --git a/cmake/redox.pc.in b/cmake/redox.pc.in
31index a480d1f..1574542 100644
32--- a/cmake/redox.pc.in
33+++ b/cmake/redox.pc.in
34@@ -7,5 +7,5 @@ Name: redox
35 Description: Modern, asynchronous, and wicked fast C++11 client for Redis
36 Version: @REDOX_VERSION_STRING@
37
38-Libs: -L${libdir} -lredox @HIREDIS_LIBRARIES@ @LIBEV_LIBRARIES@ @CMAKE_THREAD_LIBS_INIT@
39-Cflags: -I${includedir}
40+Libs: -L${libdir} -lredox -L@HIREDIS_LIBRARY_DIRECTORY@ -lhiredis -L@LIBEV_LIBRARY_DIRECTORY@ -lev @CMAKE_THREAD_LIBS_INIT@
41+Cflags: -I${includedir} -I@HIREDIS_INCLUDE_DIRS@
diff --git a/patches/redox-install-pkg-config-file.patch b/patches/redox-install-pkg-config-file.patch
new file mode 100644
index 0000000..a1390b3
--- /dev/null
+++ b/patches/redox-install-pkg-config-file.patch
@@ -0,0 +1,42 @@
1From 6728a7582bbd5f0ef37f8893cc0103f82c9fdc05 Mon Sep 17 00:00:00 2001
2From: Millian Poquet <millian.poquet@inria.fr>
3Date: Thu, 6 Dec 2018 20:01:15 +0100
4Subject: [PATCH] install a pkg-config redox.pc file
5
6---
7 CMakeLists.txt | 3 +++
8 cmake/redox.pc.in | 11 +++++++++++
9 2 files changed, 14 insertions(+)
10 create mode 100644 cmake/redox.pc.in
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index 11887ad..54dfa35 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -193,6 +193,9 @@ endif()
17 if (lib)
18 # Install the dynamic library to /usr/lib[64]
19 install(TARGETS redox DESTINATION lib${LIB_SUFFIX})
20+ # Generate the redox.pc pkg-config file in /usr/lib[64]/pkgconfig
21+ configure_file("${CMAKE_HOME_DIRECTORY}/cmake/redox.pc.in" "${PROJECT_BINARY_DIR}/redox.pc" @ONLY)
22+ install(FILES "${PROJECT_BINARY_DIR}/redox.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/)
23 endif()
24
25 if (static_lib)
26diff --git a/cmake/redox.pc.in b/cmake/redox.pc.in
27new file mode 100644
28index 0000000..a480d1f
29--- /dev/null
30+++ b/cmake/redox.pc.in
31@@ -0,0 +1,11 @@
32+prefix=@CMAKE_INSTALL_PREFIX@
33+exec_prefix=${prefix}
34+libdir=${prefix}/lib@LIB_SUFFIX@
35+includedir=${prefix}/include
36+
37+Name: redox
38+Description: Modern, asynchronous, and wicked fast C++11 client for Redis
39+Version: @REDOX_VERSION_STRING@
40+
41+Libs: -L${libdir} -lredox @HIREDIS_LIBRARIES@ @LIBEV_LIBRARIES@ @CMAKE_THREAD_LIBS_INIT@
42+Cflags: -I${includedir}