pkgsrc/lang/nim/Makefile
ryoon ae2792a252 nim: Update to 1.6.2
Changelog:
Bugfixes

These reported issues were fixed:

  * Fixed "SYS_getrandom undeclared compiling nim 1.6.0 stdlib on linux kernel
    < 3.17 (including RHEL7)" (#19052)
  * Fixed "Compiler terminated with IndexDefect if --gc:arc or --gc:orc given,
    when proc return a global variable with lent or var type" (#18971)
  * Fixed "Errors initializing an object of RootObj with the C++ backend" (#
    18410)
  * Fixed "Stack traces broken with arc/orc" (#19078)
  * Fixed "isolate happily compiles despite not being able to prove the
    absence of captured refs" (#19013)
  * Fixed "PragmaExpr erroneously added to enum type" (#19011)
  * Fixed "RVO not applied to object with large array" (#14470)
  * Fixed "Compile error from backend gcc when generic int type is defined" (
    #19051)
  * Fixed "Varargs broken in 1.6.0 when len is 0 and preceding block
    arguments." (#19015)
  * Fixed "VM replaces declared type with alias" (#19198)
  * Fixed "regression: effectless inner template declared as side effect" (#
    19159)
  * Fixed "variables in closure iterators loop are not correctly unassigned"
    (#19193)
  * Fixed "Unexported converters propagate through imports and affect code" (
    #19213)
  * Fixed "[arc] of operation segfaults for a ptr object containing traced
    reference" (#19205)
  * Fixed "Static linking with a .lib file not working" (#15955)

This release also includes these improvements:

  * Allow converting static vars to openArray (PR #19047)
  * Do not break interpolation for field init message string (PR #19085)
  * fixes another effect inference bug (PR #19100)
  * fix nimindexterm in rst2tex/doc2tex (PR #19106)
  * Remove tlsEmulation enabled from Windows + GCC config (PR #19119)
  * fixes .raises inference for newSeq builtin under -gc:orc (PR #19158)
  * Fix undeclared SYS_getrandom on emscripten (PR #19144)
  * Merge file size fields correctly on Windows (PR #19141)
  * fix marshal bugs in VM (PR #19161)
  * allow HSlice bounded by constants of distinct types (PR #19219)
  * fixes a possible "javascript:" protocol exploit (PR #19134)
  * let Nim support Nimble 0.14 with lock-file support (PR #19236)
  * nimRawSetjmp: support Windows (PR #19197)
  * Don't read \0 in uri.hostname (PR #19148)
  * json: limit recursion depth (PR #19252)
2022-01-04 12:49:08 +00:00

52 lines
2 KiB
Makefile

# $NetBSD: Makefile,v 1.24 2022/01/04 12:49:08 ryoon Exp $
DISTNAME= nim-1.6.2
CATEGORIES= lang
MASTER_SITES= http://nim-lang.org/download/
EXTRACT_SUFX= .tar.xz
MAINTAINER= cfkoch@edgebsd.org
HOMEPAGE= https://nim-lang.org/
COMMENT= The Nim programming language
LICENSE= mit
DEPENDS+= coreutils-[0-9]*:../../sysutils/coreutils
USE_TOOLS+= bash
REPLACE_BASH+= bin/nim-gdb
INSTALLATION_DIRS= bin
post-patch:
cd ${WRKSRC}/bin && ${LN} -sf nim-gdb nim-gdb.bash
# nim doesn't honor the environment variable LDFLAGS. In order to
# support PKGSRC_USE_RELRO, we need to translate the flags to compiler
# options.
NIM_FLAGS= ${LDFLAGS:S/^/--passL:/}
do-build:
cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} sh ./build.sh
printf '#! %s\nexec %s _=%s/nim/bin/nim %s/nim/bin/nim "$$@"\n' \
"${SH}" "${SETENV}" "${PREFIX}" "${PREFIX}" \
> ${WRKSRC}/nim-wrapper.sh
cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./bin/nim c --skipUserCfg --skipParentCfg --parallelBuild:${_MAKE_JOBS_N} koch
cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch boot --parallelBuild:${_MAKE_JOBS_N} -d:release ${NIM_FLAGS}
cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ./koch --stable tools --parallelBuild:${_MAKE_JOBS_N} ${NIM_FLAGS}
do-install:
cd ${WRKSRC} && sh ./install.sh ${DESTDIR}${PREFIX}
${INSTALL_SCRIPT} ${WRKSRC}/nim-wrapper.sh ${DESTDIR}${PREFIX}/bin/nim
${INSTALL} ${WRKSRC}/bin/nimble ${DESTDIR}${PREFIX}/bin/nimble
${INSTALL} ${WRKSRC}/bin/nimgrep ${DESTDIR}${PREFIX}/bin/nimgrep
${INSTALL} ${WRKSRC}/bin/nimpretty ${DESTDIR}${PREFIX}/bin/nimpretty
${INSTALL} ${WRKSRC}/bin/nimsuggest ${DESTDIR}${PREFIX}/bin/nimsuggest
${INSTALL} ${WRKSRC}/bin/testament ${DESTDIR}${PREFIX}/bin/testament
${INSTALL} ${WRKSRC}/bin/nim-gdb ${DESTDIR}${PREFIX}/bin/nim-gdb
${INSTALL} ${WRKSRC}/bin/nim-gdb.bash ${DESTDIR}${PREFIX}/bin/nim-gdb.bash
${INSTALL} ${WRKSRC}/bin/nim-gdb ${DESTDIR}${PREFIX}/bin/nim_dbg
do-test:
cd ${WRKSRC} && ./bin/nim compile koch.nim
cd ${WRKSRC} && LD_LIBRARY_PATH=${PREFIX}/lib ./koch test --parallelBuild:${_MAKE_JOBS_N}
.include "../../mk/bsd.pkg.mk"