Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lang/zig: update to 0.8.0 and add docs
Reviewed by: jbeich Reviewed by: Daniel Engberg <daniel.engberg.lists@pyret.net> Differential Revision: https://reviews.freebsd.org/D30742 Sponsored by: SkunkWerks, GmbH
- Loading branch information
Showing
7 changed files
with
3,978 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,58 @@ | ||
PORTNAME= zig | ||
DISTVERSION= 0.7.1 | ||
PORTREVISION= 2 | ||
DISTVERSION= 0.8.0 | ||
CATEGORIES= lang | ||
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ \ | ||
https://ziglang.org/builds/ | ||
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ | ||
|
||
MAINTAINER= dch@FreeBSD.org | ||
COMMENT= Language designed for robustness, optimality, and maintainability | ||
|
||
LICENSE= MIT | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
BROKEN_i386= static_assert failed "static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "")" | ||
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 | ||
|
||
_LLVM_VER= 11 | ||
BUILD_DEPENDS= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER} | ||
|
||
USES= cmake compiler:c++11-lang tar:xz | ||
USES= cmake compiler:c++11-lang localbase:ldflags tar:xz | ||
|
||
OPTIONS_DEFINE= STATIC | ||
OPTIONS_DEFAULT= STATIC | ||
|
||
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 -llzma -lm -lxml2 -lmd | ||
|
||
_LLVM_VER= 12 | ||
_ZIG_BIN= ${STAGEDIR}${PREFIX}/bin/zig | ||
|
||
post-configure-STATIC-on: | ||
@${REINPLACE_CMD} 's/-Wl,-Bdynamic//' ${BUILD_WRKSRC}/build.ninja | ||
|
||
post-build: | ||
# Produce the experimental std lib documentation. | ||
${MKDIR} ${WRKDIR}/cache ${WRKDIR}/doc | ||
${WRKDIR}/.build/zig test ${WRKSRC}/lib/std/std.zig \ | ||
--cache-dir ${WRKDIR}/cache \ | ||
--global-cache-dir ${WRKDIR}/cache \ | ||
--override-lib-dir ${WRKSRC}/lib \ | ||
-femit-docs=${WRKDIR}/doc \ | ||
-fno-emit-bin | ||
${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 | ||
.for f in data.js main.js index.html | ||
${INSTALL_MAN} ${WRKDIR}/doc/${f} ${STAGEDIR}${DOCSDIR}/std/ | ||
.endfor | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1607988527 | ||
SHA256 (zig-0.7.1.tar.xz) = 2db3b944ab368d955b48743d9f7c963b8f96de1a441ba5a35e197237cc6dae44 | ||
SIZE (zig-0.7.1.tar.xz) = 10711824 | ||
TIMESTAMP = 1623448037 | ||
SHA256 (zig-0.8.0.tar.xz) = 03a828d00c06b2e3bb8b7ff706997fd76bf32503b08d759756155b6e8c981e77 | ||
SIZE (zig-0.8.0.tar.xz) = 12614896 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- doc/langref.html.in.orig 2021-06-14 12:00:33 UTC | ||
+++ doc/langref.html.in | ||
@@ -221,7 +221,9 @@ | ||
</p> | ||
<p> | ||
If you search for something specific in this documentation and do not find it, | ||
- please <a href="https://github.com/ziglang/www.ziglang.org/issues/new?title=I%20searched%20for%20___%20in%20the%20docs%20and%20didn%27t%20find%20it">file an issue</a> or <a href="https://webchat.freenode.net/?channels=%23zig">say something on IRC</a>. | ||
+ please <a | ||
+ href="https://github.com/ziglang/www.ziglang.org/issues/new?title=I%20searched%20for%20___%20in%20the%20docs%20and%20didn%27t%20find%20it">file | ||
+ an issue</a> or <a href="https://web.libera.chat/#zig">say something on IRC</a>. | ||
</p> | ||
<p> | ||
The code samples in this document are compiled and tested as part of the main test suite of Zig. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.