Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] nim: update to 1.6.0
@ 2021-11-16 20:40 EliteTK
  2021-11-16 20:48 ` [PR PATCH] [Updated] " EliteTK
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: EliteTK @ 2021-11-16 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

There is a new pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

[RFC] nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet.
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 3512 bytes --]

From 3a857816605a0431e19137d2ee93dacb72a1be52 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0

---
 srcpkgs/nim/template | 39 ++++++++++++++-------------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..0c999bc49b86 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
  ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
-	case "$XBPS_TARGET_MACHINE" in
-		i686*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
-		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
-	esac
-	cd ..
+	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -75,7 +63,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +84,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
@ 2021-11-16 20:48 ` EliteTK
  2021-11-16 21:20 ` EliteTK
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-16 20:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

[RFC] nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet.
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 3601 bytes --]

From 22c21553eb0bf8aa68c9599df464ab4741299a86 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0

---
 srcpkgs/nim/template | 41 +++++++++++++++--------------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..03e43226c0eb 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
-	case "$XBPS_TARGET_MACHINE" in
-		i686*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
-		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
-	esac
-	cd ..
+	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -75,7 +63,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +84,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
  2021-11-16 20:48 ` [PR PATCH] [Updated] " EliteTK
@ 2021-11-16 21:20 ` EliteTK
  2021-11-17 23:37 ` [PR PATCH] [Updated] " EliteTK
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-16 21:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-970688635

Comment:
Well, the CI didn't complain about the lack of passing ucpu=i686 to the bootstrap compiler build when compiling for i686. Would anyone know why that would ever be necessary?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
  2021-11-16 20:48 ` [PR PATCH] [Updated] " EliteTK
  2021-11-16 21:20 ` EliteTK
@ 2021-11-17 23:37 ` EliteTK
  2021-11-17 23:45 ` EliteTK
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-17 23:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

[RFC] nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 4615 bytes --]

From 22c21553eb0bf8aa68c9599df464ab4741299a86 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH 1/2] nim: update to 1.6.0

---
 srcpkgs/nim/template | 41 +++++++++++++++--------------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..03e43226c0eb 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
-	case "$XBPS_TARGET_MACHINE" in
-		i686*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
-		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
-	esac
-	cd ..
+	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -75,7 +63,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +84,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

From 7a6edef7d293507f7daba1af8e415db64e8b9410 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Wed, 17 Nov 2021 23:36:46 +0000
Subject: [PATCH 2/2] nim: revert to previous i686 build method

I think I figured out why things were done the way they were, I just
want to test what happens in CI.

This will be squashed if I'm right or dropped if not.
---
 srcpkgs/nim/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 03e43226c0eb..6b40ce7a15c4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -27,7 +27,15 @@ post_extract() {
 }
 
 do_build() {
-	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
+	cd csources_v1
+	case "$XBPS_TARGET_MACHINE" in
+		i686*)
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			sh build.sh --cpu i686;;
+		*)
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+	esac
+	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (2 preceding siblings ...)
  2021-11-17 23:37 ` [PR PATCH] [Updated] " EliteTK
@ 2021-11-17 23:45 ` EliteTK
  2021-11-18  7:40 ` [PR PATCH] [Updated] " EliteTK
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-17 23:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-972304584

Comment:
Since github has drafts now, I've made this one.

I got to thinking about the i686 build and I think I understand how it works.

The cpu is set to i686 because nim doesn't really support cross-building the compiler. The problem is this doesn't actually work when you try to run the compile locally (and it didn't work for the previous csources) so I'm confused there. I pushed to see what CI says about it.

I think actually the correct solution would be to do for i686 what we're currently doing for the other non x86_64 arches an I'm not sure why that isn't the case already.

But in the meanwhile, if this does end up working in CI, I would like to keep it that way and get this version bump merged. Then doing i686 builds properly can be a task for later.

That being said I think _ALL_ builds should be done the way that they are for non-x86_64/i686 and that's so you can cross-compile a nim void package from a non-x86_64 machine. But I don't know what the void policy is there.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (3 preceding siblings ...)
  2021-11-17 23:45 ` EliteTK
