-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from JuliaGeometry/sd/newbinprov
update travis, binaryprovider build, appveyor
- Loading branch information
Showing
8 changed files
with
49 additions
and
1,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
using BinaryProvider | ||
using BinaryProvider # requires BinaryProvider 0.3.0 or later | ||
|
||
# This is where all binaries will get installed | ||
const prefix = Prefix(joinpath(@__DIR__, "usr")) | ||
|
||
# Instantiate products here. Examples: | ||
earcut = LibraryProduct(prefix, "earcut") | ||
# foo_executable = ExecutableProduct(prefix, "fooifier") | ||
# libfoo_pc = FileProduct(joinpath(libdir(prefix), "pkgconfig", "libfoo.pc")) | ||
|
||
# Assign products to `products`: | ||
products = [earcut] | ||
# Parse some basic command-line arguments | ||
const verbose = "--verbose" in ARGS | ||
const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) | ||
products = [ | ||
LibraryProduct(prefix, String["earcut"], :earcut), | ||
] | ||
|
||
# Download binaries from hosted location | ||
bin_prefix = "https://github.com/SimonDanisch/EarCutDeps/releases/download/v0.1.5" | ||
# Listing of files generated by BinaryBuilder: | ||
bin_prefix = "https://github.com/SimonDanisch/EarCutBuilder/releases/download/v1.0.0" | ||
|
||
# Listing of files generated by BinaryBuilder: | ||
download_info = Dict( | ||
BinaryProvider.Linux(:aarch64, :glibc) => ("$bin_prefix/Earcut.aarch64-linux-gnu.tar.gz", "09caecb4561394546e456b6d3902ba681d3a31f2f1caca9317c74978de403c03"), | ||
BinaryProvider.Linux(:armv7l, :glibc) => ("$bin_prefix/Earcut.arm-linux-gnueabihf.tar.gz", "eba4d1deef3f7f5e0325ec22162dab7249b2331997264428493520d1efcf17c4"), | ||
BinaryProvider.Linux(:i686, :glibc) => ("$bin_prefix/Earcut.i686-linux-gnu.tar.gz", "bf6e5a28e32daaa7159b2c64ef0a1ae1e539891185bd440fd701245ed448facd"), | ||
BinaryProvider.Windows(:i686) => ("$bin_prefix/Earcut.i686-w64-mingw32.tar.gz", "c38b67d7fae5b2db8905e538801f390992a0368125e20deb513db39e36b203da"), | ||
BinaryProvider.Linux(:powerpc64le, :glibc) => ("$bin_prefix/Earcut.powerpc64le-linux-gnu.tar.gz", "e3c0b9d671c9ef805381d3d54cea8f7728252f4f9612728d8d145659b861d2c9"), | ||
BinaryProvider.MacOS() => ("$bin_prefix/Earcut.x86_64-apple-darwin14.tar.gz", "302ec5c22ecd053a1dfdc44f70aa0500d94e6a5c7d71d876d0265aad1589cecd"), | ||
BinaryProvider.Linux(:x86_64, :glibc) => ("$bin_prefix/Earcut.x86_64-linux-gnu.tar.gz", "b371bc36f28bf3b39d5d48913dd8a3eecb5e03aa43da87ccf514eb9973fe2446"), | ||
BinaryProvider.Windows(:x86_64) => ("$bin_prefix/Earcut.x86_64-w64-mingw32.tar.gz", "9a51509aa3cf9705b9f6833aa6f74733f483fc55b0fef027e717bada9805bf77"), | ||
Linux(:aarch64, :glibc) => ("$bin_prefix/EarCut.v1.0.0.aarch64-linux-gnu.tar.gz", "5c9b3bbbefca40653a0f8c76b4fb81c1b3ffe38a595d4fea8ceb4042e61d076c"), | ||
Linux(:aarch64, :musl) => ("$bin_prefix/EarCut.v1.0.0.aarch64-linux-musl.tar.gz", "33804140cbc0548e5b7b6019dde699f00887874bb20d5455f72773c6c941e096"), | ||
Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/EarCut.v1.0.0.arm-linux-gnueabihf.tar.gz", "5530d6c7e745721df2eebb16b4434e6bc376f4f6e954cf684209bc10a7d80590"), | ||
Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/EarCut.v1.0.0.arm-linux-musleabihf.tar.gz", "6ad7fc447cc12a3c78520ee6f74263a7ddbc5a22efebad177e044478e9f1c009"), | ||
Linux(:i686, :glibc) => ("$bin_prefix/EarCut.v1.0.0.i686-linux-gnu.tar.gz", "af984da94d01608ed4e56500d98043622f0a6d8e9c89be7f871c9952dabda39e"), | ||
Linux(:i686, :musl) => ("$bin_prefix/EarCut.v1.0.0.i686-linux-musl.tar.gz", "fedf73674acc407fb619b838dd92624654c4e4af2589c7aa9d162544ca9dc0b4"), | ||
Windows(:i686) => ("$bin_prefix/EarCut.v1.0.0.i686-w64-mingw32.tar.gz", "d7e090ca7bff14ba1fcb0063445ebe29aaf67efbcefe05438169fab65c27b11e"), | ||
Linux(:powerpc64le, :glibc) => ("$bin_prefix/EarCut.v1.0.0.powerpc64le-linux-gnu.tar.gz", "2fc25b6c4aedba11ebb6da708046d1d798e9dd3ba6a2cf7e522f08689f616de3"), | ||
MacOS(:x86_64) => ("$bin_prefix/EarCut.v1.0.0.x86_64-apple-darwin14.tar.gz", "fe39007cbc391b9021b37ea16cedb478f10ecae270f3950ea87fa394acee8bd0"), | ||
Linux(:x86_64, :glibc) => ("$bin_prefix/EarCut.v1.0.0.x86_64-linux-gnu.tar.gz", "12624a769191b22ae1040f8171ae8d94b5ee8cf06288c58f216337d846d1258d"), | ||
Linux(:x86_64, :musl) => ("$bin_prefix/EarCut.v1.0.0.x86_64-linux-musl.tar.gz", "025fa1d07a067cb6b0eed1465f549ce88aac9732a39cded2f8a547eeb80a89ec"), | ||
FreeBSD(:x86_64) => ("$bin_prefix/EarCut.v1.0.0.x86_64-unknown-freebsd11.1.tar.gz", "6dea8e7ddea50a4e4426fd7dafe25807a6b27b3ebbbb3c821fc03e9e2f6e23e1"), | ||
Windows(:x86_64) => ("$bin_prefix/EarCut.v1.0.0.x86_64-w64-mingw32.tar.gz", "e0bc2089108bc2aabfb1e11d0a7ddf40adeec501fa8d1414871c0056b927762a"), | ||
) | ||
|
||
if platform_key() in keys(download_info) | ||
# First, check to see if we're all satisfied | ||
if any(!satisfied(p; verbose=true) for p in products) | ||
# Install unsatisfied or updated dependencies: | ||
unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) | ||
if haskey(download_info, platform_key()) | ||
url, tarball_hash = download_info[platform_key()] | ||
if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) | ||
# Download and install binaries | ||
url, tarball_hash = download_info[platform_key()] | ||
install(url, tarball_hash; prefix=prefix, force=true, verbose=true) | ||
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) | ||
end | ||
@write_deps_file earcut | ||
else | ||
error("Your platform $(Sys.MACHINE) is not supported by this package!") | ||
elseif unsatisfied | ||
# If we don't have a BinaryProvider-compatible .tar.gz to download, complain. | ||
# Alternatively, you could attempt to install from a separate provider, | ||
# build from source or something even more ambitious here. | ||
error("Your platform $(triplet(platform_key())) is not supported by this package!") | ||
end | ||
|
||
# Write out a deps.jl file that will contain mappings for our products | ||
write_deps_file(joinpath(@__DIR__, "deps.jl"), products) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.