Skip to content
Draft

Zig 0.16 #59955

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions common/build-style/zig-build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
do_build() {
local zig_target zig_cpu
local zig_target zig_cpu zig_search_prefix

# TODO: This duplication between build-profiles and cross-profiles
# is totally unnecessary. It would be nice if there was some way to
# avoid it.
if [ "$CROSS_BUILD" ]; then
zig_target="${XBPS_CROSS_ZIG_TARGET}"
zig_cpu="${XBPS_CROSS_ZIG_CPU}"
zig_search_prefix=/
else
zig_target="${XBPS_ZIG_TARGET}"
zig_cpu="${XBPS_ZIG_CPU}"
zig_search_prefix=/usr
fi

# Inform zig of the required libc include paths.
Expand All @@ -30,8 +32,8 @@ do_build() {
# prefix used by the zig build system.
DESTDIR="zig-out" zig build \
-j"${XBPS_MAKEJOBS}" \
--sysroot "${XBPS_CROSS_BASE}" \
--search-prefix "${XBPS_CROSS_BASE}/usr" \
--sysroot "${XBPS_CROSS_BASE:-/}" \
--search-prefix "${zig_search_prefix}" \
--prefix /usr \
--global-cache-dir /host/zig \
--libc xbps_zig_libc.txt \
Expand Down
14 changes: 6 additions & 8 deletions srcpkgs/zig/template
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Template file for 'zig'
pkgname=zig
version=0.13.0
version=0.16.0
revision=1
archs="x86_64* aarch64*"
build_style=cmake
configure_args="-DZIG_TARGET_MCPU=baseline"
make_cmd=make
configure_args="-DZIG_TARGET_MCPU=baseline -DZIG_PIE=ON"
_llvmver=21
# we add xml2, zstd, zlib and ncurses
# because our lld is static-only and requires those to work
makedepends="clang18-devel llvm18-devel lld18-devel libxml2-devel libzstd-devel ncurses-devel zlib-devel"
makedepends="clang${_llvmver}-devel llvm${_llvmver}-devel lld${_llvmver}-devel
libxml2-devel libzstd-devel ncurses-devel zlib-devel"
short_desc="Programming language designed for robustness, optimality, and clarity"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://ziglang.org"
distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz"
checksum=06c73596beeccb71cc073805bdb9c0e05764128f16478fa53bf17dfabc1d4318
nopie=yes
checksum=43186959edc87d5c7a1be7b7d2a25efffd22ce5807c7af99067f86f99641bfdf
nocross=yes

export CMAKE_GENERATOR="Unix Makefiles"

post_install() {
vlicense LICENSE
}
Loading