diff --git a/R-xml2.spec b/R-xml2.spec index e1e401a..fff591a 100644 --- a/R-xml2.spec +++ b/R-xml2.spec @@ -8,7 +8,7 @@ Name: R-%{packname} Version: 1.3.2 -Release: 1 +Release: 2 Summary: Parse XML License: GPLv2+ @@ -28,6 +28,7 @@ BuildRequires: R-httr BuildRequires: R-knitr BuildRequires: R-rmarkdown %endif +Patch0: fix-build-error-assign-const-_xmlError-value-to-_xml.patch %description Work with XML files using a simple, consistent interface. Built on top of @@ -44,6 +45,7 @@ Development files for %{name}. %prep %setup -q -c -n %{packname} +%patch0 -p1 sed -i 's/covr, //g' %{packname}/DESCRIPTION @@ -85,5 +87,8 @@ _R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --ignore-vignettes %changelog +* Wed Apr 17 2024 zhangxianting - 1.3.2-2 +- fix: build error assign const _xmlError value to _xmlError + * Wed Jun 15 2022 misaka00251 - 1.3.2-1 - Init package (Thanks to fedora team) diff --git a/fix-build-error-assign-const-_xmlError-value-to-_xml.patch b/fix-build-error-assign-const-_xmlError-value-to-_xml.patch new file mode 100644 index 0000000..0f1d447 --- /dev/null +++ b/fix-build-error-assign-const-_xmlError-value-to-_xml.patch @@ -0,0 +1,39 @@ +From fc0c89940e80ac52bbc9d3f5cdbb72c94bc25ad2 Mon Sep 17 00:00:00 2001 +From: zhangxianting +Date: Thu, 11 Apr 2024 02:00:53 +0800 +Subject: [PATCH] fix build error :assign const _xmlError * value to _xmlError + +--- + xml2/src/xml2_init.cpp | 2 +- + xml2/src/xml2_schema.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xml2/src/xml2_init.cpp b/xml2/src/xml2_init.cpp +index b89c64a..0ff2782 100644 +--- a/xml2/src/xml2_init.cpp ++++ b/xml2/src/xml2_init.cpp +@@ -43,7 +43,7 @@ extern "C" SEXP init_libxml2() { + LIBXML_TEST_VERSION + + xmlInitParser(); +- xmlSetStructuredErrorFunc(NULL, handleStructuredError); ++ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc)handleStructuredError); + xmlSetGenericErrorFunc(NULL, handleGenericError); + + return R_NilValue; +diff --git a/xml2/src/xml2_schema.cpp b/xml2/src/xml2_schema.cpp +index dfe37e5..fe6fa9a 100644 +--- a/xml2/src/xml2_schema.cpp ++++ b/xml2/src/xml2_schema.cpp +@@ -6,7 +6,7 @@ + #include + #include "xml2_utils.h" + +-void handleSchemaError(void* userData, xmlError* error) { ++void handleSchemaError(void* userData, const xmlError* error) { + std::vector * vec = (std::vector *) userData; + std::string message = std::string(error->message); + message.resize(message.size() - 1); +-- +2.33.0 +