-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use latest build and BinaryProvider (#49)
* use latest build and BinaryProvider The latest BinaryProvider allows updating already installed tarballs, and writes an updated `build.jl` such that I can use it as a dependency for `GDALBuilder`. The build configuration itself did not change however. But still new hashes, a later BinaryBuilder was used to create them. * use the build script as generated * Upgrade to build 2, build product names clashed with package
- Loading branch information
Showing
2 changed files
with
28 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
julia 0.6 | ||
GeoInterface 0.2.1 | ||
BinaryProvider 0.2.5 | ||
BinaryProvider 0.3.0 |
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,42 @@ | ||
using BinaryProvider | ||
using BinaryProvider # requires BinaryProvider 0.3.0 or later | ||
|
||
# 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 = Product[ | ||
LibraryProduct(prefix, "libgeos_c", :libgeos), | ||
LibraryProduct(prefix, "libgeos", :libgeos_cpp) | ||
products = [ | ||
LibraryProduct(prefix, String["libgeos_c"], :libgeos), | ||
LibraryProduct(prefix, String["libgeos"], :libgeos_cpp), | ||
] | ||
|
||
# Download binaries from hosted location | ||
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-0" | ||
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-2" | ||
|
||
# Listing of files generated by BinaryBuilder: | ||
download_info = Dict( | ||
Linux(:i686, :glibc) => ("$bin_prefix/GEOS.i686-linux-gnu.tar.gz", "b8569ca5dd4a1aec464ae2eaec4247ea5a93f55bb843854cab09f06952c4fcd9"), | ||
Linux(:x86_64, :glibc) => ("$bin_prefix/GEOS.x86_64-linux-gnu.tar.gz", "a9f58321ff86ca05c87ec637cc6126ba5db313337491123b76b4ca7e7705223b"), | ||
Linux(:aarch64, :glibc) => ("$bin_prefix/GEOS.aarch64-linux-gnu.tar.gz", "c91616f06f03d64d9b7e06dd74b6056815e0e54e74a9af8288e4d0cd79929d6e"), | ||
Linux(:armv7l, :glibc) => ("$bin_prefix/GEOS.arm-linux-gnueabihf.tar.gz", "5ab9b9b92319daf7c08db63e711fea5724946c973a38307b33f61b49a8e93531"), | ||
Linux(:powerpc64le, :glibc) => ("$bin_prefix/GEOS.powerpc64le-linux-gnu.tar.gz", "e24c68a8e5cd517fae4ca089bd66ee2081aef5e1b492fc0835accdc112995ad6"), | ||
MacOS() => ("$bin_prefix/GEOS.x86_64-apple-darwin14.tar.gz", "017c593d91806578538d8dbdeefa9f2b88700e06c32cc07be52cdbe78f55390d"), | ||
Windows(:i686) => ("$bin_prefix/GEOS.i686-w64-mingw32.tar.gz", "f3fa4db98b50821db2b7209de76b0ac31d4d87c4d9bbbab60a6adb5f19ca0155"), | ||
Windows(:x86_64) => ("$bin_prefix/GEOS.x86_64-w64-mingw32.tar.gz", "9e8cba2c107884d1380bd6e5a6fce1003b6fa50be59e689b0a9bbe014d46d3ac"), | ||
Linux(:aarch64, :glibc) => ("$bin_prefix/GEOS.aarch64-linux-gnu.tar.gz", "bdd07a586bfd952f92ac939e5372b651af16982b542a27252ca5704c3c73dbd7"), | ||
Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/GEOS.arm-linux-gnueabihf.tar.gz", "94bb0679bb6a02b5a75a6c2727053816ed4edf8678df89dc3637d62fcd23ae21"), | ||
Linux(:i686, :glibc) => ("$bin_prefix/GEOS.i686-linux-gnu.tar.gz", "bb4e67f8a9b81eca7edf6f41c1eaddaf171398810a2b2cd0b6d272b96550ec57"), | ||
Windows(:i686) => ("$bin_prefix/GEOS.i686-w64-mingw32.tar.gz", "c3e2e8867d7af852dd5696d0eabe87449fce29853c7fa4b8e809cb86f1e4bcec"), | ||
Linux(:powerpc64le, :glibc) => ("$bin_prefix/GEOS.powerpc64le-linux-gnu.tar.gz", "8ea4bce7bc613c4f4a7541173844b12e1ba6d18836e7b09955cf5503a49de3c8"), | ||
MacOS(:x86_64) => ("$bin_prefix/GEOS.x86_64-apple-darwin14.tar.gz", "93eecb3f0a0336feb46b8bb899684d50b9025b7e4703dfca81e7ea10eb021d2b"), | ||
Linux(:x86_64, :glibc) => ("$bin_prefix/GEOS.x86_64-linux-gnu.tar.gz", "602f759fa580346f59f4b50713e82621ac34ddb397a69ef608b24ab6761223ce"), | ||
Windows(:x86_64) => ("$bin_prefix/GEOS.x86_64-w64-mingw32.tar.gz", "b3d1713345a73b230065281ebccd7867d952b5369ae64da2919b05b9c40e248a"), | ||
) | ||
|
||
# First, check to see if we're all satisfied | ||
if any(!satisfied(p; verbose=verbose) for p in products) | ||
if platform_key() in keys(download_info) | ||
# 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) | ||
else | ||
error("Your platform $(Sys.MACHINE) is not supported by this package!") | ||
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) | ||
end | ||
|
||
# Finally, write out a deps.jl file | ||
write_deps_file(joinpath(@__DIR__, "deps.jl"), products) | ||
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) |