Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package liborcus for openSUSE:Factory 
checked in at 2023-08-11 15:55:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/liborcus (Old)
 and      /work/SRC/openSUSE:Factory/.liborcus.new.11712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "liborcus"

Fri Aug 11 15:55:21 2023 rev:40 rq:1103405 version:0.18.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/liborcus/liborcus.changes        2023-08-08 
15:53:51.580589759 +0200
+++ /work/SRC/openSUSE:Factory/.liborcus.new.11712/liborcus.changes     
2023-08-11 15:55:31.811761615 +0200
@@ -1,0 +2,22 @@
+Thu Aug 10 16:06:48 UTC 2023 - Fridrich Strba <fst...@suse.com>
+
+- Clean up the spec file and require gcc-c++ >= 7, since that is the
+  first version that supports C++17
+- Run tests on all distributions and architectures
+  * Allow disabling them on command line by specifying
+    "--without tests"
+- Changed patch:
+  * no-std-filesystem.patch -> liborcus-filesystem.patch
+    + rework the patch to detect std::filesystem,
+      std::experimental::filesystem and boost::filesystem (in that
+      order, and use them if found)
+- Added patch:
+  * liborcus-tests.patch
+    + fix tests on all platforms
+    + do not use C++20 features with the
+      boost::filesystem::directory_iterator
+    + do not assume that pathlib integrates seamlessly with open
+      and do not use f-string formating, both being python 3.6+
+      features
+
+-------------------------------------------------------------------

Old:
----
  no-std-filesystem.patch

New:
----
  liborcus-filesystem.patch
  liborcus-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ liborcus.spec ++++++
--- /var/tmp/diff_new_pack.1KZRYh/_old  2023-08-11 15:55:32.719767025 +0200
+++ /var/tmp/diff_new_pack.1KZRYh/_new  2023-08-11 15:55:32.727767073 +0200
@@ -17,6 +17,7 @@
 
 
 %{!?make_build:%global make_build make %{?_smp_mflags}}
+%bcond_without tests
 %define libname liborcus-0_18-0
 Name:           liborcus
 Version:        0.18.1
@@ -25,7 +26,8 @@
 License:        MPL-2.0
 URL:            https://gitlab.com/orcus/orcus/
 Source:         http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz
-Patch0:         no-std-filesystem.patch
+Patch0:         liborcus-filesystem.patch
+Patch1:         liborcus-tests.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  coreutils
@@ -38,12 +40,8 @@
 BuildRequires:  pkgconfig(python3)
 BuildRequires:  pkgconfig(zlib)
 %if 0%{?suse_version} >= 1500
-BuildRequires:  gcc-c++
-%else
-BuildRequires:  gcc8
-BuildRequires:  gcc8-c++
-%endif
-%if 0%{?suse_version} >= 1500
+BuildRequires:  gcc >= 7
+BuildRequires:  gcc-c++ >= 7
 BuildRequires:  libboost_date_time-devel
 BuildRequires:  libboost_filesystem-devel
 BuildRequires:  libboost_iostreams-devel
@@ -51,6 +49,8 @@
 BuildRequires:  libboost_system-devel
 %else
 BuildRequires:  boost-devel
+BuildRequires:  gcc7
+BuildRequires:  gcc7-c++
 %endif
 
 %package -n %{libname}
@@ -90,14 +90,15 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
-%global optflags %optflags -fexcess-precision=fast
+%global optflags %{optflags} -fexcess-precision=fast
 libtoolize --force --copy
 autoreconf -fi
 %if 0%{?suse_version} < 1500
-export CC=gcc-8
-export CXX=g++-8
+export CC=gcc-7
+export CXX=g++-7
 %endif
 %configure \
        --disable-silent-rules \
@@ -107,8 +108,8 @@
        --docdir=%{_docdir}/%{name}
 %make_build
 
+%if %{with tests}
 %check
-%if 0%{?suse_version} >= 1500
 %make_build check
 %endif
 

++++++ liborcus-filesystem.patch ++++++
--- liborcus-0.18.1/configure.ac        2023-08-11 00:01:13.087681555 +0200
+++ liborcus-0.18.1/configure.ac        2023-08-11 00:01:22.964416039 +0200
@@ -26,7 +26,7 @@
 AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2 dist-xz])
 AM_SILENT_RULES([yes])
 AC_LANG([C++])
-AX_CXX_COMPILE_STDCXX_17([noext], [mandatory])
+AX_CXX_COMPILE_STDCXX_17([ext], [optional])
 CXXFLAGS="-fvisibility=hidden $CXXFLAGS -Wall -pthread -Wshadow"
 
 # ===========================
@@ -44,6 +44,17 @@
 # =====================
 AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
 
