mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
parent
d333a12b54
commit
92992bd19d
2 changed files with 74 additions and 2 deletions
72
srcpkgs/python3-pillow_heif/patches/363.patch
Normal file
72
srcpkgs/python3-pillow_heif/patches/363.patch
Normal file
|
@ -0,0 +1,72 @@
|
|||
see https://github.com/bigcat88/pillow_heif/pull/363
|
||||
--- a/pillow_heif/_pillow_heif.c
|
||||
+++ b/pillow_heif/_pillow_heif.c
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
#include "Python.h"
|
||||
#include "libheif/heif.h"
|
||||
+#if LIBHEIF_HAVE_VERSION(1,20,0)
|
||||
+ #include "libheif/heif_properties.h"
|
||||
+#endif
|
||||
#include "_ph_postprocess.h"
|
||||
|
||||
/* =========== Common stuff ======== */
|
||||
--- a/tests/basic_test.py
|
||||
+++ b/tests/basic_test.py
|
||||
@@ -18,7 +18,7 @@ def test_libheif_info():
|
||||
assert key in info
|
||||
|
||||
version = pillow_heif.libheif_version()
|
||||
- valid_prefixes = ["1.17.", "1.18.", "1.19."]
|
||||
+ valid_prefixes = ["1.17.", "1.18.", "1.19.", "1.20."]
|
||||
assert any(version.startswith(prefix) for prefix in valid_prefixes)
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ def test_full_build():
|
||||
assert info["HEIF"]
|
||||
assert info["encoders"]
|
||||
assert info["decoders"]
|
||||
- expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.8")
|
||||
+ expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.20.1")
|
||||
if expected_version:
|
||||
assert info["libheif"] == expected_version
|
||||
|
||||
@@ -118,7 +118,7 @@ def test_light_build():
|
||||
assert not info["AVIF"]
|
||||
assert not info["HEIF"]
|
||||
assert info["decoders"]
|
||||
- expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.8")
|
||||
+ expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.20.1")
|
||||
if expected_version:
|
||||
assert info["libheif"] == expected_version
|
||||
|
||||
--- a/tests/read_test.py
|
||||
+++ b/tests/read_test.py
|
||||
@@ -533,14 +533,16 @@ def test_invalid_decoder():
|
||||
pillow_heif.options.PREFERRED_DECODER["HEIF"] = ""
|
||||
|
||||
|
||||
-@pytest.mark.skipif(
|
||||
- parse_version(pillow_heif.libheif_version()) < parse_version("1.19.7"), reason="Requires libheif 1.19.7."
|
||||
-)
|
||||
-def test_200_megapixels():
|
||||
- with pytest.raises(RuntimeError):
|
||||
- _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
|
||||
- try:
|
||||
- pillow_heif.options.DISABLE_SECURITY_LIMITS = True
|
||||
- _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
|
||||
- finally:
|
||||
- pillow_heif.options.DISABLE_SECURITY_LIMITS = False
|
||||
+# to-do: looks like we need now image with 400MP size to hit the security limits :(
|
||||
+#
|
||||
+# @pytest.mark.skipif(
|
||||
+# parse_version(pillow_heif.libheif_version()) < parse_version("1.19.7"), reason="Requires libheif 1.19.7"
|
||||
+# )
|
||||
+# def test_200_megapixels():
|
||||
+# with pytest.raises(RuntimeError):
|
||||
+# _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
|
||||
+# try:
|
||||
+# pillow_heif.options.DISABLE_SECURITY_LIMITS = True
|
||||
+# _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
|
||||
+# finally:
|
||||
+# pillow_heif.options.DISABLE_SECURITY_LIMITS = False
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'python3-pillow_heif'
|
||||
pkgname=python3-pillow_heif
|
||||
version=0.22.0
|
||||
version=1.0.0
|
||||
revision=1
|
||||
build_style=python3-module
|
||||
hostmakedepends="python3-setuptools"
|
||||
|
@ -13,7 +13,7 @@ license="BSD-3-Clause"
|
|||
homepage="https://github.com/bigcat88/pillow_heif"
|
||||
changelog="https://raw.githubusercontent.com/bigcat88/pillow_heif/master/CHANGELOG.md"
|
||||
distfiles="${PYPI_SITE}/p/pillow_heif/pillow_heif-${version}.tar.gz"
|
||||
checksum=61d473929340d3073722f6316b7fbbdb11132faa6bac0242328e8436cc55b39a
|
||||
checksum=0df7a1fb29bd55bc77fd286195eeb02604e356a5da3d5e8786129b91263b99e2
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE.txt
|
||||
|
|
Loading…
Add table
Reference in a new issue