dev-lang/nim: moved to ::gentoo

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć 2021-12-25 21:02:31 +01:00
parent 9df0eaec9e
commit 7557d9ad31
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
4 changed files with 0 additions and 136 deletions

View File

@ -1 +0,0 @@
DIST nim-1.6.0.tar.xz 5272976 BLAKE2B 2381108ee0661c2106c044cfc119bda4ea1c8eb2a642327bb29f3e23f16a4712ae1479913369ff3b62a073fa5f40b725259404acc21efb32d33cf9291f20e25b SHA512 ac6f20664a2bdc0a47d0b010120ac47590278afa3ef799d02e2fe6da597cacba128be9a0a77ef2f1d78f4ee79ae01732f34a6bfb918af268dccf768b9ca11627

View File

@ -1,36 +0,0 @@
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

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xgqt@riseup.net</email>
<name>Maciej Barć</name>
</maintainer>
<longdescription lang="en">
Nim is a statically typed compiled systems programming language.
It combines successful concepts from mature languages like Python,
Ada and Modula. Its design focuses on efficiency, expressiveness
and elegance (in that order of priority).
</longdescription>
<upstream>
<bugs-to>https://github.com/nim-lang/Nim/issues</bugs-to>
<remote-id type="github">nim-lang/Nim</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,80 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 multiprocessing toolchain-funcs
DESCRIPTION="Statically typed, compiled, garbage-collected systems programming language"
HOMEPAGE="https://nim-lang.org"
SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
# Failing tests
RESTRICT="test"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
QA_FLAGS_IGNORED="
usr/bin/nim_dbg
usr/bin/nimble
usr/bin/nimgrep
usr/bin/nimpretty
usr/bin/nimsuggest
usr/bin/testament
usr/bin/atlas
"
PATCHES=( "${FILESDIR}/paths.patch" )
function Run() {
echo "Running: ${@}"
PATH="${S}/bin:${PATH}" "${@}" || die "ERROR: \"${*}\" failed"
}
src_configure() {
tc-export CC CXX LD
export XDG_CACHE_HOME="${T}/cache"
unset NIMBLE_DIR
local build_type
if use debug; then
build_type="debug"
else
build_type="release"
fi
export nim_opts=( --parallelBuild:$(makeopts_jobs) -d:${build_type} )
local nimcfg="$(pwd)/config/nim.cfg"
Run touch "${nimcfg}"
echo "gcc.exe = \"$(tc-getCC)\"" >> "${nimcfg}"
echo "gcc.linkerexe = \"$(tc-getCC)\"" >> "${nimcfg}"
echo "gcc.cpp.exe = \"$(tc-getCXX)\"" >> "${nimcfg}"
echo "gcc.cpp.linkerexe = \"$(tc-getCXX)\"" >> "${nimcfg}"
}
src_compile() {
Run bash ./build.sh
Run nim compile ${nim_opts[@]} ./koch.nim
Run ./koch tools ${nim_opts[@]}
}
# src_test() {
# Run ./koch test
# }
src_install() {
Run ./koch install "${ED}"
exeinto /usr/bin
local exe
for exe in ./bin/*; do
doexe "${exe}"
done
newbashcomp ./tools/nim.bash-completion nim
newbashcomp ./dist/nimble/nimble.bash-completion nimble
}