1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

lang/zig-devel: add latest zig from 20210824 snapshot

This commit is contained in:
Dave Cottlehuber 2021-06-11 19:24:37 +00:00
parent 680a2dfd53
commit 07f9a9a01b
5 changed files with 12530 additions and 0 deletions

View File

@ -366,5 +366,6 @@
SUBDIR += yorick
SUBDIR += ypsilon
SUBDIR += zig
SUBDIR += zig-devel
.include <bsd.port.subdir.mk>

57
lang/zig-devel/Makefile Normal file
View File

@ -0,0 +1,57 @@
PORTNAME= zig
DISTVERSION= g20210824
CATEGORIES= lang
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ \
https://ziglang.org/builds/
MAINTAINER= dch@FreeBSD.org
COMMENT= Language designed for robustness, optimality, and maintainability
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
IGNORE_FreeBSD_11= expects getrandom(2) which is unavailable on FreeBSD < 12.0
ONLY_FOR_ARCHS= aarch64 amd64
ONLY_FOR_ARCHS_REASON= not yet supported
BUILD_DEPENDS= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
USES= cmake compiler:c++11-lang localbase:ldflags tar:xz
USE_GITHUB= yes
GH_ACCOUNT= ziglang
GH_PROJECT= zig
GH_TAGNAME= 9e3ec9893
CONFLICTS= zig-*
OPTIONS_DEFINE= STATIC
OPTIONS_DEFAULT= STATIC
CMAKE_ARGS+= -DZIG_VERSION="0.9.0-dev.850+9e3ec9893"
STATIC_DESC= sets ZIG_STATIC to avoid 800MiB LLVM dependencies
STATIC_RUN_DEPENDS_OFF= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
STATIC_CMAKE_BOOL= CMAKE_SKIP_INSTALL_RPATH ZIG_STATIC
STATIC_LDFLAGS= -lz -lm -lmd -llzma -L/usr/lib
_LLVM_VER= 12
_ZIG_BIN= ${STAGEDIR}${PREFIX}/bin/zig
post-configure-STATIC-on:
@${REINPLACE_CMD} 's/-Wl,-Bdynamic//' ${BUILD_WRKSRC}/build.ninja
post-build:
${MKDIR} ${WRKDIR}/cache ${WRKDIR}/doc
${RM} ${WRKSRC}/lib/zig/std/zig-cache
post-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}/std
# langref cannot be generated until after install target has run
(cd ${WRKSRC} && ${_ZIG_BIN} run \
./doc/docgen.zig -- ${_ZIG_BIN} \
./doc/langref.html.in ${STAGEDIR}${DOCSDIR}/langref.html \
&& ${RM} ${STAGEDIR}/lib/zig/std/zig-cache)
${REINPLACE_CMD} -i '' -e 's|${STAGEDIR}||' ${STAGEDIR}${DOCSDIR}/langref.html
.include <bsd.port.mk>

3
lang/zig-devel/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1629830410
SHA256 (ziglang-zig-g20210824-9e3ec9893_GH0.tar.gz) = 8552fe2d2253bbef77808652d977a9b7fbdad56f1d224b0d38f3f226521add72
SIZE (ziglang-zig-g20210824-9e3ec9893_GH0.tar.gz) = 19456789

4
lang/zig-devel/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
Zig is a general purpose programming language designed for robustness,
optimality, and maintainability.
WWW: https://ziglang.org/

12465
lang/zig-devel/pkg-plist Normal file

File diff suppressed because it is too large Load Diff