diff options
author | Sam James <sam@gentoo.org> | 2021-03-22 22:34:48 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-23 04:48:45 +0000 |
commit | 6b6515f9da372efc0899614f2d1abcba2382b4bb (patch) | |
tree | 11cdf3adae76f542922d738f061372196acd6dc6 /dev-libs/hiredis | |
parent | dev-libs/botan: sort IUSE (diff) | |
download | gentoo-6b6515f9da372efc0899614f2d1abcba2382b4bb.tar.gz gentoo-6b6515f9da372efc0899614f2d1abcba2382b4bb.tar.bz2 gentoo-6b6515f9da372efc0899614f2d1abcba2382b4bb.zip |
dev-libs/hiredis: style changes
* Don't quote EAPI
* Use Bash tests, not POSIX
* Define PATCHES in global scope
* sam-style semicolons
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r-- | dev-libs/hiredis/hiredis-0.14.1.ebuild | 20 | ||||
-rw-r--r-- | dev-libs/hiredis/hiredis-1.0.0.ebuild | 27 |
2 files changed, 27 insertions, 20 deletions
diff --git a/dev-libs/hiredis/hiredis-0.14.1.ebuild b/dev-libs/hiredis/hiredis-0.14.1.ebuild index d3827b66b401..81bbbb4420c3 100644 --- a/dev-libs/hiredis/hiredis-0.14.1.ebuild +++ b/dev-libs/hiredis/hiredis-0.14.1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit toolchain-funcs @@ -17,11 +17,12 @@ RESTRICT="!test? ( test )" DEPEND="test? ( dev-db/redis )" +PATCHES=( + "${FILESDIR}"/${PN}-0.13.3-disable-network-tests.patch + "${FILESDIR}"/${PN}-0.14.1-honor-AR.patch +) + src_prepare() { - local PATCHES=( - "${FILESDIR}"/${PN}-0.13.3-disable-network-tests.patch - "${FILESDIR}"/${PN}-0.14.1-honor-AR.patch - ) default # use GNU ld syntax on Solaris @@ -58,17 +59,18 @@ src_test() { _build hiredis-test - /usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die + "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die - [ ${ret} != "0" ] && die "tests failed" + [[ ${ret} != "0" ]] && die "tests failed" } src_install() { _build PREFIX="${ED}/usr" install - if ! use static-libs; then + + if ! use static-libs ; then find "${ED}" -name '*.a' -delete || die fi diff --git a/dev-libs/hiredis/hiredis-1.0.0.ebuild b/dev-libs/hiredis/hiredis-1.0.0.ebuild index 20d56c4f2ebd..b9046749771f 100644 --- a/dev-libs/hiredis/hiredis-1.0.0.ebuild +++ b/dev-libs/hiredis/hiredis-1.0.0.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit toolchain-funcs @@ -17,12 +17,14 @@ RESTRICT="!test? ( test )" DEPEND=" ssl? ( dev-libs/openssl ) - test? ( dev-db/redis )" + test? ( dev-db/redis ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.0-disable-network-tests.patch +) src_prepare() { - local PATCHES=( - "${FILESDIR}/${PN}-1.0.0-disable-network-tests.patch" - ) default # use GNU ld syntax on Solaris @@ -52,25 +54,28 @@ src_test() { local REDIS_PID="${T}"/hiredis.pid local REDIS_SOCK="${T}"/hiredis.sock local REDIS_PORT=56379 - local REDIS_TEST_CONFIG="daemonize yes + local REDIS_TEST_CONFIG=" + daemonize yes pidfile ${REDIS_PID} port ${REDIS_PORT} bind 127.0.0.1 - unixsocket //${REDIS_SOCK}" + unixsocket //${REDIS_SOCK} + " _build hiredis-test - /usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die + "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die - [ ${ret} != "0" ] && die "tests failed" + [[ ${ret} != "0" ]] && die "tests failed" } src_install() { _build PREFIX="${ED}/usr" install - if ! use static-libs; then + + if ! use static-libs ; then find "${ED}" -name '*.a' -delete || die fi |