mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Add a patch so the port no longer requires procfs.
PR: ports/188326 Approved by: Neal Nelson <ports@nicandneal.net> (maintainer)
This commit is contained in:
parent
eb469f31a5
commit
b6021e2573
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=351413
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= nimrod
|
||||
PORTVERSION= 0.9.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://nimrod-code.org/download/
|
||||
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
||||
|
36
lang/nimrod/files/patch-lib-pure-os.nim
Normal file
36
lang/nimrod/files/patch-lib-pure-os.nim
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user