From 6c17fa34c7cd24abf98caa225bc6f60d2bf4abd9 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Sat, 9 Apr 2022 14:10:43 +0200 Subject: [PATCH] img2pdf: update to 0.4.4. --- .../img2pdf/patches/1_fix_broken_tests.patch | 23 +++++++++++++++++++ srcpkgs/img2pdf/template | 7 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/img2pdf/patches/1_fix_broken_tests.patch diff --git a/srcpkgs/img2pdf/patches/1_fix_broken_tests.patch b/srcpkgs/img2pdf/patches/1_fix_broken_tests.patch new file mode 100644 index 000000000000..7f873ce2f830 --- /dev/null +++ b/srcpkgs/img2pdf/patches/1_fix_broken_tests.patch @@ -0,0 +1,23 @@ +--- a/src/img2pdf_test.py ++++ b/src/img2pdf_test.py +@@ -2542,10 +2542,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png): + assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + identify + ) # FIXME: should be LSB +- if identify[0].get("version", "0") < "1.0": +- assert identify[0]["image"].get("depth") == 12, str(identify) +- else: +- assert identify[0]["image"].get("depth") == 16, str(identify) ++ assert identify[0]["image"].get("depth") == 12, str(identify) + assert identify[0]["image"].get("baseDepth") == 12, str(identify) + assert identify[0]["image"].get("pageGeometry") == { + "width": 60, +@@ -2602,7 +2599,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png): + assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( + identify + ) # FIXME: should be LSB +- assert identify[0]["image"].get("depth") == 16, str(identify) ++ assert identify[0]["image"].get("depth") == 14, str(identify) + assert identify[0]["image"].get("baseDepth") == 14, str(identify) + assert identify[0]["image"].get("pageGeometry") == { + "width": 60, diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template index a24ea1f1b610..266bd3ab63e8 100644 --- a/srcpkgs/img2pdf/template +++ b/srcpkgs/img2pdf/template @@ -1,14 +1,15 @@ # Template file for 'img2pdf' pkgname=img2pdf -version=0.4.3 +version=0.4.4 revision=1 build_style=python3-module hostmakedepends="python3-pikepdf python3-setuptools" depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter" +checkdepends="exiftool ghostscript ImageMagick mupdf-tools netpbm poppler + python3-numpy python3-pytest python3-scipy $depends" short_desc="Lossless conversion of raster images to PDF" maintainer="Philipp David " license="GPL-3.0-or-later" homepage="https://gitlab.mister-muffin.de/josch/img2pdf" distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz" -checksum=8e51c5043efa95d751481b516071a006f87c2a4059961a9ac43ec238915de09f -make_check=no # need to patch out some bitdepth checks +checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c