mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
eb0f460b63
PR: 235606 Submitted by: Neal Nelson <ports@nicandneal.net> (maintainer)
61 lines
1.6 KiB
Makefile
61 lines
1.6 KiB
Makefile
# Created by: Neal Nelson <ports@nicandneal.net>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= nim
|
|
PORTVERSION= 0.19.4
|
|
CATEGORIES= lang
|
|
MASTER_SITES= https://nim-lang.org/download/
|
|
|
|
MAINTAINER= ports@nicandneal.net
|
|
COMMENT= Nim programming language
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/copying.txt
|
|
|
|
BROKEN_aarch64= fails to compile: crt1.c: undefined reference to main
|
|
BROKEN_armv6= fails to compile: crt1.c: undefined reference to main
|
|
BROKEN_armv7= fails to compile: crt1.c: undefined reference to main
|
|
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
|
|
|
|
TOOLS_DESC= Build and install nimgrep and nimsuggest
|
|
|
|
OPTIONS_DEFINE= DOCS TOOLS
|
|
OPTIONS_SUB= yes
|
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
USES= compiler tar:xz
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
TLIST= nimgrep nimsuggest
|
|
|
|
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} --nimcache=${WRKSRC}/nimcache koch
|
|
cd ${WRKSRC} && ./koch boot --parallelBuild=${MAKE_JOBS_NUMBER} \
|
|
-d:release
|
|
|
|
do-build-TOOLS-on:
|
|
cd ${WRKSRC} && ./koch tools --parallelBuild=${MAKE_JOBS_NUMBER} \
|
|
-d:release
|
|
|
|
do-install:
|
|
cd ${WRKSRC} && ${SH} install.sh ${STAGEDIR}${PREFIX}
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/nim
|
|
|
|
do-install-TOOLS-on:
|
|
.for t in ${TLIST}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/${t} ${STAGEDIR}${PREFIX}/bin
|
|
.endfor
|
|
|
|
.include <bsd.port.post.mk>
|