2020-11-19 17:16:50 +01:00
|
|
|
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"
|
2020-11-23 16:28:12 +01:00
|
|
|
+requires "nimterop >= 0.6.12"
|
2020-11-19 17:16:50 +01:00
|
|
|
#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.}
|