summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-10 02:44:37 +0100
committerSam James <sam@gentoo.org>2022-09-10 02:57:07 +0100
commitc2f2b8beda5a58db82808d5e8de0bcde63266d61 (patch)
tree5dafa07ce6dcd20e07403f04171bbd381b5aaf52 /media-libs/raptor
parentdev-db/qdbm: update to EAPI 8 (diff)
downloadgentoo-c2f2b8beda5a58db82808d5e8de0bcde63266d61.tar.gz
gentoo-c2f2b8beda5a58db82808d5e8de0bcde63266d61.tar.bz2
gentoo-c2f2b8beda5a58db82808d5e8de0bcde63266d61.zip
media-libs/raptor: fix build w/ Clang 15
Closes: https://bugs.gentoo.org/869380 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/raptor')
-rw-r--r--media-libs/raptor/files/raptor-2.0.15-clang-pointer-integer-warning.patch44
-rw-r--r--media-libs/raptor/raptor-2.0.15-r6.ebuild83
2 files changed, 127 insertions, 0 deletions
diff --git a/media-libs/raptor/files/raptor-2.0.15-clang-pointer-integer-warning.patch b/media-libs/raptor/files/raptor-2.0.15-clang-pointer-integer-warning.patch
new file mode 100644
index 000000000000..badb450456e4
--- /dev/null
+++ b/media-libs/raptor/files/raptor-2.0.15-clang-pointer-integer-warning.patch
@@ -0,0 +1,44 @@
+https://bugs.gentoo.org/869380
+https://github.com/dajobe/raptor/commit/567d4d1ab639d924e8d5af459476f331b9af0ce5
+
+From: Dave Beckett <dave@dajobe.org>
+Date: Tue, 4 Nov 2014 15:25:20 -0800
+Subject: [PATCH] Fix error returns in new world methods
+
+(raptor_world_get_parser_factory,
+raptor_world_get_serializers_count): Fix return value in assertions
+--- a/src/raptor_parse.c
++++ b/src/raptor_parse.c
+@@ -252,12 +252,12 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name)
+ *
+ * Get number of parsers
+ *
+- * Return value: number of parsers
++ * Return value: number of parsers or <0 on failure
+ **/
+ int
+ raptor_world_get_parsers_count(raptor_world* world)
+ {
+- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
+
+ raptor_world_open(world);
+
+--- a/src/raptor_serialize.c
++++ b/src/raptor_serialize.c
+@@ -235,12 +235,12 @@ raptor_get_serializer_factory(raptor_world* world, const char *name)
+ *
+ * Get number of serializers
+ *
+- * Return value: number of serializers
++ * Return value: number of serializers or <0 on failure
+ **/
+ int
+ raptor_world_get_serializers_count(raptor_world* world)
+ {
+- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
+
+ raptor_world_open(world);
+
+
diff --git a/media-libs/raptor/raptor-2.0.15-r6.ebuild b/media-libs/raptor/raptor-2.0.15-r6.ebuild
new file mode 100644
index 000000000000..61763d7ebb69
--- /dev/null
+++ b/media-libs/raptor/raptor-2.0.15-r6.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal
+
+MY_PN=${PN}2
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="The RDF Parser Toolkit"
+HOMEPAGE="https://librdf.org/raptor/"
+SRC_URI="https://download.librdf.org/source/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+curl debug json static-libs"
+
+DEPEND="
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ dev-libs/icu:=[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
+ json? ( dev-libs/yajl[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+ !media-libs/raptor:0
+"
+BDEPEND="
+ >=sys-devel/bison-3
+ >=sys-devel/flex-2.5.36
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( AUTHORS ChangeLog NEWS NOTICE README )
+HTML_DOCS=( {NEWS,README,RELEASE,UPGRADING}.html )
+
+PATCHES=(
+ "${FILESDIR}/${P}-heap-overflow.patch"
+ "${FILESDIR}/${P}-dont_use_curl-config.patch" #552474
+ "${FILESDIR}/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch"
+ "${FILESDIR}/${P}-use-pkg-config-libxml2.patch"
+ "${FILESDIR}/${P}-use-pkg-config-icu.patch"
+ "${FILESDIR}/${P}-use-pkg-config-libxslt.patch"
+ "${FILESDIR}/${P}-clang-pointer-integer-warning.patch"
+)
+
+src_prepare() {
+ default
+
+ # bug #552474
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # FIXME: It should be possible to use net-nntp/inn for libinn.h and -linn!
+
+ local myeconfargs=(
+ --with-html-dir="${EPREFIX}"/usr/share/gtk-doc/html
+ $(usex curl --with-www=curl --with-www=xml)
+ $(use_enable debug)
+ $(use_with json yajl)
+ $(use_enable static-libs static)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ emake -j1 test
+}
+
+multilib_src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}