Browse Source

replace some usage of shell.call with shell.new_call

zrythm
Matthew Waters 3 years ago
parent
commit
4ddfdf2157
  1. 9
      cerbero/bootstrap/linux.py
  2. 4
      cerbero/bootstrap/osx.py
  3. 4
      cerbero/bootstrap/windows.py
  4. 8
      cerbero/build/build.py
  5. 2
      cerbero/build/recipe.py
  6. 2
      cerbero/commands/gensdkshell.py
  7. 2
      cerbero/hacks.py
  8. 2
      cerbero/ide/xcode/fwlib.py
  9. 2
      cerbero/packages/debian.py
  10. 17
      cerbero/packages/osx/buildtools.py
  11. 9
      cerbero/packages/osx/bundles.py
  12. 16
      cerbero/packages/osx/packager.py
  13. 2
      cerbero/packages/rpm.py
  14. 6
      cerbero/packages/wix_packager.py
  15. 18
      cerbero/tools/osxrelocator.py
  16. 28
      cerbero/utils/git.py
  17. 7
      cerbero/utils/msbuild.py
  18. 14
      cerbero/utils/shell.py
  19. 4
      recipes-toolchain/binutils.recipe
  20. 3
      recipes-toolchain/mingw-w64-headers.recipe
  21. 6
      recipes-toolchain/mpc.recipe
  22. 4
      recipes/gnustl.recipe
  23. 4
      recipes/libvpx.recipe

9
cerbero/bootstrap/linux.py

@ -21,6 +21,7 @@ from cerbero.bootstrap.bootstrapper import register_bootstrapper @@ -21,6 +21,7 @@ from cerbero.bootstrap.bootstrapper import register_bootstrapper
from cerbero.enums import Platform, Architecture, Distro, DistroVersion
from cerbero.errors import ConfigurationError
from cerbero.utils import shell
from cerbero.utils import messages as m
import subprocess
@ -54,7 +55,9 @@ class UnixBootstrapper (BootstrapperBase): @@ -54,7 +55,9 @@ class UnixBootstrapper (BootstrapperBase):
if self.assume_yes:
tool += ' ' + self.yes_arg;
tool += ' ' + self.command;
shell.call(tool % ' '.join(self.packages))
cmd = tool % ' '.join(self.packages)
m.message("Running command '%s'" % cmd)
shell.new_call(cmd)
class DebianBootstrapper (UnixBootstrapper):
@ -184,8 +187,8 @@ class ArchBootstrapper (UnixBootstrapper): @@ -184,8 +187,8 @@ class ArchBootstrapper (UnixBootstrapper):
has_multilib = True
try:
subprocess.check_output(["pacman", "-Sp", "gcc-multilib"])
except subprocess.CalledProcessError:
shell.check_output (["pacman", "-Sp", "gcc-multilib"])
except CommandError:
has_multilib = False
if self.config.arch == Architecture.X86_64 and has_multilib:

4
cerbero/bootstrap/osx.py

@ -43,9 +43,9 @@ class OSXBootstrapper (BootstrapperBase): @@ -43,9 +43,9 @@ class OSXBootstrapper (BootstrapperBase):
def _install_perl_deps(self):
cpanm_installer = os.path.join(self.config.local_sources, 'cpanm')
shell.call('chmod +x %s' % cpanm_installer)
shell.new_call(['chmod', '+x', cpanm_installer])
# Install XML::Parser, required for intltool
shell.call("sudo %s XML::Parser" % cpanm_installer)
shell.new_call(['sudo', cpanm_installer, 'XML::Parser'])
def register_all():

4
cerbero/bootstrap/windows.py

