pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Make wip/nim v.2.4.0 build under NetBSD-current
Module Name: pkgsrc-wip
Committed By: ci4ic4 <ci4ic4%gmail.com@localhost>
Pushed By: ci4ic4
Date: Tue Nov 3 16:12:20 2026 +0000
Changeset: c5cc9af35dc3781f79633efed2bcb36b822b5061
Modified Files:
nim/distinfo
Added Files:
nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
Log Message:
Make wip/nim v.2.4.0 build under NetBSD-current
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c5cc9af35dc3781f79633efed2bcb36b822b5061
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
nim/distinfo | 2 ++
.../patch-dist_nimble_src_nimblepkg_downloadnim.nim | 16 ++++++++++++++++
...ch-dist_nimble_vendor_chronos_chronos_sendfile.nim | 19 +++++++++++++++++++
3 files changed, 37 insertions(+)
diffs:
diff --git a/nim/distinfo b/nim/distinfo
index 62386e3f01..016029d315 100644
--- a/nim/distinfo
+++ b/nim/distinfo
@@ -9,3 +9,5 @@ Size (nim-2.4.0.tar.xz) = 16957544 bytes
BLAKE2s (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = e61713da1b17aea1a345df71dc22cd8ec2058623546668a7b9af6db501d1a224
SHA512 (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 6dff5f65bb7aaa7c59b7c832e760b35ba6f9aebbc53ef6e4d87ef3dde6308458cd6c27988c309f60f8eca9019e135fb34981704310cb55b5dd5c84de1641b20d
Size (sat-9d52513b3c68bfb929dbd687d4fb2836cfee6936.tar.gz) = 10247 bytes
+SHA1 (patch-dist_nimble_src_nimblepkg_downloadnim.nim) = 499197b81265ecf16d4c6baeca54673aead052c6
+SHA1 (patch-dist_nimble_vendor_chronos_chronos_sendfile.nim) = da30276501e0521056267c28f35e14949f5a2f96
diff --git a/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim b/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
new file mode 100644
index 0000000000..a58b65cf92
--- /dev/null
+++ b/nim/patches/patch-dist_nimble_src_nimblepkg_downloadnim.nim
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Add NetBSD to nimble's nightly-OS detection. Without a matching branch the
+`when` expression in getNightliesUrl is empty on NetBSD and the compiler
+rejects it with "expression '' has no type (or is ambiguous)".
+
+--- dist/nimble/src/nimblepkg/downloadnim.nim.orig
++++ dist/nimble/src/nimblepkg/downloadnim.nim
+@@ -146,5 +146,7 @@
+ elif defined(openbsd):
+ "openbsd"
+ elif defined(haiku):
+ "haiku"
++ elif defined(netbsd):
++ "netbsd"
+ for jn in parsedContents.getElems():
diff --git a/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim b/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
new file mode 100644
index 0000000000..2fd5d355e5
--- /dev/null
+++ b/nim/patches/patch-dist_nimble_vendor_chronos_chronos_sendfile.nim
@@ -0,0 +1,19 @@
+$NetBSD$
+
+NetBSD does not provide sendfile(2) (no libc symbol, no header declaration,
+no man page). chronos grouped NetBSD with the BSDs that do, so the generated
+code called an implicitly-declared function, which the pkgsrc compiler
+wrapper turns into an error. Treat NetBSD like emscripten/haiku instead.
+
+--- dist/nimble/vendor/chronos/chronos/sendfile.nim.orig
++++ dist/nimble/vendor/chronos/chronos/sendfile.nim
+@@ -41,3 +41,3 @@
+-elif defined(emscripten) or defined(haiku):
++elif defined(emscripten) or defined(haiku) or defined(netbsd):
+
+ proc sendfile*(outfd, infd: int, offset: int, count: var int): int =
+@@ -67,3 +67,2 @@
+-elif defined(freebsd) or defined(openbsd) or defined(netbsd) or
+- defined(dragonflybsd):
++elif defined(freebsd) or defined(openbsd) or defined(dragonflybsd):
+ import oserrno
Home |
Main Index |
Thread Index |
Old Index