Skip to content

Commit

Permalink
dev-lang/nim: bump up to 0.20.2
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Sergei Trofimovich <[email protected]>
  • Loading branch information
Sergei Trofimovich committed Jul 17, 2019
1 parent a5434e5 commit cd2d1d8
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-lang/nim/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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
DIST nim-0.20.2.tar.xz 5032768 BLAKE2B 583e0b5cede279a0c0a60d4209f9be6237ff5ac070c0e82a075a242d08086e59c88c2ab29cbf3d2c6d7a455709b64086afd11e4928fcc9e81979d5296ef38b64 SHA512 231d95950ca5a7abe86175f93085ea27fae493e4f8dde3c9e086993431f9517781ceffeb4f9e761eb524523df3703d0a315fe53e32bc6daea6a684bf90589282
82 changes: 82 additions & 0 deletions dev-lang/nim/nim-0.20.2.ebuild
Original file line number Diff line number Diff line change
@@ -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}
}

0 comments on commit cd2d1d8

Please sign in to comment.