Recommendation: this not be turned into a PR until such a time as the third stage works. That is to say, when the language gets out of absolute Beta quality software.
Recommendation: a build_option of 'bootstrap' be used to trigger a cmake build, else just rely on a preexisting zig package and run stage two and three to do the build (that means building the zig compiler twice, really necessary? Or just a stage 2 compiler will be adequate, since that has the same effect?)
# Template file for 'zig'
pkgname=zig
version=0.2.0
revision=1
build_style=cmake
makedepends="llvm clang zlib-devel libxml2-devel ncurses-devel"
short_desc="Robust, optimal, and clear programming language"
maintainer="Toyam Cox <[email protected]>"
license="MIT"
homepage="https://ziglang.org/"
distfiles="https://github.com/ziglang/zig/archive/${version}.tar.gz"
checksum=09843a3748bf8a5f1742fe93dbf45699f92051ecf479b23272b067dfc3837cc7
post_install() {
vlicense LICENSE
}
do_check() {
bin/zig build --build-file ../build.zig test
}
ping
It's out of beta?
# Template file for 'zig'
pkgname=zig
version=0.4.0
revision=1
build_style=cmake
configure_args="-DZIG_STATIC=FALSE"
hostmakedepends="cmake"
makedepends="clang libxml2-devel llvm8 ncurses-devel zlib-devel"
short_desc="Programming language designed for robustness, optimality, and clarity"
maintainer="Duncaen <[email protected]>"
license="MIT"
homepage="https://ziglang.org/"
distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz"
checksum=fec1f3f6b359a3d942e0a7f9157b3b30cde83927627a0e1ea95c54de3c526cfc
post_extract() {
# make it link llvm dynamically
vsed -e '/OR ZIG_STATIC/c\if(false)' -i cmake/Findllvm.cmake
# don't install build artefacts
vsed -i -e '/${ZIG_CPP_LIB_DIR}/d' CMakeLists.txt
}
post_install() {
vlicense LICENSE
}
I didn't get cross builds working iirc, because something pulls in libgcc which then removed some chroot- packages.
Language creator here. It'll be in "beta" until 1.0.0. That's the point at which I can look at someone in the eyes and say, "you can use this in production for mission critical software."
Once self-hosted is complete, the build process will always be exactly 3 steps, from source to final binaries, and the cmake build will do all the steps. You should be able to use the "default" cmake build invocation of the system package manager once everything is done. See https://github.com/ziglang/zig/issues/853 for more details.
Why does it have to come out of beta?
(For example, Crystal is also in beta, but shipped in the repos.)
zig is already packaged and has been updated to 0.6.0 a few days ago.
Most helpful comment
Language creator here. It'll be in "beta" until 1.0.0. That's the point at which I can look at someone in the eyes and say, "you can use this in production for mission critical software."
Once self-hosted is complete, the build process will always be exactly 3 steps, from source to final binaries, and the cmake build will do all the steps. You should be able to use the "default" cmake build invocation of the system package manager once everything is done. See https://github.com/ziglang/zig/issues/853 for more details.