Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Minimalistic C client library for Redis" |
| 2 | HOMEPAGE = "http://github.com/redis/hiredis" |
| 3 | SECTION = "libs" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51" |
| 6 | |
| 7 | SRC_URI = " \ |
| 8 | git://github.com/redis/hiredis;protocol=https;branch=master \ |
| 9 | file://run-ptest \ |
| 10 | " |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 11 | SRCREV = "60e5075d4ac77424809f855ba3e398df7aacefe8" |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 12 | |
| 13 | S = "${WORKDIR}/git" |
| 14 | |
| 15 | inherit cmake ptest |
| 16 | |
| 17 | # 'testssl' is not enabled by default as redis recipe does not build with ssl support |
| 18 | # option 'testssl' requires 'ssl' |
| 19 | PACKAGECONFIG ??= "ssl ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'test testasync', '', d)}" |
| 20 | PACKAGECONFIG[ssl] = "-DENABLE_SSL=ON, -DENABLE_SSL=OFF, openssl" |
| 21 | PACKAGECONFIG[test] = "-DDISABLE_TESTS=OFF, -DDISABLE_TESTS=ON" |
| 22 | PACKAGECONFIG[testssl] = "-DENABLE_SSL_TESTS=ON, -DENABLE_SSL_TESTS=OFF, openssl" |
| 23 | PACKAGECONFIG[testasync] = "-DENABLE_ASYNC_TESTS=ON, -DENABLE_ASYNC_TESTS=OFF, libevent" |
| 24 | |
| 25 | do_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 | |
| 36 | FILES:${PN}-dev += "${datadir}/hiredis_ssl ${prefix}/build" |
| 37 | |
| 38 | RDEPENDS:${PN} = "redis" |
| 39 | RDEPENDS:${PN}-ptest = "${@bb.utils.contains('PACKAGECONFIG', 'testssl', 'openssl-bin', '', d)}" |