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