@ -137,7 +137,7 @@ class WindowsBootstrapper(BootstrapperBase): @@ -137,7 +137,7 @@ class WindowsBootstrapper(BootstrapperBase):
# Otherwise we simply remove the directory and link back the sysroot
else:
shutil.rmtree(mingwdir)
shell.call('ln -s usr/x86_64-w64-mingw32 mingw', sysroot)
shell.symlink('usr/x86_64-w64-mingw32', 'mingw', sysroot)
# In cross-compilation gcc does not create a prefixed cpp
cpp_exe = os.path.join(self.prefix, 'bin', 'cpp.exe')
host_cpp_exe = os.path.join(self.prefix, 'bin', 'x86_64-w64-mingw32-cpp.exe')
@ -160,7 +160,7 @@ class WindowsBootstrapper(BootstrapperBase): @@ -160,7 +160,7 @@ class WindowsBootstrapper(BootstrapperBase):
def install_mingwget_deps(self):
for dep in MINGWGET_DEPS:
shell.call('mingw-get install %s' % dep)
shell.new_call(['mingw-get', 'install', dep])
def fix_bin_deps(self):
# replace /opt/perl/bin/perl in intltool

8
cerbero/build/build.py

@ -474,13 +474,13 @@ class MakefilesBase (Build, ModifyEnvBase): @@ -474,13 +474,13 @@ class MakefilesBase (Build, ModifyEnvBase):
@modify_environment
def clean(self):
self.maybe_add_system_libs(step='clean')
shell.call(self.make_clean, self.make_dir, logfile=self.logfile, env=self.env)
shell.new_call(self.make_clean, self.make_dir, logfile=self.logfile, env=self.env)
@modify_environment
def check(self):
if self.make_check:
self.maybe_add_system_libs(step='check')
shell.call(self.make_check, self.build_dir, logfile=self.logfile, env=self.env)
shell.new_call(self.make_check, self.build_dir, logfile=self.logfile, env=self.env)
class Makefile (MakefilesBase):
@ -969,12 +969,12 @@ class Meson (Build, ModifyEnvBase) : @@ -969,12 +969,12 @@ class Meson (Build, ModifyEnvBase) :
@modify_environment
def clean(self):
self.maybe_add_system_libs(step='clean')
shell.call(self.make_clean, self.meson_dir, logfile=self.logfile, env=self.env)
shell.new_call(self.make_clean, self.meson_dir, logfile=self.logfile, env=self.env)
@modify_environment
def check(self):
self.maybe_add_system_libs(step='check')
shell.call(self.make_check, self.meson_dir, logfile=self.logfile, env=self.env)
shell.new_call(self.make_check, self.meson_dir, logfile=self.logfile, env=self.env)
class BuildType (object):

2
cerbero/build/recipe.py

@ -487,7 +487,7 @@ SOFTWARE LICENSE COMPLIANCE.\n\n''' @@ -487,7 +487,7 @@ SOFTWARE LICENSE COMPLIANCE.\n\n'''
for f in set([get_real_path(x) for x in self.files_list() \
if file_is_bin(x)]):
shell.call('codesign -f -s - ' + f, logfile=self.logfile, env=self.env)
shell.new_call(['codesign', '-f', '-s', '-', f], logfile=self.logfile, env=self.env)
def _install_srcdir_license(self, lfiles, install_dir):
'''

2
cerbero/commands/gensdkshell.py

@ -112,7 +112,7 @@ class GenSdkShell(Command): @@ -112,7 +112,7 @@ class GenSdkShell(Command):
with open(filepath, 'w+') as f:
f.write(SCRIPT_TPL % (envstr, cmd))
shell.call("chmod +x %s" % filepath)
shell.new_call(['chmod', '+x', filepath])
except IOError as ex:
raise FatalError(_("Error creating script: %s" % ex))

2
cerbero/hacks.py

@ -96,7 +96,7 @@ if sys.platform.startswith('win'): @@ -96,7 +96,7 @@ if sys.platform.startswith('win'):
import stat
import shutil
from shutil import rmtree as shutil_rmtree
from cerbero.utils.shell import call as shell_call
from cerbero.utils.shell import new_call as shell_call
def rmtree(path, ignore_errors=False, onerror=None):
'''

2
cerbero/ide/xcode/fwlib.py

@ -218,7 +218,7 @@ class StaticFrameworkLibrary(FrameworkLibrary): @@ -218,7 +218,7 @@ class StaticFrameworkLibrary(FrameworkLibrary):
split_queue = asyncio.Queue()
join_queues = collections.defaultdict(asyncio.Queue)
for thin_arch in archs:
shell.call ('mkdir -p %s' % thin_arch, tmpdir, env=self.env)
os.makedirs (os.path.join (tmpdir, thin_arch))
status = BuildStatusPrinter(archs, m.console_is_interactive())
for lib in libraries:

