blob: 6de19ad87a5f4f6732bf6cac2b4c376dfea933b0 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From ae7c8d0336381dd4c10e809e9c8926f9deeafeb8 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: 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
Brad Bishop26bdd442019-08-16 17:08:17 -040014index 5ceae344..07863340 100755
Brad Bishop19323692019-04-05 15:28:33 -040015--- a/setup.py
16+++ b/setup.py
Brad Bishop26bdd442019-08-16 17:08:17 -040017@@ -105,7 +105,7 @@ _LIB_IMAGING = (
18 "codec_fd",
19 )
Brad Bishop19323692019-04-05 15:28:33 -040020
21-DEBUG = False
22+DEBUG = True
23
24
25 class DependencyException(Exception):
Brad Bishop26bdd442019-08-16 17:08:17 -040026@@ -396,21 +396,16 @@ class pil_build_ext(build_ext):
Brad Bishop19323692019-04-05 15:28:33 -040027 _add_directory(library_dirs, match.group(1))
28
29 # include, rpath, if set as environment variables:
Brad Bishop26bdd442019-08-16 17:08:17 -040030- for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE"):
Brad Bishop19323692019-04-05 15:28:33 -040031+ 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
Brad Bishop26bdd442019-08-16 17:08:17 -040036- for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB"):
Brad Bishop19323692019-04-05 15:28:33 -040037+ 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
Brad Bishop26bdd442019-08-16 17:08:17 -040050@@ -469,8 +464,6 @@ class pil_build_ext(build_ext):
51 or sys.platform.startswith("gnu")
52 or sys.platform.startswith("freebsd")
53 ):
Brad Bishop19323692019-04-05 15:28:33 -040054- for dirname in _find_library_dirs_ldconfig():
55- _add_directory(library_dirs, dirname)
Brad Bishop26bdd442019-08-16 17:08:17 -040056 if sys.platform.startswith("linux") and os.environ.get(
57 "ANDROID_ROOT", None
58 ):
Brad Bishop19323692019-04-05 15:28:33 -040059--
Brad Bishop26bdd442019-08-16 17:08:17 -0400602.20.1
Brad Bishop19323692019-04-05 15:28:33 -040061