kumquat-buildroot/package/python-pillow/0001-Search-pkg-config-system-libs-cflags.patch
James Hilliard 10664068b9 package/python-pillow: fix pkg-config search paths
Currently pillow doesn't correctly search pkg-config system paths
for some libraries which can prevent some libraries from being
properly detected/enabled in pillow.

This is due to pillow implementing custom header validation
checks which need system paths present to function correctly:
https://github.com/python-pillow/Pillow/blob/9.0.1/setup.py#L633

Removed custom BUILD_CMDS and INSTALL_TARGET_CMDS which were
causing python-pillow to be installed for the host, they are
not required, we just need to set build_ext at the start
of PYTHON_PILLOW_BUILD_OPTS instead.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-03 22:13:17 +02:00

34 lines
1.2 KiB
Diff

From 9ea46247048f861f088f09541cd434aeb16e6f9c Mon Sep 17 00:00:00 2001
From: James Hilliard <james.hilliard1@gmail.com>
Date: Tue, 15 Mar 2022 23:31:59 -0600
Subject: [PATCH] Search pkg-config system libs/cflags.
We need to search the system paths as well from pkg-config for
some packages to be found properly.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[james.hilliard1@gmail.com: backport from upstream commit
9ea46247048f861f088f09541cd434aeb16e6f9c]
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 9a05e5105..d41aedbd6 100755
--- a/setup.py
+++ b/setup.py
@@ -252,8 +252,8 @@ def _cmd_exists(cmd):
def _pkg_config(name):
try:
command = os.environ.get("PKG_CONFIG", "pkg-config")
- command_libs = [command, "--libs-only-L", name]
- command_cflags = [command, "--cflags-only-I", name]
+ command_libs = [command, "--libs-only-L", "--keep-system-libs", name]
+ command_cflags = [command, "--cflags-only-I", "--keep-system-cflags", name]
if not DEBUG:
command_libs.append("--silence-errors")
command_cflags.append("--silence-errors")
--
2.25.1