1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

graphics/py-pillow-heif: Add py-pillow-heif 0.13.0

Python bindings to libheif for working with HEIF images and plugin for Pillow.

Features:
- Decoding of 8, 10, 12 bit HEIC and AVIF files.
- Encoding of 8, 10, 12 bit HEIC and AVIF files.
- EXIF, XMP, IPTC read & write support.
- Support of multiple images in one file and a PrimaryImage attribute.
- Adding & removing thumbnails.
- Reading of Depth Images.
- Adding HEIF support to Pillow in one line of code as a plugin.
This commit is contained in:
Po-Chuan Hsieh 2023-10-01 07:26:33 +08:00
parent f0c874797f
commit 5e673607f9
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
6 changed files with 61 additions and 0 deletions

View File

@ -917,6 +917,7 @@
SUBDIR += py-photocollage
SUBDIR += py-piexif
SUBDIR += py-pillow
SUBDIR += py-pillow-heif
SUBDIR += py-pivy
SUBDIR += py-plotly
SUBDIR += py-png

View File

@ -0,0 +1,28 @@
PORTNAME= pillow-heif
PORTVERSION= 0.13.0
CATEGORIES= graphics python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pillow_heif-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Python interface for libheif library
WWW= https://github.com/bigcat88/pillow_heif
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
LIB_DEPENDS= libheif.so:graphics/libheif
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=9.1.1:graphics/py-pillow@${PY_FLAVOR}
USES= localbase python
USE_PYTHON= autoplist concurrent pep517
LDFLAGS+= -lheif
post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1696048422
SHA256 (pillow_heif-0.13.0.tar.gz) = be337495d0be5accf4d6ea6614f61293c40c86dc8d3e5e6eb63661f90f472362
SIZE (pillow_heif-0.13.0.tar.gz) = 14891825

View File

@ -0,0 +1,10 @@
--- pyproject.toml.orig 2023-08-09 12:11:06 UTC
+++ pyproject.toml
@@ -1,6 +1,6 @@
[build-system]
requires = [
- "setuptools>=67.8",
+ "setuptools>=61",
"wheel",
]

View File

@ -0,0 +1,9 @@
--- setup.py.orig 2023-08-09 12:11:06 UTC
+++ setup.py
@@ -142,6 +142,5 @@ if getenv("READTHEDOCS", "False") == "True":
else:
setup(
version=get_version(),
- cmdclass={"build_ext": PillowHeifBuildExt},
ext_modules=[Extension("_pillow_heif", ["pillow_heif/_pillow_heif.c"])],
)

View File

@ -0,0 +1,10 @@
Python bindings to libheif for working with HEIF images and plugin for Pillow.
Features:
- Decoding of 8, 10, 12 bit HEIC and AVIF files.
- Encoding of 8, 10, 12 bit HEIC and AVIF files.
- EXIF, XMP, IPTC read & write support.
- Support of multiple images in one file and a PrimaryImage attribute.
- Adding & removing thumbnails.
- Reading of Depth Images.
- Adding HEIF support to Pillow in one line of code as a plugin.