forked from Lainports/freebsd-ports
lang/zig: fork 0.10 into a pinned port
Some consumers are ready for 0.11 syntax but many are not. PR: 273124 Approved by: dch (maintainer)
This commit is contained in:
parent
a5307f7c55
commit
aaaa65fc06
7 changed files with 13931 additions and 0 deletions
|
|
@ -377,5 +377,6 @@
|
|||
SUBDIR += ypsilon
|
||||
SUBDIR += zephir
|
||||
SUBDIR += zig
|
||||
SUBDIR += zig010
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ USES= cmake compiler:c++11-lang localbase:ldflags tar:xz
|
|||
CMAKE_ON= THREADS_PREFER_PTHREAD_FLAG
|
||||
CMAKE_ARGS+= -DZIG_TARGET_MCPU=baseline # ensure we run everywhere
|
||||
|
||||
CONFLICTS_INSTALL= zig010
|
||||
|
||||
OPTIONS_DEFINE= DOCS STATIC
|
||||
OPTIONS_DEFAULT= DOCS
|
||||
|
||||
|
|
|
|||
66
lang/zig010/Makefile
Normal file
66
lang/zig010/Makefile
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
PORTNAME= zig
|
||||
DISTVERSION= 0.10.1
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ \
|
||||
https://ziglang.org/builds/
|
||||
PKGNAMESUFFIX= 010
|
||||
# fetch prebuilt platform-independent docs
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
zig-freebsd-x86_64-${DISTVERSION}${EXTRACT_SUFX}
|
||||
|
||||
PATCH_SITES= https://github.com/ziglang/${PORTNAME}/commit/
|
||||
|
||||
MAINTAINER= dch@FreeBSD.org
|
||||
COMMENT= Language designed for robustness, optimality, and maintainability (deprecated 0.10.* series)
|
||||
WWW= https://ziglang.org/
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
ONLY_FOR_ARCHS= aarch64 amd64
|
||||
ONLY_FOR_ARCHS_REASON= not yet supported
|
||||
|
||||
BUILD_DEPENDS= icu>=71:devel/icu \
|
||||
llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
|
||||
|
||||
LIB_DEPENDS= liblzma.so:archivers/lzma \
|
||||
libzstd.so:archivers/zstd
|
||||
|
||||
USES= cmake compiler:c++11-lang localbase:ldflags tar:xz
|
||||
CMAKE_ON= THREADS_PREFER_PTHREAD_FLAG
|
||||
CMAKE_ARGS+= -DZIG_TARGET_MCPU=baseline # ensure we run everywhere
|
||||
|
||||
CONFLICTS_INSTALL= zig
|
||||
PORTSCOUT= limit:^0\.10\.
|
||||
|
||||
OPTIONS_DEFINE= DOCS STATIC
|
||||
OPTIONS_DEFAULT= DOCS
|
||||
|
||||
STATIC_DESC= sets ZIG_STATIC to avoid 800MiB LLVM runtime dependency
|
||||
|
||||
STATIC_RUN_DEPENDS_OFF= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
|
||||
STATIC_CMAKE_BOOL= CMAKE_SKIP_INSTALL_RPATH ZIG_STATIC
|
||||
STATIC_LDFLAGS= -licudata -licuuc -llzma -lm -lmd -lxml2 -lz -lzstd
|
||||
|
||||
_LLVM_VER= 15
|
||||
_ZIG_BIN= ${STAGEDIR}${PREFIX}/bin/zig
|
||||
|
||||
post-configure-STATIC-on:
|
||||
@${REINPLACE_CMD} 's/-Wl,-Bdynamic//' \
|
||||
${BUILD_WRKSRC}/build.ninja
|
||||
|
||||
post-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/std
|
||||
.for f in langref.html std/data.js std/main.js std/index.html
|
||||
${INSTALL_MAN} ${WRKDIR}/zig-freebsd-x86_64-${DISTVERSION}/doc/${f} \
|
||||
${STAGEDIR}${DOCSDIR}/${f}
|
||||
.endfor
|
||||
|
||||
do-test:
|
||||
mkdir ${WRKDIR}/cache
|
||||
(cd ${WRKSRC} && \
|
||||
${_ZIG_BIN} build test-behavior --cache-dir ${WRKDIR}/cache \
|
||||
--global-cache-dir ${WRKDIR}/cache --zig-lib-dir ${WRKSRC}/lib)
|
||||
|
||||
.include <bsd.port.mk>
|
||||
5
lang/zig010/distinfo
Normal file
5
lang/zig010/distinfo
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
TIMESTAMP = 1674467482
|
||||
SHA256 (zig-0.10.1.tar.xz) = 69459bc804333df077d441ef052ffa143d53012b655a51f04cfef1414c04168c
|
||||
SIZE (zig-0.10.1.tar.xz) = 15143112
|
||||
SHA256 (zig-freebsd-x86_64-0.10.1.tar.xz) = e245b577b548af1c36357999165efbd347ae6fe1c7b04d02cd9bfb8d994cb58a
|
||||
SIZE (zig-freebsd-x86_64-0.10.1.tar.xz) = 43966220
|
||||
10
lang/zig010/files/patch-CMakeLists.txt
Normal file
10
lang/zig010/files/patch-CMakeLists.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- CMakeLists.txt.orig 2023-01-31 09:51:54 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -1089,6 +1089,7 @@ set(ZIG_BUILD_ARGS
|
||||
"-Dtarget=${ZIG_TARGET_TRIPLE}"
|
||||
"-Dcpu=${ZIG_TARGET_MCPU}"
|
||||
"-Dversion-string=${ZIG_VERSION}"
|
||||
+ "--verbose"
|
||||
)
|
||||
|
||||
add_custom_target(stage3 ALL
|
||||
2
lang/zig010/pkg-descr
Normal file
2
lang/zig010/pkg-descr
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Zig is a general purpose programming language designed for robustness,
|
||||
optimality, and maintainability.
|
||||
13845
lang/zig010/pkg-plist
Normal file
13845
lang/zig010/pkg-plist
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue