diff options
author | Sam James <sam@gentoo.org> | 2021-03-04 05:29:09 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-04 05:29:09 +0000 |
commit | 3710296030a5439c1034dba302d249ad0736e7bb (patch) | |
tree | 966021ceabe1d75492b68329e68e4be251f1b526 /dev-libs/hiredis/hiredis-0.14.1.ebuild | |
parent | games-strategy/0ad: Keyword 0.0.24b_alpha arm64, #773634 (diff) | |
download | gentoo-3710296030a5439c1034dba302d249ad0736e7bb.tar.gz gentoo-3710296030a5439c1034dba302d249ad0736e7bb.tar.bz2 gentoo-3710296030a5439c1034dba302d249ad0736e7bb.zip |
Revert "dev-libs/hiredis: remove 0.14.1"
This reverts commit 3cb8d20c8f4e3d211e1acfc05cb7fc3ea4dc3a2d.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/hiredis/hiredis-0.14.1.ebuild')
-rw-r--r-- | dev-libs/hiredis/hiredis-0.14.1.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/dev-libs/hiredis/hiredis-0.14.1.ebuild b/dev-libs/hiredis/hiredis-0.14.1.ebuild new file mode 100644 index 000000000000..d3827b66b401 --- /dev/null +++ b/dev-libs/hiredis/hiredis-0.14.1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs + +DESCRIPTION="Minimalistic C client library for the Redis database" +HOMEPAGE="https://github.com/redis/hiredis" +SRC_URI="https://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/0.14" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 s390 sparc x86 ~x64-solaris" +IUSE="examples static-libs test" +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-db/redis )" + +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 + sed -i -e '/DYLIB_MAKE_CMD=.* -G/d' Makefile || die +} + +_build() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + PREFIX="${EPREFIX}/usr" \ + LIBRARY_PATH="$(get_libdir)" \ + DEBUG_FLAGS= \ + OPTIMIZATION= \ + "$@" +} + +src_compile() { + # The static lib re-uses the same objects as the shared lib, so + # overhead is low w/creating it all the time. It's also needed + # by the tests. + _build dynamic static hiredis.pc +} + +src_test() { + local REDIS_PID="${T}"/hiredis.pid + local REDIS_SOCK="${T}"/hiredis.sock + local REDIS_PORT=56379 + local REDIS_TEST_CONFIG="daemonize yes + pidfile ${REDIS_PID} + port ${REDIS_PORT} + bind 127.0.0.1 + unixsocket //${REDIS_SOCK}" + + _build hiredis-test + + /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" +} + +src_install() { + _build PREFIX="${ED}/usr" install + if ! use static-libs; then + find "${ED}" -name '*.a' -delete || die + fi + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc + + local DOCS=( CHANGELOG.md README.md ) + use examples && DOCS+=( examples ) + einstalldocs +} |