1 |
commit: fa753b1f6d3f193fa2752e22bb9391ad77b9802e |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 29 00:11:36 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 29 00:11:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa753b1f |
7 |
|
8 |
dev-lang/nim: bump up to 1.0.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
dev-lang/nim/Manifest | 1 + |
14 |
dev-lang/nim/nim-1.0.6.ebuild | 78 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 79 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest |
18 |
index 621b3396629..cf27238f3ec 100644 |
19 |
--- a/dev-lang/nim/Manifest |
20 |
+++ b/dev-lang/nim/Manifest |
21 |
@@ -1,2 +1,3 @@ |
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 |
+DIST nim-1.0.6.tar.xz 5153708 BLAKE2B c3263d4cf19629093306fa93decf038d8b19b8d810b7e782f84708b6771e2950554cda7c6f3d63e8dc6d2b604649fd31bd7009e51bea49ae556aa973cefc4167 SHA512 8da5281a8d93349996cbbe445e21fa9525c56e5721578ede2ae0f668cb2f29641db7d50a1b1a3e2c404ce56cb83dca10df5cbc84983242646a735b8f58d05f80 |
25 |
|
26 |
diff --git a/dev-lang/nim/nim-1.0.6.ebuild b/dev-lang/nim/nim-1.0.6.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..05a23695168 |
29 |
--- /dev/null |
30 |
+++ b/dev-lang/nim/nim-1.0.6.ebuild |
31 |
@@ -0,0 +1,78 @@ |
32 |
+# Copyright 1999-2020 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 |
+ use doc && dodoc doc/html/*.html |
108 |
+ newbashcomp tools/nim.bash-completion ${PN} |
109 |
+} |