-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use binary provider to install liblzma (#8)
- Loading branch information
1 parent
86dcf65
commit f813790
Showing
4 changed files
with
56 additions
and
2 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,4 @@ | ||
julia 0.6 | ||
BinaryProvider 0.2 | ||
Compat 0.62 | ||
TranscodingStreams 0.3 |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using BinaryProvider | ||
|
||
# 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["liblzma"], :liblzma), | ||
] | ||
|
||
# Download binaries from hosted location | ||
bin_prefix = "https://github.com/bicycle1885/XzBuilder/releases/download/v1.0.0" | ||
|
||
# Listing of files generated by BinaryBuilder: | ||
download_info = Dict( | ||
#BinaryProvider.Linux(:aarch64, :glibc, :blank_abi) => ("$bin_prefix/XzBuilder.aarch64-linux-gnu.tar.gz", "36cb5f30ef212ae889850336121b97bebe8805b77190e5b2bb5e9f30da3e471a"), | ||
#BinaryProvider.UnknownPlatform() => ("$bin_prefix/XzBuilder.arm-linux-gnueabihf.tar.gz", "52a0d759997d722099078338271fb1278bab66c12f268932b94b7a8ce5feaf84"), | ||
#BinaryProvider.Linux(:i686, :glibc, :blank_abi) => ("$bin_prefix/XzBuilder.i686-linux-gnu.tar.gz", "caae08967ae86557dab4d1fc9c607b131aec7390bdeb04bf201d855f88747cf6"), | ||
#BinaryProvider.Windows(:i686, :blank_libc, :blank_abi) => ("$bin_prefix/XzBuilder.i686-w64-mingw32.tar.gz", "ef2f862f760e6a9b095b2182d351a826f4a192f2afbd8a4c9302d89174101cda"), | ||
#BinaryProvider.Linux(:powerpc64le, :glibc, :blank_abi) => ("$bin_prefix/XzBuilder.powerpc64le-linux-gnu.tar.gz", "6f6be8b5a3670e181f3b7823559a2bb74198ed9fe680a80cb26cc42d041cd378"), | ||
#BinaryProvider.MacOS(:x86_64, :blank_libc, :blank_abi) => ("$bin_prefix/XzBuilder.x86_64-apple-darwin14.tar.gz", "8aed74a3a44123d15d4fc76659bd7cf4d336fb2e200a9c897624b19bdfb5ba81"), | ||
#BinaryProvider.Linux(:x86_64, :glibc, :blank_abi) => ("$bin_prefix/XzBuilder.x86_64-linux-gnu.tar.gz", "786d2c2a86452c11b31a2af8db5f80db1237e967efad2661887cbb6140214b1e"), | ||
#BinaryProvider.Windows(:x86_64, :blank_libc, :blank_abi) => ("$bin_prefix/XzBuilder.x86_64-w64-mingw32.tar.gz", "239333adb161f0e3ad1971fe43b2ccb7741f4f0657d131fe1354c343261f93ce"), | ||
BinaryProvider.Linux(:aarch64, :glibc) => ("$bin_prefix/XzBuilder.aarch64-linux-gnu.tar.gz", "36cb5f30ef212ae889850336121b97bebe8805b77190e5b2bb5e9f30da3e471a"), | ||
BinaryProvider.Linux(:i686, :glibc) => ("$bin_prefix/XzBuilder.i686-linux-gnu.tar.gz", "caae08967ae86557dab4d1fc9c607b131aec7390bdeb04bf201d855f88747cf6"), | ||
BinaryProvider.Windows(:i686) => ("$bin_prefix/XzBuilder.i686-w64-mingw32.tar.gz", "ef2f862f760e6a9b095b2182d351a826f4a192f2afbd8a4c9302d89174101cda"), | ||
BinaryProvider.Linux(:powerpc64le, :glibc) => ("$bin_prefix/XzBuilder.powerpc64le-linux-gnu.tar.gz", "6f6be8b5a3670e181f3b7823559a2bb74198ed9fe680a80cb26cc42d041cd378"), | ||
BinaryProvider.MacOS(:x86_64) => ("$bin_prefix/XzBuilder.x86_64-apple-darwin14.tar.gz", "8aed74a3a44123d15d4fc76659bd7cf4d336fb2e200a9c897624b19bdfb5ba81"), | ||
BinaryProvider.Linux(:x86_64, :glibc) => ("$bin_prefix/XzBuilder.x86_64-linux-gnu.tar.gz", "786d2c2a86452c11b31a2af8db5f80db1237e967efad2661887cbb6140214b1e"), | ||
BinaryProvider.Windows(:x86_64) => ("$bin_prefix/XzBuilder.x86_64-w64-mingw32.tar.gz", "239333adb161f0e3ad1971fe43b2ccb7741f4f0657d131fe1354c343261f93ce"), | ||
) | ||
|
||
# First, check to see if we're all satisfied | ||
if any(!satisfied(p; verbose=verbose) for p in products) | ||
if haskey(download_info, platform_key()) | ||
# Download and install binaries | ||
url, tarball_hash = download_info[platform_key()] | ||
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) | ||
else | ||
# 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 more even more ambitious here. | ||
error("Your platform $(triplet(platform_key())) is not supported by this package!") | ||
end | ||
end | ||
|
||
# Write out a deps.jl file that will contain mappings for our products | ||
write_deps_file(joinpath(@__DIR__, "deps.jl"), products) |
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