sb: Add support to search for a suitable version of python.

The command python has been removed from upstream python and python2
and python3 is now used. This patch wraps the commands in a shell
script that locates a suitable python to run.

Updates #3537
This commit is contained in:
Chris Johns
2018-10-07 20:59:45 +11:00
parent 8992d20b8c
commit 13f4c37999
27 changed files with 914 additions and 369 deletions

View File

@@ -57,6 +57,8 @@ def load():
'_host_cpu': ('none', 'none', cpu),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', cpu),
'host_includes': ('none', 'convert', '-I%{_usr}/include'),
'host_ldflags': ('none', 'convert', '-L%{_usr}/lib'),
'_usr': ('dir', 'required', '/usr/local'),
'_var': ('dir', 'optional', '/usr/local/var'),
'__bash': ('exe', 'optional', '/usr/local/bin/bash'),
@@ -67,7 +69,7 @@ def load():
'__xz': ('exe', 'optional', '/usr/bin/xz'),
'__make': ('exe', 'required', 'gmake'),
'__patch_opts': ('none', 'none', '-E')
}
}
defines['_build'] = defines['_host']
defines['_build_vendor'] = defines['_host_vendor']
@@ -110,7 +112,7 @@ def load():
#
# Fix the mess iconv is on FreeBSD 10.0.
#
defines['iconv_includes'] = ('none', 'none', '-I/usr/local/include -L/usr/local/lib')
defines['iconv_includes'] = ('none', 'none', '%{_host_includes} %{_host_ldflags}')
#
# On 11.0+ makeinfo and install-info have moved to /usr/local/...