From 5db7e8012e9bf8b1df102476a018e590849f8397 Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Fri, 4 Jul 2025 14:28:52 +0200 Subject: [PATCH] dev-libs/yaz: add 5.35.1 rm features : ziffy, separate package since 3.0.20, remove its license GPL-2 openssl, removed since 5.0.13 add features : memcached with dev-libs/libmemcached, since 5.0.13 redis with dev-libs/hiredis, since 5.2.0 set PACKAGE_SUFFIX to install doc cleaner it compiles fine with libxml2:2/16 one patch to fix musl building Bugs : close the old bug for tcpd (#730016) compilation is fixed with c23 (#945028 #945062) Bug: https://bugs.gentoo.org/945028 Bug: https://bugs.gentoo.org/945062 Closes: https://bugs.gentoo.org/730016 Signed-off-by: Nicolas PARLANT Part-of: https://github.com/gentoo/gentoo/pull/42864 Closes: https://github.com/gentoo/gentoo/pull/42864 Signed-off-by: Sam James --- dev-libs/yaz/Manifest | 1 + dev-libs/yaz/files/yaz-5.35.1-fix_musl.patch | 30 ++++++++ dev-libs/yaz/metadata.xml | 1 + dev-libs/yaz/yaz-5.35.1.ebuild | 78 ++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 dev-libs/yaz/files/yaz-5.35.1-fix_musl.patch create mode 100644 dev-libs/yaz/yaz-5.35.1.ebuild diff --git a/dev-libs/yaz/Manifest b/dev-libs/yaz/Manifest index 4ea9e3c42500..f33c53f34687 100644 --- a/dev-libs/yaz/Manifest +++ b/dev-libs/yaz/Manifest @@ -1,3 +1,4 @@ DIST yaz-5.34.0.tar.gz 2656382 BLAKE2B 7a16974dc815c1121aaea4179843a6982600a0491c8c95a03f28cf0c68725b986ebc39049e2159cd0d105b23811d35ae3d3538a83e945b64951cc9215efe7f3d SHA512 0c835b98b4640e077459c9ead8043cea941a75f39dace9501efbb56c38837b1525349b8668c135ac0753ba7a4803e38d9c90d7bf3f6f2951c0e7e863b4c51f65 DIST yaz-5.34.2.tar.gz 2601365 BLAKE2B 525197c4c10e3a41fb0b050a78f00a8122de844a5c7e53d115a079c0ec16144312e7861b048c31cecf00cac900d8fc7dffd98e2ac18c6b046ac9ae521c7d60aa SHA512 8fd22b97cf46c7db8083198ad67745f4b99b303253b669e28f8c509fe3fee223de64d79a7b0a5d9318637b65d056129ca220e3ecbfc7ad392ef634c87543a16b DIST yaz-5.34.4.tar.gz 2632926 BLAKE2B 63b057066604a562f6174c327b5699d60a465aa4814311205d94257fd51df11cdc60fe52a17cc356f57cf04e84afae5351c02f17715225d5927863a887e0aab8 SHA512 f5c9dfce5817cdd6ac0c4b038dbe3eba7cb4b91cc1001fe256019160fb86bcb58bf067e40c83d789f3d0fbed8f1f970f79e048c8906ba44ea81a95f3086bb232 +DIST yaz-5.35.1.tar.gz 2635632 BLAKE2B a83cff0af98bf8a9fea8f5e22eec0ed13131624512dbc4c38f78c71ee69b25dc15aa444134426948ce3eb9cbc0bb53e9d07e265f4706cc995fb020b0a07f6649 SHA512 20534114906d33c650d15218bf3e4edbca99d6d17577ef6c7205e9edf140baabb76db798f739e926a2405ba54f97208c6ffd365fa308d62c626328962b956dcd diff --git a/dev-libs/yaz/files/yaz-5.35.1-fix_musl.patch b/dev-libs/yaz/files/yaz-5.35.1-fix_musl.patch new file mode 100644 index 000000000000..6c183de898ca --- /dev/null +++ b/dev-libs/yaz/files/yaz-5.35.1-fix_musl.patch @@ -0,0 +1,30 @@ +Pending upstream PR +https://github.com/indexdata/yaz/pull/163.patch +From b3214e59d168c1c9b348ca02bf443046a3ab834a Mon Sep 17 00:00:00 2001 +From: Nicolas PARLANT +Date: Fri, 4 Jul 2025 15:26:55 +0200 +Subject: [PATCH] fix musl - expose gethostbyaddr with _GNU_SOURCE + +>tcpdchk.c:72:25: error: call to undeclared function 'gethostbyaddr'; ISO C99 and later do not support implicit function declarations +> [-Wimplicit-function-declaration] +> 72 | if ((host = gethostbyaddr((char*)&addr_in->sin_addr, +> | ^ + +Signed-off-by: Nicolas PARLANT +--- + src/tcpdchk.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tcpdchk.c b/src/tcpdchk.c +index f98417033..6e9a65adb 100644 +--- a/src/tcpdchk.c ++++ b/src/tcpdchk.c +@@ -36,6 +36,8 @@ + #endif + + #if HAVE_NETDB_H ++/* _GNU_SOURCE: for musl's netdb.h to expose gethostbyaddr */ ++#define _GNU_SOURCE + #include + #endif + diff --git a/dev-libs/yaz/metadata.xml b/dev-libs/yaz/metadata.xml index 8300ac4768e7..bc5f17876c39 100644 --- a/dev-libs/yaz/metadata.xml +++ b/dev-libs/yaz/metadata.xml @@ -7,6 +7,7 @@ indexdata/yaz + Enable cache via dev-libs/hiredis Install ziffy, a promiscuous Z39.50 APDU sniffer diff --git a/dev-libs/yaz/yaz-5.35.1.ebuild b/dev-libs/yaz/yaz-5.35.1.ebuild new file mode 100644 index 000000000000..ee075d6cfa41 --- /dev/null +++ b/dev-libs/yaz/yaz-5.35.1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="C/C++ toolkit for Z39.50v3 clients and servers" +HOMEPAGE="https://www.indexdata.com/resources/software/yaz/" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/indexdata/yaz.git" +else + SRC_URI="https://ftp.indexdata.com/pub/${PN}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86" +fi + +LICENSE="BSD" +SLOT="0/5" +IUSE="memcached redis tcpd" + +RDEPEND=" + dev-libs/icu:= + dev-libs/libxml2:= + dev-libs/libxslt + net-libs/gnutls:= + sys-libs/readline:= + virtual/libintl + memcached? ( dev-libs/libmemcached ) + redis? ( dev-libs/hiredis:= ) + tcpd? ( sys-apps/tcp-wrappers ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/yacc + dev-build/libtool:2 + dev-lang/tcl:0 + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-fix_musl.patch +) + +DOCS=( NEWS README.md ) + +src_prepare() { + default + + # Hardcoded assumption of libraries residing in lib/, bug #730016 + sed -i -e "s|/lib\"|/$(get_libdir)\"|" configure.ac || die + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_with memcached) + $(use_with redis) + $(use_enable tcpd tcpd /usr) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + local myemakeargs=( + DESTDIR="${D}" + docdir="${EPREFIX}/usr/share/doc/${PF}/html" + # move common dir in html + PACKAGE_SUFFIX="-${PV}/html" + ) + emake "${myemakeargs[@]}" install + + find "${D}" -name '*.la' -delete || die + + einstalldocs +}