From 0e7d5fe2d6a3404a9d99efe4fc1c65b0e59cca66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 29 Aug 2019 19:16:25 +0200 Subject: [PATCH] New build.jl --- .gitignore | 1 + Project.toml | 2 -- deps/build-229.jl | 63 ---------------------------------- deps/build.jl | 59 +++++++++++++------------------ deps/build_FreeType2.v2.9.0.jl | 46 ------------------------- deps/build_Pixman.v0.34.0.jl | 46 ------------------------- deps/build_Zlib.v1.2.11.jl | 46 ------------------------- deps/build_libpng.v1.0.0.jl | 46 ------------------------- src/Cairo.jl | 2 +- 9 files changed, 25 insertions(+), 286 deletions(-) delete mode 100644 deps/build-229.jl delete mode 100644 deps/build_FreeType2.v2.9.0.jl delete mode 100644 deps/build_Pixman.v0.34.0.jl delete mode 100644 deps/build_Zlib.v1.2.11.jl delete mode 100644 deps/build_libpng.v1.0.0.jl diff --git a/.gitignore b/.gitignore index 41335f6..df0af92 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ test/test_results .DS_Store *~ deps/build.log +deps/build_*.jl diff --git a/Project.toml b/Project.toml index 8fb96f0..af82de0 100644 --- a/Project.toml +++ b/Project.toml @@ -3,13 +3,11 @@ uuid = "159f3aea-2a34-519c-b102-8c37f9878175" version = "0.6.0" [deps] -BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae" BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" Graphics = "a2bd30eb-e257-5431-a919-1863eab51364" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [compat] Compat = "≥ 0.52.0" diff --git a/deps/build-229.jl b/deps/build-229.jl deleted file mode 100644 index 0ca9d9a..0000000 --- a/deps/build-229.jl +++ /dev/null @@ -1,63 +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, String["libcairo"], :libcairo), -] - -dependencies = [ - "https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.1/build_Zlib.v1.2.11.jl", - "https://github.com/SimonDanisch/LibpngBuilder/releases/download/v1.6.31/build_libpng.v1.0.0.jl", - "https://github.com/staticfloat/PixmanBuilder/releases/download/v0.34.0-1/build_Pixman.v0.34.0.jl", - "https://github.com/JuliaGraphics/FreeTypeBuilder/releases/download/v2.9.1/build_FreeType2.v2.9.0.jl" -] - -# for url in dependencies -# download(url, basename(url)) -# end -for elem in dependencies - # it's a bit faster to run the build in an anonymous module instead of - # starting a new julia process - m = Module(:__anon__) - Core.eval(m, :(Main.include($(joinpath(@__DIR__, basename(elem)))))) -end - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaGraphics/CairoBuilder/releases/download/v1.12.12" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, :glibc) => ("$bin_prefix/Cairo.v1.12.12.aarch64-linux-gnu.tar.gz", "128ab2c799f28ea6c46b974244716c02e4cd0ba9f4d99dbd06cea84486a70c15"), - Linux(:aarch64, :musl) => ("$bin_prefix/Cairo.v1.12.12.aarch64-linux-musl.tar.gz", "cb51e16e171af0dea78947d47c61d1ee5976460e458c64cfe8746c7cfe3e8972"), - Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/Cairo.v1.12.12.arm-linux-gnueabihf.tar.gz", "8a699225e6ac5ab945b57d1179ba41e1021f84dddde02df2104e1466d1f1eba4"), - Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/Cairo.v1.12.12.arm-linux-musleabihf.tar.gz", "3cebe2407cfc6dda7e4f2b4f21b57d120ebc6da18c15785e76de92571ef2fb05"), - Linux(:i686, :glibc) => ("$bin_prefix/Cairo.v1.12.12.i686-linux-gnu.tar.gz", "5011f386292387d76beeea3d33487d09e312daa6c5aaf91033c1c9f4e431d279"), - Linux(:i686, :musl) => ("$bin_prefix/Cairo.v1.12.12.i686-linux-musl.tar.gz", "d12257d06e73297aa3cd40a556d1f1da2831ffa28b9d5d0a76491552a6e594b9"), - Windows(:i686) => ("$bin_prefix/Cairo.v1.12.12.i686-w64-mingw32.tar.gz", "3eb3b72323b0a5effafaad8660fbcb5a4a85cbbb16be8ac69fd7d8df0ea99618"), - Linux(:powerpc64le, :glibc) => ("$bin_prefix/Cairo.v1.12.12.powerpc64le-linux-gnu.tar.gz", "75fa6f359d200665de028c493250539c1ed5e64137e4ed019c61959fc8e4d3a3"), - MacOS(:x86_64) => ("$bin_prefix/Cairo.v1.12.12.x86_64-apple-darwin14.tar.gz", "703323019abbdb8c5ac93dc4671479e71694d2fd6266fb55ced5ffbf7eaef934"), - Linux(:x86_64, :glibc) => ("$bin_prefix/Cairo.v1.12.12.x86_64-linux-gnu.tar.gz", "ba25e83f1f49dce8bb408e4accf914ed774b94d630983a6c8d46d0b66de3f691"), - Linux(:x86_64, :musl) => ("$bin_prefix/Cairo.v1.12.12.x86_64-linux-musl.tar.gz", "823a3ad3d8370714985a3a8a9dc4f3dc1bc1be1ca8937d482fc69f41bf1079e1"), - FreeBSD(:x86_64) => ("$bin_prefix/Cairo.v1.12.12.x86_64-unknown-freebsd11.1.tar.gz", "f08161cc296f2daba8ddae0ce664e9f7b2f1bb071787325970d31310eab0718a"), - Windows(:x86_64) => ("$bin_prefix/Cairo.v1.12.12.x86_64-w64-mingw32.tar.gz", "9718250937e175ecd8306cea6bceb5c18f3d1b1b2e597c7e408340db53ec1bb6"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -if haskey(download_info, platform_key()) - url, tarball_hash = download_info[platform_key()] - if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) - # Download and install binaries - install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) - end -elseif unsatisfied - # 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 even more ambitious here. - error("Your platform $(triplet(platform_key())) is not supported by this package!") -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build.jl b/deps/build.jl index 6886585..f24d7d5 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -3,46 +3,33 @@ 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, ["libcairo"], :libcairo), + +# These are the two binary objects we care about +products = Product[ + LibraryProduct(prefix, "libcairo", :libcairo), ] -# Download binaries from hosted location -bin_prefix = "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12" +dependencies = [ + "https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl", + "https://github.com/JuliaIO/LibpngBuilder/releases/download/v1.0.3/build_libpng.v1.6.37.jl", + "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Pixman-v0.36.0-0/build_Pixman.v0.36.0.jl", + "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Bzip2-v1.0.6-2/build_Bzip2.v1.0.6.jl", + "https://github.com/JuliaGraphics/FreeTypeBuilder/releases/download/v2.9.1-4/build_FreeType2.v2.10.0.jl", + "https://github.com/giordano/Yggdrasil/releases/download/X11-v1.6.8/build_X11.v1.6.8.jl", + "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_Cairo.v1.14.12.jl", +] -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Cairo.v1.14.12.aarch64-linux-gnu.tar.gz", "f5e3a0f4face5142ce8273d25a614452864034077dd840c50ccfb17322f18adf"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Cairo.v1.14.12.aarch64-linux-musl.tar.gz", "f9fcf6750090c3e964c38b06866635163389fdfba0dd4d781e5fb279624b9b3d"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Cairo.v1.14.12.arm-linux-gnueabihf.tar.gz", "804ee9f98b26c5a4a26f0ecfe4abaabf5dbf79f4d7c1486e4ceaadd34ac38033"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Cairo.v1.14.12.arm-linux-musleabihf.tar.gz", "c66e446884509180440f24893b51a39345346ba9cefbf9a8a04ce1de4ed25d98"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Cairo.v1.14.12.i686-linux-gnu.tar.gz", "d4fafd44b5f1301786fc4ddf63fe71ac9e942891dde7f07efb1ee2d6b28b2c6c"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Cairo.v1.14.12.i686-linux-musl.tar.gz", "1fefd232b6238b2718f8ab73bbbb222eae51dd5c157549fb1749f70243aca77f"), - Windows(:i686) => ("$bin_prefix/Cairo.v1.14.12.i686-w64-mingw32.tar.gz", "1f39115d7c99d102e05edc7eb19db88b4456a4940d3a46ee2151092a6fe862ee"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Cairo.v1.14.12.powerpc64le-linux-gnu.tar.gz", "28517b9460af7cdf25c7fd20d88a9277e00261b6c451179fb6db9edb01c7b8bf"), - MacOS(:x86_64) => ("$bin_prefix/Cairo.v1.14.12.x86_64-apple-darwin14.tar.gz", "aa1b2a45191ad3b24745f4a5c9eea18c3ef125d67746a29e677f531c806d9cf9"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Cairo.v1.14.12.x86_64-linux-gnu.tar.gz", "c24b27be757123e795ace83b44d4d1110951e6662d7489817bb36ca98f7d3923"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Cairo.v1.14.12.x86_64-linux-musl.tar.gz", "6c286983562052ac5fc6dbc47d30155d97258257c027215f4a1a34ef59ec7e5a"), - FreeBSD(:x86_64) => ("$bin_prefix/Cairo.v1.14.12.x86_64-unknown-freebsd11.1.tar.gz", "6ea14fcf72852c421f81b3acd6b7bb657071a10f484311205862381b746e2135"), - Windows(:x86_64) => ("$bin_prefix/Cairo.v1.14.12.x86_64-w64-mingw32.tar.gz", "4cdfc0c08af8bcce3529ae13ecee6826acc9a25585151c84a7f6bdfb93200281"), -) -# 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 +for dependency in dependencies + file = joinpath(@__DIR__, basename(dependency)) + isfile(file) || download(dependency, file) + # it's a bit faster to run the build in an anonymous module instead of + # starting a new julia process -# 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) + # Build the dependencies + Mod = @eval module Anon end + Mod.include(file) end -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) +# Finally, write out a deps.jl file +write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build_FreeType2.v2.9.0.jl b/deps/build_FreeType2.v2.9.0.jl deleted file mode 100644 index bf05778..0000000 --- a/deps/build_FreeType2.v2.9.0.jl +++ /dev/null @@ -1,46 +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, String["libfreetype"], :libfreetype), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/Gnimuc/FreeTypeBuilder/releases/download/v2.9.1" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, :glibc) => ("$bin_prefix/FreeType2.v2.9.0.aarch64-linux-gnu.tar.gz", "c47c6bdef0f8483cf4e968877ee8778fe173f53cadb12de22e6aeee34a70384d"), - Linux(:aarch64, :musl) => ("$bin_prefix/FreeType2.v2.9.0.aarch64-linux-musl.tar.gz", "b50ef907f7019bc7cc49a16a46e24e521213dda7fe1ab48442900d82860230e0"), - Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/FreeType2.v2.9.0.arm-linux-gnueabihf.tar.gz", "960642c185936a501a4c7301f042c5bc616e85d859cf868516b72b787f2f1380"), - Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/FreeType2.v2.9.0.arm-linux-musleabihf.tar.gz", "4e624965ab3aaae52e1751fa60d1eeebca2df60e26cf0b1c5876bd53005144c7"), - Linux(:i686, :glibc) => ("$bin_prefix/FreeType2.v2.9.0.i686-linux-gnu.tar.gz", "f344cd50f3cd9e4eed72fabe48ccce6acf8129cb966b2654ea6b9bb0c729a32a"), - Linux(:i686, :musl) => ("$bin_prefix/FreeType2.v2.9.0.i686-linux-musl.tar.gz", "f7480c18b444509d0f97eea8f5013c068898de05fad1e29fc035d73454d85153"), - Windows(:i686) => ("$bin_prefix/FreeType2.v2.9.0.i686-w64-mingw32.tar.gz", "8114192e9f9f23053bc94eb352b7b87d5a4e1e2438396668e08c5a8b63987fdd"), - Linux(:powerpc64le, :glibc) => ("$bin_prefix/FreeType2.v2.9.0.powerpc64le-linux-gnu.tar.gz", "6714d99a688e994aa311d06e6214b25264f4dc976fe7fdbf9338287656379fe3"), - MacOS(:x86_64) => ("$bin_prefix/FreeType2.v2.9.0.x86_64-apple-darwin14.tar.gz", "1c1fb7b064735780472c7b3de34639072952c274dea50986b1e37a2888d5e642"), - Linux(:x86_64, :glibc) => ("$bin_prefix/FreeType2.v2.9.0.x86_64-linux-gnu.tar.gz", "1abcf93c7bc5e4d94d89823c32577add3d4948d7cdbcdc5214f36594c45ca96e"), - Linux(:x86_64, :musl) => ("$bin_prefix/FreeType2.v2.9.0.x86_64-linux-musl.tar.gz", "9fb7aacef54b59462e9fc5f008df4ffbacf6f828adc54452afb6c7796b825bb9"), - FreeBSD(:x86_64) => ("$bin_prefix/FreeType2.v2.9.0.x86_64-unknown-freebsd11.1.tar.gz", "57af70cbbfda1731e91210a883d5ade50772485189e0a7931f30ad64ff698c7f"), - Windows(:x86_64) => ("$bin_prefix/FreeType2.v2.9.0.x86_64-w64-mingw32.tar.gz", "e28168f248814da26c6319bd9e55982b233f5605e662edaa3c8d6617fb375def"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -if haskey(download_info, platform_key()) - url, tarball_hash = download_info[platform_key()] - if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) - # Download and install binaries - install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) - end -elseif unsatisfied - # 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 even more ambitious here. - error("Your platform $(triplet(platform_key())) is not supported by this package!") -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build_Pixman.v0.34.0.jl b/deps/build_Pixman.v0.34.0.jl deleted file mode 100644 index 29247c9..0000000 --- a/deps/build_Pixman.v0.34.0.jl +++ /dev/null @@ -1,46 +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, String["libpixman"], :libpixman), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/staticfloat/PixmanBuilder/releases/download/v0.34.0-1" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, :glibc) => ("$bin_prefix/Pixman.v0.34.0.aarch64-linux-gnu.tar.gz", "202d8658a38c3a97d679aaf871c4b4b278a2df2de80e5151884746cd8aecacf1"), - Linux(:aarch64, :musl) => ("$bin_prefix/Pixman.v0.34.0.aarch64-linux-musl.tar.gz", "40215a85cba958e8ac0bbf8fa5c76f07ed41ba10439187a6eed426e9db9fe969"), - Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/Pixman.v0.34.0.arm-linux-gnueabihf.tar.gz", "cb6013ae64a8da3c4a5b706052043dd2a82287e6d6a8ef7030c94f9be404860e"), - Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/Pixman.v0.34.0.arm-linux-musleabihf.tar.gz", "f93e8e42ae7e8a9833288ed71441de699c5639790f6772a3d442b76f55e551c7"), - Linux(:i686, :glibc) => ("$bin_prefix/Pixman.v0.34.0.i686-linux-gnu.tar.gz", "6aa014509b393fed0b5bf2861844f415c2c401cc1f385f1b26df1eb5574682ab"), - Linux(:i686, :musl) => ("$bin_prefix/Pixman.v0.34.0.i686-linux-musl.tar.gz", "7f52cca4f29caf230b1350187f42584c12c71e7c306a6a7cc6c8b62794c548f0"), - Windows(:i686) => ("$bin_prefix/Pixman.v0.34.0.i686-w64-mingw32.tar.gz", "c06c104d74a32fadb1aee26b85a79a83478034ef34969e943f8868f0d333c547"), - Linux(:powerpc64le, :glibc) => ("$bin_prefix/Pixman.v0.34.0.powerpc64le-linux-gnu.tar.gz", "6788f04d8091ac90522b2e5f09961d2408789e37ce6c01f8730e3cdc43dbdcf3"), - MacOS(:x86_64) => ("$bin_prefix/Pixman.v0.34.0.x86_64-apple-darwin14.tar.gz", "248ac947cbf73d5b342694f8421db5b59c558ca5349dfcca6130ca89ad4368cb"), - Linux(:x86_64, :glibc) => ("$bin_prefix/Pixman.v0.34.0.x86_64-linux-gnu.tar.gz", "3382fd010d41bab9c457f1e317ae8d426e34311ddbab2a31d0937b2255873886"), - Linux(:x86_64, :musl) => ("$bin_prefix/Pixman.v0.34.0.x86_64-linux-musl.tar.gz", "27931e6fae07e27acae91657cb7b67d9089f2942ef09b9a082e87cff52bcb603"), - FreeBSD(:x86_64) => ("$bin_prefix/Pixman.v0.34.0.x86_64-unknown-freebsd11.1.tar.gz", "ae5617bfd640b8f6cb47a05440b3a96807cefad9e6cc4af5d333620aac6c39b7"), - Windows(:x86_64) => ("$bin_prefix/Pixman.v0.34.0.x86_64-w64-mingw32.tar.gz", "4cbf76c796ae923e3d7a69d3b06147b8e944bbeb0d224c21a4834be2fa519c22"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -if haskey(download_info, platform_key()) - url, tarball_hash = download_info[platform_key()] - if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) - # Download and install binaries - install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) - end -elseif unsatisfied - # 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 even more ambitious here. - error("Your platform $(triplet(platform_key())) is not supported by this package!") -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build_Zlib.v1.2.11.jl b/deps/build_Zlib.v1.2.11.jl deleted file mode 100644 index 81cc56c..0000000 --- a/deps/build_Zlib.v1.2.11.jl +++ /dev/null @@ -1,46 +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, String["libz"], :libz), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.1" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, :glibc) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-gnu.tar.gz", "37de2156c3c7e71cf7a913726eaae493239bcd65e5b42a84008298d8d418122a"), - Linux(:aarch64, :musl) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-musl.tar.gz", "4eaed05355abc53edfda7add75db1b37508a6bfc7c7612f6a622435ab6e2376e"), - Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-gnueabihf.tar.gz", "f08efe363ec8d1cd683a0ede7e1a9b7f8fc9104b02f345fa0134c41f8ed6b858"), - Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-musleabihf.tar.gz", "480406c4ad864d6fc469a68e7f64fed8650de31c7330bb0ab2969eea22c26157"), - Linux(:i686, :glibc) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-gnu.tar.gz", "8d0b2e36823e3ef9ad5a37d7adc629cb2fd1d64c4d5173237c27523e2d01fa48"), - Linux(:i686, :musl) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-musl.tar.gz", "23cf414f24a7138b8c4b77d54750a371eda340cda3f91bf081643335de4a44b2"), - Windows(:i686) => ("$bin_prefix/Zlib.v1.2.11.i686-w64-mingw32.tar.gz", "a58cc5df045f50caaf16bb9e393f5549fb6498471a04e5c55659425936243e0a"), - Linux(:powerpc64le, :glibc) => ("$bin_prefix/Zlib.v1.2.11.powerpc64le-linux-gnu.tar.gz", "1ac9ceeaf2512734d04848a6fb45ba40213e5ea7d2b7d33b72bfda879e1c69bd"), - MacOS(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-apple-darwin14.tar.gz", "c923f866a0770cf2165d1b18b6e301b3d01a875401a7801ddc9deba86759ca7b"), - Linux(:x86_64, :glibc) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-gnu.tar.gz", "2b081904e33195cd24e40639c3fa1b3e70284d86f267710343941083bedaf610"), - Linux(:x86_64, :musl) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-musl.tar.gz", "a782fb42c612576cffbc448cc8b17aa888592e1419b5e3713e6e0a9859ebbb36"), - FreeBSD(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-unknown-freebsd11.1.tar.gz", "e035a82177cad715e819c08f888538db4ddb0589a13292cb18e9a69a220a7028"), - Windows(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz", "34cfc00b28c3883d007e642c4518cba3ba4244bcced25101e3f15168e1a898d7"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -if haskey(download_info, platform_key()) - url, tarball_hash = download_info[platform_key()] - if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) - # Download and install binaries - install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) - end -elseif unsatisfied - # 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 even more ambitious here. - error("Your platform $(triplet(platform_key())) is not supported by this package!") -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build_libpng.v1.0.0.jl b/deps/build_libpng.v1.0.0.jl deleted file mode 100644 index b9c5c7b..0000000 --- a/deps/build_libpng.v1.0.0.jl +++ /dev/null @@ -1,46 +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, String["libpng16"], :libpng), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/SimonDanisch/LibpngBuilder/releases/download/v1.6.31" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, :glibc) => ("$bin_prefix/libpng.v1.0.0.aarch64-linux-gnu.tar.gz", "066248a17adcbd9533a3abb61aeb92d96f1341e1b588ee938ca93aece66afeee"), - Linux(:aarch64, :musl) => ("$bin_prefix/libpng.v1.0.0.aarch64-linux-musl.tar.gz", "f1f85dcb141b508301db19e9a11ef43a999b39b1a4ced29e64c8f52700eab43b"), - Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/libpng.v1.0.0.arm-linux-gnueabihf.tar.gz", "28be4910b6ef152d604b432b2aef9617774e306b2744c312c7499196a660950c"), - Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/libpng.v1.0.0.arm-linux-musleabihf.tar.gz", "0809cbce8c12a3f9632718a827ed8820225374553eb3eda92a3e8c56b033b77b"), - Linux(:i686, :glibc) => ("$bin_prefix/libpng.v1.0.0.i686-linux-gnu.tar.gz", "c6937fcc23a15c3eadfbf13a1fa7aa8046e5e82192d0e79378d1d57e25c2a7c0"), - Linux(:i686, :musl) => ("$bin_prefix/libpng.v1.0.0.i686-linux-musl.tar.gz", "50a7c43df57ef32d0ab61f5059f3bccf423e18d4d9e86d1a084174bbe2b62ffb"), - Windows(:i686) => ("$bin_prefix/libpng.v1.0.0.i686-w64-mingw32.tar.gz", "7adfe9b2e2f91798d43bc98f79645b69cb611fd5221fa803ce8ba530ccf9bcfa"), - Linux(:powerpc64le, :glibc) => ("$bin_prefix/libpng.v1.0.0.powerpc64le-linux-gnu.tar.gz", "90430fa0a2858db0ffc87981e14c5864171389e6af50be9cf7c9ed5a85713e5c"), - MacOS(:x86_64) => ("$bin_prefix/libpng.v1.0.0.x86_64-apple-darwin14.tar.gz", "53a530ca9251761cd3e0123fee3ff470a473097e7f112038e4c5b7ca7aa4eae9"), - Linux(:x86_64, :glibc) => ("$bin_prefix/libpng.v1.0.0.x86_64-linux-gnu.tar.gz", "eee0ffe168e0ba11129a544f666bc9840036a0761234f36e15421c9004c5be55"), - Linux(:x86_64, :musl) => ("$bin_prefix/libpng.v1.0.0.x86_64-linux-musl.tar.gz", "458cb397e183772a87ca7bc7fbb309cdc082a74a70460ce3b90027f1565d5f40"), - FreeBSD(:x86_64) => ("$bin_prefix/libpng.v1.0.0.x86_64-unknown-freebsd11.1.tar.gz", "afe7b58dc391ff1f2e982c5a734d33fc942ba611349d79f917d5c0647cc1148a"), - Windows(:x86_64) => ("$bin_prefix/libpng.v1.0.0.x86_64-w64-mingw32.tar.gz", "ff95e2f2f7d5c410c5374e7e86ab443bb58ff132bf418ab0db99c3385cb0bee2"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -if haskey(download_info, platform_key()) - url, tarball_hash = download_info[platform_key()] - if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix) - # Download and install binaries - install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose) - end -elseif unsatisfied - # 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 even more ambitious here. - error("Your platform $(triplet(platform_key())) is not supported by this package!") -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/src/Cairo.jl b/src/Cairo.jl index 33ccf31..54c37c6 100644 --- a/src/Cairo.jl +++ b/src/Cairo.jl @@ -10,7 +10,7 @@ isfile(depsjl) ? include(depsjl) : error("Cairo not properly ", "installed. Please run\nPkg.build(\"Cairo\")") function __init__() - + check_deps() end using Colors