@ 2021-11-18  7:40 ` EliteTK
  2021-11-18  9:24 ` EliteTK
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18  7:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 4615 bytes --]

From 22c21553eb0bf8aa68c9599df464ab4741299a86 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH 1/2] nim: update to 1.6.0

---
 srcpkgs/nim/template | 41 +++++++++++++++--------------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..03e43226c0eb 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
-	case "$XBPS_TARGET_MACHINE" in
-		i686*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
-		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
-	esac
-	cd ..
+	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -75,7 +63,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +84,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

From b4c4955906869b014b256d44a05a5898e2d9971b Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Wed, 17 Nov 2021 23:36:46 +0000
Subject: [PATCH 2/2] nim: revert to previous i686 build method

I think I figured out why things were done the way they were, I just
want to test what happens in CI.

This will be squashed if I'm right or dropped if not.
---
 srcpkgs/nim/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 03e43226c0eb..6b40ce7a15c4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -27,7 +27,15 @@ post_extract() {
 }
 
 do_build() {
-	CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= make -C csources_v1 ${makejobs}
+	cd csources_v1
+	case "$XBPS_TARGET_MACHINE" in
+		i686*)
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			sh build.sh --cpu i686;;
+		*)
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+	esac
+	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (4 preceding siblings ...)
  2021-11-18  7:40 ` [PR PATCH] [Updated] " EliteTK
@ 2021-11-18  9:24 ` EliteTK
  2021-11-18  9:26 ` EliteTK
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18  9:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 3374 bytes --]

From 7a320bdb3b8e793cfc532aea63df32d02ebccd3b Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0

---
 srcpkgs/nim/template | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..6b40ce7a15c4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,23 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
+	cd csources_v1
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
@@ -75,7 +71,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +92,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (5 preceding siblings ...)
  2021-11-18  9:24 ` EliteTK
@ 2021-11-18  9:26 ` EliteTK
  2021-11-18 19:18 ` EliteTK
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18  9:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-972685163

Comment:
Okay, that worked, I checked the existing packages for nim in the repositories for other arches and they are compiled correctly. The void cross-building system confuses me but I've squashed the revert and I'm going to mark this as ready for review.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (6 preceding siblings ...)
  2021-11-18  9:26 ` EliteTK
@ 2021-11-18 19:18 ` EliteTK
  2021-11-18 20:10 ` [PR PATCH] [Updated] " EliteTK
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18 19:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-973179581

Comment:
Okay, so I figured out that the current (and this bump doesn't change this) packages which ship for voidlinux come with a nim.cfg which sets the compiler for multiple architectures to be the cross compiler for the package architecture on non-x86_64 and non-i686 packages.

I verified this by just downloading an aarch64 package and checking the config.

There's an easy workaround for this I can put into a separate commit.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (7 preceding siblings ...)
  2021-11-18 19:18 ` EliteTK
@ 2021-11-18 20:10 ` EliteTK
  2021-11-18 20:12 ` nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template EliteTK
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18 20:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 9265 bytes --]

From 7a320bdb3b8e793cfc532aea63df32d02ebccd3b Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH 1/5] nim: update to 1.6.0

---
 srcpkgs/nim/template | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..6b40ce7a15c4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,23 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
+	cd csources_v1
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
@@ -75,7 +71,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +92,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

From 251e103f959972eaae472cad577ffc184ee73f7e Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:00:31 +0000
Subject: [PATCH 2/5] nim: fix non-x86_64/i686 nim.cfg

Currently non-x86_64/i686 builds end up with a broken nim.cfg which
tries to use the target architecture cross-compiler to build packages
for the target architecture (as well as a bunch of other architectures).

By temporarily setting the cross-compiler during the build, the final
nim.cfg which gets installed is the default one.
---
 srcpkgs/nim/template | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 6b40ce7a15c4..db8eba0a8845 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=1
+revision=2
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -50,21 +50,10 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
 		for _p in \
