1 |
commit: d9e4c6fa5bdc0c29bec7f02d47e51e5a782efa3e |
2 |
Author: Nick Erdmann <n <AT> nirf <DOT> de> |
3 |
AuthorDate: Fri Sep 27 06:05:26 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 1 06:14:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9e4c6fa |
7 |
|
8 |
dev-lang/zig: bump to 0.5.0 |
9 |
|
10 |
Signed-off-by: Nick Erdmann <n <AT> nirf.de> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/13107 |
12 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
13 |
|
14 |
dev-lang/zig/Manifest | 1 + |
15 |
dev-lang/zig/zig-0.5.0.ebuild | 61 +++++++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 62 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest |
19 |
index d5a4c7c3d61..a3f8c62566b 100644 |
20 |
--- a/dev-lang/zig/Manifest |
21 |
+++ b/dev-lang/zig/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST zig-0.4.0.tar.gz 8924757 BLAKE2B 5ca3377f205694ff02360900b49eee7347cdf1cdaef90f1be071eff2610425ed453dfb35928fbe65b25f151b7153ab838c887d362ed3cd746f07833ae42510fd SHA512 423915730bc4ae9a67db3731a96471467826d16e59b87b3541f3e8ed2436f941939f22ccbebdb9a958a195b05360eb65f5be1658b32a01cc8db55c6e581eb039 |
24 |
+DIST zig-0.5.0.tar.gz 15743912 BLAKE2B 1a28dffebc24200cf51e1d94ff7203c8de5641e1a299eff58e808a5a8f3257fc8ff771699a0f90733702b90e5536990adc5bf41b973b4ea642081ef788f7a83d SHA512 9fc2ef827421e54e8db98ce3474ba3bbe9119b0b9aa30b4edd78d73277d2384067b5c78f4ebbca350a97ac230131e7f71e6d54c1e75fc74e1833ce6c51c402df |
25 |
|
26 |
diff --git a/dev-lang/zig/zig-0.5.0.ebuild b/dev-lang/zig/zig-0.5.0.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..7189e4ddc62 |
29 |
--- /dev/null |
30 |
+++ b/dev-lang/zig/zig-0.5.0.ebuild |
31 |
@@ -0,0 +1,61 @@ |
32 |
+# Copyright 2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit cmake-utils llvm |
38 |
+ |
39 |
+DESCRIPTION="A robust, optimal, and maintainable programming language" |
40 |
+HOMEPAGE="https://ziglang.org/" |
41 |
+LICENSE="MIT" |
42 |
+SLOT="0" |
43 |
+IUSE="+experimental" |
44 |
+ |
45 |
+if [[ ${PV} == 9999 ]]; then |
46 |
+ EGIT_REPO_URI="https://github.com/ziglang/zig.git" |
47 |
+ inherit git-r3 |
48 |
+else |
49 |
+ SRC_URI="https://github.com/ziglang/zig/archive/${PV}.tar.gz -> ${P}.tar.gz" |
50 |
+ KEYWORDS="~amd64" |
51 |
+fi |
52 |
+ |
53 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 NVPTX |
54 |
+ PowerPC Sparc SystemZ WebAssembly X86 XCore ) |
55 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
56 |
+# According to zig's author, zig builds that do not support all targets are not |
57 |
+# supported by the upstream project. |
58 |
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]} |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ sys-devel/llvm:9 |
62 |
+ !experimental? ( sys-devel/llvm:9[${LLVM_TARGET_USEDEPS// /,}] ) |
63 |
+ sys-devel/clang:9 |
64 |
+" |
65 |
+ |
66 |
+DEPEND="${RDEPEND}" |
67 |
+ |
68 |
+LLVM_MAX_SLOT=9 |
69 |
+ |
70 |
+llvm_check_deps() { |
71 |
+ has_version "sys-devel/clang:${LLVM_SLOT}" |
72 |
+} |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ if use experimental; then |
76 |
+ sed -i '/^NEED_TARGET(/d' cmake/Findllvm.cmake || die "unable to modify cmake/Findllvm.cmake" |
77 |
+ fi |
78 |
+ |
79 |
+ sed -i 's/--prefix "${CMAKE_INSTALL_PREFIX}"/--prefix ".\/${CMAKE_INSTALL_PREFIX}"/' CMakeLists.txt || \ |
80 |
+ die "unable to fix install path" |
81 |
+ |
82 |
+ cmake-utils_src_prepare |
83 |
+} |
84 |
+ |
85 |
+src_configure() { |
86 |
+ local mycmakeargs=( |
87 |
+ -DCLANG_INCLUDE_DIRS="$(llvm-config --includedir)" |
88 |
+ -DCLANG_LIBDIRS="$(llvm-config --libdir)" |
89 |
+ ) |
90 |
+ |
91 |
+ cmake-utils_src_configure |
92 |
+} |