summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-07-28 21:39:33 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2016-07-28 21:39:51 +0100
commit8c46ca63853a3da95a58f5488130294ee0f1c8a0 (patch)
treee8016d14797a08c291b8eeea413197c1e098e331
parentdev-libs/libical: Remove 2.0.0 (r0) (diff)
downloadgentoo-8c46ca63853a3da95a58f5488130294ee0f1c8a0.tar.gz
gentoo-8c46ca63853a3da95a58f5488130294ee0f1c8a0.tar.bz2
gentoo-8c46ca63853a3da95a58f5488130294ee0f1c8a0.zip
dev-lang/nim: new package, bug #535938 by Stefan Talpalaru
Compiled via C statically typed modern language. This ebuild is a slightly regreshed version written by Stefan Talpalaru. Bug: https://bugs.gentoo.org/535938 Package-Manager: portage-2.3.0
-rw-r--r--dev-lang/nim/Manifest1
-rw-r--r--dev-lang/nim/metadata.xml11
-rw-r--r--dev-lang/nim/nim-0.14.2.ebuild55
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
new file mode 100644
index 000000000000..651229b8a654
--- /dev/null
+++ b/dev-lang/nim/Manifest
@@ -0,0 +1 @@
+DIST nim-0.14.2.tar.xz 4778444 SHA256 8f8d38d70ed57164795fc55e19de4c11488fcd31dbe42094e44a92a23e3f5e92 SHA512 34afd07fafd066f6b4acc423c21e1cc275dce00f575d01f0d1edc147946930cf13c772abe0c4a081e2e0091ad41f6ae5cead20cc4d9a7cb3bc628ad7469f6459 WHIRLPOOL 7109f28fd8e0e83a386e9a26b46a3fbb2ad9cc0c8736107fe7eb573c301768d0c3d149407657478431f8107a539cb18bb6db5ce0e0de6e96e25769dfec43a2df
diff --git a/dev-lang/nim/metadata.xml b/dev-lang/nim/metadata.xml
new file mode 100644
index 000000000000..b7796e3694d8
--- /dev/null
+++ b/dev-lang/nim/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">nim-lang/Nim</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/nim/nim-0.14.2.ebuild b/dev-lang/nim/nim-0.14.2.ebuild
new file mode 100644
index 000000000000..005344ba8df5
--- /dev/null
+++ b/dev-lang/nim/nim-0.14.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=6
+
+MY_PN=Nim
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="http://nim-lang.org/"
+SRC_URI="http://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~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"
+
+ if use doc; then
+ PATH="./bin:$PATH" ./koch web || die "koch web failed"
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" ./koch test || die "test suire failed"
+}
+
+src_install() {
+ ./koch install "${D}/usr" || die "koch install failed"
+ rm -r "${D}/usr/nim/doc"
+
+ dodir /usr/bin
+ dosym ../nim/bin/nim /usr/bin/nim
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+}