1 |
commit: 716b94531c4f2387dea4e7342fe29fec337e2bb3 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 27 13:32:13 2017 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 27 13:34:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=716b9453 |
7 |
|
8 |
dev-libs/librdkafka: Add USE flag for lz4 support |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
.../librdkafka-0.9.2-remove-lz4-automagic.patch | 47 ++++++++++++++++++++++ |
13 |
...fka-0.9.2.ebuild => librdkafka-0.9.2-r1.ebuild} | 10 +++-- |
14 |
dev-libs/librdkafka/metadata.xml | 3 ++ |
15 |
3 files changed, 57 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/dev-libs/librdkafka/files/librdkafka-0.9.2-remove-lz4-automagic.patch b/dev-libs/librdkafka/files/librdkafka-0.9.2-remove-lz4-automagic.patch |
18 |
new file mode 100644 |
19 |
index 00000000..bf22aed |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/librdkafka/files/librdkafka-0.9.2-remove-lz4-automagic.patch |
22 |
@@ -0,0 +1,47 @@ |
23 |
+[PATCH] configure: Add option to disable automagic dependency on |
24 |
+ liblz4 |
25 |
+ |
26 |
+Backport of commit cbf5ea173a2e17310aa1adc4b1ee80fb8831901b. |
27 |
+ |
28 |
+Previously, mklove activated lz4 support when lz4 was found. This added |
29 |
+a so called "automagic" dependency on liblz4 which is a problem from |
30 |
+distributions. |
31 |
+ |
32 |
+This commit will add an option which will allow you to explicit disable |
33 |
+lz4 usage. |
34 |
+--- |
35 |
+ configure.librdkafka | 11 +++++++---- |
36 |
+ 1 file changed, 7 insertions(+), 4 deletions(-) |
37 |
+ |
38 |
+diff --git a/configure.librdkafka b/configure.librdkafka |
39 |
+index 34acc17..71d9905 100644 |
40 |
+--- a/configure.librdkafka |
41 |
++++ b/configure.librdkafka |
42 |
+@@ -30,6 +30,8 @@ mkl_toggle_option "Development" ENABLE_REFCNT_DEBUG "--enable-refcnt-debug" "Ena |
43 |
+ |
44 |
+ mkl_toggle_option "Development" ENABLE_SHAREDPTR_DEBUG "--enable-sharedptr-debug" "Enable sharedptr debugging" "n" |
45 |
+ |
46 |
++mkl_toggle_option "Feature" ENABLE_LZ4 "--enable-lz4" "Enable LZ4 support" "y" |
47 |
++ |
48 |
+ mkl_toggle_option "Feature" ENABLE_SSL "--enable-ssl" "Enable SSL support" "y" |
49 |
+ mkl_toggle_option "Feature" ENABLE_SASL "--enable-sasl" "Enable SASL support" "y" |
50 |
+ |
51 |
+@@ -42,10 +44,11 @@ function checks { |
52 |
+ # optional libs |
53 |
+ mkl_lib_check "zlib" "WITH_ZLIB" disable CC "-lz" |
54 |
+ mkl_lib_check "libcrypto" "" disable CC "-lcrypto" |
55 |
+- mkl_lib_check "liblz4" "WITH_LZ4" disable CC "-llz4" \ |
56 |
+- " |
57 |
+-#include <lz4frame.h> |
58 |
+-" |
59 |
++ |
60 |
++ if [[ "$ENABLE_LZ4" == "y" ]]; then |
61 |
++ mkl_lib_check "liblz4" "WITH_LZ4" disable CC "-llz4" \ |
62 |
++ "#include <lz4frame.h>" |
63 |
++ fi |
64 |
+ |
65 |
+ # Snappy support is built-in |
66 |
+ mkl_allvar_set WITH_SNAPPY WITH_SNAPPY y |
67 |
+-- |
68 |
+2.11.0 |
69 |
+ |
70 |
|
71 |
diff --git a/dev-libs/librdkafka/librdkafka-0.9.2.ebuild b/dev-libs/librdkafka/librdkafka-0.9.2-r1.ebuild |
72 |
similarity index 85% |
73 |
rename from dev-libs/librdkafka/librdkafka-0.9.2.ebuild |
74 |
rename to dev-libs/librdkafka/librdkafka-0.9.2-r1.ebuild |
75 |
index 7623bd2..14f60a1 100644 |
76 |
--- a/dev-libs/librdkafka/librdkafka-0.9.2.ebuild |
77 |
+++ b/dev-libs/librdkafka/librdkafka-0.9.2-r1.ebuild |
78 |
@@ -1,8 +1,8 @@ |
79 |
-# Copyright 1999-2016 Gentoo Foundation |
80 |
+# Copyright 1999-2017 Gentoo Foundation |
81 |
# Distributed under the terms of the GNU General Public License v2 |
82 |
# $Id$ |
83 |
|
84 |
-EAPI=6 |
85 |
+EAPI="6" |
86 |
|
87 |
inherit toolchain-funcs |
88 |
|
89 |
@@ -26,9 +26,10 @@ LICENSE="BSD-2" |
90 |
# subslot = soname version |
91 |
SLOT="0/1" |
92 |
|
93 |
-IUSE="sasl ssl static-libs" |
94 |
+IUSE="lz4 sasl ssl static-libs" |
95 |
|
96 |
RDEPEND=" |
97 |
+ lz4? ( app-arch/lz4:= ) |
98 |
sasl? ( dev-libs/cyrus-sasl:= ) |
99 |
ssl? ( dev-libs/openssl:0= ) |
100 |
sys-libs/zlib |
101 |
@@ -39,6 +40,8 @@ DEPEND=" |
102 |
virtual/pkgconfig |
103 |
" |
104 |
|
105 |
+PATCHES=( "${FILESDIR}"/${PN}-0.9.2-remove-lz4-automagic.patch ) |
106 |
+ |
107 |
src_configure() { |
108 |
tc-export CC CXX LD NM OBJDUMP PKG_CONFIG STRIP |
109 |
|
110 |
@@ -46,6 +49,7 @@ src_configure() { |
111 |
--no-cache |
112 |
--no-download |
113 |
--disable-debug-symbols |
114 |
+ $(use_enable lz4) |
115 |
$(use_enable sasl) |
116 |
$(usex static-libs '--enable-static' '') |
117 |
$(use_enable ssl) |
118 |
|
119 |
diff --git a/dev-libs/librdkafka/metadata.xml b/dev-libs/librdkafka/metadata.xml |
120 |
index e0fb32e..1d277ad 100644 |
121 |
--- a/dev-libs/librdkafka/metadata.xml |
122 |
+++ b/dev-libs/librdkafka/metadata.xml |
123 |
@@ -9,4 +9,7 @@ |
124 |
<bugs-to>https://github.com/edenhill/librdkafka/issues</bugs-to> |
125 |
<remote-id type="github">edenhill/librdkafka</remote-id> |
126 |
</upstream> |
127 |
+ <use> |
128 |
+ <flag name="lz4">Enable support for Kafka's LZ4 compression based on KIP-57 (uses <pkg>app-arch/lz4</pkg>)</flag> |
129 |
+ </use> |
130 |
</pkgmetadata> |