summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-03-02 20:49:45 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2018-03-02 20:52:41 +0000
commit5f5b8085f0b8bdf8effa00e2f773fb1fa1e2377b (patch)
treed539f436e2fcd8d4a9f1d476b8fcba615d212c14 /dev-lang/nim
parentapp-arch/brotli-1.0.3: arm64 stable (bug #645698) (diff)
downloadgentoo-5f5b8085f0b8bdf8effa00e2f773fb1fa1e2377b.tar.gz
gentoo-5f5b8085f0b8bdf8effa00e2f773fb1fa1e2377b.tar.bz2
gentoo-5f5b8085f0b8bdf8effa00e2f773fb1fa1e2377b.zip
dev-lang/nim: bump up to 0.18.0
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-lang/nim')
-rw-r--r--dev-lang/nim/Manifest1
-rw-r--r--dev-lang/nim/nim-0.18.0.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index eb332d7ea6a5..dfd023bda128 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -1,3 +1,4 @@
DIST nim-0.16.0.tar.xz 2907076 BLAKE2B 5f14bb2634da32deb810381edf817e3885382ffce0a35db0ae3faca818bb0f5646b1619609e971fbe93ef383f3c4060029bf51a12ef0b4df75ebf0dde12753b5 SHA512 6be1c00328b7e5bdaa9070e1cd0e3c6e1883c5bc1e44e9c574785f9bce93697f05753f598cf6fdaa6c5a66f08c2ad6f7afb8f6650fc3b1c8e461eb0cf80baabd
DIST nim-0.17.0.tar.xz 25079320 BLAKE2B d01ade93ff299962aeea3dc9c90f0a8fe87acef8c2ee6d7d521d936c680aded0d8383221b7c11c3b2a8d6c28311c939456f271bbc90c1115acaae2c1987fa908 SHA512 90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b
DIST nim-0.17.2.tar.xz 4083084 BLAKE2B c1a4134592bb6a57bfaf6174becb409e40075c77042964c639b39fe7b30f094bfc8d404d6e1e4e527a95333a8ee4597477f1052da1af58c3216042bb2f85c826 SHA512 7b4ed1eb1e9067ce72b76b95c43ec74eb38f04611776c174ba6a697254a9253fed61258712fb938f15e662bb3b0d36138194fc8fa89bbcb4d22888263e5e2880
+DIST nim-0.18.0.tar.xz 4412632 BLAKE2B f7286542daa4c3502f4edeb9d93e6a69169228a50248f1c5c02421cb8e70c0ab99bc84cc91b35a6227a4974345423eeb3b5ffecdb18e321b0a82eb8fd0879a16 SHA512 8f59cb4a8d44949cdd1154fb44df548005329da8255becf2f54083ce58323ff8d6cf7b2fdd86d4b1f446bd9f977e8eaf4b13c7ca6723da8a10c7b671954de772
diff --git a/dev-lang/nim/nim-0.18.0.ebuild b/dev-lang/nim/nim-0.18.0.ebuild
new file mode 100644
index 000000000000..8b6f54d235fa
--- /dev/null
+++ b/dev-lang/nim/nim-0.18.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +readline test"
+
+DEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ ./build.sh || die "build.sh failed"
+
+ ./bin/nim c koch || die "csources nim failed"
+ ./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
+ # build nimble and friends
+ PATH="./bin:$PATH" ./koch tools || die "koch tools failed"
+
+ if use doc; then
+ PATH="./bin:$PATH" ./koch web || die "koch web failed"
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" ./koch test || die "test suite failed"
+}
+
+src_install() {
+ PATH="./bin:$PATH" ./koch install "${ED}/usr" || die "koch install failed"
+ rm -r "${ED}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ exeinto /usr/nim/bin
+
+ local bin_exe
+ for bin_exe in bin/*; do
+ # './koch install' installs only 'nim' binary
+ # but not the rest
+ doexe "${bin_exe}"
+ dosym ../nim/"${bin_exe}" /usr/"${bin_exe}"
+ done
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+
+ newbashcomp tools/nim.bash-completion ${PN}
+}