summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-06-14 12:12:56 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-06-14 12:13:01 +0100
commit673f14de314e31f533512f2bc82ce4efa6eb8f70 (patch)
tree3bec701d10c1cd93d05640012e9ff921c3dd7077 /dev-libs/librdkafka
parentdev-python/networkx: Use https (diff)
downloadgentoo-673f14de314e31f533512f2bc82ce4efa6eb8f70.tar.gz
gentoo-673f14de314e31f533512f2bc82ce4efa6eb8f70.tar.bz2
gentoo-673f14de314e31f533512f2bc82ce4efa6eb8f70.zip
dev-libs/librdkafka: avoid calling 'ar' directly
Closes: https://bugs.gentoo.org/726304 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/librdkafka')
-rw-r--r--dev-libs/librdkafka/librdkafka-1.4.2-r1.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-libs/librdkafka/librdkafka-1.4.2-r1.ebuild b/dev-libs/librdkafka/librdkafka-1.4.2-r1.ebuild
new file mode 100644
index 000000000000..026accdfa88e
--- /dev/null
+++ b/dev-libs/librdkafka/librdkafka-1.4.2-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Apache Kafka C/C++ client library"
+HOMEPAGE="https://github.com/edenhill/librdkafka"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/edenhill/${PN}.git"
+
+ inherit git-r3
+else
+ SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+LICENSE="BSD-2"
+
+# subslot = soname version
+SLOT="0/1"
+
+IUSE="lz4 sasl ssl static-libs zstd"
+
+LIB_DEPEND="
+ lz4? ( app-arch/lz4:=[static-libs(+)] )
+ sasl? ( dev-libs/cyrus-sasl:=[static-libs(+)] )
+ ssl? ( dev-libs/openssl:0=[static-libs(+)] )
+ zstd? ( app-arch/zstd:=[static-libs(+)] )
+ sys-libs/zlib:=[static-libs(+)]
+"
+
+RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ static-libs? ( ${LIB_DEPEND} )
+"
+
+src_configure() {
+ tc-export AR CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
+
+ local myeconf=(
+ --no-cache
+ --no-download
+ --disable-debug-symbols
+ $(use_enable lz4)
+ $(use_enable sasl)
+ $(usex static-libs '--enable-static' '')
+ $(use_enable ssl)
+ $(use_enable zstd)
+ )
+
+ econf ${myeconf[@]}
+}
+
+src_test() {
+ emake -C tests run_local
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ install
+
+ if ! use static-libs; then
+ find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+ fi
+}