diff options
author | Leon Anavi <leon.anavi@konsulko.com> | 2025-05-08 09:33:35 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-05-08 00:03:27 -0700 |
commit | 7dd27c20504790eb5090b8732781ae463a99f8b1 (patch) | |
tree | 55fb0286ee389432942738b027c1380e0fd26593 /meta-python | |
parent | 292e40fe97909bcfc961cdfb8dddd92b105063b5 (diff) | |
download | meta-openembedded-7dd27c20504790eb5090b8732781ae463a99f8b1.tar.gz |
python3-pillow-heif: Add recipe
Add recipe for release 0.22.0:
- Boolean pillow_heif.options.DISABLE_SECURITY_LIMITS to bypass
security limit of libheif for the image size.
- libx265 library was updated to the latest 4.1 version.
- libheif was updated from the 1.19.5 to 1.19.7 version.
- AVIF format marked as deprecated and pending for the removal.
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch | 56 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb | 20 |
2 files changed, 76 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch b/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch new file mode 100644 index 0000000000..66cf7a9244 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 98e6831754712221ce030ce8b27e100a3926c543 Mon Sep 17 00:00:00 2001 | ||
2 | From: Leon Anavi <leon.anavi@konsulko.com> | ||
3 | Date: Mon, 5 May 2025 16:08:37 +0000 | ||
4 | Subject: [PATCH] setup.py: support cross compiling | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> | ||
9 | --- | ||
10 | setup.py | 19 +++++++++++-------- | ||
11 | 1 file changed, 11 insertions(+), 8 deletions(-) | ||
12 | |||
13 | diff --git a/setup.py b/setup.py | ||
14 | index 68945e4..67566e8 100644 | ||
15 | --- a/setup.py | ||
16 | +++ b/setup.py | ||
17 | @@ -125,12 +125,12 @@ class PillowHeifBuildExt(build_ext): | ||
18 | self._add_directory(library_dirs, match.group(1)) | ||
19 | |||
20 | # include, rpath, if set as environment variables | ||
21 | - for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE"): | ||
22 | + for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE", "STAGING_INCDIR"): | ||
23 | if k in os.environ: | ||
24 | for d in os.environ[k].split(os.path.pathsep): | ||
25 | self._add_directory(include_dirs, d) | ||
26 | |||
27 | - for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB"): | ||
28 | + for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB", "STAGING_LIBDIR"): | ||
29 | if k in os.environ: | ||
30 | for d in os.environ[k].split(os.path.pathsep): | ||
31 | self._add_directory(library_dirs, d) | ||
32 | @@ -199,12 +199,15 @@ class PillowHeifBuildExt(build_ext): | ||
33 | self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"]) | ||
34 | else: # let's assume it's some kind of linux | ||
35 | # this old code waiting for refactoring, when time comes. | ||
36 | - self._add_directory(include_dirs, "/usr/local/include") | ||
37 | - self._add_directory(include_dirs, "/usr/include") | ||
38 | - self._add_directory(library_dirs, "/usr/local/lib") | ||
39 | - self._add_directory(library_dirs, "/usr/lib64") | ||
40 | - self._add_directory(library_dirs, "/usr/lib") | ||
41 | - self._add_directory(library_dirs, "/lib") | ||
42 | + include_os_path = os.environ.get("STAGING_INCDIR") | ||
43 | + if include_os_path: | ||
44 | + for path in include_os_path.split(os.pathsep): | ||
45 | + self._add_directory(include_dirs, path) | ||
46 | + | ||
47 | + lib_os_path = os.environ.get("STAGING_LIBDIR") | ||
48 | + if lib_os_path: | ||
49 | + for path in lib_os_path.split(os.pathsep): | ||
50 | + self._add_directory(library_dirs, path) | ||
51 | |||
52 | self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"]) | ||
53 | |||
54 | -- | ||
55 | 2.39.5 | ||
56 | |||
diff --git a/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb b/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb new file mode 100644 index 0000000000..7f5dfac702 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "Python interface for libheif library" | ||
2 | HOMEPAGE = "https://github.com/bigcat88/pillow_heif" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b6c07a92aed67c33bc346748d7c7e991" | ||
5 | |||
6 | # While this item does not require it, it depends on libheif which does | ||
7 | LICENSE_FLAGS = "commercial" | ||
8 | |||
9 | PYPI_PACKAGE = "pillow_heif" | ||
10 | |||
11 | inherit pypi python_setuptools_build_meta | ||
12 | |||
13 | SRC_URI += "file://0001-setup.py-support-cross-compiling.patch" | ||
14 | SRC_URI[sha256sum] = "61d473929340d3073722f6316b7fbbdb11132faa6bac0242328e8436cc55b39a" | ||
15 | |||
16 | DEPENDS += "libheif" | ||
17 | |||
18 | RDEPENDS:${PN} += "python3-pillow" | ||
19 | |||
20 | BBCLASSEXTEND = "native nativesdk" | ||