@@ -77,6 +66,7 @@ do_build() {
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
 		done
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac

From ef55cf51ec252f93870e26c3d4a641f34279c4ed Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:04:08 +0000
Subject: [PATCH 3/5] nim: fix arm nim.cfg compiler configuration

Since the default nim.cfg provides a arm.linux.gcc.(linker)?exe preset,
it will break builds when you're on arm. Since posix sh has no
fallthroughs, this patch comments the preset on all non-x86_64/i686
builds.
---
 srcpkgs/nim/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index db8eba0a8845..da0a26ff194a 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=2
+revision=3
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -50,6 +50,7 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
 		cat >>config/nim.cfg <<-EDIT
 		# VOIDLINUX TEMP
 		$_arch.linux.gcc.exe = "$CC"

From 2220ff31b2038aae459010d029c38b3505e9e770 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:06:29 +0000
Subject: [PATCH 4/5] nim: use koch to build non-x86_64/i686 tools

This simplifies the template a bit.

note: nimsuggest is now built without -d:release on non-x86_64/i686
builds now, I don't know if this is intentional or an upstream bug but
this actually means it now matches how nimsuggest is built on
x86_64/i686
---
 srcpkgs/nim/template | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index da0a26ff194a..e67564ac25a2 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=3
+revision=4
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -56,17 +56,8 @@ do_build() {
 		$_arch.linux.gcc.exe = "$CC"
 		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
-		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty \
-			testament/testament
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		bin/nim c -d:release -d:danger --cpu:$_arch --listCmd compiler/nim
+		./koch tools --cpu:$_arch --listCmd
 		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools

From 5f45362dceb2288b227387368622b03f26439665 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:09:09 +0000
Subject: [PATCH 5/5] nim: use make to build the bootstrap compiler

The build_all.sh script now uses make, I don't think there's any
difference between this and using build.sh except that it can take
advantage of makejobs and avoids having to cd around.
---
 srcpkgs/nim/template | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index e67564ac25a2..ba7f3fbeaeea 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=4
+revision=5
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -27,15 +27,14 @@ post_extract() {
 }
 
 do_build() {
-	cd csources_v1
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (8 preceding siblings ...)
  2021-11-18 20:10 ` [PR PATCH] [Updated] " EliteTK
@ 2021-11-18 20:12 ` EliteTK
  2021-11-18 20:21 ` [PR PATCH] [Updated] " EliteTK
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-973224035

Comment:
I've now pushed the cross-platform build fixes as well as a few template improvements.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (9 preceding siblings ...)
  2021-11-18 20:12 ` nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template EliteTK
@ 2021-11-18 20:21 ` EliteTK
  2021-11-19 23:07 ` EliteTK
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-18 20:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 9172 bytes --]

From 7a320bdb3b8e793cfc532aea63df32d02ebccd3b Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH 1/5] nim: update to 1.6.0

---
 srcpkgs/nim/template | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..6b40ce7a15c4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,23 +14,20 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
+	cd csources_v1
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
@@ -75,7 +71,8 @@ do_build() {
 			dist/nimble/src/nimble \
 			tools/nimgrep \
 			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
+			nimpretty/nimpretty \
+			testament/testament
 		do
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
@@ -95,15 +92,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

From 251e103f959972eaae472cad577ffc184ee73f7e Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:00:31 +0000
Subject: [PATCH 2/5] nim: fix non-x86_64/i686 nim.cfg

Currently non-x86_64/i686 builds end up with a broken nim.cfg which
tries to use the target architecture cross-compiler to build packages
for the target architecture (as well as a bunch of other architectures).

By temporarily setting the cross-compiler during the build, the final
nim.cfg which gets installed is the default one.
---
 srcpkgs/nim/template | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 6b40ce7a15c4..db8eba0a8845 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=1
+revision=2
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -50,21 +50,10 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
 		for _p in \
@@ -77,6 +66,7 @@ do_build() {
 			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
 			mv $_p bin
 		done
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac

From ef55cf51ec252f93870e26c3d4a641f34279c4ed Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:04:08 +0000
Subject: [PATCH 3/5] nim: fix arm nim.cfg compiler configuration

Since the default nim.cfg provides a arm.linux.gcc.(linker)?exe preset,
it will break builds when you're on arm. Since posix sh has no
fallthroughs, this patch comments the preset on all non-x86_64/i686
builds.
---
 srcpkgs/nim/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index db8eba0a8845..da0a26ff194a 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=2
+revision=3
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -50,6 +50,7 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
 		cat >>config/nim.cfg <<-EDIT
 		# VOIDLINUX TEMP
 		$_arch.linux.gcc.exe = "$CC"

From 6d9a186f919b45c3b69242f3bb54f19f53a1cff5 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:06:29 +0000
Subject: [PATCH 4/5] nim: use koch to build non-x86_64/i686 tools

This simplifies the template a bit.

note: nimsuggest is now built without -d:release on non-x86_64/i686
builds now, I don't know if this is intentional or an upstream bug but
this actually means it now matches how nimsuggest is built on
x86_64/i686
---
 srcpkgs/nim/template | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index da0a26ff194a..bc49ef4aff77 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=3
+revision=4
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -57,16 +57,7 @@ do_build() {
 		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty \
-			testament/testament
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		./koch tools --os:linux --cpu:$_arch --listCmd
 		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools

From 39466d4a680cb63355bd7df80862ae78d96d57bc Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Thu, 18 Nov 2021 20:09:09 +0000
Subject: [PATCH 5/5] nim: use make to build the bootstrap compiler

The build_all.sh script now uses make, I don't think there's any
difference between this and using build.sh except that it can take
advantage of makejobs and avoids having to cd around.
---
 srcpkgs/nim/template | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index bc49ef4aff77..1dc036013ff4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,7 +1,7 @@
 # Template file for 'nim'
 pkgname=nim
 version=1.6.0
-revision=4
+revision=5
 _c1version=561b417c65791cd8356b5f73620914ceff845d10
 _nimbleversion=0.13.1
 create_wrksrc=yes
@@ -27,15 +27,14 @@ post_extract() {
 }
 
 do_build() {
-	cd csources_v1
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (10 preceding siblings ...)
  2021-11-18 20:21 ` [PR PATCH] [Updated] " EliteTK
@ 2021-11-19 23:07 ` EliteTK
  2021-11-19 23:07 ` EliteTK
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-19 23:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 5639 bytes --]

From 57d5f3f5b38658c0fe477c41108d4449cbc42816 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0 (and fixes + cleanup)

Version bump to 1.6.0 including the following changes:

- Nim now comes with testament
- Fusion library is no longer bundled with nim
- Examples no longer come with nim
- FIX - non-x86_64/i686 nim.cfg compiler configuration
  Non-x86_64/i686 builds no longer end up with a broken nim.cfg which
  will try to use the package build time $CC to build packages for the
  package architecture as well as a bunch of others (which will simply
  not work).
- FIX - arm nim.cfg compiler configuration
  The default arm.linux.gcc.(linker)?exe variables are now commented on
  non-x86_64/i686 builds to ensure that arm packages don't end up with
  the same issue as above.
- CLEANUP - use koch to build non-x86_64/i686 tools
  The loop was unnecessary.
  - note: This means nimsuggest is now built without -d:release on all
    builds (not just x86_64/i686 builds). I am not sure if this is
    intentional or an upstream bug, should be investigated at some
    point.
- CLEANUP - use make to build the bootstrap compiler
---
 srcpkgs/nim/template | 68 +++++++++++++++-----------------------------
 1 file changed, 23 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..1dc036013ff4 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
-revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+version=1.6.0
+revision=5
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,27 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -54,32 +49,15 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		./koch tools --os:linux --cpu:$_arch --listCmd
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac
@@ -95,15 +73,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (11 preceding siblings ...)
  2021-11-19 23:07 ` EliteTK
@ 2021-11-19 23:07 ` EliteTK
  2021-11-19 23:13 ` EliteTK
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-19 23:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 5627 bytes --]

From 452efcd2fe1011f8f7b3f387bb6a71997bda007b Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0 (and fixes + cleanup)

Version bump to 1.6.0 including the following changes:

- Nim now comes with testament
- Fusion library is no longer bundled with nim
- Examples no longer come with nim
- FIX - non-x86_64/i686 nim.cfg compiler configuration
  Non-x86_64/i686 builds no longer end up with a broken nim.cfg which
  will try to use the package build time $CC to build packages for the
  package architecture as well as a bunch of others (which will simply
  not work).
- FIX - arm nim.cfg compiler configuration
  The default arm.linux.gcc.(linker)?exe variables are now commented on
  non-x86_64/i686 builds to ensure that arm packages don't end up with
  the same issue as above.
- CLEANUP - use koch to build non-x86_64/i686 tools
  The loop was unnecessary.
  - note: This means nimsuggest is now built without -d:release on all
    builds (not just x86_64/i686 builds). I am not sure if this is
    intentional or an upstream bug, should be investigated at some
    point.
- CLEANUP - use make to build the bootstrap compiler
---
 srcpkgs/nim/template | 66 +++++++++++++++-----------------------------
 1 file changed, 22 insertions(+), 44 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..4f1de45cbcc0 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,27 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -54,32 +49,15 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		./koch tools --os:linux --cpu:$_arch --listCmd
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac
@@ -95,15 +73,15 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
+	ln -sf /usr/lib/nim/testament ${DESTDIR}/usr/share/nim/testament
 	vlicense copying.txt
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (12 preceding siblings ...)
  2021-11-19 23:07 ` EliteTK
@ 2021-11-19 23:13 ` EliteTK
  2021-11-19 23:21 ` EliteTK
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-19 23:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 5557 bytes --]

From 0b43bbda24436da04ac0a80d2cabcf9289a9b887 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0 (and fixes + cleanup)

Version bump to 1.6.0 including the following changes:

- Nim now comes with testament
- Fusion library is no longer bundled with nim
- Examples no longer come with nim
- FIX - non-x86_64/i686 nim.cfg compiler configuration
  Non-x86_64/i686 builds no longer end up with a broken nim.cfg which
  will try to use the package build time $CC to build packages for the
  package architecture as well as a bunch of others (which will simply
  not work).
- FIX - arm nim.cfg compiler configuration
  The default arm.linux.gcc.(linker)?exe variables are now commented on
  non-x86_64/i686 builds to ensure that arm packages don't end up with
  the same issue as above.
- CLEANUP - use koch to build non-x86_64/i686 tools
  The loop was unnecessary.
  - note: This means nimsuggest is now built without -d:release on all
    builds (not just x86_64/i686 builds). I am not sure if this is
    intentional or an upstream bug, should be investigated at some
    point.
- CLEANUP - use make to build the bootstrap compiler
---
 srcpkgs/nim/template | 65 ++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 44 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..e6f1e370c03f 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,10 +1,9 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
 hostmakedepends="ed"
@@ -15,31 +14,27 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -54,32 +49,15 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		./koch tools --os:linux --cpu:$_arch --listCmd
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac
@@ -95,14 +73,13 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
 	vlicense copying.txt

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (13 preceding siblings ...)
  2021-11-19 23:13 ` EliteTK
@ 2021-11-19 23:21 ` EliteTK
  2021-11-19 23:25 ` EliteTK
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-19 23:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

There is an updated pull request by EliteTK against master on the void-packages repository

https://github.com/EliteTK/void-packages nim-1.6.0
https://github.com/void-linux/void-packages/pull/34106

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

A patch file from https://github.com/void-linux/void-packages/pull/34106.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nim-1.6.0-34106.patch --]
[-- Type: text/x-diff, Size: 5666 bytes --]

From aeea762fe6fa847ef8cb3031dbe78e7d5b1cd208 Mon Sep 17 00:00:00 2001
From: Tomasz Kramkowski <tk@the-tk.com>
Date: Tue, 16 Nov 2021 20:26:26 +0000
Subject: [PATCH] nim: update to 1.6.0 (and fixes + cleanup)

Version bump to 1.6.0 including the following changes:

- Nim now comes with testament
- Fusion library is no longer bundled with nim
- Examples no longer come with nim
- FIX - non-x86_64/i686 nim.cfg compiler configuration
  Non-x86_64/i686 builds no longer end up with a broken nim.cfg which
  will try to use the package build time $CC to build packages for the
  package architecture as well as a bunch of others (which will simply
  not work).
- FIX - arm nim.cfg compiler configuration
  The default arm.linux.gcc.(linker)?exe variables are now commented on
  non-x86_64/i686 builds to ensure that arm packages don't end up with
  the same issue as above.
- CLEANUP - use koch to build non-x86_64/i686 tools
  The loop was unnecessary.
  - note: This means nimsuggest is now built without -d:release on all
    builds (not just x86_64/i686 builds). I am not sure if this is
    intentional or an upstream bug, should be investigated at some
    point.
- CLEANUP - use make to build the bootstrap compiler
---
 srcpkgs/nim/template | 66 ++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/nim/template b/srcpkgs/nim/template
index 76a3452c68ab..809627066a68 100644
--- a/srcpkgs/nim/template
+++ b/srcpkgs/nim/template
@@ -1,13 +1,11 @@
 # Template file for 'nim'
 pkgname=nim
-version=1.4.8
+version=1.6.0
 revision=1
-_cversion=0.20.0
-_nimbleversion=0.12.0
-_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
+_c1version=561b417c65791cd8356b5f73620914ceff845d10
+_nimbleversion=0.13.1
 create_wrksrc=yes
 build_wrksrc="Nim-$version"
-hostmakedepends="ed"
 depends="gcc openssl-devel"
 short_desc="Nim programming language"
 maintainer="allan <mail@may.mooo.com>"
@@ -15,31 +13,27 @@ license="MIT"
 homepage="https://nim-lang.org/"
 _ghsite="https://github.com/nim-lang"
 distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
- ${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
- ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
- ${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
-checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
- 5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
- 0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
- 76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
+ ${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
+ ${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
+checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
+ 71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
+ e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
 
 post_extract() {
-	mv csources-$_cversion $build_wrksrc/csources
+	mv csources_v1-$_c1version $build_wrksrc/csources_v1
 	mkdir $build_wrksrc/dist
 	mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
-	mv fusion-$_fusionversion $build_wrksrc/dist/fusion
 }
 
 do_build() {
-	cd csources
 	case "$XBPS_TARGET_MACHINE" in
 		i686*)
 			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
-			sh build.sh --cpu i686;;
+			make -C csources_v1 ucpu=i686 ${makejobs};;
 		*)
-			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
+			CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
+			make -C csources_v1 ${makejobs};;
 	esac
-	cd ..
 
 	bin/nim c koch
 	./koch boot -d:release -d:danger
@@ -54,32 +48,15 @@ do_build() {
 
 	case "$XBPS_TARGET_MACHINE"
 	in arm*|aarch64*|ppc*)
-		ed config/nim.cfg <<-EDIT
-			,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
-			,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
-			a
-			arm64.linux.gcc.exe = "$CC"
-			arm64.linux.gcc.linkerexe = "$CC"
-			powerpc.linux.gcc.exe = "$CC"
-			powerpc.linux.gcc.linkerexe = "$CC"
-			powerpc64.linux.gcc.exe = "$CC"
-			powerpc64.linux.gcc.linkerexe = "$CC"
-			powerpc64el.linux.gcc.exe = "$CC"
-			powerpc64el.linux.gcc.linkerexe = "$CC"
-			.
-			w
-			q
+		vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
+		cat >>config/nim.cfg <<-EDIT
+		# VOIDLINUX TEMP
+		$_arch.linux.gcc.exe = "$CC"
+		$_arch.linux.gcc.linkerexe = "$CC"
 		EDIT
 		bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
-		for _p in \
-			dist/nimble/src/nimble \
-			tools/nimgrep \
-			nimsuggest/nimsuggest \
-			nimpretty/nimpretty
-		do
-			bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
-			mv $_p bin
-		done
+		./koch tools --os:linux --cpu:$_arch --listCmd
+		vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
 	;; *)
 		./koch tools
 	esac
@@ -95,14 +72,13 @@ do_install() {
 	vmkdir usr/bin
 	vmkdir usr/share/nim
 	ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
-	for _f in nimble nimsuggest nimgrep nimpretty; do
+	for _f in nimble nimsuggest nimgrep nimpretty testament; do
 		chmod 0755 bin/$_f
 		cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
 		ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
 	done
-	cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
+	cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
 	ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
-	ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
 	ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
 	ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
 	vlicense copying.txt

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (14 preceding siblings ...)
  2021-11-19 23:21 ` EliteTK
@ 2021-11-19 23:25 ` EliteTK
  2021-12-04  4:27 ` ericonr
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: EliteTK @ 2021-11-19 23:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

New comment by EliteTK on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-974536971

Comment:
Squashed per instruction on irc.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (15 preceding siblings ...)
  2021-11-19 23:25 ` EliteTK
@ 2021-12-04  4:27 ` ericonr
  2021-12-04  4:30 ` [PR PATCH] [Merged]: " ericonr
  2021-12-04  4:30 ` ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-12-04  4:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-985965090

Comment:
> But in the meanwhile, if this does end up working in CI, I would like to keep it that way and get this version bump merged. Then doing i686 builds properly can be a task for later.

FWIW i686 is built natively.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Merged]: nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (16 preceding siblings ...)
  2021-12-04  4:27 ` ericonr
@ 2021-12-04  4:30 ` ericonr
  2021-12-04  4:30 ` ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-12-04  4:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

There's a merged pull request on the void-packages repository

nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
https://github.com/void-linux/void-packages/pull/34106

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (glibc)
- I cross-built it for a few things (aarch64 and arm all glibc)

I think it is about ready.

Old comments below this line.

---

I was mainly putting this up here to gather comments. For background, things which have changed between what is available in the repositories and 1.6.0:

- Nim no longer bundles fusion. It provides a koch command to nimble install it at a specific commit. It might be worth providing it as a separate package but maybe not worth it.
- Nim now uses csources_v1 instead of csources. This is now built with make. We used to pass --cpu to build.sh based on XBPS_TARGET_MACHINE. I removed this temporarily, I think it would have to be re-added setting the ucpu variable instead but I would like to see what CI says first.
- Nim now comes with testament which I am installing like the rest of things
- Nim no longer comes with examples

Other notes:

- I bumped the nimble version but actually I think it would be more correct to figure out which exact commit nim 1.6.0 uses in build_all.sh and mirror that. I simply haven't gotten around to this yet. (update: Looks like it uses 0.13.1 so the template is correct now)
- I noticed build_all.sh passes `--skipUserCfg --skipParentCfg --hints:off` everywhere. I'm not sure if we should mirror that. I think the first two options would be irrelevant inside the build environment and the last option is just removing diagnostics. They're not essential options but I also don't think they hurt.
- It would be nice if someone else had a glance at this. I don't really do void packaging but I think I did almost everything correctly.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template
  2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
                   ` (17 preceding siblings ...)
  2021-12-04  4:30 ` [PR PATCH] [Merged]: " ericonr
@ 2021-12-04  4:30 ` ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-12-04  4:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34106#issuecomment-985965469

Comment:
Sorry for the delay, great PR!

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-12-04  4:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 20:40 [PR PATCH] [RFC] nim: update to 1.6.0 EliteTK
2021-11-16 20:48 ` [PR PATCH] [Updated] " EliteTK
2021-11-16 21:20 ` EliteTK
2021-11-17 23:37 ` [PR PATCH] [Updated] " EliteTK
2021-11-17 23:45 ` EliteTK
2021-11-18  7:40 ` [PR PATCH] [Updated] " EliteTK
2021-11-18  9:24 ` EliteTK
2021-11-18  9:26 ` EliteTK
2021-11-18 19:18 ` EliteTK
2021-11-18 20:10 ` [PR PATCH] [Updated] " EliteTK
2021-11-18 20:12 ` nim: update to 1.6.0, fix non-x86_64/i686 packages, improve template EliteTK
2021-11-18 20:21 ` [PR PATCH] [Updated] " EliteTK
2021-11-19 23:07 ` EliteTK
2021-11-19 23:07 ` EliteTK
2021-11-19 23:13 ` EliteTK
2021-11-19 23:21 ` EliteTK
2021-11-19 23:25 ` EliteTK
2021-12-04  4:27 ` ericonr
2021-12-04  4:30 ` [PR PATCH] [Merged]: " ericonr
2021-12-04  4:30 ` ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).