diff options
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 18 |
2 files changed, 17 insertions, 3 deletions
@@ -1,6 +1,6 @@ pkgbase = zig-git pkgdesc = a programming language prioritizing robustness, optimality, and clarity - pkgver = 0.0.0r1434.221e5b1 + pkgver = 0.0.0r1439.ba7b5da pkgrel = 1 url = http://ziglang.org arch = i686 @@ -1,7 +1,7 @@ # Maintainer: Marc Tiehuis <marctiehuis at gmail.com> pkgname=zig-git -pkgver=0.0.0r1434.221e5b1 +pkgver=0.0.0r1439.ba7b5da pkgrel=1 pkgdesc="a programming language prioritizing robustness, optimality, and clarity" arch=('i686' 'x86_64') @@ -33,7 +33,21 @@ build() { } check() { - cd "$srcdir/$provides/build" + # We rebuild and install into a new local directory so we can test the + # stdlib before installing. The `--zig-std-dir` option does not work as + # expected with the `build` command right now so, hence the workaround. + cd "$srcdir/$provides" + mkdir -p build_test + cd build_test + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$(pwd) \ + -DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=crt1.o)) \ + -DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") \ + -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-name=crtbegin.o)) + make install + + cd "$srcdir/$provides/build_test" ./zig build --build-file ../build.zig test } |