nim: bump to 1.4.6 (#5896)

korli: use the release tarball
This commit is contained in:
mgurga
2021-05-11 11:36:33 -07:00
committed by Jerome Duval
parent 0d5a1aac12
commit 41d6ef1069
2 changed files with 9 additions and 36 deletions

View File

@@ -9,13 +9,13 @@ Features:
* Produces dependency-free binaries
* Runs on Windows, macOS, Linux, and more"
HOMEPAGE="https://nim-lang.org/"
COPYRIGHT="2006-2018 Andreas Rumpf
2017-2018 Nim contributors"
COPYRIGHT="2006-2021 Andreas Rumpf
2017-2021 Nim contributors"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://nim-lang.org/download/nim-$portVersion.tar.xz"
CHECKSUM_SHA256="a09f0c58d29392434d4fd6d15d4059cf7e013ae948413cb9233b8233d67e3a29"
PATCHES="nim-$portVersion.patchset"
SOURCE_DIR="nim-$portVersion"
CHECKSUM_SHA256="0fbc0f9282cffe85de99bc47bfa876525b9ddda2a2eae55c185a08804b98d3bd"
ADDITIONAL_FILES="
config.nims
nim.rdef.in
@@ -46,6 +46,7 @@ USER_SETTINGS_FILES="
PROVIDES="
nim$secondaryArchSuffix = $portVersion
cmd:nim$secondaryArchSuffix = $portVersion
cmd:nimble$secondaryArchSuffix = $portVersion
cmd:nimgrep$secondaryArchSuffix = $portVersion
cmd:nimpretty$secondaryArchSuffix = $portVersion
cmd:nimsuggest$secondaryArchSuffix = $portVersion
@@ -74,15 +75,11 @@ TEST_REQUIRES="
BUILD()
{
make $jobArgs CC=gcc LD=gcc
export XDG_CACHE_HOME="$sourceDir/cache"
bin/nim c -d:release koch
sh build.sh
bin/nim c koch
./koch boot -d:release
bin/nim c -d:release -o:bin/nimsuggest nimsuggest/nimsuggest.nim
bin/nim c -d:release -o:bin/nimgrep tools/nimgrep.nim
bin/nim c -d:release -o:bin/nimpretty nimpretty/nimpretty.nim
./koch tools
# Docs
./koch docs
@@ -94,7 +91,7 @@ INSTALL()
"$developDocDir"
./koch install "$libDir"
install -t "$libDir/nim/bin" -m 755 bin/{nimsuggest,nimgrep,nimpretty}
install -t "$libDir/nim/bin" -m 755 bin/{nimsuggest,nimgrep,nimpretty,nimble}
ln -st "$binDir" "$libDir/nim/bin"/*
mv "$libDir/nim/config" "$settingsDir/nim"

View File

@@ -1,24 +0,0 @@
From 1f75fa4b9c8b138585f13db094f3642f228c0ece Mon Sep 17 00:00:00 2001
From: Leorize <leorize+oss@disroot.org>
Date: Mon, 7 Jan 2019 08:42:27 +0000
Subject: os.execShellCmd: use WEXITSTATUS to retrieve exit code
According to POSIX, system() shall returns the termination status in the
format specified by waitpid(), which means WEXITSTATUS should be used to
retrieve the exit code portably.
This fixes execShellCmd on Haiku.
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 96833056a0..a218121ed1 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -1298,7 +1298,7 @@ proc execShellCmd*(command: string): int {.rtl, extern: "nos$1",
## shell involved, use the `execProcess` proc of the `osproc`
## module.
when defined(posix):
- result = c_system(command) shr 8
+ result = WEXITSTATUS(c_system(command))
else:
result = c_system(command)