2013-11-14 20:36:55 +00:00
|
|
|
# Created by: Neal Nelson <ports@nicandneal.net>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2015-04-03 20:32:14 +00:00
|
|
|
PORTNAME= nim
|
2017-10-18 22:02:12 +00:00
|
|
|
PORTVERSION= 0.17.2
|
2013-11-14 20:36:55 +00:00
|
|
|
CATEGORIES= lang
|
2017-10-18 22:02:12 +00:00
|
|
|
MASTER_SITES= https://nim-lang.org/download/
|
2013-11-14 20:36:55 +00:00
|
|
|
|
|
|
|
MAINTAINER= ports@nicandneal.net
|
2015-10-28 12:57:46 +00:00
|
|
|
COMMENT= Nim programming language
|
2013-11-14 20:36:55 +00:00
|
|
|
|
|
|
|
LICENSE= MIT
|
2017-10-18 22:02:12 +00:00
|
|
|
LICENSE_FILE= ${WRKSRC}/copying.txt
|
2013-11-14 20:36:55 +00:00
|
|
|
|
2017-05-27 22:16:50 +00:00
|
|
|
BROKEN_aarch64= fails to compile: crt1.c: undefined reference to main
|
|
|
|
BROKEN_armv6= fails to compile: crt1.c: undefined reference to main
|
2017-11-30 06:13:34 +00:00
|
|
|
BROKEN_armv7= fails to compile: crt1.c: undefined reference to main
|
2017-05-27 22:16:50 +00:00
|
|
|
BROKEN_mips64= fails to build: build.sh: clang: not found
|
|
|
|
BROKEN_powerpc64= fails to build: build.sh: clang: not found
|
|
|
|
BROKEN_sparc64= fails to build: build.sh: clang: not found
|
2016-04-21 16:43:14 +00:00
|
|
|
|
2017-05-20 01:10:03 +00:00
|
|
|
TOOLS_DESC= Build and install nimgrep and nimsuggest
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= DOCS TOOLS
|
|
|
|
OPTIONS_SUB= yes
|
2013-11-14 20:36:55 +00:00
|
|
|
|
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2016-10-15 14:07:04 +00:00
|
|
|
USES= compiler tar:xz
|
2013-11-14 20:36:55 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2017-05-20 01:10:03 +00:00
|
|
|
TLIST= nimgrep nimsuggest
|
|
|
|
|
2013-11-14 20:36:55 +00:00
|
|
|
post-patch:
|
|
|
|
.if ${COMPILER_TYPE} == clang
|
2015-04-03 20:32:14 +00:00
|
|
|
@${REINPLACE_CMD} -e '/cc =/s/gcc/clang/' ${WRKSRC}/config/nim.cfg
|
2013-11-14 20:36:55 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
|
|
|
|
COMP_FLAGS="${CPPFLAGS} ${CFLAGS}" LINK_FLAGS="${LDFLAGS}" \
|
|
|
|
${SH} build.sh
|
2015-04-03 20:32:14 +00:00
|
|
|
cd ${WRKSRC} && bin/nim c --parallelBuild=${MAKE_JOBS_NUMBER} koch
|
2013-11-14 20:36:55 +00:00
|
|
|
cd ${WRKSRC} && ./koch boot --parallelBuild=${MAKE_JOBS_NUMBER} \
|
|
|
|
-d:release
|
|
|
|
|
2017-05-20 01:10:03 +00:00
|
|
|
do-build-TOOLS-on:
|
|
|
|
cd ${WRKSRC} && ./koch tools --parallelBuild=${MAKE_JOBS_NUMBER} \
|
|
|
|
-d:release
|
|
|
|
|
2013-11-14 20:36:55 +00:00
|
|
|
do-install:
|
|
|
|
cd ${WRKSRC} && ${SH} install.sh ${STAGEDIR}${PREFIX}
|
2015-10-28 12:57:46 +00:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/nim
|
|
|
|
|
2017-05-20 01:10:03 +00:00
|
|
|
do-install-TOOLS-on:
|
|
|
|
.for t in ${TLIST}
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/${t} ${STAGEDIR}${PREFIX}/bin
|
|
|
|
.endfor
|
|
|
|
|
2013-11-14 20:36:55 +00:00
|
|
|
.include <bsd.port.post.mk>
|