aboutsummaryrefslogtreecommitdiff
path: root/lang/nim
diff options
context:
space:
mode:
authorBartek Rutkowski <robak@FreeBSD.org>2015-04-03 20:32:14 +0000
committerBartek Rutkowski <robak@FreeBSD.org>2015-04-03 20:32:14 +0000
commitdd5e0f907f0e5d0bc118bccffd5ae911374488b0 (patch)
tree5f8f30c9be2016db9bb793fb6b39fcfd0a562fe0 /lang/nim
parentf0e3f4a2366e4c05440097b8c47f320a449d3663 (diff)
downloadports-dd5e0f907f0e5d0bc118bccffd5ae911374488b0.tar.gz
ports-dd5e0f907f0e5d0bc118bccffd5ae911374488b0.zip
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>
Notes
Notes: svn path=/head/; revision=383175
Diffstat (limited to 'lang/nim')
-rw-r--r--lang/nim/Makefile38
-rw-r--r--lang/nim/distinfo2
-rw-r--r--lang/nim/files/patch-build.sh13
-rw-r--r--lang/nim/files/patch-compiler-nimconf.nim27
-rw-r--r--lang/nim/files/patch-config-nim.cfg15
-rw-r--r--lang/nim/files/patch-install.sh47
-rw-r--r--lang/nim/files/patch-lib-posix-posix.nim11
-rw-r--r--lang/nim/files/patch-lib-pure-os.nim12
-rw-r--r--lang/nim/pkg-descr13
-rw-r--r--lang/nim/pkg-plist206
10 files changed, 384 insertions, 0 deletions
diff --git a/lang/nim/Makefile b/lang/nim/Makefile
new file mode 100644
index 000000000000..151b36f59299
--- /dev/null
+++ b/lang/nim/Makefile
@@ -0,0 +1,38 @@
+# Created by: Neal Nelson <ports@nicandneal.net>
+# $FreeBSD$
+
+PORTNAME= nim
+PORTVERSION= 0.10.2
+PORTREVISION= 0
+CATEGORIES= lang
+MASTER_SITES= http://nim-lang.org/download/
+
+MAINTAINER= ports@nicandneal.net
+COMMENT= The Nim programming language
+
+LICENSE= MIT
+
+OPTIONS_DEFINE= DOCS
+
+MAKE_JOBS_UNSAFE= yes
+USES= compiler zip
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if ${COMPILER_TYPE} == clang
+ @${REINPLACE_CMD} -e '/cc =/s/gcc/clang/' ${WRKSRC}/config/nim.cfg
+.endif
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
+ COMP_FLAGS="${CPPFLAGS} ${CFLAGS}" LINK_FLAGS="${LDFLAGS}" \
+ ${SH} build.sh
+ cd ${WRKSRC} && bin/nim c --parallelBuild=${MAKE_JOBS_NUMBER} koch
+ cd ${WRKSRC} && ./koch boot --parallelBuild=${MAKE_JOBS_NUMBER} \
+ -d:release
+
+do-install:
+ cd ${WRKSRC} && ${SH} install.sh ${STAGEDIR}${PREFIX}
+
+.include <bsd.port.post.mk>
diff --git a/lang/nim/distinfo b/lang/nim/distinfo
new file mode 100644
index 000000000000..4e2d95fc71ce
--- /dev/null
+++ b/lang/nim/distinfo
@@ -0,0 +1,2 @@
+SHA256 (nim-0.10.2.zip) = 2fb7986cbceda10992fbe2cf657241cac416991e2e68bc0175f3a8fd387279ca
+SIZE (nim-0.10.2.zip) = 27753779
diff --git a/lang/nim/files/patch-build.sh b/lang/nim/files/patch-build.sh
new file mode 100644
index 000000000000..d48a98e93784
--- /dev/null
+++ b/lang/nim/files/patch-build.sh
@@ -0,0 +1,13 @@
+--- build.sh.orig
++++ build.sh
+@@ -26,10 +26,6 @@
+ esac
+ done
+
+-CC="gcc"
+-LINKER="gcc"
+-COMP_FLAGS="-w -O3 -fno-strict-aliasing$extraBuildArgs"
+-LINK_FLAGS=""
+ # platform detection
+ ucpu=`uname -m`
+ uos=`uname`
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))
diff --git a/lang/nim/files/patch-config-nim.cfg b/lang/nim/files/patch-config-nim.cfg
new file mode 100644
index 000000000000..ac454a2ae4e1
--- /dev/null
+++ b/lang/nim/files/patch-config-nim.cfg
@@ -0,0 +1,15 @@
+--- config/nim.cfg.orig
++++ config/nim.cfg
+@@ -78,12 +78,6 @@
+ clang.options.linker = "-ldl"
+ tcc.options.linker = "-ldl"
+ @end
+- @if bsd or haiku:
+- # BSD got posix_spawn only recently, so we deactivate it for osproc:
+- define:useFork
+- # at least NetBSD has problems with thread local storage:
+- tlsEmulation:on
+- @end
+ @end
+
+ # Configuration for the Intel C/C++ compiler:
diff --git a/lang/nim/files/patch-install.sh b/lang/nim/files/patch-install.sh
new file mode 100644
index 000000000000..b91735d1e083
--- /dev/null
+++ b/lang/nim/files/patch-install.sh
@@ -0,0 +1,47 @@
+--- install.sh.orig
++++ install.sh
+@@ -15,39 +15,14 @@
+ "--help"|"-h"|"help"|"h")
+ echo "Nim installation script"
+ echo "Usage: [sudo] sh install.sh DIR"
+- echo "Where DIR may be:"
+- echo " /usr/bin"
+- echo " /usr/local/bin"
+- echo " /opt"
+- echo " <some other dir> (treated like '/opt')"
+- echo "To deinstall, use the command:"
+- echo "sh deinstall.sh DIR"
+ exit 1
+ ;;
+- "/usr/bin")
+- bindir=/usr/bin
+- configdir=/etc
+- libdir=/usr/lib/nim
+- docdir=/usr/share/nim/doc
+- datadir=/usr/share/nim/data
+- ;;
+- "/usr/local/bin")
+- bindir=/usr/local/bin
+- configdir=/etc
+- libdir=/usr/local/lib/nim
+- docdir=/usr/local/share/nim/doc
+- datadir=/usr/local/share/nim/data
+- ;;
+ *)
+- bindir="$1/nim/bin"
+- configdir="$1/nim/config"
+- libdir="$1/nim/lib"
+- docdir="$1/nim/doc"
+- datadir="$1/nim/data"
+-
+- mkdir -p $1/nim
+- mkdir -p $bindir
+- mkdir -p $configdir
++ bindir="$1/bin"
++ configdir="$1/etc"
++ libdir="$1/lib/nim"
++ docdir="$1/share/doc/nim"
++ datadir="$1/share/nim"
+ ;;
+ esac
+ mkdir -p $libdir
diff --git a/lang/nim/files/patch-lib-posix-posix.nim b/lang/nim/files/patch-lib-posix-posix.nim
new file mode 100644
index 000000000000..516f94637607
--- /dev/null
+++ b/lang/nim/files/patch-lib-posix-posix.nim
@@ -0,0 +1,11 @@
+--- lib/posix/posix.nim.orig
++++ lib/posix/posix.nim
+@@ -453,7 +453,7 @@
+ l_linger*: cint ## Linger time, in seconds.
+
+ TInPort* = int16 ## unsigned!
+- TInAddrScalar* = int32 ## unsigned!
++ TInAddrScalar* {.importc: "u_int32_t", header: "<sys/types.h>", final, pure.} = int32 ## unsigned!
+
+ TInAddrT* {.importc: "in_addr_t", pure, final,
+ header: "<netinet/in.h>".} = int32 ## unsigned!
diff --git a/lang/nim/files/patch-lib-pure-os.nim b/lang/nim/files/patch-lib-pure-os.nim
new file mode 100644
index 000000000000..c72f506e4a0e
--- /dev/null
+++ b/lang/nim/files/patch-lib-pure-os.nim
@@ -0,0 +1,12 @@
+--- lib/pure/os.nim.orig
++++ lib/pure/os.nim
+@@ -1785,8 +1785,7 @@
+ result = getApplAux("/proc/" & $getpid() & "/path/a.out")
+ if result.len == 0: result = getApplHeuristic()
+ elif defined(freebsd):
+- result = getApplAux("/proc/" & $getpid() & "/file")
+- if result.len == 0: result = getApplHeuristic()
++ result = getApplHeuristic()
+ elif defined(macosx):
+ var size: cuint32
+ getExecPath1(nil, size)
diff --git a/lang/nim/pkg-descr b/lang/nim/pkg-descr
new file mode 100644
index 000000000000..79fdfe16c074
--- /dev/null
+++ b/lang/nim/pkg-descr
@@ -0,0 +1,13 @@
+Nim (formerly known as "Nimrod") is a statically typed, imperative
+programming language that tries to give the programmer ultimate power
+without compromises on runtime efficiency. This means it focuses on
+compile-time mechanisms in all their various forms.
+
+Beneath a nice infix/indentation based syntax with a powerful (AST
+based, hygienic) macro system lies a semantic model that supports a soft
+realtime GC on thread local heaps. Asynchronous message passing is used
+between threads, so no "stop the world" mechanism is necessary. An unsafe
+shared memory heap is also provided for the increased efficiency that
+results from that model.
+
+WWW: http://nim-lang.org/
diff --git a/lang/nim/pkg-plist b/lang/nim/pkg-plist
new file mode 100644
index 000000000000..965c775f5aec
--- /dev/null
+++ b/lang/nim/pkg-plist
@@ -0,0 +1,206 @@
+bin/nim
+etc/nim.cfg
+etc/nimdoc.cfg
+etc/nimdoc.tex.cfg
+lib/nim/core/locks.nim
+lib/nim/core/macros.nim
+lib/nim/core/typeinfo.nim
+lib/nim/core/unsigned.nim
+lib/nim/impure/db_mysql.nim
+lib/nim/impure/db_postgres.nim
+lib/nim/impure/db_sqlite.nim
+lib/nim/impure/dialogs.nim
+lib/nim/impure/graphics.nim
+lib/nim/impure/osinfo_posix.nim
+lib/nim/impure/osinfo_win.nim
+lib/nim/impure/rdstdin.nim
+lib/nim/impure/re.nim
+lib/nim/impure/ssl.nim
+lib/nim/impure/zipfiles.nim
+lib/nim/js/dom.nim
+lib/nim/nimbase.h
+lib/nim/nimrtl.nim
+lib/nim/nimrtl.nimrod.cfg
+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/posix/epoll.nim
+lib/nim/posix/inotify.nim
+lib/nim/posix/linux.nim
+lib/nim/posix/posix.nim
+lib/nim/prelude.nim
+lib/nim/pure/actors.nim
+lib/nim/pure/actors.nim.cfg
+lib/nim/pure/algorithm.nim
+lib/nim/pure/asyncdispatch.nim
+lib/nim/pure/asyncdispatch.nimrod.cfg
+lib/nim/pure/asyncfile.nim
+lib/nim/pure/asyncftpclient.nim
+lib/nim/pure/asynchttpserver.nim
+lib/nim/pure/asyncio.nim
+lib/nim/pure/asyncnet.nim
+lib/nim/pure/base64.nim
+lib/nim/pure/basic2d.nim
+lib/nim/pure/basic3d.nim
+lib/nim/pure/browsers.nim
+lib/nim/pure/cgi.nim
+lib/nim/pure/collections/LockFreeHash.nim
+lib/nim/pure/collections/critbits.nim
+lib/nim/pure/collections/intsets.nim
+lib/nim/pure/collections/lists.nim
+lib/nim/pure/collections/queues.nim
+lib/nim/pure/collections/rtarrays.nim
+lib/nim/pure/collections/sequtils.nim
+lib/nim/pure/collections/sets.nim
+lib/nim/pure/collections/tables.nim
+lib/nim/pure/colors.nim
+lib/nim/pure/complex.nim
+lib/nim/pure/concurrency/cpuinfo.nim
+lib/nim/pure/concurrency/cpuload.nim
+lib/nim/pure/concurrency/threadpool.nim
+lib/nim/pure/concurrency/threadpool.nim.cfg
+lib/nim/pure/cookies.nim
+lib/nim/pure/dynlib.nim
+lib/nim/pure/encodings.nim
+lib/nim/pure/endians.nim
+lib/nim/pure/events.nim
+lib/nim/pure/fenv.nim
+lib/nim/pure/fsmonitor.nim
+lib/nim/pure/ftpclient.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
+lib/nim/pure/httpclient.nim
+lib/nim/pure/httpserver.nim
+lib/nim/pure/json.nim
+lib/nim/pure/lexbase.nim
+lib/nim/pure/logging.nim
+lib/nim/pure/marshal.nim
+lib/nim/pure/matchers.nim
+lib/nim/pure/math.nim
+lib/nim/pure/md5.nim
+lib/nim/pure/memfiles.nim
+lib/nim/pure/mersenne.nim
+lib/nim/pure/mimetypes.nim
+lib/nim/pure/net.nim
+lib/nim/pure/nimprof.nim
+lib/nim/pure/nimprof.nimrod.cfg
+lib/nim/pure/numeric.nim
+lib/nim/pure/oids.nim
+lib/nim/pure/os.nim
+lib/nim/pure/osproc.nim
+lib/nim/pure/parsecfg.nim
+lib/nim/pure/parsecsv.nim
+lib/nim/pure/parseopt.nim
+lib/nim/pure/parseopt2.nim
+lib/nim/pure/parsesql.nim
+lib/nim/pure/parseurl.nim
+lib/nim/pure/parseutils.nim
+lib/nim/pure/parsexml.nim
+lib/nim/pure/pegs.nim
+lib/nim/pure/poly.nim
+lib/nim/pure/rawsockets.nim
+lib/nim/pure/rawsockets.pretty.nim
+lib/nim/pure/redis.nim
+lib/nim/pure/romans.nim
+lib/nim/pure/ropes.nim
+lib/nim/pure/scgi.nim
+lib/nim/pure/selectors.nim
+lib/nim/pure/smtp.nim
+lib/nim/pure/smtp.nimrod.cfg
+lib/nim/pure/sockets.nim
+lib/nim/pure/streams.nim
+lib/nim/pure/strtabs.nim
+lib/nim/pure/strutils.nim
+lib/nim/pure/subexes.nim
+lib/nim/pure/terminal.nim
+lib/nim/pure/times.nim
+lib/nim/pure/typetraits.nim
+lib/nim/pure/unicode.nim
+lib/nim/pure/unidecode/unidecode.nim
+lib/nim/pure/unittest.nim
+lib/nim/pure/uri.nim
+lib/nim/pure/xmldom.nim
+lib/nim/pure/xmldomparser.nim
+lib/nim/pure/xmlparser.nim
+lib/nim/pure/xmltree.nim
+lib/nim/system.nim
+lib/nim/system/alloc.nim
+lib/nim/system/ansi_c.nim
+lib/nim/system/arithm.nim
+lib/nim/system/assign.nim
+lib/nim/system/atomics.nim
+lib/nim/system/avltree.nim
+lib/nim/system/cellsets.nim
+lib/nim/system/cgprocs.nim
+lib/nim/system/channels.nim
+lib/nim/system/chcks.nim
+lib/nim/system/debugger.nim
+lib/nim/system/deepcopy.nim
+lib/nim/system/dyncalls.nim
+lib/nim/system/embedded.nim
+lib/nim/system/endb.nim
+lib/nim/system/excpt.nim
+lib/nim/system/gc.nim
+lib/nim/system/gc2.nim
+lib/nim/system/gc_ms.nim
+lib/nim/system/hti.nim
+lib/nim/system/inclrtl.nim
+lib/nim/system/jssys.nim
+lib/nim/system/mmdisp.nim
+lib/nim/system/platforms.nim
+lib/nim/system/profiler.nim
+lib/nim/system/repr.nim
+lib/nim/system/reprjs.nim
+lib/nim/system/sets.nim
+lib/nim/system/sysio.nim
+lib/nim/system/syslocks.nim
+lib/nim/system/sysspawn.nim
+lib/nim/system/sysstr.nim
+lib/nim/system/threads.nim
+lib/nim/system/timers.nim
+lib/nim/system/widestrs.nim
+lib/nim/windows/mmsystem.nim
+lib/nim/windows/nb30.nim
+lib/nim/windows/psapi.nim
+lib/nim/windows/shellapi.nim
+lib/nim/windows/shfolder.nim
+lib/nim/windows/windows.nim
+lib/nim/windows/winlean.nim
+lib/nim/wrappers/claro.nim
+lib/nim/wrappers/expat.nim
+lib/nim/wrappers/iup.nim
+lib/nim/wrappers/joyent_http_parser.nim
+lib/nim/wrappers/libcurl.nim
+lib/nim/wrappers/libsvm.nim
+lib/nim/wrappers/libuv.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/readline/history.nim
+lib/nim/wrappers/readline/readline.nim
+lib/nim/wrappers/readline/rltypedefs.nim
+lib/nim/wrappers/sdl/sdl.nim
+lib/nim/wrappers/sdl/sdl_gfx.nim
+lib/nim/wrappers/sdl/sdl_image.nim
+lib/nim/wrappers/sdl/sdl_mixer.nim
+lib/nim/wrappers/sdl/sdl_mixer_nosmpeg.nim
+lib/nim/wrappers/sdl/sdl_net.nim
+lib/nim/wrappers/sdl/sdl_ttf.nim
+lib/nim/wrappers/sdl/smpeg.nim
+lib/nim/wrappers/sphinx.nim
+lib/nim/wrappers/sqlite3.nim
+lib/nim/wrappers/tinyc.nim
+lib/nim/wrappers/tre.nim
+lib/nim/wrappers/zip/libzip.nim
+lib/nim/wrappers/zip/libzip_all.c
+lib/nim/wrappers/zip/zlib.nim
+lib/nim/wrappers/zip/zzip.nim
+%%PORTDOCS%%%%DOCSDIR%%/overview.html
+