kumquat-buildroot/package/samba4/0004-cross_compile-fix.patch
Bernd Kuhls a3d20b86d2 package/samba4: bump version to 4.10.6
Release notes: https://www.samba.org/samba/history/samba-4.10.6.html

Updated and rebased patch 0002, added various cross-compile patches.

Added python3 support:
https://www.samba.org/samba/history/samba-4.10.0.html
"Samba 4.10 still has support for Python 2, however, Python 3 will be
 used by default, i.e. 'configure' & 'make' will execute using python3."

Renamed json configure option:
c98f997192

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-07-26 22:46:35 +02:00

95 lines
3.6 KiB
Diff

From a197e0cafb276a9b732f914b1f679ebb487b47f1 Mon Sep 17 00:00:00 2001
From: pinglin <pinglin@synology.com>
Date: Tue, 19 Mar 2019 20:46:27 +0800
Subject: [PATCH] cross_compile argument doesn't apply
reproduce:
./configure --cross-compile --cross-answers=XXX
The output log now will show correct cross-answers.
Downloaded from
https://github.com/openwrt/packages/blob/master/net/samba4/patches/003-samba-4-10-cross_compile-fix.patch
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
third_party/waf/waflib/Context.py | 20 ++++++++++++++++++--
third_party/waf/waflib/Tools/c_config.py | 11 +++++++----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/third_party/waf/waflib/Context.py b/third_party/waf/waflib/Context.py
index 3222fb1551c..d1c87512095 100644
--- a/third_party/waf/waflib/Context.py
+++ b/third_party/waf/waflib/Context.py
@@ -359,8 +359,16 @@ class Context(ctx):
encoding = kw.pop('decode_as', default_encoding)
+ exec_args = kw.pop('exec_args', [])
+ if isinstance(cmd, str):
+ cmd = [cmd] + exec_args
+ elif isinstance(cmd, list):
+ cmd = cmd + exec_args
try:
- ret, out, err = Utils.run_process(cmd, kw, cargs)
+ if exec_args:
+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
+ else:
+ ret, out, err = Utils.run_process(cmd, kw, cargs)
except Exception as e:
raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
@@ -438,8 +446,16 @@ class Context(ctx):
encoding = kw.pop('decode_as', default_encoding)
+ exec_args = kw.pop('exec_args', [])
+ if isinstance(cmd, str):
+ cmd = [cmd] + exec_args
+ elif isinstance(cmd, list):
+ cmd = cmd + exec_args
try:
- ret, out, err = Utils.run_process(cmd, kw, cargs)
+ if exec_args:
+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
+ else:
+ ret, out, err = Utils.run_process(cmd, kw, cargs)
except Exception as e:
raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
index 76082152cd9..25e468b0844 100644
--- a/third_party/waf/waflib/Tools/c_config.py
+++ b/third_party/waf/waflib/Tools/c_config.py
@@ -660,20 +660,23 @@ class test_exec(Task.Task):
"""
color = 'PINK'
def run(self):
+ exec_args = Utils.to_list(self.generator.exec_args)
+
if getattr(self.generator, 'rpath', None):
if getattr(self.generator, 'define_ret', False):
- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], exec_args=exec_args)
else:
- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], exec_args=exec_args)
else:
env = self.env.env or {}
env.update(dict(os.environ))
for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
+
if getattr(self.generator, 'define_ret', False):
- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env, exec_args=exec_args)
else:
- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env, exec_args=exec_args)
@feature('test_exec')
@after_method('apply_link')
--
2.17.1