summaryrefslogtreecommitdiff
path: root/dev-lang/nim
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/nim')
-rw-r--r--dev-lang/nim/Manifest3
-rw-r--r--dev-lang/nim/files/nim-0.20.0-paths.patch36
-rw-r--r--dev-lang/nim/nim-0.20.0.ebuild82
3 files changed, 121 insertions, 0 deletions
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index b6e538213b90..681426296638 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -1,6 +1,9 @@
AUX nim-0.19.0-paths.patch 934 BLAKE2B 08237a430441660a2d2380b243185c49301c80c9f5043319a7fc95419d9e8e84a4dd756bebef8692a396b80cef186fc9f9105e60a6877dca2171abee49d26d81 SHA512 c41fa08bd364af89557deca7e1f1a5d39c7e6b9e35b30b9f399465426c94953880ef4e7ac59acc1fdec70551ed5afbeb5de6b2fbd4d489d7b3538387bfa058ea
+AUX nim-0.20.0-paths.patch 934 BLAKE2B 6a4e44c5656cde6d5127bf6a6b8db92cdf8aada0892c27d536d0c1030ed7da8dc97138a8941030101918021f2a301fa683169c8a656fefc6fb7d0fcdb24029d4 SHA512 bf8dbc3e3861ec3ea2718092b981e495194ead5b547e69d01d5d842d128dc4b96b0ba3e95c78afd8fd822d594199315a01de370851ed8f594c091231b9a10ee9
DIST nim-0.19.4.tar.xz 4284092 BLAKE2B 7fcc4d4c13cd5ab0b9ac7b98b3ffff99ffcb77d0a23bb731b92813b5d96f5ce88303cb0196ad425f5944744f30aa1d257dc90714f6d11c1a26726ad4512206b7 SHA512 0cf87368b51bc305935b350b63c535ed268c066258ef731b73c12afaa9a3c20760876e3c4bec46448051fe8bacb6c4f1ef84f2ec3789f601a4786408bf3da06c
DIST nim-0.19.6.tar.xz 4166952 BLAKE2B 6be2cf16bc7807fe78e3d30d9533ab3c1eff1c2042c6af1aca0d7e8330597f2aaa363085f8da2448075be6cb1feb07186c28a32fb58f120af8f4db009dcd4561 SHA512 9728825e349570ec187c031725162b70fdb1a43229732d33fcfa61dde84fb6392c7265a456ce925fd7d1d782d7f9881398173bf69c0d1ecdbefbbb6bd57f6041
+DIST nim-0.20.0.tar.xz 4997088 BLAKE2B fd03837c1674052145cbed631be4d4028a31fdd46d8b730734781b65d5bbcd9cb118ef7ac14c1bc16f7e056365b5bddf32160bf84566ac4815cb12e330f8e712 SHA512 e41fc9f9337535d07ebdd14ae8195bf9c666a0a242516f24d50241e69d50e89fcb9ac1a0b1fbeee0bc75b0218aeb18698ff2ac87447005dad52dc18da80bb02d
EBUILD nim-0.19.4.ebuild 1701 BLAKE2B 722d99d2d6c83eb62a362ce0020bdfcb50f1b185f5e8deaa09e1a12a7570d8496869d40c2c4bba09099deab8fcae41e69ccce0dcb9133692d0cbdfe974b32047 SHA512 8b54a7ef70bfd9143c5fbaaa9e3f5a77e3e19c6d926b90473e3732345b73f0a3dccc2a1c46a90ed3f1e684624b1e6e6061f3309c2ad464a81d561ff60064fdec
EBUILD nim-0.19.6.ebuild 1701 BLAKE2B 722d99d2d6c83eb62a362ce0020bdfcb50f1b185f5e8deaa09e1a12a7570d8496869d40c2c4bba09099deab8fcae41e69ccce0dcb9133692d0cbdfe974b32047 SHA512 8b54a7ef70bfd9143c5fbaaa9e3f5a77e3e19c6d926b90473e3732345b73f0a3dccc2a1c46a90ed3f1e684624b1e6e6061f3309c2ad464a81d561ff60064fdec
+EBUILD nim-0.20.0.ebuild 1734 BLAKE2B 00de80e0dbcf7e0b30b0884e169ea488dff8e2fcf8688b5bcedda7a37688a5bf61f4a51dfae2ad89995067bc1dc6ebefbaede3c055555d7b664d39681a822958 SHA512 c09d02c2344b3c2f391b8134426e7612fbef028264717921a0af709c430eb579bef0f5c83f075f5800c7c68816bc95d21c9eceae006c8e3634ccc2c618407208
MISC metadata.xml 328 BLAKE2B 9205920d8c9b12118456bd186f2e882b3e6f75b7cc3f766def1e79e2e4f7ac695370409ff1555e379516606568f181f4ba3625322f70e41bfffd21d319b0035f SHA512 bf02bc0a8c25d6e157b7ab1ef87c2eac3241d42bc4cf0632a159dcb5d429051018848be81d0cbce228124660ced8694f5de48d64fe10bc7ff5b536b7e7579e49
diff --git a/dev-lang/nim/files/nim-0.20.0-paths.patch b/dev-lang/nim/files/nim-0.20.0-paths.patch
new file mode 100644
index 000000000000..a314eae2299b
--- /dev/null
+++ b/dev-lang/nim/files/nim-0.20.0-paths.patch
@@ -0,0 +1,36 @@
+Default to <prefix>/usr/bin install.
+
+https://bugs.gentoo.org/635032
+--- a/tools/niminst/install.nimf
++++ b/tools/niminst/install.nimf
+@@ -28,13 +28,13 @@ if [ $# -eq 1 ] ; then
+ echo "sh deinstall.sh DIR"
+ exit 1
+ ;;
+- "/usr/bin")
+- bindir=/usr/bin
+- configdir=/etc/?proj
+- libdir=/usr/lib/?proj
+- docdir=/usr/share/?proj/doc
+- datadir=/usr/share/?proj/data
+- nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
++ *)
++ bindir=$1/usr/bin
++ configdir=$1/etc/?proj
++ libdir=$1/usr/lib/?proj
++ docdir=$1/usr/share/?proj/doc
++ datadir=$1/usr/share/?proj/data
++ nimbleDir=$1"/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+ ;;
+ "/usr/local/bin")
+ bindir=/usr/local/bin
+@@ -68,6 +68,9 @@ if [ $# -eq 1 ] ; then
+ ;;
+ esac
+
++ mkdir -p $bindir
++ mkdir -p $datadir
++
+ mkdir -p $libdir
+ mkdir -p $docdir
+ mkdir -p $configdir
diff --git a/dev-lang/nim/nim-0.20.0.ebuild b/dev-lang/nim/nim-0.20.0.ebuild
new file mode 100644
index 000000000000..bb41a8721feb
--- /dev/null
+++ b/dev-lang/nim/nim-0.20.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 multiprocessing toolchain-funcs
+
+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"
+
+RESTRICT=test # need to sort out depends and numerous failures
+
+RDEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+DEPEND="
+ ${DEPEND}
+ test? ( net-libs/nodejs )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.20.0-paths.patch
+)
+
+_run() {
+ echo "$@"
+ "$@" || die "'$*' failed"
+}
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ export XDG_CACHE_HOME=${T}/cache #667182
+ tc-export CC LD
+
+ _run ./build.sh
+
+ _run ./bin/nim --parallelBuild:$(makeopts_jobs) c koch
+ _run ./koch boot --parallelBuild:$(makeopts_jobs) -d:release $(nim_use_enable readline useGnuReadline)
+ # build nimble and friends
+ # --stable to avoid pulling HEAD nimble
+ PATH="./bin:$PATH" _run ./koch --stable tools
+
+ if use doc; then
+ PATH="./bin:$PATH" _run ./koch doc
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" _run ./koch test
+}
+
+src_install() {
+ PATH="./bin:$PATH" _run ./koch install "${ED%/}"
+ rm -r "${ED%/}/usr/share/nim/doc" || die "failed to remove 'doc'"
+
+ exeinto /usr/bin
+
+ local bin_exe
+ for bin_exe in bin/*; do
+ # './koch install' installs only 'nim' binary
+ # but not the rest
+ [[ ${bin_exe} == bin/nim ]] && continue
+ doexe "${bin_exe}"
+ done
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/html/*.html
+ fi
+
+ newbashcomp tools/nim.bash-completion ${PN}
+}