nim: bump to 1.4.6 (#5896)

This commit is contained in:
mgurga
2021-05-11 11:36:33 -07:00
committed by GitHub
parent 6c9b76575e
commit e7afa68017
2 changed files with 9 additions and 39 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_URI="https://github.com/nim-lang/Nim/archive/refs/tags/v$portVersion.tar.gz"
SOURCE_DIR="Nim-$portVersion"
CHECKSUM_SHA256="f041b63cbd7a5018a2a60f27aa3d2ea6f13890c1a2d8d79197a3b2fecb2614b1"
ADDITIONAL_FILES="
config.nims
nim.rdef.in
@@ -49,6 +49,7 @@ PROVIDES="
cmd:nimgrep$secondaryArchSuffix = $portVersion
cmd:nimpretty$secondaryArchSuffix = $portVersion
cmd:nimsuggest$secondaryArchSuffix = $portVersion
cmd:nimble$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -74,15 +75,8 @@ TEST_REQUIRES="
BUILD()
{
make $jobArgs CC=gcc LD=gcc
export XDG_CACHE_HOME="$sourceDir/cache"
bin/nim c -d:release 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
# Binaries
./build_all.sh
# Docs
./koch docs
@@ -94,7 +88,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)