Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/raptor/files/, media-libs/raptor/
Date: Sat, 10 Sep 2022 01:58:02
Message-Id: 1662775027.c2f2b8beda5a58db82808d5e8de0bcde63266d61.sam@gentoo
1 commit: c2f2b8beda5a58db82808d5e8de0bcde63266d61
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 10 01:44:37 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 10 01:57:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2f2b8be
7
8 media-libs/raptor: fix build w/ Clang 15
9
10 Closes: https://bugs.gentoo.org/869380
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 ...ptor-2.0.15-clang-pointer-integer-warning.patch | 44 ++++++++++++
14 media-libs/raptor/raptor-2.0.15-r6.ebuild | 83 ++++++++++++++++++++++
15 2 files changed, 127 insertions(+)
16
17 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
18 new file mode 100644
19 index 000000000000..badb450456e4
20 --- /dev/null
21 +++ b/media-libs/raptor/files/raptor-2.0.15-clang-pointer-integer-warning.patch
22 @@ -0,0 +1,44 @@
23 +https://bugs.gentoo.org/869380
24 +https://github.com/dajobe/raptor/commit/567d4d1ab639d924e8d5af459476f331b9af0ce5
25 +
26 +From: Dave Beckett <dave@××××××.org>
27 +Date: Tue, 4 Nov 2014 15:25:20 -0800
28 +Subject: [PATCH] Fix error returns in new world methods
29 +
30 +(raptor_world_get_parser_factory,
31 +raptor_world_get_serializers_count): Fix return value in assertions
32 +--- a/src/raptor_parse.c
33 ++++ b/src/raptor_parse.c
34 +@@ -252,12 +252,12 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name)
35 + *
36 + * Get number of parsers
37 + *
38 +- * Return value: number of parsers
39 ++ * Return value: number of parsers or <0 on failure
40 + **/
41 + int
42 + raptor_world_get_parsers_count(raptor_world* world)
43 + {
44 +- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
45 ++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
46 +
47 + raptor_world_open(world);
48 +
49 +--- a/src/raptor_serialize.c
50 ++++ b/src/raptor_serialize.c
51 +@@ -235,12 +235,12 @@ raptor_get_serializer_factory(raptor_world* world, const char *name)
52 + *
53 + * Get number of serializers
54 + *
55 +- * Return value: number of serializers
56 ++ * Return value: number of serializers or <0 on failure
57 + **/
58 + int
59 + raptor_world_get_serializers_count(raptor_world* world)
60 + {
61 +- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
62 ++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
63 +
64 + raptor_world_open(world);
65 +
66 +
67
68 diff --git a/media-libs/raptor/raptor-2.0.15-r6.ebuild b/media-libs/raptor/raptor-2.0.15-r6.ebuild
69 new file mode 100644
70 index 000000000000..61763d7ebb69
71 --- /dev/null
72 +++ b/media-libs/raptor/raptor-2.0.15-r6.ebuild
73 @@ -0,0 +1,83 @@
74 +# Copyright 1999-2022 Gentoo Authors
75 +# Distributed under the terms of the GNU General Public License v2
76 +
77 +EAPI=8
78 +
79 +inherit autotools multilib-minimal
80 +
81 +MY_PN=${PN}2
82 +MY_P=${MY_PN}-${PV}
83 +
84 +DESCRIPTION="The RDF Parser Toolkit"
85 +HOMEPAGE="https://librdf.org/raptor/"
86 +SRC_URI="https://download.librdf.org/source/${MY_P}.tar.gz"
87 +
88 +LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
89 +SLOT="2"
90 +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"
91 +IUSE="+curl debug json static-libs"
92 +
93 +DEPEND="
94 + dev-libs/libxml2[${MULTILIB_USEDEP}]
95 + dev-libs/libxslt[${MULTILIB_USEDEP}]
96 + dev-libs/icu:=[${MULTILIB_USEDEP}]
97 + sys-libs/zlib[${MULTILIB_USEDEP}]
98 + curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
99 + json? ( dev-libs/yajl[${MULTILIB_USEDEP}] )
100 +"
101 +RDEPEND="${DEPEND}
102 + !media-libs/raptor:0
103 +"
104 +BDEPEND="
105 + >=sys-devel/bison-3
106 + >=sys-devel/flex-2.5.36
107 + virtual/pkgconfig
108 +"
109 +
110 +S="${WORKDIR}/${MY_P}"
111 +
112 +DOCS=( AUTHORS ChangeLog NEWS NOTICE README )
113 +HTML_DOCS=( {NEWS,README,RELEASE,UPGRADING}.html )
114 +
115 +PATCHES=(
116 + "${FILESDIR}/${P}-heap-overflow.patch"
117 + "${FILESDIR}/${P}-dont_use_curl-config.patch" #552474
118 + "${FILESDIR}/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch"
119 + "${FILESDIR}/${P}-use-pkg-config-libxml2.patch"
120 + "${FILESDIR}/${P}-use-pkg-config-icu.patch"
121 + "${FILESDIR}/${P}-use-pkg-config-libxslt.patch"
122 + "${FILESDIR}/${P}-clang-pointer-integer-warning.patch"
123 +)
124 +
125 +src_prepare() {
126 + default
127 +
128 + # bug #552474
129 + eautoreconf
130 +
131 + multilib_copy_sources
132 +}
133 +
134 +multilib_src_configure() {
135 + # FIXME: It should be possible to use net-nntp/inn for libinn.h and -linn!
136 +
137 + local myeconfargs=(
138 + --with-html-dir="${EPREFIX}"/usr/share/gtk-doc/html
139 + $(usex curl --with-www=curl --with-www=xml)
140 + $(use_enable debug)
141 + $(use_with json yajl)
142 + $(use_enable static-libs static)
143 + )
144 +
145 + econf "${myeconfargs[@]}"
146 +}
147 +
148 +multilib_src_test() {
149 + emake -j1 test
150 +}
151 +
152 +multilib_src_install() {
153 + default
154 +
155 + find "${ED}" -name '*.la' -delete || die
156 +}