Files
Khem Raj 1f046fc340 python3-pillow-heif: upgrade 1.1.1 -> 1.5.0
Upstream changes (release notes):
 * 1.2.0: dropped Python 3.9; PREFERRED_DECODER must be a valid decoder.
 * 1.3.0: pixel-aspect-ratio (pasp) read/write; free-threaded (no-GIL)
   Python support; fix integer overflow in the encode path leading to a
   heap OOB read (CVE-2026-28231).
 * 1.4.0: track newer bundled libheif/libde265/libx265 (not used here -
   the recipe builds against the system libraries); minimum libheif
   raised to 1.19.0.
 * 1.5.0: grid (tiled) image encoding via options.GRID_TILE_SIZE /
   tile_size, info["tiling"] read-back, and PH_LIBHEIF_CMAKE_ARGS.

Refresh 0001-setup.py-support-cross-compiling.patch for 1.5.0: setup.py
context shifted, so the patch applied with fuzz and failed the patch-fuzz
QA check. Regenerated against 1.5.0 (same STAGING_INCDIR/STAGING_LIBDIR
changes).

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-08-01 11:57:29 -07:00

59 lines
2.4 KiB
Diff

From 98e6831754712221ce030ce8b27e100a3926c543 Mon Sep 17 00:00:00 2001
From: Leon Anavi <leon.anavi@konsulko.com>
Date: Mon, 5 May 2025 16:08:37 +0000
Subject: [PATCH] setup.py: support cross compiling
Refreshed for pillow-heif 1.5.0 (context shifted).
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
setup.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/setup.py b/setup.py
index f6d444d..29b6b4d 100644
--- a/setup.py
+++ b/setup.py
@@ -126,12 +126,12 @@ class PillowHeifBuildExt(build_ext):
self._add_directory(library_dirs, match.group(1))
# include, rpath, if set as environment variables
- for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE"):
+ for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE", "STAGING_INCDIR"):
if k in os.environ:
for d in os.environ[k].split(os.path.pathsep):
self._add_directory(include_dirs, d)
- for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB"):
+ for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB", "STAGING_LIBDIR"):
if k in os.environ:
for d in os.environ[k].split(os.path.pathsep):
self._add_directory(library_dirs, d)
@@ -210,12 +210,15 @@ class PillowHeifBuildExt(build_ext):
)
else: # let's assume it's some kind of linux
# this old code waiting for refactoring, when time comes.
- self._add_directory(include_dirs, "/usr/local/include")
- self._add_directory(include_dirs, "/usr/include")
- self._add_directory(library_dirs, "/usr/local/lib")
- self._add_directory(library_dirs, "/usr/lib64")
- self._add_directory(library_dirs, "/usr/lib")
- self._add_directory(library_dirs, "/lib")
+ include_os_path = os.environ.get("STAGING_INCDIR")
+ if include_os_path:
+ for path in include_os_path.split(os.pathsep):
+ self._add_directory(include_dirs, path)
+
+ lib_os_path = os.environ.get("STAGING_LIBDIR")
+ if lib_os_path:
+ for path in lib_os_path.split(os.pathsep):
+ self._add_directory(library_dirs, path)
self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])
--
2.39.5