commit: 1a279490d286f7252cfc71f559466bf75942580b Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed Dec 20 10:41:15 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Dec 20 10:41:15 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a279490
dev-libs/rasqal: fix modern C issue in configure Signed-off-by: Sam James <sam <AT> gentoo.org> .../rasqal/files/rasqal-0.9.33-configure-c99.patch | 29 ++++++++ dev-libs/rasqal/rasqal-0.9.33-r2.ebuild | 77 ++++++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/dev-libs/rasqal/files/rasqal-0.9.33-configure-c99.patch b/dev-libs/rasqal/files/rasqal-0.9.33-configure-c99.patch new file mode 100644 index 000000000000..50a48de12cda --- /dev/null +++ b/dev-libs/rasqal/files/rasqal-0.9.33-configure-c99.patch @@ -0,0 +1,29 @@ +https://github.com/dajobe/rasqal/pull/13 + +From b5fdf2539b5eec823ca449de8d04defe37f97ba7 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <[email protected]> +Date: Tue, 19 Dec 2023 21:31:36 +0100 +Subject: [PATCH] configure: Fix incorrect argument type in gcry_md_open + +The gcry_md_open function expects a gcry_md_hd_t * argument, +and not a gcry_md_hd_t argument (which is also a pointer behind +the typedef). Future compilers will likely treat this as an +error, causing the check to fail unconditionally. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 113d4f89..6aed2f46 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -771,7 +771,7 @@ elif test "$ac_cv_header_gcrypt_h" = "yes"; then + LIBS="$LIBS `$LIBGCRYPT_CONFIG --libs`" + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +- #include <gcrypt.h>]], [[ gcry_md_hd_t hash; gcry_md_open(hash, GCRY_MD_MD5, 0); ]])],[have_digest_gcrypt=yes],[have_digest_gcrypt=no]) ++ #include <gcrypt.h>]], [[ gcry_md_hd_t hash; gcry_md_open(&hash, GCRY_MD_MD5, 0); ]])],[have_digest_gcrypt=yes],[have_digest_gcrypt=no]) + + CPPFLAGS="$oCPPFLAGS" + LIBS="$oLIBS" + diff --git a/dev-libs/rasqal/rasqal-0.9.33-r2.ebuild b/dev-libs/rasqal/rasqal-0.9.33-r2.ebuild new file mode 100644 index 000000000000..1e7e3ef81e82 --- /dev/null +++ b/dev-libs/rasqal/rasqal-0.9.33-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Library that handles Resource Description Framework (RDF)" +HOMEPAGE="https://librdf.org/rasqal/" +SRC_URI="https://download.librdf.org/source/${P}.tar.gz" + +LICENSE="Apache-2.0 GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+crypt gmp +mhash pcre static-libs test xml" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=media-libs/raptor-2.0.15 + crypt? ( + !mhash? ( dev-libs/libgcrypt:0 ) + mhash? ( app-crypt/mhash ) + ) + !gmp? ( dev-libs/mpfr:= ) + gmp? ( dev-libs/gmp:= ) + kernel_linux? ( >=sys-apps/util-linux-2.19 ) + pcre? ( dev-libs/libpcre ) + xml? ( dev-libs/libxml2 ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=sys-devel/bison-3 + >=sys-devel/flex-2.5.36 + virtual/pkgconfig + test? ( dev-perl/XML-DOM ) +" + +DOCS=( AUTHORS ChangeLog NEWS README ) +HTML_DOCS=( {NEWS,README,RELEASE}.html ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.33-configure-clang16.patch + "${FILESDIR}"/${PN}-0.9.33-configure-c99.patch +) + +src_prepare() { + default + + #elibtoolize # g/fbsd .so versioning + eautoreconf # for clang 16 patch +} + +src_configure() { + # FIXME: From 0.9.27 to .28 --with-random-approach= was introduced, do we + # need a logic for it? Perhaps for dev-libs/gmp? + local myeconfargs=( + --with-decimal=$(usex gmp gmp mpfr) + --with-uuid-library=$(usex kernel_linux libuuid internal) + $(use_enable pcre) + --with-regex-library=$(usex pcre pcre posix) + $(use_enable static-libs static) + $(use_enable xml xml2) + ) + + if use crypt; then + myeconfargs+=( --with-digest-library=$(usex mhash mhash gcrypt) ) + else + myeconfargs+=( --with-digest-library=internal ) + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +}
