blob: e86293421c6aafd94db03bd7c67cf13ada294cd4 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From a78411402c824668283beb94db4bf7e206a4cf60 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 14 Mar 2019 03:48:10 -0400
4Subject: [PATCH] support cross compiling
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 setup.py | 13 +++----------
11 1 file changed, 3 insertions(+), 10 deletions(-)
12
13diff --git a/setup.py b/setup.py
14index 79f912b..37e5827 100755
15--- a/setup.py
16+++ b/setup.py
17@@ -50,7 +50,7 @@ _LIB_IMAGING = (
18 "ZipEncode", "TiffDecode", "Jpeg2KDecode", "Jpeg2KEncode", "BoxBlur",
19 "QuantPngQuant", "codec_fd")
20
21-DEBUG = False
22+DEBUG = True
23
24
25 class DependencyException(Exception):
26@@ -345,21 +345,16 @@ class pil_build_ext(build_ext):
27 _add_directory(library_dirs, match.group(1))
28
29 # include, rpath, if set as environment variables:
30- for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE'):
31+ for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE', 'STAGING_INCDIR'):
32 if k in os.environ:
33 for d in os.environ[k].split(os.path.pathsep):
34 _add_directory(include_dirs, d)
35
36- for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB'):
37+ for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB', 'STAGING_LIBDIR'):
38 if k in os.environ:
39 for d in os.environ[k].split(os.path.pathsep):
40 _add_directory(library_dirs, d)
41
42- prefix = sysconfig.get_config_var("prefix")
43- if prefix:
44- _add_directory(library_dirs, os.path.join(prefix, "lib"))
45- _add_directory(include_dirs, os.path.join(prefix, "include"))
46-
47 #
48 # add platform directories
49
50@@ -413,8 +408,6 @@ class pil_build_ext(build_ext):
51 elif sys.platform.startswith("linux") or \
52 sys.platform.startswith("gnu") or \
53 sys.platform.startswith("freebsd"):
54- for dirname in _find_library_dirs_ldconfig():
55- _add_directory(library_dirs, dirname)
56 if sys.platform.startswith("linux") and \
57 os.environ.get('ANDROID_ROOT', None):
58 # termux support for android.
59--
602.8.1
61