2
cerbero/packages/debian.py

@ -279,7 +279,7 @@ class DebianPackager(LinuxPackager): @@ -279,7 +279,7 @@ class DebianPackager(LinuxPackager):
shutil.copyfileobj(open(package_shlibs_path, 'r'), f)
f.close()
shell.call('dpkg-buildpackage -rfakeroot -us -uc -D -b', srcdir)
shell.new_call(['dpkg-buildpackage', '-rfakeroot', '-us', '-uc', '-D', '-b'], srcdir)
# we may only have a generated shlibs file if at least we have
# runtime files

17
cerbero/packages/osx/buildtools.py

@ -50,13 +50,13 @@ class PackageBuild(object): @@ -50,13 +50,13 @@ class PackageBuild(object):
'install-location': destination}
if scripts_path is not None:
args['scripts'] = scripts_path
shell.call(self._cmd_with_args(args, output_file))
shell.new_call(self._cmd_with_args(args, output_file))
def _cmd_with_args(self, args, output):
args_str = ''
args_arr = []
for k, v in args.items():
args_str += " --%s '%s'" % (k, v)
return '%s %s %s' % (self.CMD, args_str, output)
args_arr += ['--%s' % (k,), '%s' % (v,)]
return [self.CMD] + args_arr + [output]
class ProductBuild (object):
@ -65,11 +65,10 @@ class ProductBuild (object): @@ -65,11 +65,10 @@ class ProductBuild (object):
CMD = 'productbuild'
def create_app_package(self, app_bundle, output):
shell.call("%s --component %s /Applications %s"
% (self.CMD, app_bundle, output))
shell.new_call([self.CMD, '--component', app_bundle, '/Applications', output])
def create_package(self, distribution, output, package_path=None):
cmd = "%s --distribution %s %s" % (self.CMD, distribution, output)
cmd = [self.CMD, '--distribution', distribution, output]
for p in package_path:
cmd += ' --package-path %s' % p
shell.call(cmd)
cmd += ['--package-path', p]
shell.new_call(cmd)

9
cerbero/packages/osx/bundles.py

