-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbuild_Zlib.v1.2.11.jl
48 lines (42 loc) · 3.48 KB
/
build_Zlib.v1.2.11.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 = [
LibraryProduct(prefix, "libz", :libz),
]
# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaBinaryWrappers/Zlib_jll.jl/releases/download/Zlib-v1.2.11+8"
# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-gnu.tar.gz", "dc3449f9073750cf574530a0e19a942d2e6a721b56afc29b6b9c247f09c2a420"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-musl.tar.gz", "27aeb30f125423695320312593dd17c8cf67dec635a337df0f218811a76d873b"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-gnueabihf.tar.gz", "af5c8ece6392ba048bd6d1e1257a4068ac6c192ad0aa5f6bef3879ed03ac11af"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-musleabihf.tar.gz", "a22637e5d66a9b4ba62bb18642e2d6623243a00146d0d29f6ee049e5d4e12045"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-gnu.tar.gz", "2297b370398fb1c2dcc966eeccdbffd9960497dfda9e223ffd41bf7231025a27"),
Linux(:i686, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-musl.tar.gz", "7b9664abc3d390c2726caa8957154700268045eee4001f9db4f89f3a76d40a75"),
Windows(:i686) => ("$bin_prefix/Zlib.v1.2.11.i686-w64-mingw32.tar.gz", "d3192db395f15e61105f09ad06928657e4e934d54e7d5d7aceb9e4672c1f4193"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.powerpc64le-linux-gnu.tar.gz", "53579b8eb2e542d88f05861ccbc4e04c95884a47bd23349e270c433f921cf418"),
MacOS(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-apple-darwin14.tar.gz", "10045ecb5ae2278ee3ca1549cc27dd30db42e415bfd6978e68572642f9396e11"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-gnu.tar.gz", "18a8553dc5335b8c42c1dec0e5fa055bc5badcc0591ee1dea44737b2c34b548f"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-musl.tar.gz", "3a19413626d019ace52b39ed3fdaecd721778ab51408bda7f68575351c8fb256"),
FreeBSD(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-unknown-freebsd11.1.tar.gz", "48149a62b13ecf52e5b6eb258bf37aa5db57305871fcb5e029e2a0b5140219f8"),
Windows(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz", "99dda782d485c18b854ea24e7749ea78e577ce86038f85c53fd2067a03e39661"),
)
# Install unsatisfied or updated dependencies:
unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
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 (\"$(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, verbose=verbose)