dev-libs/librdkafka: remove automagic on app-arch/zstd
authorThomas Deutschmann <whissi@gentoo.org>
Mon, 29 Apr 2019 17:00:29 +0000 (19:00 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Mon, 29 Apr 2019 17:02:13 +0000 (19:02 +0200)
Package-Manager: Portage-2.3.65, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
dev-libs/librdkafka/files/librdkafka-1.0.0-remove-automagic-on-zstd.patch [new file with mode: 0644]
dev-libs/librdkafka/librdkafka-1.0.0-r1.ebuild [moved from dev-libs/librdkafka/librdkafka-1.0.0.ebuild with 89% similarity]

diff --git a/dev-libs/librdkafka/files/librdkafka-1.0.0-remove-automagic-on-zstd.patch b/dev-libs/librdkafka/files/librdkafka-1.0.0-remove-automagic-on-zstd.patch
new file mode 100644 (file)
index 0000000..ed4dbda
--- /dev/null
@@ -0,0 +1,29 @@
+commit ff67402dcfb2f4913a3ff1d84449a5e1620ee4ae
+Author:     Thomas Deutschmann <whissi@gentoo.org>
+AuthorDate: Mon Apr 29 18:57:10 2019 +0200
+Commit:     Thomas Deutschmann <whissi@gentoo.org>
+CommitDate: Mon Apr 29 18:57:10 2019 +0200
+
+    configure: Add option to disable automagic dependency on zstd
+    
+    This commit will add an option which will allow you to explicit disable
+    zstd usage.
+
+diff --git a/mklove/modules/configure.zstd b/mklove/modules/configure.zstd
+index 6dd621ad..3ea36ccf 100644
+--- a/mklove/modules/configure.zstd
++++ b/mklove/modules/configure.zstd
+@@ -9,8 +9,12 @@
+ #   mkl_check zstd [<action>]
+ #
++mkl_toggle_option "Feature" ENABLE_ZSTD "--enable-zstd" "Enable support for ZSTD compression" "y"
++
+ function manual_checks {
+-    local action=$1
++    local action=${1:-disable}
++
++    [[ $ENABLE_ZSTD == y ]] || return 0
+     if [[ $WITH_STATIC_LINKING != y ]]; then
+         # Homebrew does not provide a static library for zstd
similarity index 89%
rename from dev-libs/librdkafka/librdkafka-1.0.0.ebuild
rename to dev-libs/librdkafka/librdkafka-1.0.0-r1.ebuild
index 1ba0f2d7c09a13248e4e4fdb0cda8f8876971744..fa9a0fd5d55650c5d469e44e824d521ff9212e4b 100644 (file)
@@ -22,12 +22,13 @@ LICENSE="BSD-2"
 # subslot = soname version
 SLOT="0/1"
 
-IUSE="lz4 sasl ssl static-libs"
+IUSE="lz4 sasl ssl static-libs zstd"
 
 RDEPEND="
        lz4? ( app-arch/lz4:=[static-libs(-)?] )
        sasl? ( dev-libs/cyrus-sasl:= )
        ssl? ( dev-libs/openssl:0= )
+       zstd? ( app-arch/zstd:= )
        sys-libs/zlib
 "
 
@@ -36,6 +37,8 @@ DEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=( "${FILESDIR}"/${P}-remove-automagic-on-zstd.patch )
+
 src_configure() {
        tc-export CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
 
@@ -47,6 +50,7 @@ src_configure() {
                $(use_enable sasl)
                $(usex static-libs '--enable-static' '')
                $(use_enable ssl)
+               $(use_enable zstd)
        )
 
        econf ${myeconf[@]}