summaryrefslogtreecommitdiff
path: root/dev-libs/librdkafka
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-14 16:01:32 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-14 16:01:32 +0100
commit153fd195574cc30040446316bb666af0e58d985f (patch)
tree657cdfb683dfabd52ff06cb67ddd31b653fb9f43 /dev-libs/librdkafka
parent3fa8418e7778f51be61ca1c9114059c73a477459 (diff)
gentoo auto-resync : 14:05:2023 - 16:01:32
Diffstat (limited to 'dev-libs/librdkafka')
-rw-r--r--dev-libs/librdkafka/Manifest2
-rw-r--r--dev-libs/librdkafka/librdkafka-2.1.0.ebuild106
2 files changed, 108 insertions, 0 deletions
diff --git a/dev-libs/librdkafka/Manifest b/dev-libs/librdkafka/Manifest
index 616bdef58d6d..0b4b3eac13d0 100644
--- a/dev-libs/librdkafka/Manifest
+++ b/dev-libs/librdkafka/Manifest
@@ -1,3 +1,5 @@
DIST librdkafka-1.8.2.tar.gz 4097028 BLAKE2B 37a3190417e973ea4629012e358ff61cda45eb0134448dd0054fd1f1cac57f3543b133331b0b0d518f219f30f79f7665a214c75084d6a8474687b7e686395724 SHA512 8c8ae291129b78e3b8367307ad1b1715af1438cd76d7160d64d13a58adf84c7c9f51efeba4656f55e101c25e4cb744db0d8bb5c01a2decb229e4567d16bdcb22
+DIST librdkafka-2.1.0.tar.gz 4276259 BLAKE2B 3b0f50bcebdc8115790622a6124e12bc8c2b36fe170484788fc1d2d01a5e9696d7cc988c5eea9efd0922ac5c70c8ab02fc4a574d0bd03bed74b22db2b5bef5a0 SHA512 eeefa8833e7c178015ff8d0914d927d1bf4e09a75c5f227ba75e527f9bfc46407798d69642b5db3edafb93fcdbe56e8b506df826d01c7793af0f11e96c38caed
EBUILD librdkafka-1.8.2.ebuild 2284 BLAKE2B e448038ee570cd86a5f084c15f34a3657c2d21471792c8a6e2df17b1d0f293cc20c0cc0d5722cc978a7c3a536b9c874c4abc77deeeecb65c1665ebd292478cc4 SHA512 c361a230001576ee779bfd1accf3f4e4fa4073638faf5a69183b7e8441b884c55863d53594145154307b1e20910b9d046ae9465d567466faa0fb96c94167116c
+EBUILD librdkafka-2.1.0.ebuild 2288 BLAKE2B 534d76f81d048940d7057e7bc487f0b73f8e1065c935d1abb4ce4a8fb2b56865e80db23e71eb5808d48b7e459496ce263e3597e68ca5ff4943eedcdaec891082 SHA512 1e33f965bd16ce4f943c9ebfecc510abc825cb27bf6dd6c90511511f92a36f5814568931adc3cdbdf460009f31d0edd093af1424d7fce5a04af8a4f35de574ff
MISC metadata.xml 450 BLAKE2B 4d06e12bfb0600ab60b4b353f9ee6c2f37a8477f2c26c3a45e1644825a40afd4200006e262a0e434047d0bf0b37e23a41100cce27540bd6bf0bcd361260e7b85 SHA512 4a9cb90dd238c3232c08905874b8e798937edb1838f73a375dc7315efe337cde0504e04b5835932480857706519066e35cc154e0959a104282e3c9aa3b81ecd5
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
+}