mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
75e66b5581
(cherry picked from commit d7117945f5a3edf44b3c71432a8a6a4f94e1d75b)
54 lines
2.3 KiB
Diff
54 lines
2.3 KiB
Diff
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
|
|
index 40f242513..53e1ff26a 100644
|
|
--- a/BuildTools/SCons/SConscript.boot
|
|
+++ b/BuildTools/SCons/SConscript.boot
|
|
@@ -508,6 +508,7 @@ if env.get("distcc", False) :
|
|
if var.startswith("DISTCC_") :
|
|
env["ENV"][var] = os.environ[var]
|
|
|
|
+env["ENV"] = os.environ
|
|
conf_env = env.Clone()
|
|
|
|
Export("env")
|
|
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
|
|
index 70bffbcfe..fef281899 100644
|
|
--- a/BuildTools/SCons/SConstruct
|
|
+++ b/BuildTools/SCons/SConstruct
|
|
@@ -272,7 +272,7 @@ if env.get("try_gconf", True) and env["PLATFORM"] != "win32" and env["PLATFORM"]
|
|
gconf_env = conf_env.Clone()
|
|
conf = Configure(gconf_env, custom_tests = {"CheckPKG": CheckPKG})
|
|
if conf.CheckPKG("gconf-2.0") :
|
|
- gconf_bare_env = Environment()
|
|
+ gconf_bare_env = Environment(ENV = os.environ)
|
|
gconf_bare_env.ParseConfig('pkg-config --cflags gconf-2.0 gobject-2.0 --libs gconf-2.0 gobject-2.0')
|
|
if os.path.basename(env["CXX"]).startswith(("g++", "clang++")) :
|
|
gconf_bare_env["CCFLAGS"] = [("-isystem" + ccflag) for ccflag in gconf_bare_env["CPPPATH"]]
|
|
@@ -634,9 +634,9 @@ hunspell_env.MergeFlags(hunspell_flags)
|
|
env["HAVE_HUNSPELL"] = 0;
|
|
if env.get("hunspell_enable", False) :
|
|
hunspell_conf = Configure(hunspell_env)
|
|
- if hunspell_conf.CheckCXXHeader("hunspell/hunspell.hxx") and hunspell_conf.CheckLib("hunspell") :
|
|
+ if hunspell_conf.CheckCXXHeader("hunspell/hunspell.hxx") and hunspell_conf.CheckLib("hunspell-1.6") :
|
|
env["HAVE_HUNSPELL"] = 1
|
|
- hunspell_flags["LIBS"] = ["hunspell"]
|
|
+ hunspell_flags["LIBS"] = ["hunspell-1.6"]
|
|
env["HUNSPELL_FLAGS"] = hunspell_flags
|
|
hunspell_conf.Finish()
|
|
|
|
diff --git a/BuildTools/SCons/Tools/textfile.py b/BuildTools/SCons/Tools/textfile.py
|
|
index 89f8963dc..b8559f7a6 100644
|
|
--- a/BuildTools/SCons/Tools/textfile.py
|
|
+++ b/BuildTools/SCons/Tools/textfile.py
|
|
@@ -113,7 +113,10 @@ def _action(target, source, env):
|
|
lsep = None
|
|
for s in source:
|
|
if lsep: fd.write(lsep)
|
|
- fd.write(_do_subst(s, subs))
|
|
+ b = _do_subst(s, subs)
|
|
+ if isinstance(b, unicode):
|
|
+ b = b.encode('UTF-8')
|
|
+ fd.write(b)
|
|
lsep = linesep
|
|
fd.close()
|
|
|