Skip to content

Commit d0a0f82

Browse files
authored
raptor2: fixed build (#12845)
1 parent 26f95eb commit d0a0f82

File tree

4 files changed

+119
-1
lines changed

4 files changed

+119
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
commit 567d4d1ab639d924e8d5af459476f331b9af0ce5
2+
Author: Dave Beckett <[email protected]>
3+
Date: Tue Nov 4 15:25:20 2014 -0800
4+
5+
Fix error returns in new world methods
6+
7+
(raptor_world_get_parser_factory,
8+
raptor_world_get_serializers_count): Fix return value in assertions
9+
10+
diff --git a/src/raptor_parse.c b/src/raptor_parse.c
11+
index 26911f47752119c6..6caa7f1c231cc0c3 100644
12+
--- a/src/raptor_parse.c
13+
+++ b/src/raptor_parse.c
14+
@@ -252,12 +252,12 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name)
15+
*
16+
* Get number of parsers
17+
*
18+
- * Return value: number of parsers
19+
+ * Return value: number of parsers or <0 on failure
20+
**/
21+
int
22+
raptor_world_get_parsers_count(raptor_world* world)
23+
{
24+
- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
25+
+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
26+
27+
raptor_world_open(world);
28+
29+
diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c
30+
index a1f29d78d33f82ee..a0344418441a2295 100644
31+
--- a/src/raptor_serialize.c
32+
+++ b/src/raptor_serialize.c
33+
@@ -235,12 +235,12 @@ raptor_get_serializer_factory(raptor_world* world, const char *name)
34+
*
35+
* Get number of serializers
36+
*
37+
- * Return value: number of serializers
38+
+ * Return value: number of serializers or <0 on failure
39+
**/
40+
int
41+
raptor_world_get_serializers_count(raptor_world* world)
42+
{
43+
- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
44+
+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1);
45+
46+
raptor_world_open(world);
47+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Include <stdio.h> for printf in __FUNCTION__ check. Otherwise, the
2+
check will fail with compilers which do not implement implicit
3+
function declarations (a C feature that was removed in 1999 from the
4+
language), no matter if the compiler supports FUNCTION or not.
5+
6+
Submitted upstream: <https://github.com/dajobe/raptor/pull/56>
7+
8+
diff --git a/configure b/configure
9+
index b0091892a210361d..08501ac8ed5e4fe1 100755
10+
--- a/configure
11+
+++ b/configure
12+
@@ -13747,6 +13747,8 @@ esac
13+
$as_echo_n "checking whether __FUNCTION__ is available... " >&6; }
14+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15+
/* end confdefs.h. */
16+
+
17+
+#include <stdio.h>
18+
int main() { printf(__FUNCTION__); }
19+
_ACEOF
20+
if ac_fn_c_try_compile "$LINENO"; then :
21+
diff --git a/configure.ac b/configure.ac
22+
index 10ff870805b82e65..40a8548b6406866a 100644
23+
--- a/configure.ac
24+
+++ b/configure.ac
25+
@@ -312,7 +312,9 @@ AC_C_BIGENDIAN
26+
AC_C_INLINE
27+
28+
AC_MSG_CHECKING(whether __FUNCTION__ is available)
29+
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])],
30+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
31+
+#include <stdio.h>
32+
+int main() { printf(__FUNCTION__); }])],
33+
[AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available])
34+
AC_MSG_RESULT(yes)],
35+
[AC_MSG_RESULT(no)])
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
commit 4dbc4c1da2a033c497d84a1291c46f416a9cac51
2+
Author: David Anes <[email protected]>
3+
Date: Thu May 4 11:54:02 2023 +0200
4+
5+
Remove the access to entities 'checked' private symbol for libxml2 2.11.0
6+
7+
Since version 2.11.0, some private symbols that were never intended
8+
as public API/ABI have been removed from libxml2, therefore the field
9+
'checked' is no longer present and raptor fails to build in this
10+
scenario.
11+
12+
diff --git a/src/raptor_libxml.c b/src/raptor_libxml.c
13+
index cee87a58e02c7e97..ecf76327d212c73a 100644
14+
--- a/src/raptor_libxml.c
15+
+++ b/src/raptor_libxml.c
16+
@@ -246,10 +246,11 @@ raptor_libxml_getEntity(void* user_data, const xmlChar *name)
17+
18+
ret->owner = 1;
19+
20+
-#if LIBXML_VERSION >= 20627
21+
+#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100
22+
/* Checked field was released in 2.6.27 on 2006-10-25
23+
* http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6
24+
*
25+
+ * and was later removed in version 2.11.0
26+
*/
27+
28+
/* Mark this entity as having been checked - never do this again */

SPECS-EXTENDED/raptor2/raptor2.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Distribution: Azure Linux
44
Summary: RDF Parser Toolkit for Redland
55
Name: raptor2
66
Version: 2.0.15
7-
Release: 28%{?dist}
7+
Release: 29%{?dist}
88

99
License: GPLv2+ or LGPLv2+ or ASL 2.0
1010
Source: http://download.librdf.org/source/raptor2-%{version}.tar.gz
@@ -17,6 +17,10 @@ Patch1: 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch
1717
Patch2: 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch
1818

1919
## upstreamable patches
20+
Patch3: raptor2-configure-c99.patch
21+
Patch4: raptor2-c99.patch
22+
Patch5: raptor2-libxml2.patch
23+
2024

2125
BuildRequires: make
2226
BuildRequires: gcc-c++
@@ -103,6 +107,10 @@ make check
103107

104108

105109
%changelog
110+
* Fri Mar 07 2025 Jyoti Kanase <[email protected]> - 2.0.15-29
111+
- added patch to fix build
112+
- License Verified
113+
106114
* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 2.0.15-28
107115
- Initial CBL-Mariner import from Fedora 33 (license: MIT).
108116

0 commit comments

Comments
 (0)