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