Skip to content

Commit 7437996

Browse files
visryeesian
authored andcommitted
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
1 parent fb9a3d7 commit 7437996

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
julia 0.6
22
GeoInterface 0.2.1
3-
BinaryProvider 0.2.5
3+
BinaryProvider 0.3.0

deps/build.jl

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
1-
using BinaryProvider
1+
using BinaryProvider # requires BinaryProvider 0.3.0 or later
22

33
# Parse some basic command-line arguments
44
const verbose = "--verbose" in ARGS
55
const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")))
6-
7-
products = Product[
8-
LibraryProduct(prefix, "libgeos_c", :libgeos),
9-
LibraryProduct(prefix, "libgeos", :libgeos_cpp)
6+
products = [
7+
LibraryProduct(prefix, String["libgeos_c"], :libgeos),
8+
LibraryProduct(prefix, String["libgeos"], :libgeos_cpp),
109
]
1110

1211
# Download binaries from hosted location
13-
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-0"
12+
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-2"
1413

1514
# Listing of files generated by BinaryBuilder:
1615
download_info = Dict(
17-
Linux(:i686, :glibc) => ("$bin_prefix/GEOS.i686-linux-gnu.tar.gz", "b8569ca5dd4a1aec464ae2eaec4247ea5a93f55bb843854cab09f06952c4fcd9"),
18-
Linux(:x86_64, :glibc) => ("$bin_prefix/GEOS.x86_64-linux-gnu.tar.gz", "a9f58321ff86ca05c87ec637cc6126ba5db313337491123b76b4ca7e7705223b"),
19-
Linux(:aarch64, :glibc) => ("$bin_prefix/GEOS.aarch64-linux-gnu.tar.gz", "c91616f06f03d64d9b7e06dd74b6056815e0e54e74a9af8288e4d0cd79929d6e"),
20-
Linux(:armv7l, :glibc) => ("$bin_prefix/GEOS.arm-linux-gnueabihf.tar.gz", "5ab9b9b92319daf7c08db63e711fea5724946c973a38307b33f61b49a8e93531"),
21-
Linux(:powerpc64le, :glibc) => ("$bin_prefix/GEOS.powerpc64le-linux-gnu.tar.gz", "e24c68a8e5cd517fae4ca089bd66ee2081aef5e1b492fc0835accdc112995ad6"),
22-
MacOS() => ("$bin_prefix/GEOS.x86_64-apple-darwin14.tar.gz", "017c593d91806578538d8dbdeefa9f2b88700e06c32cc07be52cdbe78f55390d"),
23-
Windows(:i686) => ("$bin_prefix/GEOS.i686-w64-mingw32.tar.gz", "f3fa4db98b50821db2b7209de76b0ac31d4d87c4d9bbbab60a6adb5f19ca0155"),
24-
Windows(:x86_64) => ("$bin_prefix/GEOS.x86_64-w64-mingw32.tar.gz", "9e8cba2c107884d1380bd6e5a6fce1003b6fa50be59e689b0a9bbe014d46d3ac"),
16+
Linux(:aarch64, :glibc) => ("$bin_prefix/GEOS.aarch64-linux-gnu.tar.gz", "bdd07a586bfd952f92ac939e5372b651af16982b542a27252ca5704c3c73dbd7"),
17+
Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/GEOS.arm-linux-gnueabihf.tar.gz", "94bb0679bb6a02b5a75a6c2727053816ed4edf8678df89dc3637d62fcd23ae21"),
18+
Linux(:i686, :glibc) => ("$bin_prefix/GEOS.i686-linux-gnu.tar.gz", "bb4e67f8a9b81eca7edf6f41c1eaddaf171398810a2b2cd0b6d272b96550ec57"),
19+
Windows(:i686) => ("$bin_prefix/GEOS.i686-w64-mingw32.tar.gz", "c3e2e8867d7af852dd5696d0eabe87449fce29853c7fa4b8e809cb86f1e4bcec"),
20+
Linux(:powerpc64le, :glibc) => ("$bin_prefix/GEOS.powerpc64le-linux-gnu.tar.gz", "8ea4bce7bc613c4f4a7541173844b12e1ba6d18836e7b09955cf5503a49de3c8"),
21+
MacOS(:x86_64) => ("$bin_prefix/GEOS.x86_64-apple-darwin14.tar.gz", "93eecb3f0a0336feb46b8bb899684d50b9025b7e4703dfca81e7ea10eb021d2b"),
22+
Linux(:x86_64, :glibc) => ("$bin_prefix/GEOS.x86_64-linux-gnu.tar.gz", "602f759fa580346f59f4b50713e82621ac34ddb397a69ef608b24ab6761223ce"),
23+
Windows(:x86_64) => ("$bin_prefix/GEOS.x86_64-w64-mingw32.tar.gz", "b3d1713345a73b230065281ebccd7867d952b5369ae64da2919b05b9c40e248a"),
2524
)
2625

27-
# First, check to see if we're all satisfied
28-
if any(!satisfied(p; verbose=verbose) for p in products)
29-
if platform_key() in keys(download_info)
26+
# Install unsatisfied or updated dependencies:
27+
unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
28+
if haskey(download_info, platform_key())
29+
url, tarball_hash = download_info[platform_key()]
30+
if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix)
3031
# Download and install binaries
31-
url, tarball_hash = download_info[platform_key()]
32-
install(url, tarball_hash; prefix=prefix, force=true, verbose=true)
33-
else
34-
error("Your platform $(Sys.MACHINE) is not supported by this package!")
32+
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)
3533
end
36-
37-
# Finally, write out a deps.jl file
38-
write_deps_file(joinpath(@__DIR__, "deps.jl"), products)
34+
elseif unsatisfied
35+
# If we don't have a BinaryProvider-compatible .tar.gz to download, complain.
36+
# Alternatively, you could attempt to install from a separate provider,
37+
# build from source or something even more ambitious here.
38+
error("Your platform $(triplet(platform_key())) is not supported by this package!")
3939
end
40+
41+
# Write out a deps.jl file that will contain mappings for our products
42+
write_deps_file(joinpath(@__DIR__, "deps.jl"), products)

0 commit comments

Comments
 (0)