svn commit: r351413 - in head/lang/nimrod: . files

Tijl Coosemans tijl at FreeBSD.org
Wed Apr 16 19:12:51 UTC 2014


Author: tijl
Date: Wed Apr 16 19:12:50 2014
New Revision: 351413
URL: http://svnweb.freebsd.org/changeset/ports/351413
QAT: https://qat.redports.org/buildarchive/r351413/

Log:
  Add a patch so the port no longer requires procfs.
  
  PR:		ports/188326
  Approved by:	Neal Nelson <ports at nicandneal.net> (maintainer)

Added:
  head/lang/nimrod/files/patch-lib-pure-os.nim   (contents, props changed)
Modified:
  head/lang/nimrod/Makefile

Modified: head/lang/nimrod/Makefile
==============================================================================
--- head/lang/nimrod/Makefile	Wed Apr 16 19:03:10 2014	(r351412)
+++ head/lang/nimrod/Makefile	Wed Apr 16 19:12:50 2014	(r351413)
@@ -3,6 +3,7 @@
 
 PORTNAME=	nimrod
 PORTVERSION=	0.9.2
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	http://nimrod-code.org/download/
 DISTNAME=	${PORTNAME}_${PORTVERSION}

Added: head/lang/nimrod/files/patch-lib-pure-os.nim
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/nimrod/files/patch-lib-pure-os.nim	Wed Apr 16 19:12:50 2014	(r351413)
@@ -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.


More information about the svn-ports-head mailing list