Skip to content

Commit 85c2953

Browse files
authored
rasqal: fixed build (#12846)
1 parent 97b02ab commit 85c2953

File tree

3 files changed

+67
-7
lines changed

3 files changed

+67
-7
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff -ruN rasqal-0.9.33.orig/configure rasqal-0.9.33/configure
2+
--- rasqal-0.9.33.orig/configure 2023-01-23 13:14:38.861781072 +0100
3+
+++ rasqal-0.9.33/configure 2023-01-23 16:57:03.874250005 +0100
4+
@@ -13712,6 +13712,7 @@
5+
$as_echo_n "checking whether __FUNCTION__ is available... " >&6; }
6+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7+
/* end confdefs.h. */
8+
+extern int printf(const char *);
9+
int main() { printf(__FUNCTION__); }
10+
_ACEOF
11+
if ac_fn_c_try_compile "$LINENO"; then :
12+
diff -ruN rasqal-0.9.33.orig/configure.ac rasqal-0.9.33/configure.ac
13+
--- rasqal-0.9.33.orig/configure.ac 2014-11-23 23:11:33.000000000 +0100
14+
+++ rasqal-0.9.33/configure.ac 2023-01-23 15:49:44.885025978 +0100
15+
@@ -312,7 +312,7 @@
16+
AC_C_BIGENDIAN
17+
18+
AC_MSG_CHECKING(whether __FUNCTION__ is available)
19+
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])],
20+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([extern int printf(const char *s); int main() { printf(__FUNCTION__); }])],
21+
[AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available])
22+
AC_MSG_RESULT(yes)],
23+
[AC_MSG_RESULT(no)])
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Fix incompatible pointer type due to misuse of the gcry_md_open
2+
function.
3+
4+
Submitted upstream: <https://github.com/dajobe/rasqal/pull/13>
5+
6+
diff --git a/configure b/configure
7+
index 038ea7c3efaf06a0..17a107cda735a257 100755
8+
--- a/configure
9+
+++ b/configure
10+
@@ -14541,7 +14541,7 @@ elif test "$ac_cv_header_gcrypt_h" = "yes"; then
11+
int
12+
main ()
13+
{
14+
- gcry_md_hd_t hash; gcry_md_open(hash, GCRY_MD_MD5, 0);
15+
+ gcry_md_hd_t hash; gcry_md_open(&hash, GCRY_MD_MD5, 0);
16+
;
17+
return 0;
18+
}
19+
diff --git a/configure.ac b/configure.ac
20+
index 7bfc38e9261d6c96..eea4d34e7dc9fd4b 100644
21+
--- a/configure.ac
22+
+++ b/configure.ac
23+
@@ -631,7 +631,7 @@ elif test "$ac_cv_header_gcrypt_h" = "yes"; then
24+
LIBS="$LIBS `$LIBGCRYPT_CONFIG --libs`"
25+
26+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
27+
- #include <gcrypt.h>]], [[ gcry_md_hd_t hash; gcry_md_open(hash, GCRY_MD_MD5, 0); ]])],[have_digest_gcrypt=yes],[have_digest_gcrypt=no])
28+
+ #include <gcrypt.h>]], [[ gcry_md_hd_t hash; gcry_md_open(&hash, GCRY_MD_MD5, 0); ]])],[have_digest_gcrypt=yes],[have_digest_gcrypt=no])
29+
30+
CPPFLAGS="$oCPPFLAGS"
31+
LIBS="$oLIBS"

SPECS-EXTENDED/rasqal/rasqal.spec

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@ Vendor: Microsoft Corporation
22
Distribution: Azure Linux
33
Name: rasqal
44
Version: 0.9.33
5-
Release: 13%{?dist}
5+
Release: 14%{?dist}
66
Summary: RDF Query Library
77

88
License: LGPLv2+ or ASL 2.0
99
URL: http://librdf.org/rasqal/
1010
Source: http://download.librdf.org/source/%{name}-%{version}.tar.gz
1111

12+
BuildRequires: make
1213
BuildRequires: gcc-c++
1314
BuildRequires: libxml2-devel
1415
BuildRequires: mpfr-devel
15-
BuildRequires: pcre-devel
1616
BuildRequires: raptor2-devel
1717
# for the testsuite
1818
BuildRequires: perl(Pod::Usage)
1919
BuildRequires: perl(XML::DOM)
20-
#BuildRequires: %{_bindir}/rapper
20+
21+
# Upstream PR: https://github.com/dajobe/rasqal/pull/11
22+
Patch1: define-printf.patch
23+
Patch2: rasqal-configure-c99-2.patch
2124

2225
%description
2326
Rasqal is a library providing full support for querying Resource
@@ -31,24 +34,23 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
3134
%description devel
3235
Libraries, includes etc to develop with the Rasqal RDF query language library.
3336

34-
3537
%prep
36-
%setup -q
38+
%autosetup -p1
3739

3840
# hack to nuke rpaths
3941
%if "%{_libdir}" != "/usr/lib"
4042
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
4143
%endif
4244

43-
4445
%build
4546
%configure \
47+
--with-digest-library=gcrypt\
48+
--disable-pcre \
4649
--disable-static\
4750
--enable-release
4851

4952
%make_build
5053

51-
5254
%install
5355
%make_install
5456

@@ -93,6 +95,10 @@ fi
9395

9496

9597
%changelog
98+
* Fri Mar 07 2025 Jyoti Kanase <v-jykanase@microsoft.com> - 0.9.33-14
99+
- fix build for 0.9.33
100+
- License Verified.
101+
96102
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 0.9.33-13
97103
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
98104

0 commit comments

Comments
 (0)