# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by scripts/Create-CopyPatch. # # T2 SDE: package/.../scons/ranlib-ar.patch # Copyright (C) 2020 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- SCons-4.0.1/SCons/Tool/ar.py.vanilla 2020-09-15 18:33:59.696519625 +0200 +++ SCons-4.0.1/SCons/Tool/ar.py 2020-09-15 18:36:47.284521972 +0200 @@ -36,5 +36,5 @@ import SCons.Defaults import SCons.Tool import SCons.Util - +import os @@ -42,14 +42,14 @@ """Add Builders and construction variables for ar to an Environment.""" SCons.Tool.createStaticLibBuilder(env) - env['AR'] = 'ar' + env['AR'] = os.getenv('AR') or 'ar' env['ARFLAGS'] = SCons.Util.CLVar('rc') env['ARCOM'] = '$AR $ARFLAGS $TARGET $SOURCES' env['LIBPREFIX'] = 'lib' env['LIBSUFFIX'] = '.a' - if env.get('RANLIB',env.Detect('ranlib')) : - env['RANLIB'] = env.get('RANLIB','ranlib') + if env.get('RANLIB',os.getenv('RANLIB')) or env.Detect('ranlib') : + env['RANLIB'] = env.get('RANLIB',os.getenv('RANLIB')) or 'ranlib' env['RANLIBFLAGS'] = SCons.Util.CLVar('') env['RANLIBCOM'] = '$RANLIB $RANLIBFLAGS $TARGET'