mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 20:20:06 +02:00
hiredis, new recipe (#6400)
This commit is contained in:
84
dev-libs/hiredis/hiredis-1.0.2.recipe
Normal file
84
dev-libs/hiredis/hiredis-1.0.2.recipe
Normal file
@@ -0,0 +1,84 @@
|
||||
SUMMARY="A minimalistic C client library for the Redis"
|
||||
DESCRIPTION="Hiredis is a minimalistic C client library for the Redis database.
|
||||
|
||||
It is minimalistic because it just adds minimal support for the protocol, but \
|
||||
at the same time it uses a high level printf-alike API in order to make it \
|
||||
much higher level than otherwise suggested by its minimal code base and the \
|
||||
lack of explicit bindings for every Redis command."
|
||||
HOMEPAGE="https://github.com/redis/hiredis"
|
||||
COPYRIGHT="2009-2011, Salvatore Sanfilippo
|
||||
2010-2011, Pieter Noordhuis"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e0ab696e2f07deb4252dda45b703d09854e53b9703c7d52182ce5a22616c3819"
|
||||
SOURCE_FILENAME="hiredis-v$portVersion.tar.gz"
|
||||
PATCHES="hiredis-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
hiredis$secondaryArchSuffix = $portVersion
|
||||
lib:libhiredis$secondaryArchSuffix = 1.0.0
|
||||
lib:libhiredis_ssl$secondaryArchSuffix = 1.0.0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
hiredis${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libhiredis$secondaryArchSuffix = 1.0.0
|
||||
devel:libhiredis_ssl$secondaryArchSuffix = 1.0.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
hiredis$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libssl$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DENABLE_SSL=ON \
|
||||
-DCMAKE_CONF_INSTALL_DIR=$libDir/cmake -L # this doesn't seem to work
|
||||
make -C build
|
||||
}
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:redis_server
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
# move cmake files to the correct directory
|
||||
mkdir -p $libDir/cmake
|
||||
mv $prefix/share/* $libDir/cmake/
|
||||
rm -rf $prefix/share
|
||||
|
||||
prepareInstalledDevelLibs libhiredis libhiredis_ssl
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make -C build test
|
||||
}
|
||||
24
dev-libs/hiredis/patches/hiredis-1.0.2.patchset
Normal file
24
dev-libs/hiredis/patches/hiredis-1.0.2.patchset
Normal file
@@ -0,0 +1,24 @@
|
||||
From 5d179f83a4a3c04f8d18af23e02269eabb7ff0e6 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 13 Nov 2021 11:13:55 +0000
|
||||
Subject: Link against libnetwork
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f86c9b7..95f27e3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,6 +49,10 @@ IF(WIN32 OR MINGW)
|
||||
TARGET_LINK_LIBRARIES(hiredis PRIVATE ws2_32)
|
||||
ENDIF()
|
||||
|
||||
+if(HAIKU)
|
||||
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lnetwork")
|
||||
+endif(HAIKU)
|
||||
+
|
||||
TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:.> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
|
||||
CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY)
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user