Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Bring flint to the pre #4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Jun 24, 2020
1 parent 9b24d10 commit a149c3b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ elseif VERSION < v"1.3.0-rc4"
# This has to be in sync with the jll packages (using generate_build.jl and build_tarballs.jl from Yggdrasil)
"build_GMP.v6.1.2.jl",
"build_MPFR.v4.0.2.jl",
"build_FLINT.v0.0.1.jl",
"build_FLINT.v0.0.2.jl",
]

const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")))
Expand Down
48 changes: 48 additions & 0 deletions deps/build_FLINT.v0.0.2.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,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, ["libflint"], :libflint),
]

# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaBinaryWrappers/FLINT_jll.jl/releases/download/FLINT-v0.0.2+0"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.aarch64-linux-gnu.tar.gz", "fc033381212b0003e92a12e6fb767a61b252ecde69c9ae7f4504bb1993a33ad6"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.aarch64-linux-musl.tar.gz", "823b8217daffea6f59c2e91e7b422ec0bc45fe5db82fbe92c0f112f363a08d27"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.2.armv7l-linux-gnueabihf.tar.gz", "aa17f15edadb72b30c26a36290e4e23fb142a69d6ab9978ed6115b1671e735ce"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.2.armv7l-linux-musleabihf.tar.gz", "02157189f548864fb24fee348ab775f5e5ac1bc8a144a7e5ed2b3dd2a1293fab"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.i686-linux-gnu.tar.gz", "09e7104c54e27f71d0384562267682b9c23382535abcbfa8773c8d8a607b5a20"),
Linux(:i686, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.i686-linux-musl.tar.gz", "82d1acb1fd5e363f2567cbde793086c6b0040dafa7cfbf0444339dfe9f98b743"),
Windows(:i686) => ("$bin_prefix/FLINT.v0.0.2.i686-w64-mingw32.tar.gz", "5e68cfeac5f5cfbf4f6ed0bad185274135d3751fa74a52bcb19e3d3ed4a6733d"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.powerpc64le-linux-gnu.tar.gz", "424f200d1f821ee40bc67e0728ca71378490c94756849e5e08dd599a47ef9a4e"),
MacOS(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-apple-darwin14.tar.gz", "47fa6fe4f46f084f585c7665838acb66dddebf812342911a70bec07116162e84"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.2.x86_64-linux-gnu.tar.gz", "f065650c4eaae77d7234232e279f91cfc892b1d44588792178154ee20164f95c"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.2.x86_64-linux-musl.tar.gz", "4f212be5c9ffc38b50aaa69a4c63df505bcdc02099c31494fabd64c337bf52ba"),
FreeBSD(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-unknown-freebsd11.1.tar.gz", "4a679118435961a358cfbbf68eb4ea781694d53a493929b78309690b2341a86d"),
Windows(:x86_64) => ("$bin_prefix/FLINT.v0.0.2.x86_64-w64-mingw32.tar.gz", "94900de41b267a2f0d117fa4cdbbfc73c9c215ed94dcf746a9e736664be9a644"),
)

# 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)

0 comments on commit a149c3b

Please sign in to comment.