choosenim: update to 0.7.4.
This commit is contained in:
parent
ca42bce36d
commit
32b7aa86e3
5 changed files with 132 additions and 116 deletions
|
@ -1,25 +0,0 @@
|
|||
From cfc83cd106185441604a55ef34968a2a37d6258a Mon Sep 17 00:00:00 2001
|
||||
From: Dominik Picheta <dominikpicheta@googlemail.com>
|
||||
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
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
From f7aeba5b72f8434eb690ae3b84f43968b8041a95 Mon Sep 17 00:00:00 2001
|
||||
From: Dominik Picheta <dominikpicheta@gmail.com>
|
||||
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!":
|
|
@ -1,56 +0,0 @@
|
|||
commit 53472069126088cd1d23d84aa4fdee9dc780f7d2
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
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)
|
103
srcpkgs/choosenim/patches/system-libarchive.patch
Normal file
103
srcpkgs/choosenim/patches/system-libarchive.patch
Normal file
|
@ -0,0 +1,103 @@
|
|||
diff --git choosenim.nimble choosenim.nimble
|
||||
index 7ba9b36..dc47faa 100644
|
||||
--- choosenim.nimble
|
||||
+++ choosenim.nimble
|
||||
@@ -14,7 +14,7 @@ skipExt = @["nim"]
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.2.6", "nimble#8f7af86"
|
||||
-requires "nimterop >= 0.6.12", "nimarchive >= 0.5.3"
|
||||
+requires "nimterop >= 0.6.12"
|
||||
#requires "libcurl >= 1.0.0" - OSX now uses httpclient
|
||||
requires "analytics >= 0.2.0"
|
||||
requires "osinfo >= 0.3.0"
|
||||
diff --git nimarchive/nimarchive/archive.nim nimarchive/nimarchive/archive.nim
|
||||
index 1d45140..d5361e0 100644
|
||||
--- nimarchive/nimarchive/archive.nim
|
||||
+++ nimarchive/nimarchive/archive.nim
|
||||
@@ -2,28 +2,6 @@ import os, strutils
|
||||
|
||||
import nimterop/[build, cimport]
|
||||
|
||||
-const
|
||||
- baseDir = getProjectCacheDir("nimarchive" / "libarchive")
|
||||
-
|
||||
- defs = """
|
||||
- archiveStatic
|
||||
- archiveJBB
|
||||
- archiveSetVer=3.4.3
|
||||
-
|
||||
- iconvStatic
|
||||
- iconvStd
|
||||
- iconvJBB
|
||||
- iconvSetVer=1.16.0
|
||||
- """
|
||||
-
|
||||
-setDefines(defs.splitLines())
|
||||
-
|
||||
-getHeader(
|
||||
- header = "archive.h",
|
||||
- outdir = baseDir,
|
||||
- jbburi = "LibArchive",
|
||||
- jbbFlags = "url=https://bintray.com/genotrance/binaries/download_file?file_path=LibArchive-v$1/ skip=libiconv"
|
||||
-)
|
||||
|
||||
import iconv
|
||||
|
||||
@@ -52,9 +30,7 @@ static:
|
||||
cSkipSymbol(@["archive_read_open_file", "archive_write_open_file"])
|
||||
|
||||
let
|
||||
- archiveEntryPath {.compileTime.} = archivePath[0 .. ^3] & "_entry.h"
|
||||
+ archivePath {.compileTime.} = "archive.h"
|
||||
+ archiveEntryPath {.compileTime.} = "archive_entry.h"
|
||||
|
||||
-when archiveStatic:
|
||||
- cImport(@[archivePath, archiveEntryPath], recurse = true)
|
||||
-else:
|
||||
- cImport(@[archivePath, archiveEntryPath], recurse = true, dynlib = archiveLPath)
|
||||
+cImport(@[archivePath, archiveEntryPath], recurse = false)
|
||||
diff --git nimarchive/nimarchive/iconv.nim nimarchive/nimarchive/iconv.nim
|
||||
index d983398..4f61a5b 100644
|
||||
--- nimarchive/nimarchive/iconv.nim
|
||||
+++ nimarchive/nimarchive/iconv.nim
|
||||
@@ -2,15 +2,3 @@ import os, strutils
|
||||
|
||||
import nimterop/build
|
||||
|
||||
-const
|
||||
- baseDir = getProjectCacheDir("nimarchive" / "iconv")
|
||||
-
|
||||
-getHeader(
|
||||
- header = "iconv.h",
|
||||
- dlurl = "https://ftp.gnu.org/gnu/libiconv/libiconv-$1.tar.gz",
|
||||
- conanuri = "libiconv",
|
||||
- jbburi = "Libiconv",
|
||||
- jbbFlags = "url=https://bintray.com/genotrance/binaries/download_file?file_path=Libiconv-v$1/",
|
||||
- outdir = baseDir,
|
||||
- conFlags = "--enable-static=yes --with-pic=yes"
|
||||
-)
|
||||
diff --git src/choosenimpkg/ssl.nim src/choosenimpkg/ssl.nim
|
||||
index f20b246..7576066 100644
|
||||
--- src/choosenimpkg/ssl.nim
|
||||
+++ src/choosenimpkg/ssl.nim
|
||||
@@ -2,19 +2,3 @@ import strutils
|
||||
|
||||
import nimterop/[build, cimport]
|
||||
|
||||
-# Download openssl from JuliaBinaryWrappers
|
||||
-setDefines(@[
|
||||
- "cryptoJBB", "cryptoStatic"
|
||||
-])
|
||||
-
|
||||
-getHeader(
|
||||
- "crypto.h",
|
||||
- jbburi = "openssl",
|
||||
- outdir = getProjectCacheDir("nimopenssl")
|
||||
-)
|
||||
-
|
||||
-const
|
||||
- sslLPath = cryptoLPath.replace("crypto", "ssl")
|
||||
-
|
||||
-# Link static binaries
|
||||
-{.passL: sslLPath & " " & cryptoLPath.}
|
|
@ -1,20 +1,22 @@
|
|||
# Template file for 'choosenim'
|
||||
pkgname=choosenim
|
||||
version=0.4.0
|
||||
version=0.7.4
|
||||
revision=1
|
||||
hostmakedepends="git nim"
|
||||
makedepends="libressl-devel zlib-devel"
|
||||
hostmakedepends="git nim libressl-devel pkg-config"
|
||||
makedepends="libressl-devel zlib-devel libarchive-devel"
|
||||
depends="gcc"
|
||||
short_desc="Nim toolchain installer"
|
||||
maintainer="SolitudeSF <solitudesf@protonmail.com>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/dom96/choosenim"
|
||||
distfiles="${homepage}/archive/v${version}.tar.gz"
|
||||
checksum=d7b04314666a3647c255f89031deabe53f8e281b6cfbf3a0848272fc1799c0f3
|
||||
distfiles="${homepage}/archive/v${version}.tar.gz>choosenim-${version}.tar.gz
|
||||
https://github.com/genotrance/nimarchive/archive/v0.5.4.tar.gz>nimarchive-0.5.4.tar.gz"
|
||||
checksum="0e78a59cfb3cf7926f8dff3a4215949ccfaecd6c6dddc3b2e062098b5da03edb
|
||||
c38e8c66c2eac2bc021d450f2b60d0e45c5355df963d0133930448639c0bd8d4"
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" libressl-devel"
|
||||
fi
|
||||
post_extract() {
|
||||
mv ../nimarchive-0.5.4 nimarchive
|
||||
}
|
||||
|
||||
do_build() {
|
||||
local arch args
|
||||
|
@ -26,14 +28,28 @@ do_build() {
|
|||
ppc64*) arch=powerpc64;;
|
||||
ppc*) arch=powerpc;;
|
||||
esac
|
||||
LDFLAGS+=" $($PKG_CONFIG --libs-only-l --static openssl)"
|
||||
LDFLAGS+=" $($PKG_CONFIG --libs-only-l --static libarchive)"
|
||||
LDFLAGS+=" -lrt -ldl"
|
||||
: >nim.cfg
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
cat >>nim.cfg <<-EOF
|
||||
gcc.options.always = "$CPPFLAGS $CFLAGS -pthread"
|
||||
gcc.options.linker = "$LDFLAGS"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$arch" ]; then
|
||||
cat > nim.cfg <<EOF
|
||||
$arch.linux.gcc.exe = "$CC"
|
||||
$arch.linux.gcc.linkerexe = "$CC"
|
||||
EOF
|
||||
cat >>nim.cfg <<-EOF
|
||||
$arch.linux.gcc.exe = "$CC"
|
||||
$arch.linux.gcc.linkerexe = "$CC"
|
||||
$arch.linux.gcc.options.always = "$CPPFLAGS $CFLAGS -pthread"
|
||||
$arch.linux.gcc.options.linker = "$LDFLAGS"
|
||||
EOF
|
||||
args="--cpu:$arch"
|
||||
fi
|
||||
nimble -y build -d:release --passC:-flto "$args"
|
||||
ln -sf $XBPS_CROSS_BASE/usr/include/archive.h src
|
||||
ln -sf $XBPS_CROSS_BASE/usr/include/archive_entry.h src
|
||||
nimble -y build -d:release --passC:-flto "$args" --path:$wrksrc/nimarchive
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Reference in a new issue