diff options
author | tijl <tijl@FreeBSD.org> | 2014-04-17 03:12:50 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-04-17 03:12:50 +0800 |
commit | e9dfbfb4855e83b516ab506735684dc6997e2133 (patch) | |
tree | 336c5dff274a629e3e1f1658d941bd02091042da | |
parent | 65f05164c0eea53feedca1bacd845aa111cf9ea4 (diff) | |
download | freebsd-ports-gnome-e9dfbfb4855e83b516ab506735684dc6997e2133.tar.gz freebsd-ports-gnome-e9dfbfb4855e83b516ab506735684dc6997e2133.tar.zst freebsd-ports-gnome-e9dfbfb4855e83b516ab506735684dc6997e2133.zip |
Add a patch so the port no longer requires procfs.
PR: ports/188326
Approved by: Neal Nelson <ports@nicandneal.net> (maintainer)
-rw-r--r-- | lang/nimrod/Makefile | 1 | ||||
-rw-r--r-- | lang/nimrod/files/patch-lib-pure-os.nim | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/lang/nimrod/Makefile b/lang/nimrod/Makefile index cf0037b57610..ec04f8f98f77 100644 --- a/lang/nimrod/Makefile +++ b/lang/nimrod/Makefile @@ -3,6 +3,7 @@ PORTNAME= nimrod PORTVERSION= 0.9.2 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= http://nimrod-code.org/download/ DISTNAME= ${PORTNAME}_${PORTVERSION} diff --git a/lang/nimrod/files/patch-lib-pure-os.nim b/lang/nimrod/files/patch-lib-pure-os.nim new file mode 100644 index 000000000000..e4b094fd507e --- /dev/null +++ b/lang/nimrod/files/patch-lib-pure-os.nim @@ -0,0 +1,36 @@ +--- lib/pure/os.nim.orig ++++ lib/pure/os.nim +@@ -1389,8 +1389,6 @@ + result = getApplAux("/proc/self/exe") + elif defined(solaris): + result = getApplAux("/proc/" & $getpid() & "/path/a.out") +- elif defined(freebsd): +- result = getApplAux("/proc/" & $getpid() & "/file") + elif defined(macosx): + var size: cuint32 + getExecPath1(nil, size) +@@ -1399,16 +1397,14 @@ + result = "" # error! + else: + # little heuristic that may work on other POSIX-like systems: +- result = string(getEnv("_")) +- if len(result) == 0: +- result = string(ParamStr(0)) +- # POSIX guaranties that this contains the executable +- # as it has been executed by the calling process +- if len(result) > 0 and result[0] != DirSep: # not an absolute path? +- # iterate over any path in the $PATH environment variable +- for p in split(string(getEnv("PATH")), {PathSep}): +- var x = joinPath(p, result) +- if ExistsFile(x): return x ++ result = string(ParamStr(0)) ++ # POSIX guaranties that this contains the executable ++ # as it has been executed by the calling process ++ if len(result) > 0 and result[0] != DirSep: # not an absolute path? ++ # iterate over any path in the $PATH environment variable ++ for p in split(string(getEnv("PATH")), {PathSep}): ++ var x = joinPath(p, result) ++ if ExistsFile(x): return x + + proc getApplicationFilename*(): string {.rtl, extern: "nos$1", deprecated.} = + ## Returns the filename of the application's executable. |