Skip to content

Commit

Permalink
Merge 30192c0 into 1485489
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Dec 8, 2018
2 parents 1485489 + 30192c0 commit 9747e67
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,46 @@ using BinaryProvider # requires BinaryProvider 0.3.0 or later
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["libgeos_c"], :libgeos),
LibraryProduct(prefix, String["libgeos"], :libgeos_cpp),
LibraryProduct(prefix, ["libgeos_c"], :libgeos),
LibraryProduct(prefix, ["libgeos"], :libgeos_cpp),
]

# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.6.2-3"
bin_prefix = "https://github.com/JuliaGeo/GEOSBuilder/releases/download/v3.7.1-0"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, :glibc) => ("$bin_prefix/GEOS.v3.6.2.aarch64-linux-gnu.tar.gz", "f2a299a956db14855641635bd319b302220371a7fc121bb1f2231c9ed42983bc"),
Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/GEOS.v3.6.2.arm-linux-gnueabihf.tar.gz", "a8da3b29d888a14fb2d3788df1bc6e763ba9047b10b4f1728a2f67bba0388f1c"),
Linux(:i686, :glibc) => ("$bin_prefix/GEOS.v3.6.2.i686-linux-gnu.tar.gz", "5d6c51199d228bdd1876e7e4aeec103755ecde26464139277b5185e437f6b221"),
Windows(:i686) => ("$bin_prefix/GEOS.v3.6.2.i686-w64-mingw32.tar.gz", "8e05b3a3ba8c8a7769d2947f80a01536c9b8f96f0e604c51296f7a40e392ab07"),
Linux(:powerpc64le, :glibc) => ("$bin_prefix/GEOS.v3.6.2.powerpc64le-linux-gnu.tar.gz", "d2083d831899f49e90e6c4fa854f9ac4564b2616d1ec6d58e0dfd1b9994d9d2d"),
MacOS(:x86_64) => ("$bin_prefix/GEOS.v3.6.2.x86_64-apple-darwin14.tar.gz", "9618a0ebed6bf1031c007ce73f518c80c828e2f673f2b60411d459e16c164920"),
Linux(:x86_64, :glibc) => ("$bin_prefix/GEOS.v3.6.2.x86_64-linux-gnu.tar.gz", "1ded88fc0129dfd7f0bfae7f777135d13e2866920e3457181f934c001a6961ab"),
Windows(:x86_64) => ("$bin_prefix/GEOS.v3.6.2.x86_64-w64-mingw32.tar.gz", "dcca4342944b52ef0d03b283207211e4aa47661d3891c63047963480ae4b2126"),
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/GEOS.v3.7.1.aarch64-linux-gnu.tar.gz", "28709603a286355227ed6251ccaf55338ace73e25056f8eeac90466f4e7c314b"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/GEOS.v3.7.1.aarch64-linux-musl.tar.gz", "9e741dc2768237bcbb5d2d54d741d316f8b6a84471b452be6739db7361de12b9"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/GEOS.v3.7.1.arm-linux-gnueabihf.tar.gz", "e6512becf25bbe15bd1eada987b8fb03cd8a39c5033e7476a97ad08db21be932"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/GEOS.v3.7.1.arm-linux-musleabihf.tar.gz", "332bd2ec6943a6f4a8ff8f9dd1689ea3fc52adfbe3b744c9029b124bfeaf0a6b"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/GEOS.v3.7.1.i686-linux-gnu.tar.gz", "a01f0b5a0ffa49c9dafca2e3744ce0f9d843146aaa6ee16f73e87bd94cac4037"),
Linux(:i686, libc=:musl) => ("$bin_prefix/GEOS.v3.7.1.i686-linux-musl.tar.gz", "3fda46f07b2e7121c4159fbd92107ef4d02f003a61332b771d943235a06b9bf7"),
Windows(:i686) => ("$bin_prefix/GEOS.v3.7.1.i686-w64-mingw32.tar.gz", "74c1e8d6de1be724cf6eb2e99f3438cc4248807170b2fc57a48cf84e057f090e"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/GEOS.v3.7.1.powerpc64le-linux-gnu.tar.gz", "0e4101b182e191632377baa3e4d99792f56413a98384465b2ab2fd3dbb914cb5"),
MacOS(:x86_64) => ("$bin_prefix/GEOS.v3.7.1.x86_64-apple-darwin14.tar.gz", "ad99b5d481b14176a9add0c4b0de47c60e6ed0c92be57acea606fe1da5d21f2f"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/GEOS.v3.7.1.x86_64-linux-gnu.tar.gz", "9c6d7ce38b1d36473ebd1c19905510f6887253581e7254802e45e4d98179ca8f"),
Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc7)) => ("$bin_prefix/GEOS.v3.7.1.x86_64-linux-musl-gcc7.tar.gz", "7a91360809154dc6d47ee8a0e51190002478893379c5fb649ccb4a05726c1e55"),
FreeBSD(:x86_64) => ("$bin_prefix/GEOS.v3.7.1.x86_64-unknown-freebsd11.1.tar.gz", "f66f3f8f0d86a100b8f2d24f54d7f7fe89b7bfd444634b0ad1b04b14995454f5"),
Windows(:x86_64) => ("$bin_prefix/GEOS.v3.7.1.x86_64-w64-mingw32.tar.gz", "a268d051796bb3f6a8cd020cf7cd8a66b5f103eccecc90d71b626138e1a7d0d8"),
)

# 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
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)
end
elseif unsatisfied
# If we don't have a BinaryProvider-compatible .tar.gz to download, complain.
dl_info = choose_download(download_info, platform_key_abi())
if dl_info === nothing && unsatisfied
# If we don't have a 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!")
error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!")
end

# If we have a download, and we are unsatisfied (or the version we're
# trying to install is not itself installed) then load it up!
if unsatisfied || !isinstalled(dl_info...; prefix=prefix)
# Download and install binaries
install(dl_info...; prefix=prefix, force=true, verbose=verbose)
end

# Write out a deps.jl file that will contain mappings for our products
write_deps_file(joinpath(@__DIR__, "deps.jl"), products)
write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose)

0 comments on commit 9747e67

Please sign in to comment.