diff options
| author | Bartek Rutkowski <robak@FreeBSD.org> | 2015-04-03 20:32:14 +0000 |
|---|---|---|
| committer | Bartek Rutkowski <robak@FreeBSD.org> | 2015-04-03 20:32:14 +0000 |
| commit | dd5e0f907f0e5d0bc118bccffd5ae911374488b0 (patch) | |
| tree | 5f8f30c9be2016db9bb793fb6b39fcfd0a562fe0 /lang/nim/files/patch-compiler-nimconf.nim | |
| parent | xmpp-client is a simple XMPP client written in pure Go. It supports the OTR (diff) | |
lang/nimrod: MOVED to lang/nim and update 0.9.2 -> 0.10.2
- Upstream has renamed the project from 'nimrod' to 'nim'
PR: 199118
Submitted by: Neal Nelson <ports@nicandneal.net>
Diffstat (limited to '')
| -rw-r--r-- | lang/nim/files/patch-compiler-nimconf.nim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lang/nim/files/patch-compiler-nimconf.nim b/lang/nim/files/patch-compiler-nimconf.nim new file mode 100644 index 000000000000..ca534bc348b2 --- /dev/null +++ b/lang/nim/files/patch-compiler-nimconf.nim @@ -0,0 +1,27 @@ +--- compiler/nimconf.nim.orig 2015-04-02 16:30:19.768619132 +0200 ++++ compiler/nimconf.nim 2015-04-02 16:44:18.476742363 +0200 +@@ -215,20 +215,16 @@ + # the UNIX way) + let p = getPrefixDir() + result = joinPath([p, "config", filename]) +- when defined(unix): +- if not existsFile(result): result = joinPath([p, "etc", filename]) +- if not existsFile(result): result = "/etc/" & filename ++ if not existsFile(result): result = joinPath([p, "etc", filename]) ++ if not existsFile(result): result = "/etc/" & filename + + proc loadConfigs*(cfg: string) = + # set default value (can be overwritten): + if libpath == "": + # choose default libpath: + var prefix = getPrefixDir() +- when defined(posix): +- if prefix == "/usr": libpath = "/usr/lib/nim" +- elif prefix == "/usr/local": libpath = "/usr/local/lib/nim" +- else: libpath = joinPath(prefix, "lib") +- else: libpath = joinPath(prefix, "lib") ++ libpath = joinPath(prefix, "lib/nim") ++ if not existsDir(libpath): libpath = joinPath(prefix, "lib") + + if optSkipConfigFile notin gGlobalOptions: + readConfigFile(getSystemConfigPath(cfg)) |
