commit c00dadf585611cc9ab5d091ca8234c8a5d809d87 Author: Jan Palus <at...@pld-linux.org> Date: Wed Jan 22 20:12:31 2025 +0100
fix build with libxml2 >= 2.12 and boost >= 1.85 boost1.85.patch | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ libxml2.12.patch | 44 ++++++++++++++++++++++ zorba.spec | 12 ++++-- 3 files changed, 161 insertions(+), 4 deletions(-) --- diff --git a/zorba.spec b/zorba.spec index 7de89a9..38fbbcb 100644 --- a/zorba.spec +++ b/zorba.spec @@ -15,6 +15,8 @@ Patch0: %{name}-tr1.patch Patch1: %{name}-icu.patch Patch2: %{name}-glibc.patch Patch3: %{name}-includes.patch +Patch4: libxml2.12.patch +Patch5: boost1.85.patch URL: https://github.com/28msec/zorba BuildRequires: bison >= 2.4 BuildRequires: boost-devel >= 1.33 @@ -74,10 +76,12 @@ Pliki nagłówkowe biblioteki zorba. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 %build install -d build diff --git a/boost1.85.patch b/boost1.85.patch new file mode 100644 index 0000000..f7e3479 --- /dev/null +++ b/boost1.85.patch @@ -0,0 +1,109 @@ +--- zorba-3.1/test/driver/testdriver_mt.cpp.orig 2015-06-16 13:26:38.000000000 +0200 ++++ zorba-3.1/test/driver/testdriver_mt.cpp 2025-01-22 20:06:45.077984129 +0100 +@@ -44,9 +44,9 @@ + #include "testdriver_common.h" + + // These are included last because they define the <stdint.h>'s INTMAX_C and UINTMAX_C ++#include <boost/filesystem/directory.hpp> + #include <boost/filesystem/operations.hpp> + #include <boost/filesystem/path.hpp> +-#include <boost/filesystem/convenience.hpp> + + + namespace fs = boost::filesystem; +@@ -293,7 +293,7 @@ + if (!fileStream.good()) + { + fs::path dirPath = filePath; +- dirPath = dirPath.remove_leaf(); ++ dirPath = dirPath.remove_filename(); + + if (!fs::exists(dirPath.file_string())) + { +@@ -321,7 +321,7 @@ + if (!fileStream.good()) + { + fs::path dirPath = filePath; +- dirPath = dirPath.remove_leaf(); ++ dirPath = dirPath.remove_filename(); + + if (!fs::exists(dirPath.generic_string())) + { +@@ -462,10 +462,12 @@ + relativeQueryFile = queries->theQueryFilenames[queryNo]; + queryPath = fs::path(queries->theQueriesDir) / (relativeQueryFile); + ++ fs::path tmpPath(queryPath); ++ tmpPath.replace_extension(""); + #if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 +- std::string testName = fs::change_extension(queryPath, "").file_string(); ++ std::string testName = tmpPath.file_string(); + #else +- std::string testName = fs::change_extension(queryPath, "").generic_string(); ++ std::string testName = tmpPath.generic_string(); + #endif + + ulong pos = testName.find("Queries"); +@@ -489,7 +491,8 @@ + // with this query. If the .spec file exists, read its contents to + // extract args to be passed to the query (e.g., external var bindings), + // exprected errors, or the pathnames of reference-result files. +- specPath = fs::change_extension(queryPath, ".spec"); ++ specPath = fs::path(queryPath); ++ specPath.replace_extension(".spec"); + if (fs::exists(specPath)) + { + #if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 +@@ -527,7 +530,7 @@ + } + + fs::path refFilePath = fs::path(queries->theRefsDir) / (relativeRefFile); +- refFilePath = fs::change_extension(refFilePath, ".xml.res"); ++ refFilePath.replace_extension(".xml.res"); + + if (fs::exists(refFilePath)) + refFileSpecified = true; +@@ -540,7 +543,7 @@ + // previous runs of the query. Finaly, create (if necessary) all the dirs + // in the pathname of the result and error files. + resultFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile); +- resultFilePath = fs::change_extension(resultFilePath, (".res_" + tnoStr)); ++ resultFilePath.replace_extension((".res_" + tnoStr)); + + if (fs::exists(resultFilePath)) + fs::remove(resultFilePath); +@@ -550,7 +553,7 @@ + + #if 0 + errorFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile); +- errorFilePath = fs::change_extension(errorFilePath, (".err_" + tnoStr)); ++ errorFilePath.replace_extension((".err_" + tnoStr)); + + if (fs::exists(errorFilePath)) + fs::remove(errorFilePath); +@@ -1090,13 +1093,13 @@ + { + fs::path queryPath = *dirIte; + +- if (!fs::is_regular(queryPath)) ++ if (!fs::is_regular_file(queryPath)) + { + //std::cerr << "Found non-regular file " << queryPath.string() << std::endl; + continue; + } + +- if (fs::extension(queryPath) != testExtension) ++ if (queryPath.extension().string() != testExtension) + { + //std::cerr << "Found no-query file " << queryPath.string() << std::endl; + continue; +@@ -1227,7 +1230,8 @@ + for (long i = 0; i < queries.theNumQueries; i++) + { + fs::path queryPath = fs::path(pathPrefix) / (queries.theQueryFilenames[i]); +- fs::path queryName = fs::change_extension(queryPath, ""); ++ fs::path queryName(queryPath); ++ queryName.replace_extension(""); + bool queryWasKnownToFail = false; + if (haveKnownFailures) + { diff --git a/libxml2.12.patch b/libxml2.12.patch new file mode 100644 index 0000000..94108f2 --- /dev/null +++ b/libxml2.12.patch @@ -0,0 +1,44 @@ +--- zorba-3.1/src/store/naive/loader.h.orig 2015-06-16 13:26:38.000000000 +0200 ++++ zorba-3.1/src/store/naive/loader.h 2025-01-22 11:36:28.295406325 +0100 +@@ -19,6 +19,7 @@ + #include <stack> + #include <libxml/parser.h> + #include <libxml/xmlstring.h> ++#include <libxml/xmlversion.h> + + #include "store/api/item.h" + #include "store/api/load_properties.h" +@@ -111,7 +112,11 @@ + const zstring& docUri, + std::istream& xmlStream) = 0; + ++#if LIBXML_VERSION >= 21200 ++ static void error( void *ctx, const xmlError* ); ++#else + static void error( void *ctx, xmlErrorPtr ); ++#endif + }; + + +--- zorba-3.1/src/store/naive/loader_fast.cpp.orig 2015-06-16 13:26:38.000000000 +0200 ++++ zorba-3.1/src/store/naive/loader_fast.cpp 2025-01-22 11:36:50.828868572 +0100 +@@ -21,6 +21,7 @@ + #include <iostream> + + #include <libxml/xmlmemory.h> ++#include <libxml/xmlversion.h> + + #include <zorba/store_consts.h> + +@@ -100,7 +101,11 @@ + /******************************************************************************* + + ********************************************************************************/ ++#if LIBXML_VERSION >= 21200 ++void XmlLoader::error(void* ctx, const xmlError* error) ++#else + void XmlLoader::error(void* ctx, xmlErrorPtr error) ++#endif + { + if ( error->level == XML_ERR_NONE ) + return; ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/zorba.git/commitdiff/c00dadf585611cc9ab5d091ca8234c8a5d809d87 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit