Hi ports --

Here's a diff to update lang/nim to its latest release.
An important difference is in how nim interacts with the C compiler. Previously, we were trying to get nim to use egcc in places, though looking at the code now I'm not entirely sure we were successful at this. There's no reason to do this now that clang is in base since nim is only for amd64 and i386.

This works here. I'm hesitantly taking MAINTAINER on this.

OK?

~Brian

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/nim/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile	2 Dec 2017 21:39:49 -0000	1.7
+++ Makefile	27 Apr 2018 20:30:31 -0000
@@ -4,27 +4,29 @@ ONLY_FOR_ARCHS =	i386 amd64
 
 COMMENT =		statically typed, imperative programming language
 
-VERSION =		0.16.0
+VERSION =		0.18.0
 DISTNAME =		nim-${VERSION}
 EXTRACT_SUFX =		.tar.xz
 
 CATEGORIES =		lang
 
-HOMEPAGE =		http://nim-lang.org/
-MASTER_SITES =		http://nim-lang.org/download/ \
-			https://download.tuxfamily.org/jod/lang/nim/
+HOMEPAGE =		https://nim-lang.org/
+MAINTAINER =		Brian Callahan <[email protected]>
 
 # MIT
 PERMIT_PACKAGE_CDROM =	Yes
 
-WANTLIB =		c m
+WANTLIB += c m
+
+MASTER_SITES =		https://nim-lang.org/download/ \
+			https://download.tuxfamily.org/jod/lang/nim/
 
-post-patch:
+pre-configure:
 	mkdir -p ${WRKSRC}/nimcache-port
 	mkdir -p ${WRKSRC}/nimcache-port-test
-	perl -i -pe "s#NIM_PORT_PATH#${PATH}#" ${WRKSRC}/koch.nim
-	perl -i -pe "s#NIM_PORT_CACHE#${WRKSRC}/nimcache-port-test#" \
-		${WRKSRC}/koch.nim
+	sed -i -e "s,NIM_PORT_PATH,${PATH},g" \
+		-e "s,NIM_PORT_CACHE,${WRKSRC}/nimcache-port-test,g" \
+			${WRKSRC}/koch.nim
 
 do-build:
 	cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/nim/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo	9 Jan 2017 10:32:33 -0000	1.4
+++ distinfo	27 Apr 2018 20:30:31 -0000
@@ -1,2 +1,2 @@
-SHA256 (nim-0.16.0.tar.xz) = nhmYI75Hy6VeYt1pgvAs8KrXMvNpeZ/sQqTYwiZcUWc=
-SIZE (nim-0.16.0.tar.xz) = 2907076
+SHA256 (nim-0.18.0.tar.xz) = RcdK2zXwjfqa3RESrhczDl2QLrtKNucEbK7ot55vO9A=
+SIZE (nim-0.18.0.tar.xz) = 4415048
Index: patches/patch-build_sh
===================================================================
RCS file: /cvs/ports/lang/nim/patches/patch-build_sh,v
retrieving revision 1.2
diff -u -p -r1.2 patch-build_sh
--- patches/patch-build_sh	15 Jun 2016 00:19:59 -0000	1.2
+++ patches/patch-build_sh	27 Apr 2018 20:30:31 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-build_sh,v 1.2 2016/06/15 00:19:59 juanfra Exp $
---- build.sh.orig	Tue Jun  7 00:38:53 2016
-+++ build.sh	Thu Jun  9 19:43:03 2016
-@@ -26,9 +26,9 @@ do
+Index: build.sh
+--- build.sh.orig
++++ build.sh
+@@ -38,9 +38,9 @@ do
    esac
  done
  
Index: patches/patch-compiler_extccomp_nim
===================================================================
RCS file: /cvs/ports/lang/nim/patches/patch-compiler_extccomp_nim,v
retrieving revision 1.3
diff -u -p -r1.3 patch-compiler_extccomp_nim
--- patches/patch-compiler_extccomp_nim	9 Jan 2017 10:32:33 -0000	1.3
+++ patches/patch-compiler_extccomp_nim	27 Apr 2018 20:30:31 -0000
@@ -1,16 +1,8 @@
 $OpenBSD: patch-compiler_extccomp_nim,v 1.3 2017/01/09 10:32:33 juanfra Exp $
---- compiler/extccomp.nim.orig	Sun Jan  8 21:33:43 2017
-+++ compiler/extccomp.nim	Mon Jan  9 02:22:00 2017
-@@ -21,7 +21,7 @@ import
- type
-   TSystemCC* = enum
-     ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
--    ccTcc, ccPcc, ccUcc, ccIcl, asmFasm
-+    ccTcc, ccPcc, ccUcc, ccIcl, asmFasm, ccEGcc
-   TInfoCCProp* = enum         # properties of the C compiler:
-     hasSwitchRange,           # CC allows ranges in switch statements (GNU C)
-     hasComputedGoto,          # CC has computed goto (GNU C extension)
-@@ -69,8 +69,8 @@ compiler gcc:
+Index: compiler/extccomp.nim
+--- compiler/extccomp.nim.orig
++++ compiler/extccomp.nim
+@@ -68,8 +68,8 @@ compiler gcc:
    result = (
      name: "gcc",
      objExt: "o",
@@ -21,27 +13,3 @@ $OpenBSD: patch-compiler_extccomp_nim,v 
      compilerExe: "gcc",
      cppCompiler: "g++",
      compileTmpl: "-c $options $include -o $objfile $file",
-@@ -90,6 +90,13 @@ compiler gcc:
-     props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
-             hasAttribute})
- 
-+compiler egcc:
-+    result = gcc()
-+
-+    result.name = "egcc"
-+    result.compilerExe = "egcc"
-+    result.cppCompiler = "eg++"
-+
- # LLVM Frontend for GCC/G++
- compiler llvmGcc:
-   result = gcc() # Uses settings from GCC
-@@ -359,7 +366,8 @@ const
-     pcc(),
-     ucc(),
-     icl(),
--    fasm()]
-+    fasm(),
-+    egcc()]
- 
-   hExt* = ".h"
- 
Index: patches/patch-config_nim_cfg
===================================================================
RCS file: /cvs/ports/lang/nim/patches/patch-config_nim_cfg,v
retrieving revision 1.3
diff -u -p -r1.3 patch-config_nim_cfg
--- patches/patch-config_nim_cfg	9 Jan 2017 10:32:33 -0000	1.3
+++ patches/patch-config_nim_cfg	27 Apr 2018 20:30:31 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-config_nim_cfg,v 1.3 2017/01/09 10:32:33 juanfra Exp $
---- config/nim.cfg.orig	Sun Jan  8 21:33:42 2017
-+++ config/nim.cfg	Mon Jan  9 02:28:32 2017
-@@ -76,7 +76,7 @@ path="$lib/pure"
+Index: config/nim.cfg
+--- config/nim.cfg.orig
++++ config/nim.cfg
+@@ -84,7 +84,7 @@ path="$lib/pure"
    @end
    @if bsd or haiku:
      # BSD got posix_spawn only recently, so we deactivate it for osproc:
@@ -10,16 +11,16 @@ $OpenBSD: patch-config_nim_cfg,v 1.3 201
      # at least NetBSD has problems with thread local storage:
      tlsEmulation:on
    @end
-@@ -112,6 +112,8 @@ path="$lib/pure"
- @else:
-   gcc.options.always = "-w"
-   gcc.cpp.options.always = "-w -fpermissive"
-+  egcc.options.always = "-w"
-+  egpp.options.alaways = "-w -fpermissive"
+@@ -123,7 +123,7 @@ path="$lib/pure"
+   @end
  @end
  
- # Configuration for Objective-C compiler:
-@@ -155,18 +157,23 @@ clang.objc.options.linker = "-lobjc -lgnustep-base"
+-@if macosx or freebsd:
++@if macosx or freebsd or openbsd:
+   cc = clang
+   tlsEmulation:on
+   gcc.options.always = "-w"
+@@ -177,14 +177,14 @@ clang.objc.options.linker = "-lobjc -lgnustep-base"
    gcc.options.linker %= "-L $WIND_BASE/target/lib/usr/lib/ppc/PPC32/common -mrtp -fno-strict-aliasing -D_C99 -D_HAS_C9X -std=c99 -fasm -Wall -Wno-write-strings"
  @end
  
@@ -36,16 +37,7 @@ $OpenBSD: patch-config_nim_cfg,v 1.3 201
  gcc.cpp.options.size = "-Os"
  gcc.cpp.options.debug = "-g3 -O0"
  #passl = "-pg"
- 
-+# Configuration for the OpenBSD ports GCC compiler:
-+egcc.options.speed = "-O2 -fno-strict-aliasing"
-+egcc.options.size = "-Os"
-+egcc.options.debug = "-g3 -O0"
-+
- # Configuration for the LLVM GCC compiler:
- llvm_gcc.options.debug = "-g"
- llvm_gcc.options.always = "-w"
-@@ -176,7 +183,7 @@ llvm_gcc.options.size = "-Os"
+@@ -198,7 +198,7 @@ llvm_gcc.options.size = "-Os"
  # Configuration for the LLVM CLang compiler:
  clang.options.debug = "-g"
  clang.options.always = "-w"
Index: patches/patch-koch_nim
===================================================================
RCS file: /cvs/ports/lang/nim/patches/patch-koch_nim,v
retrieving revision 1.2
diff -u -p -r1.2 patch-koch_nim
--- patches/patch-koch_nim	9 Jan 2017 10:32:33 -0000	1.2
+++ patches/patch-koch_nim	27 Apr 2018 20:30:31 -0000
@@ -1,12 +1,13 @@
 $OpenBSD: patch-koch_nim,v 1.2 2017/01/09 10:32:33 juanfra Exp $
---- koch.nim.orig	Sun Jan  8 21:33:42 2017
-+++ koch.nim	Mon Jan  9 03:15:50 2017
-@@ -393,7 +393,7 @@ proc tests(args: string) =
-   nimexec "cc --taintMode:on tests/testament/tester"
+Index: koch.nim
+--- koch.nim.orig
++++ koch.nim
+@@ -444,7 +444,7 @@ proc tests(args: string) =
+   nimexec "cc --taintMode:on --opt:speed tests/testament/tester"
    # Since tests take a long time (on my machine), and we want to defy Murhpys
    # law - lets make sure the compiler really is freshly compiled!
 -  nimexec "c --lib:lib -d:release --opt:speed compiler/nim.nim"
-+  nimexec "c --lib:lib -d:release --opt:speed --listFullPaths --listCmd --putenv:PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:: --nimcache:/usr/write-ports/pobj/nim-0.16.0/nim-0.16.0/nimcache-port-test compiler/nim.nim"
++  nimexec "c --lib:lib -d:release --opt:speed --listFullPaths --listCmd --putenv:PATH=NIM_PORT_PATH --nimcache:NIM_PORT_CACHE compiler/nim.nim"
    let tester = quoteShell(getCurrentDir() / "tests/testament/tester".exe)
    let success = tryExec tester & " " & (args|"all")
    if not existsEnv("TRAVIS") and not existsEnv("APPVEYOR"):
Index: patches/patch-tests_testament_tester_nim
===================================================================
RCS file: /cvs/ports/lang/nim/patches/patch-tests_testament_tester_nim,v
retrieving revision 1.3
diff -u -p -r1.3 patch-tests_testament_tester_nim
--- patches/patch-tests_testament_tester_nim	9 Jan 2017 10:32:33 -0000	1.3
+++ patches/patch-tests_testament_tester_nim	27 Apr 2018 20:30:31 -0000
@@ -7,23 +7,24 @@ nim cc --taintMode:on tests/testament/te
 FAILURE
 Error 1 in . (Makefile:42 'do-test')"
 
---- tests/testament/tester.nim.orig	Sun Jan  8 21:33:43 2017
-+++ tests/testament/tester.nim	Mon Jan  9 02:33:36 2017
+Index: tests/testament/tester.nim
+--- tests/testament/tester.nim.orig
++++ tests/testament/tester.nim
 @@ -12,7 +12,7 @@
  import
    parseutils, strutils, pegs, os, osproc, streams, parsecfg, json,
    marshal, backend, parseopt, specs, htmlgen, browsers, terminal,
--  algorithm, compiler/nodejs, re, times, sets
-+  algorithm, re, times, sets
+-  algorithm, compiler/nodejs, times, sets, md5
++  algorithm, times, sets, md5
  
  const
    resultsFile = "testresults.html"
-@@ -326,7 +326,7 @@ proc testSpec(r: var TResults, test: TTest) =
-       r.addResult(test, expected.outp, "executable not found", reExeNotFound)
-       return
+@@ -344,7 +344,7 @@ proc testSpec(r: var TResults, test: TTest, target = t
+         r.addResult(test, target, expected.outp, "executable not found", reExeNotFound)
+         continue
  
--    let nodejs = if isJsTarget: findNodeJs() else: ""
-+    let nodejs = if isJsTarget: "" else: ""
-     if isJsTarget and nodejs == "":
-       r.addResult(test, expected.outp, "nodejs binary not in PATH",
-                   reExeNotFound)
+-      let nodejs = if isJsTarget: findNodeJs() else: ""
++      let nodejs = if isJsTarget: "" else: ""
+       if isJsTarget and nodejs == "":
+         r.addResult(test, target, expected.outp, "nodejs binary not in PATH",
+                     reExeNotFound)
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/nim/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST	9 Jan 2017 10:32:33 -0000	1.3
+++ pkg/PLIST	27 Apr 2018 20:30:31 -0000
@@ -4,17 +4,19 @@
 @bin bin/nim
 lib/nim/
 lib/nim/arch/
-lib/nim/arch/arch.nim
-lib/nim/arch/i386.asm
-lib/nim/arch/ms_amd64.asm
-lib/nim/arch/ms_i386.asm
-lib/nim/arch/unix_amd64.asm
-lib/nim/arch/unix_i386.asm
+lib/nim/arch/x86/
+lib/nim/arch/x86/amd64.S
+lib/nim/arch/x86/i386.S
 lib/nim/core/
+lib/nim/core/allocators.nim
 lib/nim/core/locks.nim
 lib/nim/core/macros.nim
+lib/nim/core/refs.nim
 lib/nim/core/rlocks.nim
+lib/nim/core/seqs.nim
+lib/nim/core/strs.nim
 lib/nim/core/typeinfo.nim
+lib/nim/core/typelayouts.nim
 lib/nim/cycle.h
 lib/nim/deprecated/
 lib/nim/deprecated/core/
@@ -27,6 +29,9 @@ lib/nim/deprecated/pure/ftpclient.nim
 lib/nim/deprecated/pure/parseurl.nim
 lib/nim/deprecated/pure/rawsockets.nim
 lib/nim/deprecated/pure/sockets.nim
+lib/nim/genode_cpp/
+lib/nim/genode_cpp/syslocks.h
+lib/nim/genode_cpp/threads.h
 lib/nim/impure/
 lib/nim/impure/db_mysql.nim
 lib/nim/impure/db_odbc.nim
@@ -42,8 +47,10 @@ lib/nim/impure/rdstdin.nim
 lib/nim/impure/re.nim
 lib/nim/impure/ssl.nim
 lib/nim/js/
+lib/nim/js/asyncjs.nim
 lib/nim/js/dom.nim
 lib/nim/js/jsconsole.nim
+lib/nim/js/jsffi.nim
 lib/nim/nimbase.h
 lib/nim/nimrtl.nim
 lib/nim/nimrtl.nim.cfg
@@ -54,26 +61,35 @@ lib/nim/packages/docutils/highlite.nim
 lib/nim/packages/docutils/rst.nim
 lib/nim/packages/docutils/rstast.nim
 lib/nim/packages/docutils/rstgen.nim
+lib/nim/packages/fsmonitor.nim
 lib/nim/posix/
 lib/nim/posix/epoll.nim
 lib/nim/posix/inotify.nim
 lib/nim/posix/kqueue.nim
 lib/nim/posix/linux.nim
 lib/nim/posix/posix.nim
+lib/nim/posix/posix_linux_amd64.nim
+lib/nim/posix/posix_linux_amd64_consts.nim
+lib/nim/posix/posix_other.nim
+lib/nim/posix/posix_other_consts.nim
 lib/nim/posix/termios.nim
 lib/nim/prelude.nim
 lib/nim/pure/
+lib/nim/pure/.DS_Store
+lib/nim/pure/._.DS_Store
 lib/nim/pure/algorithm.nim
+lib/nim/pure/async.nim
 lib/nim/pure/asyncdispatch.nim
 lib/nim/pure/asyncdispatch.nim.cfg
 lib/nim/pure/asyncfile.nim
 lib/nim/pure/asyncftpclient.nim
+lib/nim/pure/asyncfutures.nim
 lib/nim/pure/asynchttpserver.nim
 lib/nim/pure/asyncmacro.nim
 lib/nim/pure/asyncnet.nim
+lib/nim/pure/asyncstreams.nim
 lib/nim/pure/base64.nim
-lib/nim/pure/basic2d.nim
-lib/nim/pure/basic3d.nim
+lib/nim/pure/bitops.nim
 lib/nim/pure/browsers.nim
 lib/nim/pure/cgi.nim
 lib/nim/pure/collections/
@@ -103,17 +119,16 @@ lib/nim/pure/concurrency/threadpool.nim.
 lib/nim/pure/cookies.nim
 lib/nim/pure/coro.nim
 lib/nim/pure/coro.nimcfg
+lib/nim/pure/cstrutils.nim
 lib/nim/pure/db_common.nim
 lib/nim/pure/distros.nim
 lib/nim/pure/dynlib.nim
 lib/nim/pure/encodings.nim
 lib/nim/pure/endians.nim
-lib/nim/pure/etcpriv.nim
+lib/nim/pure/endians.nim.orig
 lib/nim/pure/events.nim
 lib/nim/pure/fenv.nim
-lib/nim/pure/fsmonitor.nim
 lib/nim/pure/future.nim
-lib/nim/pure/gentabs.nim
 lib/nim/pure/hashes.nim
 lib/nim/pure/htmlgen.nim
 lib/nim/pure/htmlparser.nim
@@ -121,14 +136,16 @@ lib/nim/pure/httpclient.nim
 lib/nim/pure/httpcore.nim
 lib/nim/pure/httpserver.nim
 lib/nim/pure/includes/
-lib/nim/pure/includes/asyncfutures.nim
-lib/nim/pure/ioselectors.nim
+lib/nim/pure/includes/asynccommon.nim
+lib/nim/pure/includes/osenv.nim
+lib/nim/pure/includes/oserr.nim
 lib/nim/pure/ioselects/
 lib/nim/pure/ioselects/ioselectors_epoll.nim
 lib/nim/pure/ioselects/ioselectors_kqueue.nim
 lib/nim/pure/ioselects/ioselectors_poll.nim
 lib/nim/pure/ioselects/ioselectors_select.nim
 lib/nim/pure/json.nim
+lib/nim/pure/lenientops.nim
 lib/nim/pure/lexbase.nim
 lib/nim/pure/logging.nim
 lib/nim/pure/marshal.nim
@@ -143,7 +160,6 @@ lib/nim/pure/net.nim
 lib/nim/pure/nimprof.nim
 lib/nim/pure/nimprof.nim.cfg
 lib/nim/pure/nimtracker.nim
-lib/nim/pure/numeric.nim
 lib/nim/pure/oids.nim
 lib/nim/pure/options.nim
 lib/nim/pure/os.nim
@@ -158,19 +174,19 @@ lib/nim/pure/parsesql.nim
 lib/nim/pure/parseutils.nim
 lib/nim/pure/parsexml.nim
 lib/nim/pure/pegs.nim
-lib/nim/pure/poly.nim
 lib/nim/pure/punycode.nim
 lib/nim/pure/random.nim
 lib/nim/pure/rationals.nim
-lib/nim/pure/romans.nim
 lib/nim/pure/ropes.nim
 lib/nim/pure/scgi.nim
 lib/nim/pure/securehash.nim
+lib/nim/pure/segfaults.nim
 lib/nim/pure/selectors.nim
 lib/nim/pure/smtp.nim
 lib/nim/pure/smtp.nim.cfg
 lib/nim/pure/stats.nim
 lib/nim/pure/streams.nim
+lib/nim/pure/strformat.nim
 lib/nim/pure/strmisc.nim
 lib/nim/pure/strscans.nim
 lib/nim/pure/strtabs.nim
@@ -186,10 +202,13 @@ lib/nim/pure/unidecode/unidecode.dat
 lib/nim/pure/unidecode/unidecode.nim
 lib/nim/pure/unittest.nim
 lib/nim/pure/uri.nim
+lib/nim/pure/volatile.nim
 lib/nim/pure/xmldom.nim
 lib/nim/pure/xmldomparser.nim
 lib/nim/pure/xmlparser.nim
 lib/nim/pure/xmltree.nim
+lib/nim/std/
+lib/nim/std/sha1.nim
 lib/nim/stdlib.nimble
 lib/nim/system/
 lib/nim/system.nim
@@ -213,7 +232,8 @@ lib/nim/system/gc.nim
 lib/nim/system/gc2.nim
 lib/nim/system/gc_common.nim
 lib/nim/system/gc_ms.nim
-lib/nim/system/gc_stack.nim
+lib/nim/system/gc_regions.nim
+lib/nim/system/genodealloc.nim
 lib/nim/system/hti.nim
 lib/nim/system/inclrtl.nim
 lib/nim/system/jssys.nim
@@ -233,27 +253,21 @@ lib/nim/system/sysstr.nim
 lib/nim/system/threads.nim
 lib/nim/system/timers.nim
 lib/nim/system/widestrs.nim
-lib/nim/upcoming/
-lib/nim/upcoming/asyncdispatch.nim
 lib/nim/windows/
 lib/nim/windows/registry.nim
 lib/nim/windows/winlean.nim
 lib/nim/wrappers/
 lib/nim/wrappers/iup.nim
-lib/nim/wrappers/joyent_http_parser.nim
-lib/nim/wrappers/libsvm.nim
-lib/nim/wrappers/libuv.nim
 lib/nim/wrappers/linenoise/
 lib/nim/wrappers/linenoise/LICENSE.txt
 lib/nim/wrappers/linenoise/README.markdown
-lib/nim/wrappers/linenoise/clinenoise.c
-lib/nim/wrappers/linenoise/clinenoise.h
+lib/nim/wrappers/linenoise/linenoise.c
+lib/nim/wrappers/linenoise/linenoise.h
 lib/nim/wrappers/linenoise/linenoise.nim
 lib/nim/wrappers/mysql.nim
 lib/nim/wrappers/odbcsql.nim
 lib/nim/wrappers/openssl.nim
 lib/nim/wrappers/pcre.nim
-lib/nim/wrappers/pdcurses.nim
 lib/nim/wrappers/postgres.nim
 lib/nim/wrappers/sqlite3.nim
 lib/nim/wrappers/tinyc.nim

Reply via email to