@ -126,7 +126,7 @@ class FrameworkBundlePackager(BundlePackagerBase): @@ -126,7 +126,7 @@ class FrameworkBundlePackager(BundlePackagerBase):
vdir = os.path.join('Versions', self.package.sdk_version) #, arch_dir)
rdir = '%s/Resources/' % vdir
shell.call ('mkdir -p %s' % rdir, tmp)
os.makedirs (os.path.join(tmp, rdir), exist_ok=True if target_dir else False)
links = {'Versions/Current': '%s' % self.package.sdk_version,
'Resources': 'Versions/Current/Resources',
@ -150,15 +150,14 @@ class FrameworkBundlePackager(BundlePackagerBase): @@ -150,15 +150,14 @@ class FrameworkBundlePackager(BundlePackagerBase):
# Create all links
for dest, src in links.items():
shell.call ('ln -s %s %s' % (src, dest), tmp)
shell.symlink (src, dest, tmp)
inner_tmp = os.path.join(tmp, vdir)
for dest, src in inner_links.items():
shell.call ('ln -s %s %s' % (src, dest), inner_tmp)
shell.symlink (src, dest, inner_tmp)
# Copy the framework library to Versions/$VERSION/$ARCH/Framework
if self.package.osx_framework_library is not None \
and os.path.exists(os.path.join(self.config.prefix, link)):
shell.call ('mkdir -p %s' % vdir, tmp)
shutil.copy(os.path.join(self.config.prefix, link),
os.path.join(tmp, vdir, name))
return tmp
@ -212,7 +211,7 @@ class ApplicationBundlePackager(object): @@ -212,7 +211,7 @@ class ApplicationBundlePackager(object):
continue
with open(filename, 'w') as f:
f.write(wrapper)
shell.call('chmod +x %s' % filename)
shell.new_call(['chmod', '+x', filename])
else:
# FIXME: We need to copy the binary instead of linking, because
# beeing a different path, @executable_path will be different

16
cerbero/packages/osx/packager.py

@ -343,8 +343,8 @@ class ProductPackage(PackagerBase): @@ -343,8 +343,8 @@ class ProductPackage(PackagerBase):
for p in paths:
shutil.copy(p, workdir)
# Create Disk Image
cmd = 'hdiutil create %s -ov -srcfolder %s' % (dmg_file, workdir)
shell.call(cmd)
cmd = ['hdiutil', 'create', dmg_file, '-ov', '-srcfolder', workdir]
shell.new_call(cmd)
finally:
shutil.rmtree(workdir)
@ -418,7 +418,7 @@ class ApplicationPackage(PackagerBase): @@ -418,7 +418,7 @@ class ApplicationPackage(PackagerBase):
def _add_applications_link(self):
# Create link to /Applications
applications_link = os.path.join(self.approot, 'Applications')
shell.call('ln -s /Applications %s' % applications_link)
shell.symlink('/Applications', applications_link)
def _package_name(self, suffix):
return '%s-%s-%s%s' % (self.package.name, self.package.version,
@ -464,9 +464,8 @@ class ApplicationPackage(PackagerBase): @@ -464,9 +464,8 @@ class ApplicationPackage(PackagerBase):
dmg_file = os.path.join(self.output_dir, '%s-%s-%s.dmg' % (
self.package.app_name, self.package.version, self.config.target_arch))
# Create Disk Image
cmd = 'hdiutil create %s -volname %s -ov -srcfolder %s' % \
(dmg_file, self.package.app_name, self.approot)
shell.call(cmd)
cmd = ['hdiutil', 'create', dmg_file, '-volname', self.package.app_name, '-ov', '-srcfolder', self.approot]
shell.new_call(cmd)
return dmg_file
@ -596,9 +595,8 @@ class IOSPackage(ProductPackage, FrameworkHeadersMixin): @@ -596,9 +595,8 @@ class IOSPackage(ProductPackage, FrameworkHeadersMixin):
shutil.move(pkg_path, dmg_dir)
# Create Disk Image
cmd = 'hdiutil create %s -volname %s -ov -srcfolder %s' % \
(dmg_file, self.package.name, dmg_dir)
shell.call(cmd)
cmd = ['hdiutil', 'create', dmg_file, '-volname', self.package.name, '-ov', '-srcfolder', dmg_dir]
shell.new_call(cmd)
return dmg_file
class Packager(object):

2
cerbero/packages/rpm.py

@ -243,7 +243,7 @@ class RPMPackager(LinuxPackager): @@ -243,7 +243,7 @@ class RPMPackager(LinuxPackager):
if self._rpmbuild_support_nodebuginfo():
extra_options = '--nodebuginfo'
shell.call('rpmbuild -bb %s --buildroot %s/buildroot --target %s %s' % (
shell.new_call('rpmbuild -bb %s --buildroot %s/buildroot --target %s %s' % (
extra_options, tmpdir, target, self.spec_path))
paths = []

6
cerbero/packages/wix_packager.py

@ -302,7 +302,7 @@ class Candle(object): @@ -302,7 +302,7 @@ class Candle(object):
def compile(self, source, output_dir):
self.options['source'] = source
shell.call(self.cmd % self.options, output_dir)
shell.new_call(self.cmd % self.options, output_dir)
return os.path.join(output_dir, source, '.msm')
@ -330,11 +330,11 @@ class Light(object): @@ -330,11 +330,11 @@ class Light(object):
self.options['ext'] = 'msm'
else:
self.options['ext'] = 'msi'
shell.call(self.cmd % self.options, output_dir)
shell.new_call(self.cmd % self.options, output_dir)
msi_file_path = os.path.join(output_dir,
'%(msi)s.%(ext)s' % self.options)
if self.options['wine'] == 'wine':
shell.call('chmod 0755 {}'.format(msi_file_path))
shell.new_call(['chmod', '0755', msi_file_path])
return msi_file_path

18
cerbero/tools/osxrelocator.py

@ -57,8 +57,8 @@ class OSXRelocator(object): @@ -57,8 +57,8 @@ class OSXRelocator(object):
filename = os.path.basename(object_file)
if not (filename.endswith('so') or filename.endswith('dylib')):
return
cmd = '%s -id "%s" "%s"' % (INT_CMD, id, object_file)
shell.call(cmd, fail=False, logfile=self.logfile)
cmd = [INT_CMD, '-id', id, object_file]
shell.new_call(cmd, fail=False, logfile=self.logfile)
def change_libs_path(self, object_file):
depth = len(object_file.split('/')) - len(self.root.split('/')) - 1
@ -71,22 +71,20 @@ class OSXRelocator(object): @@ -71,22 +71,20 @@ class OSXRelocator(object):
if depth > 1:
rpaths += ['@loader_path/..', '@executable_path/..']
for p in rpaths:
cmd = '%s -add_rpath %s "%s"' % (INT_CMD, p, object_file)
shell.call(cmd, fail=False)
cmd = [INT_CMD, '-add_rpath', p, object_file]
shell.new_call(cmd, fail=False)
for lib in self.list_shared_libraries(object_file):
if self.lib_prefix in lib:
new_lib = lib.replace(self.lib_prefix, '@rpath')
cmd = '%s -change "%s" "%s" "%s"' % (INT_CMD, lib, new_lib,
object_file)
shell.call(cmd, fail=False, logfile=self.logfile)
cmd = [INT_CMD, '-change', lib, new_lib, object_file]
shell.new_call(cmd, fail=False, logfile=self.logfile)
def change_lib_path(self, object_file, old_path, new_path):
for lib in self.list_shared_libraries(object_file):
if old_path in lib:
new_path = lib.replace(old_path, new_path)
cmd = '%s -change "%s" "%s" "%s"' % (INT_CMD, lib, new_path,
object_file)
shell.call(cmd, fail=True, logfile=self.logfile)
cmd = [INT_CMD, '-change', lib, new_path, object_path]
shell.new_call(cmd, fail=True, logfile=self.logfile)
def parse_dir(self, dir_path, filters=None):
for dirpath, dirnames, filenames in os.walk(dir_path):

28
cerbero/utils/git.py

@ -32,16 +32,16 @@ def ensure_user_is_set(git_dir, logfile=None): @@ -32,16 +32,16 @@ def ensure_user_is_set(git_dir, logfile=None):
# Set the user configuration for this repository so that Cerbero never warns
# about it or errors out (it errors out with git-for-windows)
try:
shell.call('%s config user.email' % GIT, logfile=logfile)
shell.new_call([GIT, 'config', 'user.email'], logfile=logfile)
except FatalError:
shell.call('%s config user.email "cerbero@gstreamer.freedesktop.org"' %
GIT, git_dir, logfile=logfile)
shell.new_call([GIT, 'config', 'user.email', 'cerbero@gstreamer.freedesktop.org'],
git_dir, logfile=logfile)
try:
shell.call('%s config user.name' % GIT, logfile=logfile)
shell.new_call([GIT, 'config', 'user.name'], logfile=logfile)
except FatalError:
shell.call('%s config user.name "Cerbero Build System"' %
GIT, git_dir, logfile=logfile)
shell.new_call([GIT, 'config', 'user.name', 'Cerbero Build System'],
git_dir, logfile=logfile)
def init(git_dir, logfile=None):
'''
@ -51,7 +51,7 @@ def init(git_dir, logfile=None): @@ -51,7 +51,7 @@ def init(git_dir, logfile=None):
@type git_dir: str
'''
os.makedirs(git_dir, exist_ok=True)
shell.call('%s init' % GIT, git_dir, logfile=logfile)
shell.new_call([GIT, 'init'], git_dir, logfile=logfile)
ensure_user_is_set(git_dir, logfile=logfile)
@ -62,7 +62,7 @@ def clean(git_dir, logfile=None): @@ -62,7 +62,7 @@ def clean(git_dir, logfile=None):
@param git_dir: path of the git repository
@type git_dir: str
'''
return shell.call('%s clean -dfx' % GIT, git_dir, logfile=logfile)
return shell.new_call([GIT, 'clean', '-dfx'], git_dir, logfile=logfile)
def list_tags(git_dir):
@ -218,8 +218,8 @@ async def local_checkout(git_dir, local_git_dir, commit, logfile=None): @@ -218,8 +218,8 @@ async def local_checkout(git_dir, local_git_dir, commit, logfile=None):
@type commit: false
'''
branch_name = 'cerbero_build'
shell.call('%s checkout %s -B %s' % (GIT, commit, branch_name), local_git_dir, logfile=logfile)
shell.call('%s clone %s -s -b %s .' % (GIT, local_git_dir, branch_name),
shell.new_call([GIT, 'checkout', commit, '-B', branch_name], local_git_dir, logfile=logfile)
shell.new_call([GIT, 'clone', local_git_dir, '-s', '-b', branch_name, '.'],
git_dir, logfile=logfile)
ensure_user_is_set(git_dir, logfile=logfile)
await submodules_update(git_dir, local_git_dir, logfile=logfile)
@ -236,9 +236,9 @@ def add_remote(git_dir, name, url, logfile=None): @@ -236,9 +236,9 @@ def add_remote(git_dir, name, url, logfile=None):
@type url: str
'''
try:
shell.call('%s remote add %s %s' % (GIT, name, url), git_dir, logfile=logfile)
shell.new_call([GIT, 'remote', 'add', name, url], git_dir, logfile=logfile)
except:
shell.call('%s remote set-url %s %s' % (GIT, name, url), git_dir, logfile=logfile)
shell.new_call([GIT, 'remote', 'set-url', name, url], git_dir, logfile=logfile)
def check_line_endings(platform):
@ -269,7 +269,7 @@ def init_directory(git_dir, logfile=None): @@ -269,7 +269,7 @@ def init_directory(git_dir, logfile=None):
'''
init(git_dir, logfile=logfile)
try:
shell.call('%s add --force -A .' % GIT, git_dir, logfile=logfile)
shell.new_call([GIT, 'add', '--force', '-A', '.'], git_dir, logfile=logfile)
shell.call('%s commit -m "Initial commit" > /dev/null 2>&1' % GIT,
git_dir, logfile=logfile)
except:
@ -286,4 +286,4 @@ def apply_patch(patch, git_dir, logfile=None): @@ -286,4 +286,4 @@ def apply_patch(patch, git_dir, logfile=None):
@param patch: path of the patch file
@type patch: str
'''
shell.call('%s am --ignore-whitespace %s' % (GIT, patch), git_dir, logfile=logfile)
shell.new_call([GIT, 'am', '--ignore-whitespace', patch], git_dir, logfile=logfile)

7
cerbero/utils/msbuild.py

@ -66,12 +66,11 @@ class MSBuild(object): @@ -66,12 +66,11 @@ class MSBuild(object):
if self.properties['Platform'] == 'Win32':
os.environ['PATH'] = '%s;%s' % (os.environ['PATH'], vs_path)
try:
shell.call('msbuild.exe %s %s /target:%s' %
(self.solution, properties, command), msbuildpath)
shell.new_call(['msbuild.exe', self.solution, *properties, '/target:%s' %
(command,)], msbuildpath)
finally:
os.environ['PATH'] = old_path
def _format_properties(self):
props = ['/property:%s=%s' % (k, v) for k, v in
return ['/property:%s=%s' % (k, v) for k, v in
self.properties.items()]
return ' '.join(props)

14
cerbero/utils/shell.py

@ -705,6 +705,20 @@ def windows_proof_rename(from_name, to_name): @@ -705,6 +705,20 @@ def windows_proof_rename(from_name, to_name):
# Try one last time and throw an error if it fails again
os.rename(from_name, to_name)
def symlink(src, dst, working_dir=None):
prev_wd = os.getcwd()
if working_dir:
os.chdir(working_dir)
try:
os.symlink(src, dst)
except OSError:
# if symlinking fails, copy instead
if os.path.isdir(src):
copy_dir(src, dst)
else:
shutil.copy(src, dst)
finally:
os.chdir(prev_wd)
class BuildStatusPrinter:
def __init__(self, steps, interactive):

4
recipes-toolchain/binutils.recipe

@ -68,7 +68,7 @@ class Recipe(recipe.Recipe): @@ -68,7 +68,7 @@ class Recipe(recipe.Recipe):
async def configure(self):
for d in ['bfd', 'opcodes', 'gas', 'binutils', 'gprof', 'ld']:
shell.call('autoreconf -ivf', os.path.join(self.build_dir, d))
shell.new_call(['autoreconf', '-ivf'], os.path.join(self.build_dir, d))
await super().configure()
def post_install(self):
@ -83,5 +83,5 @@ class Recipe(recipe.Recipe): @@ -83,5 +83,5 @@ class Recipe(recipe.Recipe):
strings = os.path.join(bindir, 'strings')
if os.path.exists(strings):
os.remove(strings)
shell.call('ln -s %s-strings strings' % self.target, bindir)
shell.symlink('%s-strings' % self.target, 'strings', bindir)
super().post_install()

3
recipes-toolchain/mingw-w64-headers.recipe

@ -25,6 +25,5 @@ class Recipe(recipe.Recipe): @@ -25,6 +25,5 @@ class Recipe(recipe.Recipe):
def post_install(self):
if not os.path.exists(os.path.join(self._sysroot, 'mingw')):
shell.call('ln -s usr/%(host)s mingw' \
% {'host': self.host}, self._sysroot)
shell.symlink('usr/%(host)s' % {'host': self.host}, 'mingw', self._sysroot)
super().post_install()

6
recipes-toolchain/mpc.recipe

@ -11,7 +11,7 @@ class Recipe(recipe.Recipe): @@ -11,7 +11,7 @@ class Recipe(recipe.Recipe):
deps = ['mpfr']
async def configure(self):
shell.call('chmod +w config.guess', self.build_dir)
shell.call('chmod +w config.sub', self.build_dir)
shell.call('chmod +w ltmain.sh', self.build_dir)
shell.new_call(['chmod', '+w', 'config.guess'], self.build_dir)
shell.new_call(['chmod', '+w', 'config.sub'], self.build_dir)
shell.new_call(['chmod', '+w', 'ltmain.sh'], self.build_dir)
await super(Recipe, self).configure()

4
recipes/gnustl.recipe

@ -33,9 +33,9 @@ class Recipe(recipe.Recipe): @@ -33,9 +33,9 @@ class Recipe(recipe.Recipe):
# Generate libraries that aren't copied from the NDK
v = DistroVersion.get_android_api_version(self.config.target_distro_version)
if v >= 21:
shell.call(" ".join([self.get_env('AR'), 'rc', os.path.join(libdir, 'libandroid_support.a')]), env=self.env)
shell.new_call([self.get_env('AR'), 'rc', os.path.join(libdir, 'libandroid_support.a')], env=self.env)
if self.config.target_arch != Architecture.ARMv7:
shell.call(" ".join([self.get_env('AR'), 'rc', os.path.join(libdir, 'libunwind.a')]), env=self.env)
shell.new_call([self.get_env('AR'), 'rc', os.path.join(libdir, 'libunwind.a')], env=self.env)
async def install(self):
stl_prefix = os.path.join(self.config.toolchain_prefix, 'sources',

4
recipes/libvpx.recipe

@ -167,7 +167,7 @@ class Recipe(recipe.Recipe): @@ -167,7 +167,7 @@ class Recipe(recipe.Recipe):
# Fixup the id of the dylib
vpx_lib_with_ver = os.path.join(self.config.libdir, 'libvpx.6.dylib')
vpx_lib = os.path.join(self.config.libdir, 'libvpx.dylib')
shell.call(' '.join(['install_name_tool', '-id', vpx_lib_with_ver, vpx_lib]))
shell.call(' '.join(['install_name_tool', '-id', vpx_lib_with_ver, vpx_lib_with_ver]))
shell.new_call(['install_name_tool', '-id', vpx_lib_with_ver, vpx_lib])
shell.new_call(['install_name_tool', '-id', vpx_lib_with_ver, vpx_lib_with_ver])
super().post_install()

Loading…
Cancel
Save