summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiezhiko <Miezhiko@gmail.com>2023-04-19 18:35:07 +0400
committerViorel Munteanu <ceamac@gentoo.org>2023-05-14 12:42:14 +0300
commit1457787d90a518a22fe1afcd2c91ca5a05df24eb (patch)
treef754f1653c94f3273fd356f0678da4b2783bee4d
parentdev-util/poke: add 3.2 (diff)
downloadgentoo-1457787d90a518a22fe1afcd2c91ca5a05df24eb.tar.gz
gentoo-1457787d90a518a22fe1afcd2c91ca5a05df24eb.tar.bz2
gentoo-1457787d90a518a22fe1afcd2c91ca5a05df24eb.zip
dev-libs/librdkafka: new version 2.1.0
Signed-off-by: Miezhiko <Miezhiko@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/30651 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
-rw-r--r--dev-libs/librdkafka/Manifest1
-rw-r--r--dev-libs/librdkafka/librdkafka-2.1.0.ebuild106
2 files changed, 107 insertions, 0 deletions
diff --git a/dev-libs/librdkafka/Manifest b/dev-libs/librdkafka/Manifest
index da52a2e0337a..dbe431ffa583 100644
--- a/dev-libs/librdkafka/Manifest
+++ b/dev-libs/librdkafka/Manifest
@@ -1 +1,2 @@
DIST librdkafka-1.8.2.tar.gz 4097028 BLAKE2B 37a3190417e973ea4629012e358ff61cda45eb0134448dd0054fd1f1cac57f3543b133331b0b0d518f219f30f79f7665a214c75084d6a8474687b7e686395724 SHA512 8c8ae291129b78e3b8367307ad1b1715af1438cd76d7160d64d13a58adf84c7c9f51efeba4656f55e101c25e4cb744db0d8bb5c01a2decb229e4567d16bdcb22
+DIST librdkafka-2.1.0.tar.gz 4276259 BLAKE2B 3b0f50bcebdc8115790622a6124e12bc8c2b36fe170484788fc1d2d01a5e9696d7cc988c5eea9efd0922ac5c70c8ab02fc4a574d0bd03bed74b22db2b5bef5a0 SHA512 eeefa8833e7c178015ff8d0914d927d1bf4e09a75c5f227ba75e527f9bfc46407798d69642b5db3edafb93fcdbe56e8b506df826d01c7793af0f11e96c38caed
diff --git a/dev-libs/librdkafka/librdkafka-2.1.0.ebuild b/dev-libs/librdkafka/librdkafka-2.1.0.ebuild
new file mode 100644
index 000000000000..99a1329b06bf
--- /dev/null
+++ b/dev-libs/librdkafka/librdkafka-2.1.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit python-any-r1 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 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~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(+)]
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+"
+
+RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+
+DEPEND="
+ ${RDEPEND}
+ static-libs? ( ${LIB_DEPEND} )
+"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} != "9999" ]]; then
+ sed -i \
+ -e "s/^\(export RDKAFKA_GITVER=\).*/\1\"${PV}@release\"/" \
+ tests/run-test.sh || die
+ fi
+}
+
+src_configure() {
+ tc-export AR CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
+
+ local myeconf=(
+ --prefix="${EPREFIX}/usr"
+ --build="${CBUILD}"
+ --host="${CHOST}"
+ --mandir="${EPREFIX}/usr/share/man"
+ --infodir="${EPREFIX}/usr/share/info"
+ --datadir="${EPREFIX}/usr/share"
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ --no-cache
+ --no-download
+ --disable-debug-symbols
+ $(use_enable lz4)
+ $(use_enable sasl)
+ $(usex static-libs '--enable-static' '')
+ $(use_enable ssl)
+ $(use_enable zstd)
+ )
+
+ ./configure ${myeconf[@]} || die
+}
+
+src_test() {
+ # Simulate CI so we do not fail when tests are running longer than expected,
+ # https://github.com/edenhill/librdkafka/blob/v1.6.1/tests/0062-stats_event.c#L101-L116
+ local -x CI=true
+
+ emake -C tests run_local
+}
+
+src_install() {
+ emake -j1 \
+ 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
+}