Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F11047209
D1489.id4078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
15 KB
Referenced Files
None
Subscribers
None
D1489.id4078.diff
View Options
diff --git a/abi_used_libs b/abi_used_libs
--- a/abi_used_libs
+++ b/abi_used_libs
@@ -1,4 +1,5 @@
libc.so.6
libdl.so.2
libm.so.6
+libpthread.so.0
librt.so.1
diff --git a/files/0003-fix-tasyncsend4757-test.patch b/files/0003-fix-tasyncsend4757-test.patch
new file mode 100644
--- /dev/null
+++ b/files/0003-fix-tasyncsend4757-test.patch
@@ -0,0 +1,28 @@
+diff -Nru nim-0.17.2.orig/tests/async/tasyncsend4757.nim nim-0.17.2/tests/async/tasyncsend4757.nim
+--- nim-0.17.2.orig/tests/async/tasyncsend4757.nim 2017-09-07 21:45:44.000000000 +0300
++++ nim-0.17.2/tests/async/tasyncsend4757.nim 2017-11-06 22:31:36.859257572 +0300
+@@ -3,11 +3,22 @@
+ output: "Finished"
+ """
+
+-import asyncdispatch
++import asyncdispatch, asyncnet
++
++proc createServer(port: Port) {.async.} =
++ var server = newAsyncSocket()
++ server.setSockOpt(OptReuseAddr, true)
++ bindAddr(server, port)
++ server.listen()
++ while true:
++ let client = await server.accept()
++ discard await client.recvLine()
++
++asyncCheck createServer(10335.Port)
+
+ proc f(): Future[void] {.async.} =
+ let s = newAsyncNativeSocket()
+- await s.connect("example.com", 80.Port)
++ await s.connect("localhost", 10335.Port)
+ await s.send("123")
+ echo "Finished"
+
diff --git a/files/0005-fix-tnewasyncudp-endianness.patch b/files/0005-fix-tnewasyncudp-endianness.patch
new file mode 100644
--- /dev/null
+++ b/files/0005-fix-tnewasyncudp-endianness.patch
@@ -0,0 +1,12 @@
+diff -Nru nim-0.17.2.orig/tests/async/tnewasyncudp.nim nim-0.17.2/tests/async/tnewasyncudp.nim
+--- nim-0.17.2.orig/tests/async/tnewasyncudp.nim 2017-09-07 21:45:44.000000000 +0300
++++ nim-0.17.2/tests/async/tnewasyncudp.nim 2017-11-09 19:53:36.659185006 +0300
+@@ -86,7 +86,7 @@
+ size = 0
+ var grammString = $buffer
+ if grammString.startswith("Message ") and
+- saddr.sin_addr.s_addr == 0x100007F:
++ saddr.sin_addr.s_addr == nativesockets.ntohl(INADDR_LOOPBACK):
+ await sendTo(server, addr grammString[0], len(grammString),
+ cast[ptr SockAddr](addr saddr), slen)
+ inc(msgCount)
diff --git a/files/0007-fix-floats-in-tests.patch b/files/0007-fix-floats-in-tests.patch
new file mode 100644
--- /dev/null
+++ b/files/0007-fix-floats-in-tests.patch
@@ -0,0 +1,139 @@
+diff -Nru nim-0.17.2.orig/lib/pure/complex.nim nim-0.17.2/lib/pure/complex.nim
+--- nim-0.17.2.orig/lib/pure/complex.nim 2017-09-07 21:45:44.000000000 +0300
++++ nim-0.17.2/lib/pure/complex.nim 2017-11-15 23:03:41.767066276 +0300
+@@ -378,6 +378,9 @@
+
+
+ when isMainModule:
++ template assertEqual(actual: float, expected: float, epsilon = 1.0e-8, msg = "") =
++ doAssert(actual == expected or abs(abs(actual) - abs(expected)) < epsilon, msg)
++
+ var z = (0.0, 0.0)
+ var oo = (1.0,1.0)
+ var a = (1.0, 2.0)
+@@ -399,7 +402,7 @@
+ assert( tt/10.0 == a )
+ assert( oo+(-1.0) == i )
+ assert( (-1.0)+oo == i )
+- assert( abs(oo) == sqrt(2.0) )
++ assertEqual( abs(oo), sqrt(2.0) )
+ assert( conjugate(a) == (1.0, -2.0) )
+ assert( sqrt(m1) == i )
+ assert( exp(ipi) =~ m1 )
+@@ -437,7 +440,7 @@
+ assert( arccsch(a) =~ arcsinh(1/a) )
+ assert( arccoth(a) =~ arctanh(1/a) )
+
+- assert( phase(a) == 1.1071487177940904 )
++ assertEqual( phase(a), 1.1071487177940904 )
+ var t = polar(a)
+ assert( rect(t.r, t.phi) =~ a )
+ assert( rect(1.0, 2.0) =~ (-0.4161468365471424, 0.9092974268256817) )
+diff -Nru nim-0.17.2.orig/lib/pure/stats.nim nim-0.17.2/lib/pure/stats.nim
+--- nim-0.17.2.orig/lib/pure/stats.nim 2017-09-07 21:45:44.000000000 +0300
++++ nim-0.17.2/lib/pure/stats.nim 2017-11-15 22:59:02.094909978 +0300
+@@ -304,47 +304,50 @@
+ {.pop.}
+
+ when isMainModule:
++ template assertEqual(actual: float, expected: float, epsilon = 1.0e-8, msg = "") =
++ doAssert(actual == expected or abs(abs(actual) - abs(expected)) < epsilon, msg)
++
+ proc clean(x: float): float =
+ result = round(1.0e8*x).float * 1.0e-8
+
+ var rs: RunningStat
+ rs.push(@[1.0, 2.0, 1.0, 4.0, 1.0, 4.0, 1.0, 2.0])
+ doAssert(rs.n == 8)
+- doAssert(clean(rs.mean) == 2.0)
+- doAssert(clean(rs.variance()) == 1.5)
+- doAssert(clean(rs.varianceS()) == 1.71428571)
+- doAssert(clean(rs.skewness()) == 0.81649658)
+- doAssert(clean(rs.skewnessS()) == 1.01835015)
+- doAssert(clean(rs.kurtosis()) == -1.0)
+- doAssert(clean(rs.kurtosisS()) == -0.7000000000000001)
++ assertEqual(clean(rs.mean), 2.0)
++ assertEqual(clean(rs.variance()), 1.5)
++ assertEqual(clean(rs.varianceS()), 1.71428571)
++ assertEqual(clean(rs.skewness()), 0.81649658)
++ assertEqual(clean(rs.skewnessS()), 1.01835015)
++ assertEqual(clean(rs.kurtosis()), -1.0)
++ assertEqual(clean(rs.kurtosisS()), -0.7000000000000001)
+
+ var rs1, rs2: RunningStat
+ rs1.push(@[1.0, 2.0, 1.0, 4.0])
+ rs2.push(@[1.0, 4.0, 1.0, 2.0])
+ let rs3 = rs1 + rs2
+- doAssert(clean(rs3.mom2) == clean(rs.mom2))
+- doAssert(clean(rs3.mom3) == clean(rs.mom3))
+- doAssert(clean(rs3.mom4) == clean(rs.mom4))
++ assertEqual(clean(rs3.mom2), clean(rs.mom2))
++ assertEqual(clean(rs3.mom3), clean(rs.mom3))
++ assertEqual(clean(rs3.mom4), clean(rs.mom4))
+ rs1 += rs2
+- doAssert(clean(rs1.mom2) == clean(rs.mom2))
+- doAssert(clean(rs1.mom3) == clean(rs.mom3))
+- doAssert(clean(rs1.mom4) == clean(rs.mom4))
++ assertEqual(clean(rs1.mom2), clean(rs.mom2))
++ assertEqual(clean(rs1.mom3), clean(rs.mom3))
++ assertEqual(clean(rs1.mom4), clean(rs.mom4))
+ rs1.clear()
+ rs1.push(@[1.0, 2.2, 1.4, 4.9])
+- doAssert(rs1.sum == 9.5)
+- doAssert(rs1.mean() == 2.375)
++ assertEqual(rs1.sum, 9.5)
++ assertEqual(rs1.mean(), 2.375)
+
+ when not defined(cpu32):
+ # XXX For some reason on 32bit CPUs these results differ
+ var rr: RunningRegress
+ rr.push(@[0.0,1.0,2.8,3.0,4.0], @[0.0,1.0,2.3,3.0,4.0])
+- doAssert(rr.slope() == 0.9695585996955861)
+- doAssert(rr.intercept() == -0.03424657534246611)
+- doAssert(rr.correlation() == 0.9905100362239381)
++ assertEqual(rr.slope(), 0.9695585996955861)
++ assertEqual(rr.intercept(), -0.03424657534246611)
++ assertEqual(rr.correlation(), 0.9905100362239381)
+ var rr1, rr2: RunningRegress
+ rr1.push(@[0.0,1.0], @[0.0,1.0])
+ rr2.push(@[2.8,3.0,4.0], @[2.3,3.0,4.0])
+ let rr3 = rr1 + rr2
+- doAssert(rr3.correlation() == rr.correlation())
+- doAssert(clean(rr3.slope()) == clean(rr.slope()))
+- doAssert(clean(rr3.intercept()) == clean(rr.intercept()))
++ assertEqual(rr3.correlation(), rr.correlation())
++ assertEqual(clean(rr3.slope()), clean(rr.slope()))
++ assertEqual(clean(rr3.intercept()), clean(rr.intercept()))
+diff -Nru nim-0.17.2.orig/lib/pure/times.nim nim-0.17.2/lib/pure/times.nim
+--- nim-0.17.2.orig/lib/pure/times.nim 2017-09-07 21:45:44.000000000 +0300
++++ nim-0.17.2/lib/pure/times.nim 2017-11-15 22:58:50.670901055 +0300
+@@ -1387,18 +1387,21 @@
+
+
+ when isMainModule:
++ template assertEqual(actual: float, expected: float, epsilon = 1.0e-8, msg = "") =
++ doAssert(actual == expected or abs(abs(actual) - abs(expected)) < epsilon, msg)
++
+ # this is testing non-exported function
+ var
+ t4 = getGMTime(fromSeconds(876124714)) # Mon 6 Oct 08:58:34 BST 1997
+ t4L = getLocalTime(fromSeconds(876124714))
+- assert toSeconds(t4, initInterval(seconds=0)) == 0.0
+- assert toSeconds(t4L, initInterval(milliseconds=1)) == toSeconds(t4, initInterval(milliseconds=1))
+- assert toSeconds(t4L, initInterval(seconds=1)) == toSeconds(t4, initInterval(seconds=1))
+- assert toSeconds(t4L, initInterval(minutes=1)) == toSeconds(t4, initInterval(minutes=1))
+- assert toSeconds(t4L, initInterval(hours=1)) == toSeconds(t4, initInterval(hours=1))
+- assert toSeconds(t4L, initInterval(days=1)) == toSeconds(t4, initInterval(days=1))
+- assert toSeconds(t4L, initInterval(months=1)) == toSeconds(t4, initInterval(months=1))
+- assert toSeconds(t4L, initInterval(years=1)) == toSeconds(t4, initInterval(years=1))
++ assertEqual toSeconds(t4, initInterval(seconds=0)), 0.0
++ assertEqual toSeconds(t4L, initInterval(milliseconds=1)), toSeconds(t4, initInterval(milliseconds=1))
++ assertEqual toSeconds(t4L, initInterval(seconds=1)), toSeconds(t4, initInterval(seconds=1))
++ assertEqual toSeconds(t4L, initInterval(minutes=1)), toSeconds(t4, initInterval(minutes=1))
++ assertEqual toSeconds(t4L, initInterval(hours=1)), toSeconds(t4, initInterval(hours=1))
++ assertEqual toSeconds(t4L, initInterval(days=1)), toSeconds(t4, initInterval(days=1))
++ assertEqual toSeconds(t4L, initInterval(months=1)), toSeconds(t4, initInterval(months=1))
++ assertEqual toSeconds(t4L, initInterval(years=1)), toSeconds(t4, initInterval(years=1))
+
+ # Further tests are in tests/stdlib/ttime.nim
+ # koch test c stdlib
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,8 +1,8 @@
name : nim
-version : 0.17.0
-release : 10
+version : 0.17.2
+release : 11
source :
- - https://nim-lang.org/download/nim-0.17.0.tar.xz : 36e18dd9384f6c67e6d0199b871b43e774a0af30532698184d6f5a9cc9ac7a9b
+ - https://nim-lang.org/download/nim-0.17.2.tar.xz : aaff1b5023fc4a5708f1d7d9fd8e2a29f1a7f58bf496532ff1e9d7e7c7ec82bd
license : MIT
component : programming
summary : Nim programming language
@@ -10,11 +10,30 @@
Nim is a statically typed, imperative programming language.
setup : |
%patch < $pkgfiles/0001-Change-to-correct-dirs.patch
+ # fix some tests
+ %patch -p1 < $pkgfiles/0003-fix-tasyncsend4757-test.patch
+ %patch -p1 < $pkgfiles/0005-fix-tnewasyncudp-endianness.patch
+ %patch -p1 < $pkgfiles/0007-fix-floats-in-tests.patch
+builddeps :
+ - nodejs-devel # check
+rundeps :
+ - glibc-devel
+ - linux-headers
build : |
./build.sh
bin/nim c koch
./koch nimble
+ ./koch tools
install : |
./install.sh %installroot%
- install -Dm00755 bin/nimble $installdir/usr/bin/nimble
+
+ install -Dm00755 bin/* $installdir/usr/bin
+ install -Dm00644 tools/nim.bash-completion $installdir/usr/share/bash-completion/completions/nim
+ install -Dm00644 dist/nimble/nimble.bash-completion $installdir/usr/share/bash-completion/completions/nimble
mv $installdir%libdir%/nim/compiler.nimble $installdir%libdir%/nim/compiler/
+check : |
+ # don't test everything because it's too long
+ for cat in lib async float io bind rodfiles js debugger global threads
+ do
+ ./koch tests --pedantic category $cat -d:nimCoroutines || (echo "$cat test category failed" && exit 1)
+ done
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -2,8 +2,8 @@
<Source>
<Name>nim</Name>
<Packager>
- <Name>Joshua Strobl</Name>
- <Email>joshua@stroblindustries.com</Email>
+ <Name>Pierre-Yves</Name>
+ <Email>pyu@riseup.net</Email>
</Packager>
<License>MIT</License>
<PartOf>programming</PartOf>
@@ -106,6 +106,7 @@
<Path fileType="library">/usr/lib64/nim/compiler/procfind.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/readme.txt</Path>
<Path fileType="library">/usr/lib64/nim/compiler/renderer.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/compiler/reorder.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/rodread.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/rodutils.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/rodwrite.nim</Path>
@@ -137,7 +138,6 @@
<Path fileType="library">/usr/lib64/nim/compiler/suggest.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/syntaxes.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/tccgen.nim</Path>
- <Path fileType="library">/usr/lib64/nim/compiler/testability.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/transf.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/trees.nim</Path>
<Path fileType="library">/usr/lib64/nim/compiler/treetab.nim</Path>
@@ -208,9 +208,11 @@
<Path fileType="library">/usr/lib64/nim/pure/asyncdispatch.nim.cfg</Path>
<Path fileType="library">/usr/lib64/nim/pure/asyncfile.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/asyncftpclient.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/pure/asyncfutures.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/asynchttpserver.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/asyncmacro.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/asyncnet.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/pure/asyncstreams.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/base64.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/basic2d.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/basic3d.nim</Path>
@@ -258,7 +260,8 @@
<Path fileType="library">/usr/lib64/nim/pure/httpcore.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/httpserver.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/includes/asynccommon.nim</Path>
- <Path fileType="library">/usr/lib64/nim/pure/includes/asyncfutures.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/pure/includes/osenv.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/pure/includes/oserr.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/ioselectors.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/ioselects/ioselectors_epoll.nim</Path>
<Path fileType="library">/usr/lib64/nim/pure/ioselects/ioselectors_kqueue.nim</Path>
@@ -349,7 +352,7 @@
<Path fileType="library">/usr/lib64/nim/system/gc2.nim</Path>
<Path fileType="library">/usr/lib64/nim/system/gc_common.nim</Path>
<Path fileType="library">/usr/lib64/nim/system/gc_ms.nim</Path>
- <Path fileType="library">/usr/lib64/nim/system/gc_stack.nim</Path>
+ <Path fileType="library">/usr/lib64/nim/system/gc_regions.nim</Path>
<Path fileType="library">/usr/lib64/nim/system/hti.nim</Path>
<Path fileType="library">/usr/lib64/nim/system/inclrtl.nim</Path>
<Path fileType="library">/usr/lib64/nim/system/jssys.nim</Path>
@@ -389,16 +392,18 @@
<Path fileType="library">/usr/lib64/nim/wrappers/postgres.nim</Path>
<Path fileType="library">/usr/lib64/nim/wrappers/sqlite3.nim</Path>
<Path fileType="library">/usr/lib64/nim/wrappers/tinyc.nim</Path>
+ <Path fileType="data">/usr/share/bash-completion/completions/nim</Path>
+ <Path fileType="data">/usr/share/bash-completion/completions/nimble</Path>
<Path fileType="data">/usr/share/nim</Path>
</Files>
</Package>
<History>
- <Update release="10">
- <Date>2017-08-30</Date>
- <Version>0.17.0</Version>
+ <Update release="11">
+ <Date>2017-11-29</Date>
+ <Version>0.17.2</Version>
<Comment>Packaging update</Comment>
- <Name>Joshua Strobl</Name>
- <Email>joshua@stroblindustries.com</Email>
+ <Name>Pierre-Yves</Name>
+ <Email>pyu@riseup.net</Email>
</Update>
</History>
</PISI>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 11, 3:01 PM (3 h, 6 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5805457
Default Alt Text
D1489.id4078.diff (15 KB)
Attached To
Mode
D1489: Update nim to 0.17.2 + various enhancements
Attached
Detach File
Event Timeline
Log In to Comment