14
0

- 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
This commit is contained in:
2025-01-20 01:37:27 +00:00
committed by Git OBS Bridge
parent 6417a382e4
commit 53713f4448
3 changed files with 35 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 20 01:36:18 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-poppler-25.01.patch:
* Support Poppler 25.01 changes.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 13 01:28:43 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com> Mon Jan 13 01:28:43 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -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 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 # PATCH-FEATURE-OPENSUSE Build against system pybind11
Patch0: use-system-pybind11.patch 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 devel >= 3.7}
BuildRequires: %{python_module meson-python} BuildRequires: %{python_module meson-python}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}

View File

@@ -0,0 +1,27 @@
From 6cc307548a490ddaf2054ead00b8e354b494e5bc Mon Sep 17 00:00:00 2001
From: Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
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<int, int, image::format_enum>(), 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)