+AC_CHECK_HEADER([filesystem], [ 
+    AC_DEFINE(HAVE_FILESYSTEM, 1, [Define if <filesystem> is present])
+    std_filesystem=yes], [std_filesystem=no], [])
+
+AC_CHECK_HEADER([experimental/filesystem], [
+    AC_DEFINE(HAVE_EXPERIMENTAL_FILESYSTEM, 1, [Define if 
<experimental/filesystem> is present])
+    experimental_filesystem=yes], [experimental_filesystem=no], [])
+
+AM_CONDITIONAL([STD_FILESYSTEM], [test "x$std_filesystem" = "xyes"])
+AM_CONDITIONAL([EXPERIMENTAL_FILESYSTEM], [test "x$experimental_filesystem" = 
"xyes"])
+
 # =============================================================
 # Checks for typedefs, structures, and compiler characteristics
 # =============================================================
--- liborcus-0.18.1/doc_example/Makefile.am     2023-08-11 00:01:13.101014980 
+0200
+++ liborcus-0.18.1/doc_example/Makefile.am     2023-08-11 00:02:00.191338354 
+0200
@@ -91,6 +91,24 @@
        ../src/parser/liborcus-parser-@ORCUS_API_VERSION@.la \
        ../src/liborcus/liborcus-@ORCUS_API_VERSION@.la
 
+if !STD_FILESYSTEM
+if EXPERIMENTAL_FILESYSTEM
+spreadsheet_doc_1_LDADD += -lstdc++fs
+spreadsheet_doc_1_num_and_formula_LDADD += -lstdc++fs
+spreadsheet_doc_2_LDADD += -lstdc++fs
+spreadsheet_doc_2_sheets_no_string_pool_LDADD += -lstdc++fs
+spreadsheet_doc_2_sheets_with_string_pool_LDADD += -lstdc++fs
+spreadsheet_doc_2_sheets_with_formula_LDADD += -lstdc++fs
+else
+spreadsheet_doc_1_LDADD += $(BOOST_FILESYSTEM_LIBS)
+spreadsheet_doc_1_num_and_formula_LDADD += $(BOOST_FILESYSTEM_LIBS)
+spreadsheet_doc_2_LDADD += $(BOOST_FILESYSTEM_LIBS)
+spreadsheet_doc_2_sheets_no_string_pool_LDADD += $(BOOST_FILESYSTEM_LIBS)
+spreadsheet_doc_2_sheets_with_string_pool_LDADD += $(BOOST_FILESYSTEM_LIBS)
+spreadsheet_doc_2_sheets_with_formula_LDADD += $(BOOST_FILESYSTEM_LIBS)
+endif
+endif
+
 AM_TESTS_ENVIRONMENT = \
        INPUTDIR=$(srcdir)/files; export INPUTDIR;
 
--- liborcus-0.18.1/doc_example/spreadsheet_doc_1.cpp   2023-08-11 
00:01:13.101014980 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_1.cpp   2023-08-11 
00:01:22.964416039 +0200
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/document.hpp>
 #include <orcus/spreadsheet/factory.hpp>
@@ -8,13 +11,24 @@
 
 #include <iostream>
 #include <cstdlib>
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 
 using namespace orcus;
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
 
     //!code-start: instantiate
     spreadsheet::range_size_t ss{1048576, 16384};
--- liborcus-0.18.1/doc_example/spreadsheet_doc_1_num_and_formula.cpp   
2023-08-11 00:01:13.101014980 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_1_num_and_formula.cpp   
2023-08-11 00:01:22.964416039 +0200
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/document.hpp>
 #include <orcus/spreadsheet/factory.hpp>
@@ -9,13 +12,24 @@
 #include <ixion/cell.hpp>
 
 #include <iostream>
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 
 using namespace orcus;
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
 
     // Instantiate a document, and wrap it with a factory.
     spreadsheet::range_size_t ss{1048576, 16384};
--- liborcus-0.18.1/doc_example/spreadsheet_doc_2.cpp   2023-08-11 
00:01:13.101014980 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_2.cpp   2023-08-11 
00:01:22.964416039 +0200
@@ -1,8 +1,22 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/import_interface.hpp>
 #include <orcus/orcus_ods.hpp>
 
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 #include <iostream>
 
 namespace ss = orcus::spreadsheet;
@@ -33,7 +47,7 @@
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
     auto filepath = input_dir / "multi-sheets.ods";
 
     my_empty_import_factory factory;
--- liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp     
2023-08-11 00:01:13.097681623 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp     
2023-08-11 00:01:22.964416039 +0200
@@ -1,10 +1,24 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/import_interface.hpp>
 #include <orcus/orcus_ods.hpp>
 
 #include <iostream>
 #include <memory>
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 
 //!code-start: cell_value
 namespace ss = orcus::spreadsheet;
@@ -112,7 +126,7 @@
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
     auto filepath = input_dir / "multi-sheets.ods";
 
     my_import_factory factory;
--- liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp       
2023-08-11 00:01:13.101014980 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp       
2023-08-11 00:01:22.964416039 +0200
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/import_interface.hpp>
 #include <orcus/orcus_ods.hpp>
@@ -6,7 +9,18 @@
 #include <memory>
 #include <unordered_map>
 #include <deque>
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 
 namespace ss = orcus::spreadsheet;
 
@@ -279,7 +293,7 @@
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
     auto filepath = input_dir / "multi-sheets.ods";
 
     my_import_factory factory;
--- liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp   
2023-08-11 00:01:13.101014980 +0200
+++ liborcus-0.18.1/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp   
2023-08-11 00:01:22.964416039 +0200
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <orcus/spreadsheet/import_interface.hpp>
 #include <orcus/orcus_ods.hpp>
@@ -6,7 +9,18 @@
 #include <memory>
 #include <unordered_map>
 #include <deque>
+#ifdef HAVE_FILESYSTEM
 #include <filesystem>
+namespace fs = std::filesystem;
+#else
+#ifdef HAVE_EXPERIMENTAL_FILESYSTEM
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+#endif
+#endif
 
 namespace ss = orcus::spreadsheet;
 
@@ -193,7 +207,7 @@
 
 int main()
 {
-    std::filesystem::path input_dir = std::getenv("INPUTDIR");
+    fs::path input_dir = std::getenv("INPUTDIR");
     auto filepath = input_dir / "multi-sheets.ods";
 
     my_import_factory factory;
Only in liborcus-0.18.1: liborcus-filesystem.patch

++++++ liborcus-tests.patch ++++++
--- liborcus-0.18.1/src/liborcus/format_detection_test.cpp      2023-08-10 
18:52:04.943042344 +0200
+++ liborcus-0.18.1/src/liborcus/format_detection_test.cpp      2023-08-10 
22:30:15.386832157 +0200
@@ -48,8 +48,9 @@
         // Bail out silently.
         return;
 
-    for (const fs::path& p : fs::directory_iterator(root_dir))
+    for (fs::directory_iterator itr(root_dir); itr!=fs::directory_iterator(); 
++itr)
     {
+        const fs::path& p = itr->path();
         orcus::file_content content(p.string());
         assert(!content.empty());
 
--- liborcus-0.18.1/src/liborcus/json_structure_tree_test.cpp   2023-08-10 
18:52:04.949709056 +0200
+++ liborcus-0.18.1/src/liborcus/json_structure_tree_test.cpp   2023-08-10 
22:30:07.156775419 +0200
@@ -39,8 +39,9 @@
 {
     fs::path base_dir(SRCDIR"/test/json-structure/no-value-nodes");
 
-    for (const fs::path& p : fs::directory_iterator(base_dir))
+    for (fs::directory_iterator itr(base_dir); itr!=fs::directory_iterator(); 
++itr)
     {
+        const fs::path& p = itr->path();
         if (!fs::is_regular_file(p))
             continue;
 
--- liborcus-0.18.1/test/python/file_load_common.py     2023-08-10 
18:52:04.896375355 +0200
+++ liborcus-0.18.1/test/python/file_load_common.py     2023-08-10 
23:17:23.482954627 +0200
@@ -202,14 +202,14 @@
     """
 
     print("test directory: {}".format(test_dir))
-    expected = ExpectedDocument(os.path.join(test_dir, "check.txt"))
+    expected = ExpectedDocument(os.path.join(str(test_dir), "check.txt"))
 
     # Find the input file to load.
     input_file = None
-    for file_name in os.listdir(test_dir):
+    for file_name in os.listdir(str(test_dir)):
         name, ext = os.path.splitext(file_name)
         if name == "input":
-            input_file = os.path.join(test_dir, file_name)
+            input_file = os.path.join(str(test_dir), file_name)
             break
 
     print("input file: {}".format(input_file))
--- liborcus-0.18.1/test/python/test_module.py  2023-08-10 18:52:04.896375355 
+0200
+++ liborcus-0.18.1/test/python/test_module.py  2023-08-10 23:02:29.916816068 
+0200
@@ -20,12 +20,12 @@
     @classmethod
     def setUpClass(cls):
         top_builddir = Path(os.environ["BUILDDIR"])
-        with open(top_builddir / "test" / "python" / "env.json", "r") as f:
+        with open(str(top_builddir / "test" / "python" / "env.json"), "r") as 
f:
             cls.env = json.load(f)
 
     def test_version(self):
         s = orcus.__version__
-        expected = 
f"{self.env['version-major']}.{self.env['version-minor']}.{self.env['version-micro']}"
+        expected = "{}.{}.{}".format(self.env['version-major'], 
self.env['version-minor'], self.env['version-micro'])
         self.assertEqual(expected, s)
 
     def test_detect_format(self):
--- liborcus-0.18.1/test/python/test_ods.py     2023-08-10 18:52:04.896375355 
+0200
+++ liborcus-0.18.1/test/python/test_ods.py     2023-08-10 23:03:08.390414252 
+0200
@@ -31,7 +31,7 @@
 
     def test_formula_tokens_1(self):
         filepath = self.basedir / "formula-1" / "input.ods"
-        with open(filepath, "rb") as f:
+        with open(str(filepath), "rb") as f:
             doc = ods.read(f, recalc=False)
 
         self.assertEqual(len(doc.sheets), 1)
@@ -82,7 +82,7 @@
 
     def test_formula_tokens_2(self):
         filepath = self.basedir / "formula-2" / "input.ods"
-        with open(filepath, "rb") as f:
+        with open(str(filepath), "rb") as f:
             doc = ods.read(f, recalc=False)
 
         self.assertEqual(len(doc.sheets), 1)

Reply via email to