diff --git a/deps/build.jl b/deps/build.jl index d03a492..c6c7558 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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.v2.6.0.jl", ] const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) diff --git a/deps/build_FLINT.v0.0.1.jl b/deps/build_FLINT.v0.0.1.jl deleted file mode 100644 index 3a0d754..0000000 --- a/deps/build_FLINT.v0.0.1.jl +++ /dev/null @@ -1,48 +0,0 @@ -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.1+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.1.aarch64-linux-gnu.tar.gz", "ec9887a7f7fa75cd40cbf9816d4aa85c14682be8c122f2767dd33d6e3485c57d"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.1.aarch64-linux-musl.tar.gz", "2095b17382f4f6e93cc9c6682ce1bca2b5446e40ef3befcc8a39b58fbe021cf7"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.1.armv7l-linux-gnueabihf.tar.gz", "8a90c173a644001f781d4045e02cc3683c28ea7503c380d4500636827afe4b6b"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FLINT.v0.0.1.armv7l-linux-musleabihf.tar.gz", "75a5b34ba2362f4b480218090cc0d1c955bf339ee036cf7e318b1c0e463b4f3b"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.1.i686-linux-gnu.tar.gz", "efda0718eac26e25a6a91f7407836779d1ce7de3518e5f8ca4e940eecc1f7cba"), - Linux(:i686, libc=:musl) => ("$bin_prefix/FLINT.v0.0.1.i686-linux-musl.tar.gz", "9504a94062e5836c47c5cb731e8c967b917230e50f99e8b82bbfd9ca87b7d878"), - Windows(:i686) => ("$bin_prefix/FLINT.v0.0.1.i686-w64-mingw32.tar.gz", "c0a5fc39425467da297ccab4c10c7f4065cf06f2b846b033ebbc455dfa2efdc0"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.1.powerpc64le-linux-gnu.tar.gz", "3c8aaa11fbd591b21fe2defb4b0429fb025e375990c71dbd09cf1f496353dfd8"), - MacOS(:x86_64) => ("$bin_prefix/FLINT.v0.0.1.x86_64-apple-darwin14.tar.gz", "24ac5e8e9891426c221bca1009fb99b8799a4c1c0a037d8b54fdbb09000e0813"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FLINT.v0.0.1.x86_64-linux-gnu.tar.gz", "68319251b42c7fc306ca92a6c9c9c5883bdbf41833c388c214f3f3672cb03ad0"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/FLINT.v0.0.1.x86_64-linux-musl.tar.gz", "9ca6dd40dbff5d7b43ddad0206e27c6e4c5570cd87d1248911c63d9a0ce17e60"), - FreeBSD(:x86_64) => ("$bin_prefix/FLINT.v0.0.1.x86_64-unknown-freebsd11.1.tar.gz", "b7c82997dbb802eb5fc5b0aaad6ca5ce61306af821141c3b47a4f65da1818ff0"), - Windows(:x86_64) => ("$bin_prefix/FLINT.v0.0.1.x86_64-w64-mingw32.tar.gz", "02c0a3bc08e00d3ad59a00173407b62fe91c1269e5903f8b7365f856ec233f82"), -) - -# 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) diff --git a/deps/build_FLINT.v2.6.0.jl b/deps/build_FLINT.v2.6.0.jl new file mode 100644 index 0000000..95d772a --- /dev/null +++ b/deps/build_FLINT.v2.6.0.jl @@ -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-v2.6.0+0" + +# Listing of files generated by BinaryBuilder: +download_info = Dict( + Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.aarch64-linux-gnu.tar.gz", "5b14f4c383488c116c2a1755d90bba2c8d73b40efc51e0f0594e5e28dad6a0ee"), + Linux(:aarch64, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.aarch64-linux-musl.tar.gz", "ebeba3bf7a9e6007cdb2cc0d5f8f43e5dbd0ba51e0a5b8ae550e1c7364a280c8"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FLINT.v2.6.0.armv7l-linux-gnueabihf.tar.gz", "d506142b9a4744e6e8ea8279c6097d7d8ccceb99a830d82d84f140d7fe4dc574"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FLINT.v2.6.0.armv7l-linux-musleabihf.tar.gz", "07308f6bf6db8d3c7e7be043217985e751441df57baf14702ae00ab074499fc0"), + Linux(:i686, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.i686-linux-gnu.tar.gz", "d92b523d17e68890f512f90709918dec6a42ff048f511eefefd726283156b8b9"), + Linux(:i686, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.i686-linux-musl.tar.gz", "024ed3f104a92b34629f36d9bb9ca10c8e75e2a129df3974ea6ef14c94b3c438"), + Windows(:i686) => ("$bin_prefix/FLINT.v2.6.0.i686-w64-mingw32.tar.gz", "21b57a6458e3398cb132d1989819387132553235d95567942eda95a395a85c6a"), + Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.powerpc64le-linux-gnu.tar.gz", "b6d37bc7ba18a171f7b56a8c5c2eb857c32cf76827cf540446e8f086ec9392cb"), + MacOS(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-apple-darwin14.tar.gz", "0e39a384e45f82bed87f3b472e768a17ade4a5773770c3359b38854e974542d6"), + Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FLINT.v2.6.0.x86_64-linux-gnu.tar.gz", "8137bd0cf4b0fd3808b2d4bc574c005a40275a272ce4e64fc5ee1a1855ae2fae"), + Linux(:x86_64, libc=:musl) => ("$bin_prefix/FLINT.v2.6.0.x86_64-linux-musl.tar.gz", "dd63d941088ef5232207f6cfd2cf02f1003b969ec78c5b4e85ee32578087d273"), + FreeBSD(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-unknown-freebsd11.1.tar.gz", "19820b1fed197923d9d152df213fc76cca8b38f73a999391653c97d8d4327ea1"), + Windows(:x86_64) => ("$bin_prefix/FLINT.v2.6.0.x86_64-w64-mingw32.tar.gz", "9ccf3eb9b8ee8d2cfcd501e9e44273ee25a6cd0e903daf3fc2861eb9ab831a12"), +) + +# 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) diff --git a/deps/build_GMP.v6.1.2.jl b/deps/build_GMP.v6.1.2.jl index ac8a889..200f0f8 100644 --- a/deps/build_GMP.v6.1.2.jl +++ b/deps/build_GMP.v6.1.2.jl @@ -13,32 +13,32 @@ bin_prefix = "https://github.com/JuliaBinaryWrappers/GMP_jll.jl/releases/downloa # Listing of files generated by BinaryBuilder: download_info = Dict( - Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-gnu-cxx03.tar.gz", "c8dd7e07cb82260ef34682e08ef6d2924a610569e2f5cd98419bb2dcb6e60524"), - Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-gnu-cxx11.tar.gz", "130bf229c56f25e396366553752f6215be5491520556b3fda8ed79f76af4eca7"), - Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-musl-cxx03.tar.gz", "e39b05c2379a311a426946150e5e10baff03f1d44ae03bb359e2594d9973411e"), - Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-musl-cxx11.tar.gz", "0bb07a22a7cd5dc1028db8b1dc6bfc897bc8bad67d42ea644d58b63c67ac87d8"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-gnueabihf-cxx03.tar.gz", "c65ef226121b2f83dff5e0706f9c2a9c89d631a9e696ec4245db8f34d523a1b4"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-gnueabihf-cxx11.tar.gz", "4e4694472e941f3f16632bdf532d953948a1d86845867bca324b424a444470d7"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-musleabihf-cxx03.tar.gz", "1d027c2279bc7fb965d29936b4fdd94aec6fce73fa078512eb66b112b007a7ed"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-musleabihf-cxx11.tar.gz", "bd54dffd382b6a973a3ff3351a2360419efda4d0aed1895b10485b68cc04d2f5"), - Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-gnu-cxx03.tar.gz", "924ce570a667e554be131b6f016e7be4a4d9bcb3805674f284dac732be59c664"), - Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-gnu-cxx11.tar.gz", "f06a382cf1de344e492dbcc947d32b0344cbe524f95f55de0c26fa0d69e3dd09"), - Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-musl-cxx03.tar.gz", "b81b8c73c6a09e6ec9365b3801a5a8694a7b8fec9dbe21575aec45bcb00ebba9"), - Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-musl-cxx11.tar.gz", "a9b24f822050a99f20370bb66807d2e011e2d5c8f66db625f636795700b3a7e4"), - Windows(:i686, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-w64-mingw32-cxx03.tar.gz", "bfa320b37a0c5597809792b33e472ae573c3ae3b9823dcb51bc93f4594f24c59"), - Windows(:i686, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-w64-mingw32-cxx11.tar.gz", "c02853d8e5cf0c89611030d28ff930c2ca3ff412440a4da74ff49ff9511f8f7c"), - Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.powerpc64le-linux-gnu-cxx03.tar.gz", "c803fa0fa7152091df080c25569fd35e724d33a5761d793e7be9134498eab1ac"), - Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.powerpc64le-linux-gnu-cxx11.tar.gz", "e9e507486448a730e0a87c7229bf360b46254893cadc67da5c7d2306437c0e1e"), - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-apple-darwin14-cxx03.tar.gz", "4a7ea5d8efe6909bddb5a82fe497e680c15e2b1c847a06a13fc64597bec32ac5"), - MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-apple-darwin14-cxx11.tar.gz", "8693d06c3ad2d1442722a85519d754619f4ed998b9189f13659e20db2a2a6681"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-gnu-cxx03.tar.gz", "738390b5d59be5650af95c03d82eb90193d53a2deea4f009e574e47748d80cf3"), - Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-gnu-cxx11.tar.gz", "ab29a335c8341add421739ee0fbe989b49e5e8b2fd9995904689eeee6bdb5534"), - Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-musl-cxx03.tar.gz", "39342be3866d7171b64ab492499a10030071965549d5d409d8867d06bbac105b"), - Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-musl-cxx11.tar.gz", "14c421bc4a8a429fadcd42b5206bbfb53bb709f6f95d9af4bf18a6fa58c4cd67"), - FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-unknown-freebsd11.1-cxx03.tar.gz", "bdeeb7504760c248aa8121acc433d8104381d618f5144c21e56bd8ebb4167051"), - FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-unknown-freebsd11.1-cxx11.tar.gz", "324c09761ff49f4cb523fe8ef721bbf40f601029a3b4f3df74daeecaeccf89d7"), - Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-w64-mingw32-cxx03.tar.gz", "362a38432bfeeda17d1b02bbc83e5f83ef8276ae4dc732b0fc7237966bf58e4e"), - Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any,:cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-w64-mingw32-cxx11.tar.gz", "2c50fc577ee090d46faba104ba3a4f328cc642024377bcfd968f48fe93954bca"), + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-gnu-cxx03.tar.gz", "c8dd7e07cb82260ef34682e08ef6d2924a610569e2f5cd98419bb2dcb6e60524"), + Linux(:aarch64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-gnu-cxx11.tar.gz", "130bf229c56f25e396366553752f6215be5491520556b3fda8ed79f76af4eca7"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-musl-cxx03.tar.gz", "e39b05c2379a311a426946150e5e10baff03f1d44ae03bb359e2594d9973411e"), + Linux(:aarch64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.aarch64-linux-musl-cxx11.tar.gz", "0bb07a22a7cd5dc1028db8b1dc6bfc897bc8bad67d42ea644d58b63c67ac87d8"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-gnueabihf-cxx03.tar.gz", "c65ef226121b2f83dff5e0706f9c2a9c89d631a9e696ec4245db8f34d523a1b4"), + Linux(:armv7l, libc=:glibc, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-gnueabihf-cxx11.tar.gz", "4e4694472e941f3f16632bdf532d953948a1d86845867bca324b424a444470d7"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-musleabihf-cxx03.tar.gz", "1d027c2279bc7fb965d29936b4fdd94aec6fce73fa078512eb66b112b007a7ed"), + Linux(:armv7l, libc=:musl, call_abi=:eabihf, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.armv7l-linux-musleabihf-cxx11.tar.gz", "bd54dffd382b6a973a3ff3351a2360419efda4d0aed1895b10485b68cc04d2f5"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-gnu-cxx03.tar.gz", "924ce570a667e554be131b6f016e7be4a4d9bcb3805674f284dac732be59c664"), + Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-gnu-cxx11.tar.gz", "f06a382cf1de344e492dbcc947d32b0344cbe524f95f55de0c26fa0d69e3dd09"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-musl-cxx03.tar.gz", "b81b8c73c6a09e6ec9365b3801a5a8694a7b8fec9dbe21575aec45bcb00ebba9"), + Linux(:i686, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-linux-musl-cxx11.tar.gz", "a9b24f822050a99f20370bb66807d2e011e2d5c8f66db625f636795700b3a7e4"), + Windows(:i686, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.i686-w64-mingw32-cxx03.tar.gz", "bfa320b37a0c5597809792b33e472ae573c3ae3b9823dcb51bc93f4594f24c59"), + Windows(:i686, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.i686-w64-mingw32-cxx11.tar.gz", "c02853d8e5cf0c89611030d28ff930c2ca3ff412440a4da74ff49ff9511f8f7c"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.powerpc64le-linux-gnu-cxx03.tar.gz", "c803fa0fa7152091df080c25569fd35e724d33a5761d793e7be9134498eab1ac"), + Linux(:powerpc64le, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.powerpc64le-linux-gnu-cxx11.tar.gz", "e9e507486448a730e0a87c7229bf360b46254893cadc67da5c7d2306437c0e1e"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-apple-darwin14-cxx03.tar.gz", "4a7ea5d8efe6909bddb5a82fe497e680c15e2b1c847a06a13fc64597bec32ac5"), + MacOS(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-apple-darwin14-cxx11.tar.gz", "8693d06c3ad2d1442722a85519d754619f4ed998b9189f13659e20db2a2a6681"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-gnu-cxx03.tar.gz", "738390b5d59be5650af95c03d82eb90193d53a2deea4f009e574e47748d80cf3"), + Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-gnu-cxx11.tar.gz", "ab29a335c8341add421739ee0fbe989b49e5e8b2fd9995904689eeee6bdb5534"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-musl-cxx03.tar.gz", "39342be3866d7171b64ab492499a10030071965549d5d409d8867d06bbac105b"), + Linux(:x86_64, libc=:musl, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-linux-musl-cxx11.tar.gz", "14c421bc4a8a429fadcd42b5206bbfb53bb709f6f95d9af4bf18a6fa58c4cd67"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-unknown-freebsd11.1-cxx03.tar.gz", "bdeeb7504760c248aa8121acc433d8104381d618f5144c21e56bd8ebb4167051"), + FreeBSD(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-unknown-freebsd11.1-cxx11.tar.gz", "324c09761ff49f4cb523fe8ef721bbf40f601029a3b4f3df74daeecaeccf89d7"), + Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03)) => ("$bin_prefix/GMP.v6.1.2.x86_64-w64-mingw32-cxx03.tar.gz", "362a38432bfeeda17d1b02bbc83e5f83ef8276ae4dc732b0fc7237966bf58e4e"), + Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => ("$bin_prefix/GMP.v6.1.2.x86_64-w64-mingw32-cxx11.tar.gz", "2c50fc577ee090d46faba104ba3a4f328cc642024377bcfd968f48fe93954bca"), ) # Install unsatisfied or updated dependencies: diff --git a/deps/generate_buildjl.jl b/deps/generate_buildjl.jl deleted file mode 100644 index fad62c2..0000000 --- a/deps/generate_buildjl.jl +++ /dev/null @@ -1,226 +0,0 @@ -#!/usr/bin/env julia - -using GitHub, BinaryBuilder, Pkg, Pkg.PlatformEngines, SHA - -""" - extract_platform_key(path::AbstractString) - -Given the path to a tarball, return the platform key of that tarball. If none -can be found, prints a warning and return the current platform suffix. -""" -function extract_platform_key(path::AbstractString) - try - return extract_name_version_platform_key(path)[3] - catch - @warn("Could not extract the platform key of $(path); continuing...") - return platform_key_abi() - end -end - -""" - extract_name_version_platform_key(path::AbstractString) - -Given the path to a tarball, return the name, platform key and version of that -tarball. If any of those things cannot be found, throw an error. -""" -function extract_name_version_platform_key(path::AbstractString) - m = match(r"^(.*?)\.v(.*?)\.([^\.\-]+-[^\.\-]+-([^\-]+-){0,2}[^\-]+).tar.gz$", basename(path)) - if m === nothing - error("Could not parse name, platform key and version from $(path)") - end - name = m.captures[1] - version = VersionNumber(m.captures[2]) - platkey = platform_key_abi(m.captures[3]) - return name, version, platkey -end - -function product_hashes_from_github_release(repo_name::AbstractString, tag_name::AbstractString; - verbose::Bool = true) - # Get list of files within this release - release = GitHub.gh_get_json(GitHub.DEFAULT_API, "/repos/$(repo_name)/releases/tags/$(tag_name)", auth=BinaryBuilder.github_auth()) - - # Try to extract the platform key from each, use that to find all tarballs - function can_extract_platform(filename) - # Short-circuit build.jl because that's quite often there. :P - if startswith(filename, "build") && endswith(filename, ".jl") - return false - end - - unknown_platform = typeof(extract_platform_key(filename)) <: UnknownPlatform - if unknown_platform && verbose - @info("Ignoring file $(filename); can't extract its platform key") - end - return !unknown_platform - end - assets = [a for a in release["assets"] if can_extract_platform(a["name"])] - - # Download each tarball, hash it, and reconstruct product_hashes. - product_hashes = Dict() - mktempdir() do d - for asset in assets - # For each asset (tarball), download it - filepath = joinpath(d, asset["name"]) - url = asset["browser_download_url"] - download(url, filepath) - - # Hash it - hash = open(filepath) do file - return bytes2hex(sha256(file)) - end - - # Then fit it into our product_hashes - file_triplet = triplet(extract_platform_key(asset["name"])) - product_hashes[file_triplet] = (asset["name"], hash) - - if verbose - @info("Calculated $hash for $(asset["name"])") - end - end - end - - return product_hashes -end - -function print_buildjl(io::IO, products::Vector, product_hashes::Dict, - bin_path::AbstractString) - print(io, """ - 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"))) - """) - - # Print out products - print(io, "products = [\n") - for prod in products - print(io, " $(repr(prod)),\n") - end - print(io, "]\n\n") - - # Print binary locations/tarball hashes - print(io, """ - # Download binaries from hosted location - bin_prefix = "$bin_path" - - # Listing of files generated by BinaryBuilder: - """) - - println(io, "download_info = Dict(") - for platform in sort(collect(keys(product_hashes))) - fname, hash = product_hashes[platform] - pkey = platform_key_abi(platform) - println(io, " $(pkey) => (\"\$bin_prefix/$(fname)\", \"$(hash)\"),") - end - println(io, ")\n") - - print(io, """ - # 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) - """) -end - - - -if length(ARGS) < 1 || length(ARGS) > 3 - @error("Usage: generate_buildjl.jl path/to/build_tarballs.jl [ ]") - exit(1) -end - -build_tarballs_path = ARGS[1] -@info "Build tarballs script: $(build_tarballs_path)" -src_name = basename(dirname(build_tarballs_path)) -if 2 <= length(ARGS) <= 3 - repo_name = ARGS[2] -else - repo_name = "JuliaBinaryWrappers/$(src_name)_jll.jl" -end -@info "Repo name: $(repo_name)" - -if length(ARGS) == 3 - tag_name = ARGS[3] -else - ctx = Pkg.Types.Context() - # Force-update the registry here, since we may have pushed a new version recently - BinaryBuilder.update_registry(ctx) - versions = VersionNumber[] - paths = Pkg.Operations.registered_paths(ctx.env, BinaryBuilder.jll_uuid("$(src_name)_jll")) - if any(p -> isfile(joinpath(p, "Package.toml")), paths) - # Find largest version number that matches ours in the registered paths - for path in paths - append!(versions, Pkg.Compress.load_versions(joinpath(path, "Versions.toml"))) - end - end - if !isempty(versions) - last_version = maximum(versions) - tag_name = "$(src_name)-v$(last_version)" - else - @error("""Unable to determine latest version of $(src_name), - please specify it as third argument to this script: - generate_buildjl.jl $(build_tarballs_path) $(repo_name) """) - exit(1) - end -end -@info "Tag name: $(tag_name)" - -# First, snarf out the Product variables: -if !isfile(build_tarballs_path) - @error("Unable to open $(build_tarballs_path)") - exit(1) -end - -m = Module(:__anon__) -Core.eval(m, quote - using BinaryBuilder, Pkg.BinaryPlatforms - - # Override BinaryBuilder functionality so that it doesn't actually do anything - # it just saves the inputs so that we can mess around with them: - _name = nothing - _version = nothing - _producs = nothing - function build_tarballs(A, name, version, sources, script, platforms, products, dependencies; kwargs...) - global _name = name - global _version = version - - # Peel off the functionalization of Products - if isa(products, Function) - products = products(Prefix(".")) - end - global _products = products - return nothing - end -end) -include_string(m, String(read(build_tarballs_path))) -name, version, products = Core.eval(m, quote - _name, _version, _products -end) - -product_hashes = product_hashes_from_github_release(repo_name, tag_name) - -mkpath(joinpath(@__DIR__, "build")) -buildjl_path = joinpath(@__DIR__, "build", "build_$(name).v$(version).jl") -bin_path = "https://github.com/$(repo_name)/releases/download/$(tag_name)" -@info("Writing out to $(buildjl_path)") -open(buildjl_path, "w") do io - print_buildjl(io, products, product_hashes, bin_path) -end - -# julia --color=yes generate_buildjl.jl Yggdrasil/F/FLINT/build_tarballs.jl -# one needs to add prefix as first argument to LibraryProduct afterwards