1 |
commit: 10beaf0d821c58e1779a2f001add50f25a9c6676 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 24 00:33:44 2016 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 24 00:57:20 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10beaf0d |
7 |
|
8 |
dev-libs/hiredis: Bump to v0.13.3 |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/585648 |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
dev-libs/hiredis/Manifest | 1 + |
15 |
.../hiredis-0.13.3-disable-network-tests.patch | 36 ++++++++++ |
16 |
dev-libs/hiredis/hiredis-0.13.3.ebuild | 79 ++++++++++++++++++++++ |
17 |
dev-libs/hiredis/metadata.xml | 3 + |
18 |
4 files changed, 119 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/hiredis/Manifest b/dev-libs/hiredis/Manifest |
21 |
index 97b6add..030a7cc 100644 |
22 |
--- a/dev-libs/hiredis/Manifest |
23 |
+++ b/dev-libs/hiredis/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST hiredis-0.11.0.tar.gz 42137 SHA256 ff7b2849e55bf3589eecced7125934feb9645c36a4d490d001dc08c93553eafd SHA512 a506c3e09267bd431dea87fdb7f9a44fb1d4795cbecb31323fe2fb9d66c10351fbf6d931fdaf2731fc2d0a985234e5d6ba0c9e694374d2f414294d27b6f060b8 WHIRLPOOL 0d4d4385452b4fe3aabc7cbdbef95914fea685a65f44a6b2addaec8f0f7779ed7f72c50cfbb976e1838553746ae90f2ce8685c208727e450738ff2bb29cca144 |
26 |
DIST hiredis-0.13.1.tar.gz 54912 SHA256 8865105e15331156a74b64aafbfd3f8c784a8375e003a55512dcca3d82168487 SHA512 70b533a6cfbc3ce2b64018978e4f4460ca9a204ede92b571638ed4f04960199be0704cff16fcaf368e5c997a01e3b2da98e3c556c2f05c8316381f989684fcf1 WHIRLPOOL 6b2884217544a78153b33d4bc758f8d5bfe2cf29a16c768df7ffefbe7def43c7ae1477f1826790fdc64999b272bd33f72e10a968e606324366cb2b5539a0df71 |
27 |
+DIST hiredis-0.13.3.tar.gz 58291 SHA256 717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78 SHA512 0d8b71d5ee4105e8aaeeee308795afc2c1f60a04b0bfe8ae873d800a0c157882ec307efa04a8d0e63b538fd3fc3f88eedf4d46cb87c8937e2403927aeb7e434c WHIRLPOOL 511f86f680a005bd1fa75494707bf5a16670c3f2b7ac0fd61684546368868a2545fa7aa74b63e3865be8ec7cb301417c5a945fe090de398066f098bef01d664b |
28 |
|
29 |
diff --git a/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch |
30 |
new file mode 100644 |
31 |
index 00000000..000e253 |
32 |
--- /dev/null |
33 |
+++ b/dev-libs/hiredis/files/hiredis-0.13.3-disable-network-tests.patch |
34 |
@@ -0,0 +1,36 @@ |
35 |
+diff --git test.c test.c |
36 |
+index 8fde554..89ed6a0 100644 |
37 |
+--- a/test.c |
38 |
++++ b/test.c |
39 |
+@@ -343,6 +343,7 @@ static void test_free_null(void) { |
40 |
+ static void test_blocking_connection_errors(void) { |
41 |
+ redisContext *c; |
42 |
+ |
43 |
++#if 0 |
44 |
+ test("Returns error when host cannot be resolved: "); |
45 |
+ c = redisConnect((char*)"idontexist.test", 6379); |
46 |
+ test_cond(c->err == REDIS_ERR_OTHER && |
47 |
+@@ -353,6 +354,7 @@ static void test_blocking_connection_errors(void) { |
48 |
+ strcmp(c->errstr,"Temporary failure in name resolution") == 0 || |
49 |
+ strcmp(c->errstr,"no address associated with name") == 0)); |
50 |
+ redisFree(c); |
51 |
++#endif |
52 |
+ |
53 |
+ test("Returns error when the port is not open: "); |
54 |
+ c = redisConnect((char*)"localhost", 1); |
55 |
+@@ -773,6 +775,7 @@ int main(int argc, char **argv) { |
56 |
+ test_blocking_connection_errors(); |
57 |
+ test_free_null(); |
58 |
+ |
59 |
++#if 0 |
60 |
+ printf("\nTesting against TCP connection (%s:%d):\n", cfg.tcp.host, cfg.tcp.port); |
61 |
+ cfg.type = CONN_TCP; |
62 |
+ test_blocking_connection(cfg); |
63 |
+@@ -781,6 +784,7 @@ int main(int argc, char **argv) { |
64 |
+ test_invalid_timeout_errors(cfg); |
65 |
+ test_append_formatted_commands(cfg); |
66 |
+ if (throughput) test_throughput(cfg); |
67 |
++#endif |
68 |
+ |
69 |
+ printf("\nTesting against Unix socket connection (%s):\n", cfg.unix.path); |
70 |
+ cfg.type = CONN_UNIX; |
71 |
|
72 |
diff --git a/dev-libs/hiredis/hiredis-0.13.3.ebuild b/dev-libs/hiredis/hiredis-0.13.3.ebuild |
73 |
new file mode 100644 |
74 |
index 00000000..b54ef83 |
75 |
--- /dev/null |
76 |
+++ b/dev-libs/hiredis/hiredis-0.13.3.ebuild |
77 |
@@ -0,0 +1,79 @@ |
78 |
+# Copyright 1999-2016 Gentoo Foundation |
79 |
+# Distributed under the terms of the GNU General Public License v2 |
80 |
+# $Id$ |
81 |
+ |
82 |
+EAPI="6" |
83 |
+ |
84 |
+inherit toolchain-funcs |
85 |
+ |
86 |
+DESCRIPTION="Minimalistic C client library for the Redis database" |
87 |
+HOMEPAGE="https://github.com/redis/hiredis" |
88 |
+SRC_URI="https://github.com/redis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
89 |
+ |
90 |
+LICENSE="BSD" |
91 |
+SLOT="0/0.13" |
92 |
+KEYWORDS="~amd64 ~hppa ~ppc64 ~x86 ~x86-fbsd ~x64-solaris" |
93 |
+IUSE="examples static-libs test" |
94 |
+ |
95 |
+DEPEND="test? ( dev-db/redis )" |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ local PATCHES=( "${FILESDIR}/${PN}-0.13.3-disable-network-tests.patch" ) |
99 |
+ default |
100 |
+ |
101 |
+ # use GNU ld syntax on Solaris |
102 |
+ sed -i -e '/DYLIB_MAKE_CMD=.* -G/d' Makefile || die |
103 |
+} |
104 |
+ |
105 |
+_build() { |
106 |
+ emake \ |
107 |
+ AR="$(tc-getAR)" \ |
108 |
+ CC="$(tc-getCC)" \ |
109 |
+ PREFIX="${EPREFIX%/}/usr" \ |
110 |
+ LIBRARY_PATH="$(get_libdir)" \ |
111 |
+ ARCH= \ |
112 |
+ DEBUG= \ |
113 |
+ OPTIMIZATION="${CPPFLAGS}" \ |
114 |
+ "$@" |
115 |
+} |
116 |
+ |
117 |
+src_compile() { |
118 |
+ # The static lib re-uses the same objects as the shared lib, so |
119 |
+ # overhead is low w/creating it all the time. It's also needed |
120 |
+ # by the tests. |
121 |
+ _build dynamic static hiredis.pc |
122 |
+} |
123 |
+ |
124 |
+src_test() { |
125 |
+ local REDIS_PID="${T}"/hiredis.pid |
126 |
+ local REDIS_SOCK="${T}"/hiredis.sock |
127 |
+ local REDIS_PORT=56379 |
128 |
+ local REDIS_TEST_CONFIG="daemonize yes |
129 |
+ pidfile ${REDIS_PID} |
130 |
+ port ${REDIS_PORT} |
131 |
+ bind 127.0.0.1 |
132 |
+ unixsocket //${REDIS_SOCK}" |
133 |
+ |
134 |
+ _build hiredis-test |
135 |
+ |
136 |
+ /usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die |
137 |
+ ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} |
138 |
+ local ret=$? |
139 |
+ |
140 |
+ kill "$(<"${REDIS_PID}")" || die |
141 |
+ [ ${ret} != "0" ] && die "tests failed" |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ _build PREFIX="${ED%/}/usr" install |
146 |
+ if use static-libs; then |
147 |
+ rm "${ED%/}/usr/$(get_libdir)/libhiredis.a" || die |
148 |
+ fi |
149 |
+ |
150 |
+ insinto /usr/$(get_libdir)/pkgconfig |
151 |
+ doins ${PN}.pc |
152 |
+ |
153 |
+ local DOCS=( CHANGELOG.md README.md ) |
154 |
+ use examples && DOCS+=( examples ) |
155 |
+ einstalldocs |
156 |
+} |
157 |
|
158 |
diff --git a/dev-libs/hiredis/metadata.xml b/dev-libs/hiredis/metadata.xml |
159 |
index 8320586..23f7b8b 100644 |
160 |
--- a/dev-libs/hiredis/metadata.xml |
161 |
+++ b/dev-libs/hiredis/metadata.xml |
162 |
@@ -1,6 +1,9 @@ |
163 |
<?xml version="1.0" encoding="UTF-8"?> |
164 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
165 |
<pkgmetadata> |
166 |
+ <slots> |
167 |
+ <subslots>Reflect ABI of libhiredis.so.</subslots> |
168 |
+ </slots> |
169 |
<upstream> |
170 |
<remote-id type="github">redis/hiredis</remote-id> |
171 |
</upstream> |