diff --git a/.gitignore b/.gitignore index 3642444..ce7d3c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/liborcus-0.16.1.tar.xz +/liborcus-0.17.2.tar.xz diff --git a/0001-make-FormatType-conversion-work-with-python-3.10.patch b/0001-make-FormatType-conversion-work-with-python-3.10.patch deleted file mode 100644 index 7c57b00..0000000 --- a/0001-make-FormatType-conversion-work-with-python-3.10.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 34f93cdc383432aeb34c31184de8a2fb5940e0c7 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Sun, 2 May 2021 20:46:42 +0200 -Subject: [PATCH] make FormatType conversion work with python 3.10 - -The str() function for Enum returns only the member name since 3.10: -https://docs.python.org/3.10/whatsnew/3.10.html#enum -Let's just check separately the enum type name and the member name. ---- - src/python/sheet.cpp | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/python/sheet.cpp b/src/python/sheet.cpp -index 85067868..cf6d8b2c 100644 ---- a/src/python/sheet.cpp -+++ b/src/python/sheet.cpp -@@ -113,29 +113,29 @@ format_t to_format_type_enum(PyObject* format) - static const char* err_not_format_type = "An enum value of 'orcus.FormatType' was expected."; - static const char* err_format_not_supported = "Unsupported format type."; - -- PyObject* format_s = PyObject_Str(format); // new reference -- if (!format_s) -+ // Check the type name. -+ -+ PyTypeObject* type = Py_TYPE(format); -+ if (!type || strncmp(type->tp_name, "FormatType", 10u) != 0) - { - PyErr_SetString(PyExc_RuntimeError, err_not_format_type); - return format_t::unknown; - } - -- const char* p = PyUnicode_AsUTF8(format_s); -+ // Now check the member name. - -- // Make sure that the string starts with 'FormatType.'. -- if (!p || strnlen(p, 11u) < 11u || strncmp(p, "FormatType.", 11u)) -+ PyObject* format_s = PyObject_GetAttrString(format, "name"); // new reference -+ if (!format_s) - { - PyErr_SetString(PyExc_RuntimeError, err_not_format_type); -- Py_DECREF(format_s); - return format_t::unknown; - } - -- p += 11; // Move it to the char past the '.'. -- - // TODO : currently we only support csv format. Change this code when we - // add more format type(s) to support. - -- if (strncmp(p, "CSV", 3u)) -+ const char* p = PyUnicode_AsUTF8(format_s); -+ if (!p || strncmp(p, "CSV", 3u) != 0) - { - PyErr_SetString(PyExc_RuntimeError, err_format_not_supported); - Py_DECREF(format_s); --- -2.31.1 - diff --git a/liborcus-gcc11.patch b/liborcus-gcc11.patch deleted file mode 100644 index da8adae..0000000 --- a/liborcus-gcc11.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/liborcus/orcus_xlsx.cpp b/src/liborcus/orcus_xlsx.cpp -index d9e16ef..604b0f8 100644 ---- a/src/liborcus/orcus_xlsx.cpp -+++ b/src/liborcus/orcus_xlsx.cpp -@@ -30,6 +30,7 @@ - #include "ooxml_global.hpp" - #include "spreadsheet_iface_util.hpp" - -+#include - #include - #include - #include -diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp -index 3ca72e5..7504b4c 100644 ---- a/src/liborcus/xls_xml_context.cpp -+++ b/src/liborcus/xls_xml_context.cpp -@@ -16,6 +16,7 @@ - #include - - #include -+#include - - using namespace std; - namespace ss = orcus::spreadsheet; -diff --git a/src/liborcus/xlsx_revision_context.cpp b/src/liborcus/xlsx_revision_context.cpp -index edfd9ee..0b6ec0a 100644 ---- a/src/liborcus/xlsx_revision_context.cpp -+++ b/src/liborcus/xlsx_revision_context.cpp -@@ -16,6 +16,7 @@ - #include "orcus/global.hpp" - - #include -+#include - - using namespace std; - diff --git a/liborcus.spec b/liborcus.spec index 62eea36..0fb9b36 100644 --- a/liborcus.spec +++ b/liborcus.spec @@ -1,4 +1,4 @@ -%global apiversion 0.16 +%global apiversion 0.17 %if 0%{?rhel} @@ -16,16 +16,14 @@ %endif Name: liborcus -Version: 0.16.1 -Release: 10%{?dist} +Version: 0.17.2 +Release: 1%{?dist} Summary: Standalone file import filter library for spreadsheet documents License: MPLv2.0 URL: https://gitlab.com/orcus/orcus Source0: https://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz -Patch0: %{name}-gcc11.patch -Patch1: liborcus-noexamples.patch -Patch2: 0001-make-FormatType-conversion-work-with-python-3.10.patch +Patch0: liborcus-noexamples.patch BuildRequires: make BuildRequires: boost-devel @@ -34,9 +32,9 @@ BuildRequires: gcc-c++ BuildRequires: automake %if %{with convtools} BuildRequires: help2man -BuildRequires: pkgconfig(libixion-0.16) +BuildRequires: pkgconfig(libixion-0.17) %endif -BuildRequires: pkgconfig(mdds-1.5) +BuildRequires: pkgconfig(mdds-2.0) %if %{with python} BuildRequires: pkgconfig(python3) %if 0%{?rhel} @@ -200,6 +198,9 @@ make check %{?_smp_mflags} %doc doc/_doxygen/html %changelog +* Wed Feb 02 2022 Caolán McNamara - 0.17.2-1 +- Resolves: rhbz#2018620 Update to 0.17.2 + * Thu Jan 20 2022 Fedora Release Engineering - 0.16.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 396f66d..17b489d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (liborcus-0.16.1.tar.xz) = 6d75591820af65181dd3a418f051a359695083f29c7d9c77edbcab3e89d9ea367824be0b19f27a31267525f446936145f5780a0ce3c6ee2d89823742837d4739 +SHA512 (liborcus-0.17.2.tar.xz) = 8ad8db46c23673260057aff555286d95ebfeff0a027bdeae24f11f8aa12456284f7f4446edddb91936b3011eb1227cfe1618ab3c4d909f8356c8c151f5739d79