nixpkgs-suyu/pkgs/applications/audio/rhvoice/honor_nix_environment.patch

31 lines
1.2 KiB
Diff

diff --git a/SConstruct b/SConstruct
index 3ad4d9a..fb02365 100644
--- a/SConstruct
+++ b/SConstruct
@@ -94,11 +94,8 @@ def CheckWiX(context):
return result
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")
def validate_spd_version(key,val,env):
m=re.match(r"^\d+\.\d+",val)
@@ -208,9 +205,9 @@ def create_base_env(user_vars):
env_args["package_name"]="RHVoice"
env_args["CPPDEFINES"]=[("RHVOICE","1")]
env=Environment(**env_args)
- if env["dev"]:
- env["prefix"]=os.path.abspath("local")
- env["RPATH"]=env.Dir("$libdir").abspath
+ env.PrependENVPath("PATH", os.environ["PATH"])
+ env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
+ env["RPATH"]=env.Dir("$libdir").abspath
env["package_version"]=get_version(env["release"])
env.Append(CPPDEFINES=("PACKAGE",env.subst(r'\"$package_name\"')))
if env["PLATFORM"]=="win32":