mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-03 02:12:18 +00:00
Tidy up
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
From 9da8d72c454646e2c04017e1c1c89d8005ab891a Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Avseyev <sergey.avseyev@gmail.com>
|
||||
Date: Thu, 5 Oct 2017 15:30:40 +0300
|
||||
Subject: [PATCH 1/5] allow to override directories in install script
|
||||
|
||||
---
|
||||
tools/niminst/install.nimf | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/tools/niminst/install.nimf b/tools/niminst/install.nimf
|
||||
index a78914ecd..adb274179 100644
|
||||
--- a/tools/niminst/install.nimf
|
||||
+++ b/tools/niminst/install.nimf
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
-if [ $# -eq 1 ] ; then
|
||||
+if [ $# -ge 1 ] ; then
|
||||
# if c.cat[fcUnixBin].len > 0:
|
||||
if test -f ?{c.cat[fcUnixBin][0].toUnix}
|
||||
then
|
||||
@@ -56,15 +56,16 @@ if [ $# -eq 1 ] ; then
|
||||
mkdir -p $configdir
|
||||
;;
|
||||
*)
|
||||
- bindir="$1/?proj/bin"
|
||||
- configdir="$1/?proj/config"
|
||||
- libdir="$1/?proj/lib"
|
||||
- docdir="$1/?proj/doc"
|
||||
- datadir="$1/?proj/data"
|
||||
- nimbleDir="$1/?proj"
|
||||
- mkdir -p $1/?proj
|
||||
+ bindir="$1"
|
||||
+ configdir="$2/?proj"
|
||||
+ libdir="$3/?proj"
|
||||
+ docdir="$4/?proj"
|
||||
+ datadir="$5/?proj"
|
||||
+ nimbleDir="$5/nimble/pkgs/?c.nimblePkgName-?c.version"
|
||||
mkdir -p $bindir
|
||||
mkdir -p $configdir
|
||||
+ mkdir -p $datadir
|
||||
+ mkdir -p $nimbleDir
|
||||
;;
|
||||
esac
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 57d451554d68767b7568900b88d2b9fc46b36a46 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Avseyev <sergey.avseyev@gmail.com>
|
||||
Date: Fri, 6 Oct 2017 23:08:16 +0300
|
||||
Subject: [PATCH 2/5] use _datadir for platform-independent library path
|
||||
|
||||
---
|
||||
compiler/options.nim | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler/options.nim b/compiler/options.nim
|
||||
index 45ee48944..ee1ac7363 100644
|
||||
--- a/compiler/options.nim
|
||||
+++ b/compiler/options.nim
|
||||
@@ -507,7 +507,7 @@ proc setDefaultLibpath*(conf: ConfigRef) =
|
||||
var prefix = getPrefixDir(conf)
|
||||
when defined(posix):
|
||||
if prefix == AbsoluteDir"/usr":
|
||||
- conf.libpath = AbsoluteDir"/usr/lib/nim"
|
||||
+ conf.libpath = AbsoluteDir"/usr/share/nim"
|
||||
elif prefix == AbsoluteDir"/usr/local":
|
||||
conf.libpath = AbsoluteDir"/usr/local/lib/nim"
|
||||
else:
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 3fae75e980793248fca34ca198edd8b6b39476df Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Avseyev <sergey.avseyev@gmail.com>
|
||||
Date: Fri, 28 Sep 2018 17:11:09 +0300
|
||||
Subject: [PATCH 3/5] use versioned source links in docs
|
||||
|
||||
---
|
||||
compiler/docgen.nim | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
|
||||
index 1b51988b8..07ba81fb4 100644
|
||||
--- a/compiler/docgen.nim
|
||||
+++ b/compiler/docgen.nim
|
||||
@@ -686,7 +686,7 @@ proc genItem(d: PDoc, n, nameNode: PNode, k: TSymKind) =
|
||||
let defaultBranch =
|
||||
if NimPatch mod 2 == 1: "devel"
|
||||
else: "version-$1-$2" % [$NimMajor, $NimMinor]
|
||||
- let commit = getConfigVar(d.conf, "git.commit", defaultBranch)
|
||||
+ let commit = getConfigVar(d.conf, "git.commit", "v" & NimVersion)
|
||||
let develBranch = getConfigVar(d.conf, "git.devel", "devel")
|
||||
dispA(d.conf, seeSrcRope, "$1", "", [ropeFormatNamedVars(d.conf, docItemSeeSrc,
|
||||
["path", "line", "url", "commit", "devel"], [rope path.string,
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From 55ed0c5c0a1dd410a421dcf94468b40f0267c071 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Avseyev <sergey.avseyev@gmail.com>
|
||||
Date: Wed, 28 Feb 2018 20:59:08 +0300
|
||||
Subject: [PATCH 4/5] fix compiler binary lookup in docgen
|
||||
|
||||
---
|
||||
lib/packages/docutils/rstgen.nim | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim
|
||||
index dedf9b39e..cd8773158 100644
|
||||
--- a/lib/packages/docutils/rstgen.nim
|
||||
+++ b/lib/packages/docutils/rstgen.nim
|
||||
@@ -840,6 +840,17 @@ proc renderSmiley(d: PDoc, n: PRstNode, result: var string) =
|
||||
"\\includegraphics{$1}",
|
||||
[d.config.getOrDefault"doc.smiley_format" % n.text])
|
||||
|
||||
+proc exe(f: string): string = return addFileExt(f, ExeExt)
|
||||
+
|
||||
+proc findNim(): string =
|
||||
+ var nim = "nim".exe
|
||||
+ result = "bin" / nim
|
||||
+ if existsFile(result): return
|
||||
+ for dir in split(getEnv("PATH"), PathSep):
|
||||
+ if existsFile(dir / nim): return dir / nim
|
||||
+ # assume there is a symlink to the exe or something:
|
||||
+ return nim
|
||||
+
|
||||
proc parseCodeBlockField(d: PDoc, n: PRstNode, params: var CodeBlockParams) =
|
||||
## Parses useful fields which can appear before a code block.
|
||||
##
|
||||
@@ -862,9 +873,9 @@ proc parseCodeBlockField(d: PDoc, n: PRstNode, params: var CodeBlockParams) =
|
||||
of "test":
|
||||
params.testCmd = n.getFieldValue.strip
|
||||
if params.testCmd.len == 0:
|
||||
- params.testCmd = "nim c -r $1"
|
||||
+ params.testCmd = findNim() & " c -r $1"
|
||||
else:
|
||||
- params.testCmd = unescape(params.testCmd)
|
||||
+ params.testCmd = unescape(params.testCmd.replaceWord("nim", findNim()))
|
||||
of "status", "exitcode":
|
||||
var status: int
|
||||
if parseInt(n.getFieldValue, status) > 0:
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 91a2ad76034d7c1d6b340e15e5badb745002631d Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Avseyev <sergey.avseyev@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 00:24:10 +0300
|
||||
Subject: [PATCH 5/5] Fix async SSL tests
|
||||
|
||||
Ensure that all messages has been send by client
|
||||
---
|
||||
tests/async/tasyncssl.nim | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/async/tasyncssl.nim b/tests/async/tasyncssl.nim
|
||||
index 88a5eb32e..af9ae4839 100644
|
||||
--- a/tests/async/tasyncssl.nim
|
||||
+++ b/tests/async/tasyncssl.nim
|
||||
@@ -20,8 +20,10 @@ when defined(ssl):
|
||||
var clientCount = 0
|
||||
|
||||
proc sendMessages(client: AsyncSocket) {.async.} =
|
||||
+ var sendFutures: seq[Future[void]] = @[]
|
||||
for i in 0 ..< messagesToSend:
|
||||
- await send(client, "Message " & $i & "\c\L")
|
||||
+ add(sendFutures, send(client, "Message " & $i & "\r\L"))
|
||||
+ await all(sendFutures)
|
||||
|
||||
proc launchSwarm(port: Port) {.async.} =
|
||||
for i in 0 ..< swarmSize:
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1 +1 @@
|
||||
rpm.version(gh("nim-lang/Nim"))
|
||||
rpm.version(gh("nim-lang/Nim"));
|
||||
|
||||
Reference in New Issue
Block a user