commit:     49173ab13e9fead409914f4ce6abb567622d246b
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Sat Jun  1 09:59:49 2024 +0000
Commit:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
CommitDate: Sat Jun  1 10:00:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=49173ab1

dev-python/pillow-heif: new package, add 0.15.0

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-python/pillow-heif/Manifest                    |  1 +
 .../files/pillow-heif-0.15.0-respect-cflags.patch  | 11 ++++++
 dev-python/pillow-heif/metadata.xml                | 12 +++++++
 dev-python/pillow-heif/pillow-heif-0.15.0.ebuild   | 39 ++++++++++++++++++++++
 4 files changed, 63 insertions(+)

diff --git a/dev-python/pillow-heif/Manifest b/dev-python/pillow-heif/Manifest
new file mode 100644
index 000000000..23bec0d69
--- /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 000000000..0a3c02134
--- /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 000000000..2573a5e86
--- /dev/null
+++ b/dev-python/pillow-heif/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Takuya Wakazono</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">bigcat88/pillow_heif</remote-id>
+               <remote-id type="pypi">pillow-heif</remote-id>
+       </upstream>
+</pkgmetadata>

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 000000000..25bf53fd9
--- /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
+}

Reply via email to