syslinux: install helper programs to the host
[buildroot-gz.git] / package / samba4 / samba4-0004-build-allow-some-python-variable-overrides.patch
blob53ba53ce0a0dc0f55e7a540c4b6102bdff4ea753
1 From fdbdf04a9ab3f3a204e95106c4f8f6729d0bab1a Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Tue, 4 Feb 2014 14:11:52 -0300
4 Subject: [PATCH] build: allow some python variable overrides
6 The python variables (settings) are fetched from a running python
7 interpreter which usually isn't the target one when cross compiling,
8 hence libraries and flags aren't the same and can pollute the target
9 build.
10 Allow some of these variables to be redefined via environment variables
11 in order to aid cross-compiling.
12 According to testing python_LDFLAGS and python_LIBDIR should be enough.
14 Status: upstream for next branch.
16 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
17 ---
18 buildtools/wafadmin/Tools/python.py | 13 +++++++++++++
19 1 file changed, 13 insertions(+)
21 diff --git a/buildtools/wafadmin/Tools/python.py b/buildtools/wafadmin/Tools/python.py
22 index ab1e817..35c61c2 100644
23 --- a/buildtools/wafadmin/Tools/python.py
24 +++ b/buildtools/wafadmin/Tools/python.py
25 @@ -193,6 +193,19 @@ MACOSX_DEPLOYMENT_TARGET = %r
26 """ % (python, python_prefix, python_SO, python_SYSLIBS, python_LDFLAGS, python_SHLIBS,
27 python_LIBDIR, python_LIBPL, INCLUDEPY, Py_ENABLE_SHARED, python_MACOSX_DEPLOYMENT_TARGET))
29 + # Allow some python overrides from env vars for cross-compiling
30 + os_env = dict(os.environ)
32 + override_python_LDFLAGS = os_env.get('python_LDFLAGS', None)
33 + if override_python_LDFLAGS is not None:
34 + conf.log.write("python_LDFLAGS override from environment = %r\n" % (override_python_LDFLAGS))
35 + python_LDFLAGS = override_python_LDFLAGS
37 + override_python_LIBDIR = os_env.get('python_LIBDIR', None)
38 + if override_python_LIBDIR is not None:
39 + conf.log.write("python_LIBDIR override from environment = %r\n" % (override_python_LIBDIR))
40 + python_LIBDIR = override_python_LIBDIR
42 if python_MACOSX_DEPLOYMENT_TARGET:
43 conf.env['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET
44 conf.environ['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET
45 --
46 1.8.3.2