3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/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 Normal View History

2017-12-22 14:35:33 +00:00
diff --git a/SConstruct b/SConstruct
index 3ad4d9a..fb02365 100644
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)
@@ -208,9 +205,9 @@ def create_base_env(user_vars):
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
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":