From 53713f44482e7ec12887145a78e883bc97fd2fbf995f572196c0cc9d89116b6b Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 20 Jan 2025 01:37:27 +0000 Subject: [PATCH] - Add patch support-poppler-25.01.patch: * Support Poppler 25.01 changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-poppler?expand=0&rev=10 --- python-python-poppler.changes | 6 ++++++ python-python-poppler.spec | 2 ++ support-poppler-25.01.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 support-poppler-25.01.patch diff --git a/python-python-poppler.changes b/python-python-poppler.changes index 11c6664..e0640d5 100644 --- a/python-python-poppler.changes +++ b/python-python-poppler.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 20 01:36:18 UTC 2025 - Steve Kowalik + +- Add patch support-poppler-25.01.patch: + * Support Poppler 25.01 changes. + ------------------------------------------------------------------- Mon Jan 13 01:28:43 UTC 2025 - Steve Kowalik diff --git a/python-python-poppler.spec b/python-python-poppler.spec index bfb6f63..abed0c8 100644 --- a/python-python-poppler.spec +++ b/python-python-poppler.spec @@ -26,6 +26,8 @@ URL: https://github.com/cbrunet/python-poppler Source: https://github.com/cbrunet/python-poppler/archive/refs/tags/v%{version}.tar.gz#/python-poppler-%{version}.tar.gz # PATCH-FEATURE-OPENSUSE Build against system pybind11 Patch0: use-system-pybind11.patch +# PATCH-FIX-UPSTREAM gh#cbrunet/python-poppler#92 +Patch1: support-poppler-25.01.patch BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module meson-python} BuildRequires: %{python_module pip} diff --git a/support-poppler-25.01.patch b/support-poppler-25.01.patch new file mode 100644 index 0000000..f141fcb --- /dev/null +++ b/support-poppler-25.01.patch @@ -0,0 +1,27 @@ +From 6cc307548a490ddaf2054ead00b8e354b494e5bc Mon Sep 17 00:00:00 2001 +From: Bohumir Zamecnik +Date: Thu, 16 Jan 2025 16:52:41 +0700 +Subject: [PATCH] Fix: Remove image.copy() argument in poppler 25.01 + +- from poppler changelog: "Remove rect parameter from image::copy, + it was never implemented" +--- + src/cpp/image.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cpp/image.cpp b/src/cpp/image.cpp +index 725359b..91131f4 100644 +--- a/src/cpp/image.cpp ++++ b/src/cpp/image.cpp +@@ -102,7 +102,11 @@ PYBIND11_MODULE(image, m) + .def(py::init(), py::arg("iwidth"), py::arg("iheight"), py::arg("iformat")) + .def("bytes_per_row", &image::bytes_per_row) + // .def("const_data", &image::const_data) ++#if HAS_VERSION(25, 1) ++ .def("copy", &image::copy) ++#else + .def("copy", &image::copy, py::arg("rect") = rect()) ++#endif + .def("data", &data) + .def("set_data", &set_data) + .def("format", &image::format)