From 1f5c5b2bb6737b44f0e7d9a6b49f202643d12937 Mon Sep 17 00:00:00 2001 From: Romain GARBAGE Date: Fri, 16 Jan 2026 09:12:00 +0100 Subject: databases: Add redox. * guix-science/packages/databases.scm: New file. (redox): New variable. * patches/redox-generate-pkg-config-file.patch: New file. * patches/redox-install-pkg-config-file.patch: New file. --- patches/redox-generate-pkg-config-file.patch | 41 +++++++++++++++++++++++++++ patches/redox-install-pkg-config-file.patch | 42 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 patches/redox-generate-pkg-config-file.patch create mode 100644 patches/redox-install-pkg-config-file.patch (limited to 'patches') 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 @@ +From e7904da79d5360ba22fbab64b96be167b6dda5f6 Mon Sep 17 00:00:00 2001 +From: Millian Poquet +Date: Fri, 7 Dec 2018 00:33:43 +0100 +Subject: [PATCH] fix generated pkg-config file + +--- + CMakeLists.txt | 4 +++- + cmake/redox.pc.in | 4 ++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54dfa35..3f0fa52 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8.4) ++cmake_minimum_required(VERSION 3.0.2) + project(redox) + + set(REDOX_VERSION_MAJOR 0) +@@ -194,6 +194,8 @@ if (lib) + # Install the dynamic library to /usr/lib[64] + install(TARGETS redox DESTINATION lib${LIB_SUFFIX}) + # Generate the redox.pc pkg-config file in /usr/lib[64]/pkgconfig ++ get_filename_component(HIREDIS_LIBRARY_DIRECTORY ${HIREDIS_LIBRARIES} DIRECTORY) ++ get_filename_component(LIBEV_LIBRARY_DIRECTORY ${LIBEV_LIBRARIES} DIRECTORY) + configure_file("${CMAKE_HOME_DIRECTORY}/cmake/redox.pc.in" "${PROJECT_BINARY_DIR}/redox.pc" @ONLY) + install(FILES "${PROJECT_BINARY_DIR}/redox.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/) + endif() +diff --git a/cmake/redox.pc.in b/cmake/redox.pc.in +index a480d1f..1574542 100644 +--- a/cmake/redox.pc.in ++++ b/cmake/redox.pc.in +@@ -7,5 +7,5 @@ Name: redox + Description: Modern, asynchronous, and wicked fast C++11 client for Redis + Version: @REDOX_VERSION_STRING@ + +-Libs: -L${libdir} -lredox @HIREDIS_LIBRARIES@ @LIBEV_LIBRARIES@ @CMAKE_THREAD_LIBS_INIT@ +-Cflags: -I${includedir} ++Libs: -L${libdir} -lredox -L@HIREDIS_LIBRARY_DIRECTORY@ -lhiredis -L@LIBEV_LIBRARY_DIRECTORY@ -lev @CMAKE_THREAD_LIBS_INIT@ ++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 @@ +From 6728a7582bbd5f0ef37f8893cc0103f82c9fdc05 Mon Sep 17 00:00:00 2001 +From: Millian Poquet +Date: Thu, 6 Dec 2018 20:01:15 +0100 +Subject: [PATCH] install a pkg-config redox.pc file + +--- + CMakeLists.txt | 3 +++ + cmake/redox.pc.in | 11 +++++++++++ + 2 files changed, 14 insertions(+) + create mode 100644 cmake/redox.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11887ad..54dfa35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -193,6 +193,9 @@ endif() + if (lib) + # Install the dynamic library to /usr/lib[64] + install(TARGETS redox DESTINATION lib${LIB_SUFFIX}) ++ # Generate the redox.pc pkg-config file in /usr/lib[64]/pkgconfig ++ configure_file("${CMAKE_HOME_DIRECTORY}/cmake/redox.pc.in" "${PROJECT_BINARY_DIR}/redox.pc" @ONLY) ++ install(FILES "${PROJECT_BINARY_DIR}/redox.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/) + endif() + + if (static_lib) +diff --git a/cmake/redox.pc.in b/cmake/redox.pc.in +new file mode 100644 +index 0000000..a480d1f +--- /dev/null ++++ b/cmake/redox.pc.in +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${prefix}/lib@LIB_SUFFIX@ ++includedir=${prefix}/include ++ ++Name: redox ++Description: Modern, asynchronous, and wicked fast C++11 client for Redis ++Version: @REDOX_VERSION_STRING@ ++ ++Libs: -L${libdir} -lredox @HIREDIS_LIBRARIES@ @LIBEV_LIBRARIES@ @CMAKE_THREAD_LIBS_INIT@ ++Cflags: -I${includedir} -- cgit v1.2.3