[packages/zorba] - updated to 3.1, finished packaging
qboosh
qboosh at pld-linux.org
Sun Sep 3 08:29:18 CEST 2023
commit 483854e5fc8cb0ce14dae534d1e3591f9abe5522
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 3 08:30:38 2023 +0200
- updated to 3.1, finished packaging
zorba-glibc.patch | 11 ++++++
zorba-icu.patch | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++
zorba-includes.patch | 10 +++++
zorba-tr1.patch | 21 ++++++++++
zorba.spec | 92 ++++++++++++++++++++++++++++++++----------
5 files changed, 223 insertions(+), 21 deletions(-)
---
diff --git a/zorba.spec b/zorba.spec
index 6e92751..6d89fc8 100644
--- a/zorba.spec
+++ b/zorba.spec
@@ -1,23 +1,35 @@
Summary: General purpose XQuery processor
Summary(pl.UTF-8): Procesor XQuery ogólnego przeznaczenia
Name: zorba
-Version: 0.9.21
-Release: 0.1
+Version: 3.1
+Release: 1
License: Apache v2.0
Group: Applications/Text
-Source0: https://downloads.sourceforge.net/zorba/%{name}-%{version}.tar.gz
-# Source0-md5: dc4ffe43b191700b93c4802b8baeec38
+# up to 2.9.1
+# Source0: https://downloads.sourceforge.net/zorba/%{name}-%{version}.tar.gz
+# 3+
+#Source0Download: https://github.com/28msec/zorba/tags
+Source0: https://github.com/28msec/zorba/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 8b6c5203d91fcc54cc7d08efa47b4bdd
+Patch0: %{name}-tr1.patch
+Patch1: %{name}-icu.patch
+Patch2: %{name}-glibc.patch
+Patch3: %{name}-includes.patch
URL: https://github.com/28msec/zorba
-BuildRequires: bison >= 2.3
-BuildRequires: boost-devel >= 1.32
-BuildRequires: cmake >= 2.4
+BuildRequires: bison >= 2.4
+BuildRequires: boost-devel >= 1.33
+BuildRequires: cmake >= 2.6
BuildRequires: curl-devel >= 7.12
BuildRequires: doxygen
-BuildRequires: flex >= 2.5.33
+BuildRequires: flex >= 2.5.35
BuildRequires: graphviz
BuildRequires: libicu-devel >= 2.6
-BuildRequires: libxml2-devel >= 2.2.16
-BuildRequires: xerces-c-devel >= 2.7.0
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libuuid-devel
+BuildRequires: libxml2-devel >= 1:2.7.0
+BuildRequires: libxslt-devel
+BuildRequires: xerces-c-devel >= 2.8.0
+Requires: libxml2 >= 1:2.7.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -61,18 +73,16 @@ Pliki nagłówkowe biblioteki zorba.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
-mkdir build
+install -d build
cd build
-# -DCMAKE_C_COMPILER="%{__cc}" \
-# -DCMAKE_CXX_COMPILER="%{__cxx}" \
-cmake .. \
- -DCMAKE_C_FLAGS="%{rpmcflags}" \
- -DCMAKE_CXX_FLAGS="%{rpmcxxflags}" \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_BINARY_DIR=build
+%cmake .. \
+ -DZORBA_XQUERYX=ON
%{__make}
@@ -82,17 +92,57 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_ROOT%{_docdir}
+%{__rm} -r $RPM_BUILD_ROOT%{_bindir}/testdriver
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-3.1.0/c/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-3.1.0/cxx/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/cxx
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc ChangeLog
%attr(755,root,root) %{_bindir}/zorba
+%attr(755,root,root) %{_libdir}/libutil-curl.so
+%attr(755,root,root) %{_libdir}/libzorba_simplestore.so.3.1.0
+%dir %{_libdir}/zorba
+%dir %{_libdir}/zorba/core
+%dir %{_libdir}/zorba/core/3.1.0
+%dir %{_libdir}/zorba/core/3.1.0/edu
+%dir %{_libdir}/zorba/core/3.1.0/edu/princeton
+%dir %{_libdir}/zorba/core/3.1.0/edu/princeton/wordnet
+%{_libdir}/zorba/core/3.1.0/edu/princeton/wordnet/wordnet-en.zth
+%dir %{_libdir}/zorba/core/3.1.0/io
+%dir %{_libdir}/zorba/core/3.1.0/io/zorba
+%dir %{_libdir}/zorba/core/3.1.0/io/zorba/modules
+%attr(755,root,root) %{_libdir}/zorba/core/3.1.0/io/zorba/modules/libftp-client_1.0.so
+%attr(755,root,root) %{_libdir}/zorba/core/3.1.0/io/zorba/modules/libhttp-client_1.0.so
+%attr(755,root,root) %{_libdir}/zorba/core/3.1.0/io/zorba/modules/libsleep_1.0.so
+%attr(755,root,root) %{_libdir}/zorba/core/3.1.0/io/zorba/modules/libzorba-query_1.0.so
+%dir %{_libdir}/zorba/core/3.1.0/org
+%dir %{_libdir}/zorba/core/3.1.0/org/expath
+%dir %{_libdir}/zorba/core/3.1.0/org/expath/ns
+%attr(755,root,root) %{_libdir}/zorba/core/3.1.0/org/expath/ns/libfile_2.0.so
+%dir %{_libdir}/zorba/io
+%dir %{_libdir}/zorba/io/zorba
+%dir %{_libdir}/zorba/io/zorba/modules
+%attr(755,root,root) %{_libdir}/zorba/io/zorba/modules/libutil-tests_1.0.so
+%dir %{_datadir}/zorba
+%{_datadir}/zorba/uris
+%dir %{_datadir}/zorba-3.1.0
+%{_datadir}/zorba-3.1.0/fots_driver
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/libzorba_simplestore.so
+%{_includedir}/xqc.h
+%dir %{_includedir}/util
+%{_includedir}/util/curl_streambuf.h
%{_includedir}/zorba
+%{_datadir}/cmake/zorba-3.1.0
+%{_examplesdir}/%{name}-%{version}
diff --git a/zorba-glibc.patch b/zorba-glibc.patch
new file mode 100644
index 0000000..d4bfcbd
--- /dev/null
+++ b/zorba-glibc.patch
@@ -0,0 +1,11 @@
+--- zorba-3.1/src/util/locale.cpp.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/util/locale.cpp 2023-09-02 20:11:53.139086600 +0200
+@@ -26,7 +26,7 @@
+ # include <clocale>
+ # include <cstdlib> /* for getenv(3) */
+ # include <langinfo.h> /* for nl_langinfo(3) */
+-# include <xlocale.h> /* for newlocale(3) */
++# include <locale.h> /* for newlocale(3) */
+ #endif /* WIN32 */
+
+ // Zorba
diff --git a/zorba-icu.patch b/zorba-icu.patch
new file mode 100644
index 0000000..29954fb
--- /dev/null
+++ b/zorba-icu.patch
@@ -0,0 +1,110 @@
+--- zorba-3.1/src/zorbatypes/collation_manager.h.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/zorbatypes/collation_manager.h 2023-09-02 19:06:54.653539842 +0200
+@@ -22,6 +22,10 @@
+ #include <string>
+ #include <map>
+
++#ifndef ZORBA_NO_ICU
++#include <unicode/coll.h>
++#endif
++
+ namespace zorba
+ {
+
+@@ -31,6 +35,11 @@ class Collator
+ {
+ };
+
++#else
++
++using CollationKey = ::icu::CollationKey;
++using Collator = ::icu::Collator;
++
+ #endif /* ZORBA_NO_ICU */
+
+ class XQPCollator
+--- zorba-3.1/src/runtime/full_text/icu_tokenizer.h.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/runtime/full_text/icu_tokenizer.h 2023-09-02 20:09:00.490021920 +0200
+@@ -52,7 +52,7 @@ public:
+ Callback&, Item const* );
+
+ private:
+- typedef std::unique_ptr<RuleBasedBreakIterator> rbbi_ptr;
++ typedef std::unique_ptr<icu::RuleBasedBreakIterator> rbbi_ptr;
+
+ locale::iso639_1::type const lang_;
+ rbbi_ptr word_it_;
+--- zorba-3.1/src/util/unicode_util.cpp.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/util/unicode_util.cpp 2023-09-02 20:14:55.391432587 +0200
+@@ -2244,7 +2244,7 @@ bool normalize( string const &in, normal
+ default : icu_mode = UNORM_NONE; break;
+ }
+ Normalizer::normalize( in, icu_mode, 0, *out, status );
+- return U_SUCCESS( status ) == TRUE;
++ return U_SUCCESS( status ) == true;
+ }
+
+ bool strip_diacritics( string const &in, string *out ) {
+@@ -2266,7 +2266,7 @@ bool to_char( char const *in, char_type
+ u_strFromUTF8WithSub(
+ out, 1, nullptr, in, utf8::char_length( *in ), SubChar, nullptr, &status
+ );
+- return U_SUCCESS( status ) == TRUE;
++ return U_SUCCESS( status ) == true;
+ }
+ catch ( utf8::invalid_byte const& ) {
+ return false;
+@@ -2312,7 +2312,7 @@ bool to_string( char const *in, size_typ
+ UErrorCode status = U_ZERO_ERROR;
+ u_strFromUTF8( buf, in_len + 1, &buf_len, in, in_len, &status );
+ out->releaseBuffer( buf_len );
+- return U_SUCCESS( status ) == TRUE;
++ return U_SUCCESS( status ) == true;
+ }
+
+ bool to_string( wchar_t const *in, size_type in_len, string *out ) {
+@@ -2321,7 +2321,7 @@ bool to_string( wchar_t const *in, size_
+ size_type buf_len;
+ u_strFromWCS( buf, in_len + 1, &buf_len, in, in_len, &status );
+ out->releaseBuffer( buf_len );
+- return U_SUCCESS( status ) == TRUE;
++ return U_SUCCESS( status ) == true;
+ }
+
+ #endif /* ZORBA_NO_ICU */
+--- zorba-3.1/src/util/icu_regex.cpp.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/util/icu_regex.cpp 2023-09-02 20:15:43.874503265 +0200
+@@ -759,7 +759,7 @@ bool regex::replace_all( string const &i
+ matcher_->reset( in );
+ UErrorCode status = U_ZERO_ERROR;
+ *out = matcher_->replaceAll( replacement, status );
+- return U_SUCCESS( status ) == TRUE;
++ return U_SUCCESS( status ) == true;
+ }
+
+ bool regex::replace_all( char const *in, char const *replacement,
+--- zorba-3.1/src/zorbatypes/collation_manager.cpp.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/src/zorbatypes/collation_manager.cpp 2023-09-02 20:19:44.139868303 +0200
+@@ -119,11 +119,11 @@ CollationFactory::createCollator(const s
+ UErrorCode lError = U_ZERO_ERROR;
+ if (lTokens.size() == 2)
+ {
+- lCollator = Collator::createInstance(Locale(lTokens[1].c_str()), lError);
++ lCollator = Collator::createInstance(icu::Locale(lTokens[1].c_str()), lError);
+ }
+ else
+ {
+- lCollator = Collator::createInstance(Locale(lTokens[1].c_str(),
++ lCollator = Collator::createInstance(icu::Locale(lTokens[1].c_str(),
+ lTokens[2].c_str()),
+ lError);
+ }
+@@ -182,7 +182,7 @@ CollationFactory::createCollator()
+ Collator* lCollator;
+ #ifndef ZORBA_NO_ICU
+ UErrorCode lError = U_ZERO_ERROR;
+- lCollator = Collator::createInstance(Locale("en", "US"), lError);
++ lCollator = Collator::createInstance(icu::Locale("en", "US"), lError);
+ if( U_FAILURE(lError) ) {
+ assert(false);
+ }
diff --git a/zorba-includes.patch b/zorba-includes.patch
new file mode 100644
index 0000000..78d06ab
--- /dev/null
+++ b/zorba-includes.patch
@@ -0,0 +1,10 @@
+--- zorba-3.1/modules/http-client/json/http-client.xq.src/http_client.cpp.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/modules/http-client/json/http-client.xq.src/http_client.cpp 2023-09-02 20:48:24.420548742 +0200
+@@ -22,6 +22,7 @@
+ #endif
+
+ #include <curl/curl.h>
++#include <algorithm>
+ #include <map>
+ #include <zorba/serializer.h>
+ #include <zorba/external_module.h>
diff --git a/zorba-tr1.patch b/zorba-tr1.patch
new file mode 100644
index 0000000..dd0c51c
--- /dev/null
+++ b/zorba-tr1.patch
@@ -0,0 +1,21 @@
+--- zorba-3.1/CMakeLists.txt.orig 2015-06-16 13:26:38.000000000 +0200
++++ zorba-3.1/CMakeLists.txt 2023-09-02 19:45:56.814184602 +0200
+@@ -503,6 +503,10 @@ ENDIF (WIN32)
+
+ # C++11 TR1 header location & namespace
+ CHECK_CXX_SOURCE_COMPILES("
++ #include <type_traits>
++ int main() { std::is_convertible<int,int> x; }" ZORBA_NO_TR1)
++IF (NOT ZORBA_NO_TR1)
++CHECK_CXX_SOURCE_COMPILES("
+ #include <tr1/type_traits>
+ int main() { }" ZORBA_TR1_IN_TR1_SUBDIRECTORY)
+ CHECK_CXX_SOURCE_COMPILES("
+@@ -515,6 +519,7 @@ CHECK_CXX_SOURCE_COMPILES("
+ IF (ZORBA_TR1_1 OR ZORBA_TR1_2)
+ SET (ZORBA_TR1_NS_IS_STD_TR1 1)
+ ENDIF (ZORBA_TR1_1 OR ZORBA_TR1_2)
++ENDIF (NOT ZORBA_NO_TR1)
+
+ # C++11 langauge features
+ CHECK_CXX_SOURCE_COMPILES("
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/zorba.git/commitdiff/483854e5fc8cb0ce14dae534d1e3591f9abe5522
More information about the pld-cvs-commit
mailing list