blob: d0812427368068012857dbeed8b6f957794ea63e [file] [log] [blame]
Patrick Williamse760df82023-05-26 11:10:49 -05001DESCRIPTION = "Minimalistic C client library for Redis"
2HOMEPAGE = "http://github.com/redis/hiredis"
3SECTION = "libs"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
6
7SRC_URI = " \
8 git://github.com/redis/hiredis;protocol=https;branch=master \
9 file://run-ptest \
10 "
Patrick Williams2a254922023-08-11 09:48:11 -050011SRCREV = "60e5075d4ac77424809f855ba3e398df7aacefe8"
Patrick Williamse760df82023-05-26 11:10:49 -050012
13S = "${WORKDIR}/git"
14
15inherit cmake ptest
16
17# 'testssl' is not enabled by default as redis recipe does not build with ssl support
18# option 'testssl' requires 'ssl'
19PACKAGECONFIG ??= "ssl ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'test testasync', '', d)}"
20PACKAGECONFIG[ssl] = "-DENABLE_SSL=ON, -DENABLE_SSL=OFF, openssl"
21PACKAGECONFIG[test] = "-DDISABLE_TESTS=OFF, -DDISABLE_TESTS=ON"
22PACKAGECONFIG[testssl] = "-DENABLE_SSL_TESTS=ON, -DENABLE_SSL_TESTS=OFF, openssl"
23PACKAGECONFIG[testasync] = "-DENABLE_ASYNC_TESTS=ON, -DENABLE_ASYNC_TESTS=OFF, libevent"
24
25do_install_ptest() {
26 install ${S}/test.sh ${D}${PTEST_PATH}/
27 install ${B}/hiredis-test ${D}${PTEST_PATH}/
28 if ${@bb.utils.contains('PACKAGECONFIG','testssl','true','false',d)}; then
29 sed -i 's/TEST_SSL=0/TEST_SSL=1/g' ${D}${PTEST_PATH}/run-ptest
30 fi
31 if ${@bb.utils.contains('PACKAGECONFIG','testasync','true','false',d)}; then
32 sed -i 's/TEST_ASYNC=0/TEST_ASYNC=1/g' ${D}${PTEST_PATH}/run-ptest
33 fi
34}
35
36FILES:${PN}-dev += "${datadir}/hiredis_ssl ${prefix}/build"
37
38RDEPENDS:${PN} = "redis"
39RDEPENDS:${PN}-ptest = "${@bb.utils.contains('PACKAGECONFIG', 'testssl', 'openssl-bin', '', d)}"