aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2020-08-10 10:35:35 +1000
committerfuzzard <fuzzard@kodi.tv>2020-08-13 19:45:36 +1000
commitf8fda710180892af4fa0ca527e20f2933d2f43b3 (patch)
tree2b6448b193bb4ccf6ee3f43fd1c1009b47140627 /tools
parent63656a2b10b879d411626f114b525ef36777cb7b (diff)
[depends/target] fix build Pillow 7.1.2
Pillow is incorrectly linking native dependencies for zlib due to pkg-config using native pc data. For Darwin systems, correctly set and use SDKROOT for zlib, as we dont build zlib for target platforms.
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/target/pythonmodule-pil/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile
index 99d2e72820..6633c23664 100644
--- a/tools/depends/target/pythonmodule-pil/Makefile
+++ b/tools/depends/target/pythonmodule-pil/Makefile
@@ -14,6 +14,13 @@ PYTHONPATH=$(PREFIX)/lib/python3.7/site-packages/
PILPATH=$(PYTHONPATH)
LDSHARED=$(CC) -shared
+# Clear pkg-config data, as it will pull from Native pkg-config incorrectly
+ifeq ($(CROSS_COMPILING), yes)
+export PKG_CONFIG_PATH=
+export PKG_CONFIG_LIBDIR=${PREFIX}/lib/pkgconfig
+export PKG_CONFIG_SYSROOT_DIR=${SDKROOT}
+endif
+
ifeq ($(OS),android)
PILPATH=$(PREFIX)/share/$(APP_NAME)/addons/script.module.pil
PILPATHLIB=$(PILPATH)/lib
@@ -28,10 +35,11 @@ endif
ifeq (darwin, $(findstring darwin, $(HOST)))
#ensure that only our target ldflags are passed to the python build
LDSHARED=$(CC) -bundle -undefined dynamic_lookup
+ZLIB_ROOT=ZLIB_ROOT="$(SDKROOT)/usr"
endif
BUILD_OPTS=--plat-name $(OS)-$(CPU) --disable-jpeg2000 --disable-webp --disable-imagequant --disable-tiff --disable-webp --disable-webpmux --disable-xcb --disable-lcms --disable-platform-guessing
-CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" CC="$(CC) $(CFLAGS)" LDSHARED="$(LDSHARED)" LDFLAGS="$(LDFLAGS) $(EXTRALDFLAGS)" PYTHONPATH="$(PYTHONPATH)"
+CROSSFLAGS=$(ZLIB_ROOT) PYTHONXCPREFIX="$(PREFIX)" CC="$(CC) $(CFLAGS)" LDSHARED="$(LDSHARED)" LDFLAGS="$(LDFLAGS) $(EXTRALDFLAGS)" PYTHONPATH="$(PYTHONPATH)"
all: .installed-$(PLATFORM)