1 |
commit: d1272d4c770921b647badb63f12c369bee9c3a27 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 27 23:55:32 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 27 23:56:15 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1272d4c |
7 |
|
8 |
dev-lang/nim: bump up to 1.0.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
dev-lang/nim/Manifest | 1 + |
14 |
dev-lang/nim/nim-1.0.4.ebuild | 78 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 79 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest |
18 |
index 68c8fb8a0ae..621b3396629 100644 |
19 |
--- a/dev-lang/nim/Manifest |
20 |
+++ b/dev-lang/nim/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST nim-1.0.2.tar.xz 5139712 BLAKE2B bcb0f0fa2ed6069021a6359e453def7beccb6e767e3e1111ff27d8fb2adb7351336f219a88e2450df3d4aece1dd7f6e1a8fb891aa31581c32bb2535d2cf604a7 SHA512 5d7a45efcf656d5467554c3bbf42d0c62a760ccd107cec439d8375839d2e80baadfb3f598598748ef8e1b32d3eb931caaa273f8e41bbf6f4e16c7afbef745349 |
23 |
+DIST nim-1.0.4.tar.xz 5161396 BLAKE2B ff6f5b51775bfc8e83cf5ed91bf70d63d6af40cb8802d765b27a306d6a1c93ecbd4de64edfe9537b659c89c62c92ab46008d55616c7143fa9b8adaa4e905aa66 SHA512 0614259372500da4e5d67822d3caeec4c9ec6b1a06494768cfaff1db960484c1e9c1aafe70b05d1ac07b5f22d8ff57214f455e95dba26a5648d2186f13d1265a |
24 |
|
25 |
diff --git a/dev-lang/nim/nim-1.0.4.ebuild b/dev-lang/nim/nim-1.0.4.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..160171c5b09 |
28 |
--- /dev/null |
29 |
+++ b/dev-lang/nim/nim-1.0.4.ebuild |
30 |
@@ -0,0 +1,78 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit bash-completion-r1 multiprocessing toolchain-funcs |
37 |
+ |
38 |
+DESCRIPTION="compiled, garbage-collected systems programming language" |
39 |
+HOMEPAGE="https://nim-lang.org/" |
40 |
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz" |
41 |
+ |
42 |
+LICENSE="MIT" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~arm ~x86" |
45 |
+IUSE="doc +readline test" |
46 |
+ |
47 |
+RESTRICT=test # need to sort out depends and numerous failures |
48 |
+ |
49 |
+RDEPEND=" |
50 |
+ readline? ( sys-libs/readline:0= ) |
51 |
+" |
52 |
+DEPEND=" |
53 |
+ ${DEPEND} |
54 |
+ test? ( net-libs/nodejs ) |
55 |
+" |
56 |
+ |
57 |
+PATCHES=( |
58 |
+ "${FILESDIR}"/${PN}-0.20.0-paths.patch |
59 |
+) |
60 |
+ |
61 |
+_run() { |
62 |
+ echo "$@" |
63 |
+ "$@" || die "'$*' failed" |
64 |
+} |
65 |
+ |
66 |
+nim_use_enable() { |
67 |
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>" |
68 |
+ use $1 && echo "-d:$2" |
69 |
+} |
70 |
+ |
71 |
+src_compile() { |
72 |
+ export XDG_CACHE_HOME=${T}/cache #667182 |
73 |
+ tc-export CC LD |
74 |
+ |
75 |
+ _run ./build.sh |
76 |
+ |
77 |
+ _run ./bin/nim --parallelBuild:$(makeopts_jobs) c koch |
78 |
+ _run ./koch boot --parallelBuild:$(makeopts_jobs) -d:release $(nim_use_enable readline useGnuReadline) |
79 |
+ # build nimble and friends |
80 |
+ # --stable to avoid pulling HEAD nimble |
81 |
+ PATH="./bin:$PATH" _run ./koch --stable tools |
82 |
+ |
83 |
+ if use doc; then |
84 |
+ PATH="./bin:$PATH" _run ./koch doc |
85 |
+ fi |
86 |
+} |
87 |
+ |
88 |
+src_test() { |
89 |
+ PATH="./bin:$PATH" _run ./koch test |
90 |
+} |
91 |
+ |
92 |
+src_install() { |
93 |
+ PATH="./bin:$PATH" _run ./koch install "${ED}" |
94 |
+ rm -r "${ED}/usr/share/nim/doc" || die "failed to remove 'doc'" |
95 |
+ |
96 |
+ exeinto /usr/bin |
97 |
+ |
98 |
+ local bin_exe |
99 |
+ for bin_exe in bin/*; do |
100 |
+ # './koch install' installs only 'nim' binary |
101 |
+ # but not the rest |
102 |
+ [[ ${bin_exe} == bin/nim ]] && continue |
103 |
+ doexe "${bin_exe}" |
104 |
+ done |
105 |
+ |
106 |
+ use doc && dodoc doc/html/*.html |
107 |
+ newbashcomp tools/nim.bash-completion ${PN} |
108 |
+} |