Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Template for when out of Beta - Zig - Ziglang #475

Closed
Vaelatern opened this issue Jun 27, 2018 · 6 comments
Closed

Package Template for when out of Beta - Zig - Ziglang #475

Vaelatern opened this issue Jun 27, 2018 · 6 comments
Labels
request Package request

Comments

@Vaelatern
Copy link
Member

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 <Vaelatern@voidlinux.eu>"
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
}
@maxice8
Copy link
Contributor

maxice8 commented Apr 18, 2019

ping

@maxice8 maxice8 added the request Package request label Apr 18, 2019
@Vaelatern
Copy link
Member Author

It's out of beta?

@Duncaen
Copy link
Member

Duncaen commented Apr 21, 2019

# 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 <duncaen@voidlinux.org>"
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.

@andrewrk
Copy link

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 ziglang/zig#853 for more details.

@notramo
Copy link

notramo commented May 16, 2020

Why does it have to come out of beta?
(For example, Crystal is also in beta, but shipped in the repos.)

@Duncaen
Copy link
Member

Duncaen commented May 16, 2020

zig is already packaged and has been updated to 0.6.0 a few days ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Package request
Projects
None yet
Development

No branches or pull requests

5 participants