summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2017-08-11 18:11:01 +1200
committerMarc Tiehuis <marctiehuis@gmail.com>2017-08-11 18:11:01 +1200
commita78b74819db169c34244d4d8f960564d2047eb0f (patch)
treecc8c0cdb537306be9031192010c98428a33710cd
parentVersion: 1419 -> 1434 (diff)
downloadzig-git-a78b74819db169c34244d4d8f960564d2047eb0f.tar.xz
Version: 1434 -> 1439 + update check to handle stdlib changing
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD18
2 files changed, 17 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 742b837..6a4bc25 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 2901ef4..a3f2b26 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
}