summaryrefslogtreecommitdiff
path: root/dev-lang/zig
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:19:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-14 23:22:23 +0100
commit4b19be30aa626b327c885dae62c559ec0e9fb935 (patch)
tree76e74807bc479502e13866b581b6bf86734ec634 /dev-lang/zig
parent30d6f67c98d149508509d5e86f176d558793acc0 (diff)
gentoo resync : 13.10.2019
Diffstat (limited to 'dev-lang/zig')
-rw-r--r--dev-lang/zig/Manifest2
-rw-r--r--dev-lang/zig/zig-0.5.0.ebuild61
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest
index 36f386d8793b..45002400443d 100644
--- a/dev-lang/zig/Manifest
+++ b/dev-lang/zig/Manifest
@@ -1,6 +1,8 @@
AUX zig-0.4.0-r1-build-artifacts.patch 2149 BLAKE2B 7d2ac6a9d3cca4a13a4ad932f71d892b18e02e12387593f70ceab87b4ca66faf74bd1f2841ed89adbb4e1e69fe2ccb9fce2071ddcf39e4761aee248d853029f3 SHA512 5a7475eb72d32889db55f5e89a18ce25647ec7e43a716ab2606875fb77e806c05134ee2a482fcc63e152f459d2065635ae9fb75d9228c216b3541d363fd30961
AUX zig-0.4.0-r1-suppress-warnings.patch 1106 BLAKE2B 3e4cac7325789a3ef954f35814a63e554710afd00d5d913c1ae597913df05409e475cea652b4219f7cf1a8c0233391cf4bd82fec19f98552f66df5dddbb5d4ae SHA512 a401c6c88ab3b1f8e5344502a53b9c2157ff310625735b54d9e91bbc4c726fc5e97ea3a1678cbe1fe6bf7ce3087f6ef68778900c40fb633daee96f2bdef3dc2f
DIST zig-0.4.0.tar.gz 8924757 BLAKE2B 5ca3377f205694ff02360900b49eee7347cdf1cdaef90f1be071eff2610425ed453dfb35928fbe65b25f151b7153ab838c887d362ed3cd746f07833ae42510fd SHA512 423915730bc4ae9a67db3731a96471467826d16e59b87b3541f3e8ed2436f941939f22ccbebdb9a958a195b05360eb65f5be1658b32a01cc8db55c6e581eb039
+DIST zig-0.5.0.tar.gz 15743912 BLAKE2B 1a28dffebc24200cf51e1d94ff7203c8de5641e1a299eff58e808a5a8f3257fc8ff771699a0f90733702b90e5536990adc5bf41b973b4ea642081ef788f7a83d SHA512 9fc2ef827421e54e8db98ce3474ba3bbe9119b0b9aa30b4edd78d73277d2384067b5c78f4ebbca350a97ac230131e7f71e6d54c1e75fc74e1833ce6c51c402df
EBUILD zig-0.4.0-r1.ebuild 1250 BLAKE2B 43219ec7395eb7bb27a1d039c97773e76bb0d3b19656b692b804ad5bd991200b89bfd0af7c4b9bdc56f93886533243f3d0cbc411b2d5ce34f63906712a498665 SHA512 d61ca59a5205c8bdcf113ee0f317763808073b9e1480c551b1a71b34fa4e0bc3dc191e8961fdeb0b1ebe283b6f504c9403ca2c138f8afabbbf9200a7729e56f1
+EBUILD zig-0.5.0.ebuild 1536 BLAKE2B 89afabb6ce9f5fe6b28a748c026389a710241767fb0ac612cc9cd1da263a9f09d2459db19bd896aab7279c0da63cf24e6203c9b531188ca2696a510ce727e9a6 SHA512 48fc52a5f78ae16e7354979287b7f7a768d8ded1b6d9289c5dfe18948ef952acf2a44df48e01522c40ff3b16572b8f1a20f5dc8e5f89d5d87f272f588c035e8a
EBUILD zig-9999.ebuild 1536 BLAKE2B 89afabb6ce9f5fe6b28a748c026389a710241767fb0ac612cc9cd1da263a9f09d2459db19bd896aab7279c0da63cf24e6203c9b531188ca2696a510ce727e9a6 SHA512 48fc52a5f78ae16e7354979287b7f7a768d8ded1b6d9289c5dfe18948ef952acf2a44df48e01522c40ff3b16572b8f1a20f5dc8e5f89d5d87f272f588c035e8a
MISC metadata.xml 549 BLAKE2B 1f79da87db9888bc7a1c12163f7ee36dcb37645f5bdeb61034144f76b03b7e464c05f62a8753b0b85fd0ed4fd33ea1066da552d29d28bdd2502918697b3d94a0 SHA512 5867cda8d47f181e93b4aa4763efa5e12d7a6bbf1001e496cd82cc892a43b144a2d8a0a4d26466ac171622acf3590866d9d75a16c8337ae06734d5d4f8b2e908
diff --git a/dev-lang/zig/zig-0.5.0.ebuild b/dev-lang/zig/zig-0.5.0.ebuild
new file mode 100644
index 000000000000..7189e4ddc62f
--- /dev/null
+++ b/dev-lang/zig/zig-0.5.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils llvm
+
+DESCRIPTION="A robust, optimal, and maintainable programming language"
+HOMEPAGE="https://ziglang.org/"
+LICENSE="MIT"
+SLOT="0"
+IUSE="+experimental"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/ziglang/zig.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ziglang/zig/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 NVPTX
+ PowerPC Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+# According to zig's author, zig builds that do not support all targets are not
+# supported by the upstream project.
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]}
+
+RDEPEND="
+ sys-devel/llvm:9
+ !experimental? ( sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}] )
+ sys-devel/clang:9
+"
+
+DEPEND="${RDEPEND}"
+
+LLVM_MAX_SLOT=9
+
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}"
+}
+
+src_prepare() {
+ if use experimental; then
+ sed -i '/^NEED_TARGET(/d' cmake/Findllvm.cmake || die "unable to modify cmake/Findllvm.cmake"
+ fi
+
+ sed -i 's/--prefix "${CMAKE_INSTALL_PREFIX}"/--prefix ".\/${CMAKE_INSTALL_PREFIX}"/' CMakeLists.txt || \
+ die "unable to fix install path"
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCLANG_INCLUDE_DIRS="$(llvm-config --includedir)"
+ -DCLANG_LIBDIRS="$(llvm-config --libdir)"
+ )
+
+ cmake-utils_src_configure
+}