From d693641c95077754c2d4dd0c647e2f3116db566c Mon Sep 17 00:00:00 2001 From: q66 Date: Tue, 17 Dec 2019 15:16:44 +0100 Subject: [PATCH] choosenim: update to 0.4.0 + add ppc32 This also fixes build. 0.5.0 update is not possible as nimarchive is not cross-compiling friendly and doesn't even build natively because it ignores CFLAGS. I cherry-picked relevant 0.5.0 changes into patches. --- ...3cd106185441604a55ef34968a2a37d6258a.patch | 25 +++++++++ ...ba5b72f8434eb690ae3b84f43968b8041a95.patch | 22 ++++++++ srcpkgs/choosenim/patches/ftbfs.patch | 56 +++++++++++++++++++ srcpkgs/choosenim/template | 9 +-- 4 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/choosenim/patches/cfc83cd106185441604a55ef34968a2a37d6258a.patch create mode 100644 srcpkgs/choosenim/patches/f7aeba5b72f8434eb690ae3b84f43968b8041a95.patch create mode 100644 srcpkgs/choosenim/patches/ftbfs.patch diff --git a/srcpkgs/choosenim/patches/cfc83cd106185441604a55ef34968a2a37d6258a.patch b/srcpkgs/choosenim/patches/cfc83cd106185441604a55ef34968a2a37d6258a.patch new file mode 100644 index 00000000000..a7445e39527 --- /dev/null +++ b/srcpkgs/choosenim/patches/cfc83cd106185441604a55ef34968a2a37d6258a.patch @@ -0,0 +1,25 @@ +From cfc83cd106185441604a55ef34968a2a37d6258a Mon Sep 17 00:00:00 2001 +From: Dominik Picheta +Date: Mon, 14 Oct 2019 21:09:23 +0100 +Subject: [PATCH] Fixes #142. + +Fixes regression in choosenim install script. +--- + scripts/choosenim-unix-init.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/scripts/choosenim-unix-init.sh b/scripts/choosenim-unix-init.sh +index a60b74b..89912cf 100755 +--- scripts/choosenim-unix-init.sh ++++ scripts/choosenim-unix-init.sh +@@ -59,9 +59,8 @@ install() { + fi + + # Install Nim from desired channel. +- "$temp_prefix/$filename" $CHOOSE_VERSION --firstInstall -y < /dev/tty ++ "$temp_prefix/$filename" $CHOOSE_VERSION --firstInstall < /dev/tty + else +- # TODO: Use the -y switch when choosenim gets support for it. + "$temp_prefix/$filename" $CHOOSE_VERSION --firstInstall -y + fi + diff --git a/srcpkgs/choosenim/patches/f7aeba5b72f8434eb690ae3b84f43968b8041a95.patch b/srcpkgs/choosenim/patches/f7aeba5b72f8434eb690ae3b84f43968b8041a95.patch new file mode 100644 index 00000000000..a9e8c153eb2 --- /dev/null +++ b/srcpkgs/choosenim/patches/f7aeba5b72f8434eb690ae3b84f43968b8041a95.patch @@ -0,0 +1,22 @@ +From f7aeba5b72f8434eb690ae3b84f43968b8041a95 Mon Sep 17 00:00:00 2001 +From: Dominik Picheta +Date: Sun, 21 Apr 2019 20:29:41 +0100 +Subject: [PATCH] Fixes osinfo dependency conflict. + +--- + choosenim.nimble | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/choosenim.nimble b/choosenim.nimble +index d826357..b775d88 100644 +--- choosenim.nimble ++++ choosenim.nimble +@@ -15,7 +15,7 @@ skipExt = @["nim"] + + requires "nim >= 0.16.1", "nimble >= 0.8.5", "untar >= 0.1.0" + requires "libcurl >= 1.0.0" +-requires "analytics >= 0.1.1" ++requires "analytics >= 0.2.0" + requires "osinfo >= 0.3.0" + + task test, "Run the choosenim tester!": diff --git a/srcpkgs/choosenim/patches/ftbfs.patch b/srcpkgs/choosenim/patches/ftbfs.patch new file mode 100644 index 00000000000..f5bbc6ace2b --- /dev/null +++ b/srcpkgs/choosenim/patches/ftbfs.patch @@ -0,0 +1,56 @@ +commit 53472069126088cd1d23d84aa4fdee9dc780f7d2 +Author: q66 +Date: Tue Dec 17 22:21:04 2019 +0100 + + fix build: undeclared identifier: 'NimbleError' + +diff --git choosenim.nimble choosenim.nimble +index d826357..b91fac8 100644 +--- choosenim.nimble ++++ choosenim.nimble +@@ -13,7 +13,7 @@ skipExt = @["nim"] + + # Dependencies + +-requires "nim >= 0.16.1", "nimble >= 0.8.5", "untar >= 0.1.0" ++requires "nim >= 0.16.1", "nimble#5bb795a", "untar >= 0.1.0" + requires "libcurl >= 1.0.0" + requires "analytics >= 0.1.1" + requires "osinfo >= 0.3.0" +diff --git src/choosenim/common.nim src/choosenim/common.nim +index 197bfac..059d210 100644 +--- src/choosenim/common.nim ++++ src/choosenim/common.nim +@@ -1,4 +1,4 @@ +-import nimblepkg/common ++import nimblepkg/version + + type + ChooseNimError* = object of NimbleError +@@ -19,4 +19,4 @@ const + "g++", + "gdb", + "ld" +- ] +\ No newline at end of file ++ ] +diff --git src/choosenim/proxyexe.nim src/choosenim/proxyexe.nim +index 9c9c761..829df8f 100644 +--- src/choosenim/proxyexe.nim ++++ src/choosenim/proxyexe.nim +@@ -4,7 +4,7 @@ + + import strutils, os, osproc + +-import nimblepkg/[cli, options] ++import nimblepkg/[cli, options, version] + import nimblepkg/common as nimbleCommon + import cliparams + from common import ChooseNimError, mingwProxies +@@ -71,4 +71,4 @@ when isMainModule: + + display("Info:", "If unexpected, please report this error to " & + "https://github.com/dom96/choosenim", Warning, HighPriority) +- quit(1) +\ No newline at end of file ++ quit(1) diff --git a/srcpkgs/choosenim/template b/srcpkgs/choosenim/template index 4acaafaf05a..d31e065edf0 100644 --- a/srcpkgs/choosenim/template +++ b/srcpkgs/choosenim/template @@ -1,16 +1,16 @@ # Template file for 'choosenim' pkgname=choosenim -version=0.3.2 -revision=2 +version=0.4.0 +revision=1 hostmakedepends="git nim" makedepends="libressl-devel zlib-devel" depends="gcc" -short_desc="The Nim toolchain installer" +short_desc="Nim toolchain installer" maintainer="SolitudeSF " license="MIT" homepage="https://github.com/dom96/choosenim" distfiles="${homepage}/archive/v${version}.tar.gz" -checksum=2478fcc75c5a147f63f755f700601ce25f8e2ca964b39ac3cb0d903d2fa22a2b +checksum=d7b04314666a3647c255f89031deabe53f8e281b6cfbf3a0848272fc1799c0f3 if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" libressl-devel" @@ -24,6 +24,7 @@ do_build() { mips*) arch=mips;; ppc64le*) arch=powerpc64el;; ppc64*) arch=powerpc64;; + ppc*) arch=powerpc;; esac if [ -n "$arch" ]; then cat > nim.cfg <