Handle bad conan uri, test Windows static
This commit is contained in:
parent
b6278280dc
commit
f21dab89ca
3 changed files with 11 additions and 9 deletions
|
|
@ -40,12 +40,6 @@ const
|
||||||
conanPackage = "conan_package.tgz"
|
conanPackage = "conan_package.tgz"
|
||||||
conanManifest = "conanmanifest.txt"
|
conanManifest = "conanmanifest.txt"
|
||||||
|
|
||||||
# https://github.com/kdheepak/binary-builder-downloader/blob/master/src/bbd.nim
|
|
||||||
# https://bintray.com/conan/conan-center
|
|
||||||
# https://bintray.com/bincrafters/public-conan/
|
|
||||||
|
|
||||||
# https://docs.conan.io/en/latest/howtos/manage_shared_libraries.html#manage-shared
|
|
||||||
|
|
||||||
var
|
var
|
||||||
# Bintray download URL for explicit `user/channel`
|
# Bintray download URL for explicit `user/channel`
|
||||||
baseAltUrl {.compiletime.} = {
|
baseAltUrl {.compiletime.} = {
|
||||||
|
|
@ -73,7 +67,10 @@ proc jsonGet(url: string): JsonNode =
|
||||||
file
|
file
|
||||||
|
|
||||||
downloadUrl(url, temp, quiet = true)
|
downloadUrl(url, temp, quiet = true)
|
||||||
result = readFile(file).parseJson()
|
try:
|
||||||
|
result = readFile(file).parseJson()
|
||||||
|
except JsonParsingError:
|
||||||
|
discard
|
||||||
rmFile(file)
|
rmFile(file)
|
||||||
|
|
||||||
proc `==`*(pkg1, pkg2: ConanPackage): bool =
|
proc `==`*(pkg1, pkg2: ConanPackage): bool =
|
||||||
|
|
@ -352,10 +349,11 @@ proc downloadConan*(pkg: ConanPackage, outdir: string, clean = true) =
|
||||||
elif clean:
|
elif clean:
|
||||||
cleanDir(outdir)
|
cleanDir(outdir)
|
||||||
|
|
||||||
echo &"# Downloading {pkg.name} v{pkg.version} from Conan"
|
|
||||||
|
|
||||||
pkg.getConanBuilds()
|
pkg.getConanBuilds()
|
||||||
|
|
||||||
|
doAssert pkg.recipes.len != 0, &"# Failed to download {pkg.name} v{pkg.version} from Conan - check https://conan.io/center"
|
||||||
|
|
||||||
|
echo &"# Downloading {pkg.name} v{pkg.version} from Conan"
|
||||||
for recipe, builds in pkg.recipes:
|
for recipe, builds in pkg.recipes:
|
||||||
for build in builds:
|
for build in builds:
|
||||||
if pkg.bhash.len == 0 or pkg.bhash == build.bhash:
|
if pkg.bhash.len == 0 or pkg.bhash == build.bhash:
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ when defined(posix):
|
||||||
|
|
||||||
# conan static
|
# conan static
|
||||||
testCall(cmd & " -d:libssh2Conan -d:libssh2SetVer=1.9.0 -d:libssh2Static" & sshcmd, zexp, 0)
|
testCall(cmd & " -d:libssh2Conan -d:libssh2SetVer=1.9.0 -d:libssh2Static" & sshcmd, zexp, 0)
|
||||||
|
else:
|
||||||
|
# conan static for Windows
|
||||||
|
testCall(cmd & " -d:zlibConan -d:zlibSetVer=1.2.11 -d:zlibStatic" & zrcmd, zexp, 0)
|
||||||
|
|
||||||
# git
|
# git
|
||||||
testCall(cmd & " -d:envTest" & zrcmd, zexp, 0)
|
testCall(cmd & " -d:envTest" & zrcmd, zexp, 0)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ getHeader(
|
||||||
"zlib.h",
|
"zlib.h",
|
||||||
giturl = "https://github.com/madler/zlib",
|
giturl = "https://github.com/madler/zlib",
|
||||||
dlurl = "http://zlib.net/zlib-$1.tar.gz",
|
dlurl = "http://zlib.net/zlib-$1.tar.gz",
|
||||||
|
conanuri = "zlib/$1",
|
||||||
outdir = baseDir,
|
outdir = baseDir,
|
||||||
altNames = "z,zlib"
|
altNames = "z,zlib"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue