diff --git a/dev-python/pillow-heif/Manifest b/dev-python/pillow-heif/Manifest new file mode 100644 index 0000000000..23bec0d69d --- /dev/null +++ b/dev-python/pillow-heif/Manifest @@ -0,0 +1 @@ +DIST pillow_heif-0.15.0.tar.gz 14896461 BLAKE2B 0a92a31542fbd49ef87fe81208f66d9b725ae0c5c4d4194fa737dcf9fbd76898b9132e81cc843da583898d406bbc451c3cd991e6141c6c327f86d4305432fe49 SHA512 1025a987148d1785da02c9ffc19b3ab0ec9e44cafb10ff3cb3231ecb7c3f22c968e5b3583ed0c386a7747333562bf86fdfe4caf21599bc1c2942da6a27363fbb diff --git a/dev-python/pillow-heif/files/pillow-heif-0.15.0-respect-cflags.patch b/dev-python/pillow-heif/files/pillow-heif-0.15.0-respect-cflags.patch new file mode 100644 index 0000000000..0a3c021348 --- /dev/null +++ b/dev-python/pillow-heif/files/pillow-heif-0.15.0-respect-cflags.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -206,7 +206,7 @@ + self._add_directory(library_dirs, "/usr/lib") + self._add_directory(library_dirs, "/lib") + +- self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-Ofast", "-Werror"]) ++ self._update_extension("_pillow_heif", ["heif"]) + + self.compiler.library_dirs = library_dirs + self.compiler.library_dirs + self.compiler.include_dirs = include_dirs + self.compiler.include_dirs diff --git a/dev-python/pillow-heif/metadata.xml b/dev-python/pillow-heif/metadata.xml new file mode 100644 index 0000000000..2573a5e869 --- /dev/null +++ b/dev-python/pillow-heif/metadata.xml @@ -0,0 +1,12 @@ + + + + + pastalian46@gmail.com + Takuya Wakazono + + + bigcat88/pillow_heif + pillow-heif + + diff --git a/dev-python/pillow-heif/pillow-heif-0.15.0.ebuild b/dev-python/pillow-heif/pillow-heif-0.15.0.ebuild new file mode 100644 index 0000000000..25bf53fd91 --- /dev/null +++ b/dev-python/pillow-heif/pillow-heif-0.15.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) +inherit distutils-r1 pypi + +DESCRIPTION="Python interface for libheif library" +HOMEPAGE=" + https://github.com/bigcat88/pillow_heif + https://pypi.org/project/pillow-heif/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + !test? ( + dev-python/pillow[${PYTHON_USEDEP}] + media-libs/libheif:= + ) + test? ( + dev-python/pillow[webp,${PYTHON_USEDEP}] + media-libs/libheif:=[x265] + ) +" + +PATCHES=( "${FILESDIR}/${P}-respect-cflags.patch" ) + +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + sed -i "s/=get_version()/=\"${PV}\"/" setup.py || die +}