diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-04-22 14:25:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-04-22 14:25:03 +0100 |
commit | 5e8702bcbbed438e6c6cce023e7ef0cc9baa3e02 (patch) | |
tree | b041acef19bb9ae66c228d5c9d34d1e00aeb2b95 /dev-util/scons/files | |
parent | 5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (diff) |
gentoo resync : 22.04.2018
Diffstat (limited to 'dev-util/scons/files')
-rw-r--r-- | dev-util/scons/files/scons-2.5.1-respect-path.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/scons/files/scons-2.5.1-respect-path.patch b/dev-util/scons/files/scons-2.5.1-respect-path.patch new file mode 100644 index 000000000000..d5da07bc980b --- /dev/null +++ b/dev-util/scons/files/scons-2.5.1-respect-path.patch @@ -0,0 +1,34 @@ +Clang/LLVM is installed in an "odd" location (/usr/lib/llvm/<ver>/bin/) +which is added to PATH. Since we cannot know <ver> upfront, it's wrong +to hardcode the PATH at the time of installation else we'd break after a +Clang update. Since Clang is the primary compiler on Darwin, just +extract the relevant path on each invocation. + +--- a/engine/SCons/Platform/posix.py ++++ b/engine/SCons/Platform/posix.py +@@ -87,9 +87,15 @@ + pspawn = piped_env_spawn + # Note that this means that 'escape' is no longer used + ++ with open('@GENTOO_PORTAGE_EPREFIX@/etc/profile.env', 'r') as f: ++ for l in f: ++ if "export PATH=" in l: ++ path = l.split('=')[1].strip("'") ++ break ++ + if 'ENV' not in env: + env['ENV'] = {} +- env['ENV']['PATH'] = '/usr/local/bin:/opt/bin:/bin:/usr/bin' ++ env['ENV']['PATH'] = path + env['OBJPREFIX'] = '' + env['OBJSUFFIX'] = '.o' + env['SHOBJPREFIX'] = '$OBJPREFIX' +@@ -104,7 +110,7 @@ + env['LIBSUFFIXES'] = [ '$LIBSUFFIX', '$SHLIBSUFFIX' ] + env['PSPAWN'] = pspawn + env['SPAWN'] = spawn +- env['SHELL'] = 'sh' ++ env['SHELL'] = '@GENTOO_PORTAGE_EPREFIX@/bin/sh' + env['ESCAPE'] = escape + env['TEMPFILE'] = TempFileMunge + env['TEMPFILEPREFIX'] = '@' |