diff options
author | Milan P. Stanić <mps@arvanta.net> | 2019-10-09 10:52:05 +0200 |
---|---|---|
committer | Milan P. Stanić <mps@arvanta.net> | 2019-10-09 11:01:16 +0200 |
commit | 2c0e656d52c4c97324aeaeedeb7724ca98b5ca46 (patch) | |
tree | e8a6e8c6a984f4f0f1f271435059686484d2474f /testing/zig/APKBUILD | |
parent | c653c42eb37ded50d1c09658b1bd559e61f79785 (diff) | |
download | aports-2c0e656d52c4c97324aeaeedeb7724ca98b5ca46.tar.bz2 aports-2c0e656d52c4c97324aeaeedeb7724ca98b5ca46.tar.xz |
testing/zig: new aport
https://ziglang.org/
general-purpose programming language designed for robustness, optimality, and maintainability
Diffstat (limited to 'testing/zig/APKBUILD')
-rw-r--r-- | testing/zig/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/zig/APKBUILD b/testing/zig/APKBUILD new file mode 100644 index 0000000000..12563410c3 --- /dev/null +++ b/testing/zig/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Milan P. Stanić <mps@arvanta.net> +# Maintainer: Milan P. Stanić <mps@arvanta.net> +pkgname="zig" +pkgver="0.5.0" +pkgrel=0 +pkgdesc="general-purpose programming language designed for robustness, optimality, and maintainability" +url="https://ziglang.org/" +arch="x86_64" +license="MIT" +options="!check" # works, but fail at the end, need to be fixed +makedepends="cmake clang-dev clang-libs llvm9-libs llvm-dev lld-dev libstdc++ + zlib-static libxml2-dev llvm9-static clang-static lld-static" +subpackages="$pkgname-dev" +source="https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz + fix-build.zig.patch" + +builddir="$srcdir"/$pkgname-$pkgver + +build() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DZIG_FORCE_EXTERNAL_LLD=ON \ + -DZIG_SKIP_INSTALL_LIB_FILES=ON \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} . + make +} + +check() { + ./zig build test +} + +package() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DZIG_FORCE_EXTERNAL_LLD=ON \ + -DZIG_SKIP_INSTALL_LIB_FILES=OFF \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} . + make DESTDIR="$pkgdir" install +} + +sha512sums="1ce479077d2501c160bcac318b3d59e66921207855f56d900b9a59c44b14116639de10c5b578663b4963ccc8d49bb0d5aa75afb8987f5df1950037248561d1e2 zig-0.5.0.tar.xz +9972f52663c061df59363215e1624773d28a1a85c473250f0e16b78d59c6f9e8987267e55148609b0cbad5f722d365aad7554d7f547060c377edd91dd371ff82 fix-build.zig.patch" |