Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Calcium as binary dependency #1067

Merged
merged 1 commit into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Antic_jll = "e21ec000-9f72-519e-ba6d-10061e575a27"
Arb_jll = "d9960996-1013-53c9-9ba4-74a4155039c3"
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Calcium_jll = "fcfa6d1b-d8ce-59d5-8c0a-c0d7f69e4f40"
FLINT_jll = "e134572f-a0d5-539d-bddf-3cad8db41a82"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand All @@ -24,6 +25,7 @@ AbstractAlgebra = "^0.17.0"
Antic_jll = "~0.200.400"
Arb_jll = "~200.1900.0"
BinaryProvider = "0.4, 0.5"
Calcium_jll = "~0.300.0"
FLINT_jll = "^200.700.0"
LoadFlint = "^0.5.0"
RandomExtensions = "0.4.2"
Expand Down
3 changes: 2 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

append!(dependencies, [
"build_Arb.v200.1900.0.jl",
"build_Antic.v0.200.300.jl",
"build_Antic.v0.200.400.jl",
"build_Calcium.v0.300.0.jl",
])

for file in dependencies
Expand Down
48 changes: 0 additions & 48 deletions deps/build_Antic.v0.200.300.jl

This file was deleted.

48 changes: 48 additions & 0 deletions deps/build_Antic.v0.200.400.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, ["libantic"], :libantic),
]

# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaBinaryWrappers/Antic_jll.jl/releases/download/Antic-v0.200.400+0"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Antic.v0.200.400.aarch64-linux-gnu.tar.gz", "6ddd116dc0dbc19094f84ba3244094d927990b1872d04a352fc4a1eb2867a97d"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/Antic.v0.200.400.aarch64-linux-musl.tar.gz", "6f4878572d8695c99980049c3f0c9037a44b2e1687318f493166cdbcff664408"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Antic.v0.200.400.armv7l-linux-gnueabihf.tar.gz", "e5cfc54cc8f9549c821f597c41318a7fa92c3e1daf3c8fe6f27e85eb0172249a"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Antic.v0.200.400.armv7l-linux-musleabihf.tar.gz", "9408fa4516ced962a86a38e65777e6c18a2be7ec053a7ee9095c8d1c9c87ba8d"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/Antic.v0.200.400.i686-linux-gnu.tar.gz", "2987d667b01d8ab969b6007937f53ff52fdc5e3d0a93a96e844d8964f0300dab"),
Linux(:i686, libc=:musl) => ("$bin_prefix/Antic.v0.200.400.i686-linux-musl.tar.gz", "8932d17b82315ead981214ce8142542fdf07283b497efd0cefaf398984269091"),
Windows(:i686) => ("$bin_prefix/Antic.v0.200.400.i686-w64-mingw32.tar.gz", "4df374e094e7837a4e520357d30512c54a3318bcadfe21a102677a625989bfb0"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Antic.v0.200.400.powerpc64le-linux-gnu.tar.gz", "fb05c69f0f34c2b115e38dbe96f526a8cde8b57cbde46309e9c56a813a23a347"),
MacOS(:x86_64) => ("$bin_prefix/Antic.v0.200.400.x86_64-apple-darwin.tar.gz", "ddc2ff2b2e4cfe5e160bfa6f4edcb1025227d102946feea17eeb3867cb03af59"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Antic.v0.200.400.x86_64-linux-gnu.tar.gz", "93fae5f365f019630fd24dc021b9257d301d80773810edde788d63456ca762c1"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/Antic.v0.200.400.x86_64-linux-musl.tar.gz", "33d77051af64ec1bde960acf5935889193955060f496d3753eccdc892f36efb3"),
FreeBSD(:x86_64) => ("$bin_prefix/Antic.v0.200.400.x86_64-unknown-freebsd.tar.gz", "d4cf8db555fe466550e0e924c9c77f8437301dfc1d6f7c3083e2f0e299461c74"),
Windows(:x86_64) => ("$bin_prefix/Antic.v0.200.400.x86_64-w64-mingw32.tar.gz", "3a3b5aab74c300446bae6598a6ae0719d78f6dd028dc1f13a1888d687a973029"),
)

# 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)
48 changes: 48 additions & 0 deletions deps/build_Calcium.v0.300.0.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, ["libcalcium"], :libcalcium),
]

# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaBinaryWrappers/Calcium_jll.jl/releases/download/Calcium-v0.300.0+0"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Calcium.v0.300.0.aarch64-linux-gnu.tar.gz", "1f2a5fa1cc4fd11febfbe27b435d20891993bc048f666ce5fe30253e8f619cdb"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/Calcium.v0.300.0.aarch64-linux-musl.tar.gz", "c1dd548ee1955dfbc3ecf1f19e9c10be074a397108fa0b86d1f3d5061648989b"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Calcium.v0.300.0.armv7l-linux-gnueabihf.tar.gz", "7af8b9656794945cbcd329f0ebf937a759337231fb0c833625ea4786f1ffba39"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Calcium.v0.300.0.armv7l-linux-musleabihf.tar.gz", "169dad5fe25e46fd2473f076fce7a47a710502946cd71f520c17eb7464caf93b"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/Calcium.v0.300.0.i686-linux-gnu.tar.gz", "e9392ee5e4362ea7f8240438d448a105e8554be8d5d09fe80ab800df9748aca1"),
Linux(:i686, libc=:musl) => ("$bin_prefix/Calcium.v0.300.0.i686-linux-musl.tar.gz", "7aa7d7daac688e0f232148da4369a11e5234f293110ea089bd2ab5d0c99ebe10"),
Windows(:i686) => ("$bin_prefix/Calcium.v0.300.0.i686-w64-mingw32.tar.gz", "6515c81fc52473c8581138bd967dcc9da77a615682f8dd9eec748459f18aa9de"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Calcium.v0.300.0.powerpc64le-linux-gnu.tar.gz", "149bb8ea920d6d22dc70dd9c6623bdf675e99d853e4b668275f927f4ed9af8ab"),
MacOS(:x86_64) => ("$bin_prefix/Calcium.v0.300.0.x86_64-apple-darwin.tar.gz", "63406828aa81e92656fa1f1bcfa85417b424f2bf49cf672bb89334ea7001110f"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Calcium.v0.300.0.x86_64-linux-gnu.tar.gz", "baddadb8d1c3af3c5be02d1f801a045ccdca6a41582df18cff2fe732c1217871"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/Calcium.v0.300.0.x86_64-linux-musl.tar.gz", "82ab786588680cef4011350c2ccd0631f11b2608f26a0e993d5d38a691c48e42"),
FreeBSD(:x86_64) => ("$bin_prefix/Calcium.v0.300.0.x86_64-unknown-freebsd.tar.gz", "82910709bacab9ec8bf40588b38a8b8bdd755cc026c2d856898cf19a81688bf5"),
Windows(:x86_64) => ("$bin_prefix/Calcium.v0.300.0.x86_64-w64-mingw32.tar.gz", "936c72583a8b8bfb4bf9e8cc72be6443a1b58d759f5fb1a1efc7e09391d6eb39"),
)

# 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)
1 change: 1 addition & 0 deletions src/Nemo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if VERSION > v"1.3.0-rc4"
# and imports the libxxx variables
using Arb_jll
using Antic_jll
using Calcium_jll
else
deps_dir = joinpath(@__DIR__, "..", "deps")
include(joinpath(deps_dir,"deps.jl"))
Expand Down