diff options
author | Carl Smedstad | 2024-03-09 16:59:44 +0100 |
---|---|---|
committer | Carl Smedstad | 2024-03-09 17:00:52 +0100 |
commit | 778defcc4336ad059054c6fcf349cdf1ed928066 (patch) | |
tree | 77215438a57ccbaed2170aeee9b21fbab2fe1aa8 | |
parent | e82dbf546f3b1b1030942a7cfd512a6f67869d09 (diff) | |
download | aur-778defcc4336ad059054c6fcf349cdf1ed928066.tar.gz |
upgpkg: 0.2.15-2
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | reportlab-4.1.0-compatibility.patch | 28 |
4 files changed, 48 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = python-xhtml2pdf pkgdesc = A library for converting HTML into PDFs using ReportLab pkgver = 0.2.15 - pkgrel = 1 + pkgrel = 2 url = https://github.com/xhtml2pdf/xhtml2pdf arch = any license = Apache-2.0 @@ -26,7 +26,9 @@ pkgbase = python-xhtml2pdf depends = python-reportlab depends = python-svglib depends = python-typing_extensions - source = python-xhtml2pdf-0.2.15.tar.gz::https://github.com/xhtml2pdf/xhtml2pdf/archive/refs/tags/v0.2.15.tar.gz + source = python-xhtml2pdf-0.2.15.tar.gz::https://github.com/xhtml2pdf/xhtml2pdf/archive/v0.2.15.tar.gz + source = reportlab-4.1.0-compatibility.patch sha256sums = 4e802908267d3b8682076cca11cb314997dff946400e10a929243d40b4c17e28 + sha256sums = 53fb653376a3d92cf50d28094c99e6685a588ab9390526e31992815690ea9096 pkgname = python-xhtml2pdf diff --git a/.gitignore b/.gitignore index 0df2b70016b9..3d192c721931 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ !.nvchecker.toml !.SRCINFO !PKGBUILD +!reportlab-4.1.0-compatibility.patch @@ -5,7 +5,7 @@ pkgname=python-xhtml2pdf _pkgname=${pkgname#python-} pkgver=0.2.15 -pkgrel=1 +pkgrel=2 pkgdesc="A library for converting HTML into PDFs using ReportLab" arch=(any) url="https://github.com/xhtml2pdf/xhtml2pdf" @@ -36,11 +36,23 @@ makedepends=( texlive-latexextra ) checkdepends=(python-nose) -source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('4e802908267d3b8682076cca11cb314997dff946400e10a929243d40b4c17e28') +source=( + "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" + "reportlab-4.1.0-compatibility.patch" +) +sha256sums=( + '4e802908267d3b8682076cca11cb314997dff946400e10a929243d40b4c17e28' + '53fb653376a3d92cf50d28094c99e6685a588ab9390526e31992815690ea9096' +) _archive="$_pkgname-$pkgver" +prepare() { + cd "$_archive" + + patch --forward --strip=1 --input="$srcdir/reportlab-4.1.0-compatibility.patch" +} + build() { cd "$_archive" diff --git a/reportlab-4.1.0-compatibility.patch b/reportlab-4.1.0-compatibility.patch new file mode 100644 index 000000000000..0ba4658d2677 --- /dev/null +++ b/reportlab-4.1.0-compatibility.patch @@ -0,0 +1,28 @@ +From 1252510bd23b833b45b4d252aeac62c1eb51eeef Mon Sep 17 00:00:00 2001 +From: Stefan <96178532+stefan6419846@users.noreply.github.com> +Date: Sat, 10 Feb 2024 11:47:23 +0100 +Subject: [PATCH] Adapt to new ShowBoundaryValue import + +--- + xhtml2pdf/context.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/xhtml2pdf/context.py b/xhtml2pdf/context.py +index 31abc542..d768875b 100644 +--- a/xhtml2pdf/context.py ++++ b/xhtml2pdf/context.py +@@ -27,8 +27,13 @@ + from reportlab.lib.styles import ParagraphStyle + from reportlab.pdfbase import pdfmetrics + from reportlab.pdfbase.ttfonts import TTFont +-from reportlab.platypus.frames import Frame, ShowBoundaryValue ++from reportlab.platypus.frames import Frame + from reportlab.platypus.paraparser import ParaFrag, ps2tt, tt2ps ++try: ++ from reportlab.pdfgen.canvas import ShowBoundaryValue ++except ImportError: ++ # reportlab < 4.0.9.1 ++ from reportlab.platypus.frames import ShowBoundaryValue + + from xhtml2pdf import default, parser + from xhtml2pdf.files import getFile, pisaFileObject |