summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMarc Tiehuis2017-08-11 18:11:01 +1200
committerMarc Tiehuis2017-08-11 18:11:01 +1200
commita78b74819db169c34244d4d8f960564d2047eb0f (patch)
treecc8c0cdb537306be9031192010c98428a33710cd /PKGBUILD
parentb627ea9876318435ce967b2146882c553f89abe0 (diff)
downloadaur-a78b74819db169c34244d4d8f960564d2047eb0f.tar.gz
Version: 1434 -> 1439 + update check to handle stdlib changing
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 16 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2901ef40e498..a3f2b266a88d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}