nixpkgs/pkgs/by-name/rh/rhvoice/honor_nix_environment.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.2 KiB
Diff
Raw Permalink Normal View History

2017-12-22 14:35:33 +00:00
--- a/SConstruct
+++ b/SConstruct
@@ -94,11 +94,8 @@ def CheckWiX(context):
return result
2022-01-16 16:53:09 +00:00
def get_spd_module_dir():
- env = Environment()
- try:
- return env.ParseConfig("pkg-config speech-dispatcher --variable=modulebindir", passthru)
- except:
- return False
+ # cannot write to ${speechd}/libexec/speech-dispatcher-modules
+ return os.path.join(os.environ["out"], "libexec/speech-dispatcher-modules")
2022-01-16 16:53:09 +00:00
def validate_spd_version(key,val,env):
m=re.match(r"^\d+\.\d+",val)
@@ -207,10 +204,10 @@ def create_base_env(user_vars):
env_args["LIBS"]=[]
2017-12-22 14:35:33 +00:00
env_args["package_name"]="RHVoice"
env_args["CPPDEFINES"]=[("RHVOICE","1")]
- env=Environment(**env_args)
2022-01-16 16:53:09 +00:00
- if env["dev"]:
- env["prefix"]=os.path.abspath("local")
- env["RPATH"]=env.Dir("$libdir").abspath
+ env=Environment(ENV = os.environ, **env_args)
2017-12-22 14:35:33 +00:00
+ env.PrependENVPath("PATH", os.environ["PATH"])
+ env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
2022-01-16 16:53:09 +00:00
+ env["RPATH"]=env.Dir("$libdir").abspath
2017-12-22 14:35:33 +00:00
env["package_version"]=get_version(env["release"])
env.Append(CPPDEFINES=("PACKAGE",env.subst(r'\"$package_name\"')))
2022-01-16 16:53:09 +00:00
if env["PLATFORM"]=="win32":