1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

textproc/py-pikepdf: Unbreak build with qpdf 10.1.0 after r560703

* Bump PORTREVISION due package change.

src/qpdf/page.cpp:82:10: error: no matching member function for call to 'def'
        .def("externalize_inline_images", &QPDFPageObjectHelper::externalizeInlineImages,
        ~^~~

Reported by:	pkg-fallout
This commit is contained in:
Kai Knoblich 2021-01-09 13:18:00 +00:00
parent 5803da33cc
commit f0c6ab8cf4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=560860
3 changed files with 66 additions and 0 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= pikepdf
DISTVERSION= 1.19.3
PORTREVISION= 1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

View File

@ -0,0 +1,22 @@
From: "James R. Barlow" <james@purplerock.ca>
Date: Mon, 4 Jan 2021 20:21:51 -0800
Subject: [PATCH] Fix externalize_inline_images for qpdf 10.1.0
Obtained from:
https://github.com/pikepdf/pikepdf/commit/7ac9b058104219b26747f3fc9761ac6b3c037402.patch
--- src/qpdf/page.cpp.orig 2020-09-09 22:57:09 UTC
+++ src/qpdf/page.cpp
@@ -79,7 +79,10 @@ void init_page(py::module& m)
.def("_get_mediabox", &QPDFPageObjectHelper::getMediaBox)
.def("_get_cropbox", &QPDFPageObjectHelper::getCropBox)
.def("_get_trimbox", &QPDFPageObjectHelper::getTrimBox)
- .def("externalize_inline_images", &QPDFPageObjectHelper::externalizeInlineImages,
+ .def("externalize_inline_images",
+ [](QPDFPageObjectHelper &poh, size_t min_size = 0) {
+ return poh.externalizeInlineImages(min_size);
+ },
py::arg("min_size") = 0,
R"~~~(
Convert inlines image to normal (external) images.

View File

@ -0,0 +1,43 @@
From: "James R. Barlow" <james@purplerock.ca>
Date: Wed, 6 Jan 2021 00:22:16 -0800
Subject: [PATCH] libqpdf 10.1.0 raises different exception [1]
The different errors are acceptable to us; actually they are more
correct than the original behavior.
From: "James R. Barlow" <james@purplerock.ca>
Date: Wed, 6 Jan 2021 03:39:50 -0800
Subject: [PATCH] Fix test_tokenfilter_is_abstract [2]
Obtained from:
[1] https://github.com/pikepdf/pikepdf/commit/fe4b568ac88ba551458578613b013ac17edf5c4e.patch
[2] https://github.com/pikepdf/pikepdf/commit/7ca375cb6ff82011d716da1614ef5721a97f91b0.patch
--- tests/test_filters.py.orig 2020-09-09 22:57:09 UTC
+++ tests/test_filters.py
@@ -74,19 +74,17 @@ class FilterInvalid(pikepdf.TokenFilter):
def test_invalid_handle_token(pal):
page = pikepdf.Page(pal.pages[0])
- with pytest.raises(pikepdf.PdfError):
- result = page.get_filtered_contents(FilterInvalid())
+ with pytest.raises((TypeError, pikepdf.PdfError)):
+ page.get_filtered_contents(FilterInvalid())
def test_invalid_tokenfilter(pal):
page = pikepdf.Page(pal.pages[0])
with pytest.raises(TypeError):
- result = page.get_filtered_contents(list())
+ page.get_filtered_contents(list())
def test_tokenfilter_is_abstract(pal):
page = pikepdf.Page(pal.pages[0])
- try:
- result = page.get_filtered_contents(pikepdf.TokenFilter())
- except pikepdf.PdfError:
- assert 'Tried to call pure virtual' in pal.get_warnings()[0]
+ with pytest.raises((RuntimeError, pikepdf.PdfError)):
+ page.get_filtered_contents(pikepdf.TokenFilter())