From f2f00804973a9c0c5b070972a42bf4e39a87cbf0 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 3 Sep 2019 11:45:24 -0700 Subject: [PATCH] Use Artifacts and JLL packages on Julia 1.3+ --- Manifest.toml | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++ Project.toml | 5 +- deps/build.jl | 62 ------------ src/Cairo.jl | 10 +- 4 files changed, 265 insertions(+), 67 deletions(-) create mode 100644 Manifest.toml delete mode 100644 deps/build.jl diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 0000000..28a312f --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,255 @@ +# This file is machine-generated - editing it directly is not advised + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[BinaryProvider]] +deps = ["Libdl", "Logging", "SHA"] +git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648" +uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +version = "0.5.6" + +[[Bzip2_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "decbb1e47894a4cff23ee418731b2a8b950b656c" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.6+0" + +[[Cairo_jll]] +deps = ["Bzip2_jll", "Fontconfig_jll", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "X11_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "f34ea13ce27acf27b8b81976f315534c496c8d3a" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.14.12+0" + +[[ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "10050a24b09e8e41b951e9976b109871ce98d965" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.8.0" + +[[Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Printf", "Reexport"] +git-tree-sha1 = "c9c1845d6bf22e34738bee65c357a69f416ed5d1" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.9.6" + +[[Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "2.1.0" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[Expat_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "e1b4190be75ba8d03ce2bec3a6cfc7a939c713ea" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.2.7+0" + +[[FixedPointNumbers]] +git-tree-sha1 = "d14a6fa5890ea3a7e5dcab6811114f132fec2b4b" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.6.1" + +[[Fontconfig_jll]] +deps = ["Bzip2_jll", "Expat_jll", "FreeType2_jll", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "60d38a9676cefea325c9714033d76798315e5fcf" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.1+2" + +[[FreeType2_jll]] +deps = ["Bzip2_jll", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "8e290780d75bc0f676548c3bb84c153f83d14bdc" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.1+1" + +[[FriBidi_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "0066610c8b3d531001737a4c8e6663b2a57dbd63" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.5+0" + +[[Gettext_jll]] +deps = ["Libdl", "Libiconv_jll", "Pkg"] +git-tree-sha1 = "1158ee88d262610dbf2d1751490f4f0a02c4180f" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.20.1+0" + +[[Glib_jll]] +deps = ["Gettext_jll", "Libdl", "Libffi_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "9a7e1ad28f1313da50e5ab8568725bed5f131ad1" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.59.0+1" + +[[Graphics]] +deps = ["Colors", "Compat", "NaNMath"] +git-tree-sha1 = "e3ead4211073d4117a0d2ef7d1efc5c8092c8412" +uuid = "a2bd30eb-e257-5431-a919-1863eab51364" +version = "0.4.0" + +[[Graphite2_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "3dfe2a952dd348bcd6dbf5caec90092f58280697" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.13+0" + +[[HarfBuzz_jll]] +deps = ["Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Gettext_jll", "Glib_jll", "Graphite2_jll", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "c56c15106e76e4d58b4afe55c462aae656cd93b9" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.6.1+0" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[LZO_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "26ff20dc58051d7eda388662b90049d192f8d0a1" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.0+0" + +[[LibGit2]] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[Libffi_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "f2c12e7da9c4f7fab577619626b772f607e67b04" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.1+0" + +[[Libiconv_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "48563fe30f00c9d4a4d61891e71df389bf901142" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.0+0" + +[[Libuuid_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "922dcdf893eeb85cac8c79b2841e35f091a8a824" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.34.0+0" + +[[LinearAlgebra]] +deps = ["Libdl"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[NaNMath]] +deps = ["Compat"] +git-tree-sha1 = "ce3b85e484a5d4c71dd5316215069311135fa9f2" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "0.3.2" + +[[PCRE_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "afb11698f8d191354fd16ad6e292dd1e32c3f5b8" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.42.0+0" + +[[Pango_jll]] +deps = ["Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "Libdl", "Pkg"] +git-tree-sha1 = "30085dba71ee9e337652bae886b9bff0cc2b48c4" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.42.4+0" + +[[Pixman_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "cdddc5aab6ae8e3034dbf3c264e636fbf19fdee0" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.38.4+1" + +[[Pkg]] +deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[Reexport]] +deps = ["Pkg"] +git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "0.2.0" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[Test]] +deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[X11_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "e07151cdc8ccc45bff4a30bd0a1bf4cd3bbcab7a" +uuid = "546b0b6d-9ca3-5ba2-8705-1bc1841d8479" +version = "1.6.8+0" + +[[Zlib_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "02b171e3e5766ab7c9fa51aca145d691da8f7a0e" +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.11+5" + +[[libpng_jll]] +deps = ["Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "503a5863235e7056816c504f5f9e0a7678372c89" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.37+0" diff --git a/Project.toml b/Project.toml index 94fddcb..7cc6fa9 100644 --- a/Project.toml +++ b/Project.toml @@ -4,14 +4,17 @@ version = "0.6.0" [deps] BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +Cairo_jll = "83423d85-b0ee-5818-9007-b63ccbeb887a" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" +Glib_jll = "7746bdde-850d-59dc-9ae8-88ece973131d" Graphics = "a2bd30eb-e257-5431-a919-1863eab51364" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Pango_jll = "36c8627f-9965-5494-a995-c6b170f724f3" [compat] BinaryProvider = "≥ 0.3.0" Graphics = "≥ 0.1.0" -julia = "≥ 0.7.0" +julia = "≥ 1.3.0" [extras] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index 750fd56..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,62 +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"))) - -# These are the two binary objects we care about -products = Product[ - LibraryProduct(prefix, "libcairo", :libcairo), - LibraryProduct(prefix, "libpango", :libpango), - LibraryProduct(prefix, "libpangocairo", :libpangocairo), - LibraryProduct(prefix, "libgobject", :libgobject), -] - -dependencies = [ - # Freetype2-related dependencies - "https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.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", - # Glib-related dependencies - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/PCRE-v8.42-2/build_PCRE.v8.42.0.jl", - "https://github.com/giordano/Yggdrasil/releases/download/Libffi-v3.2.1-0/build_Libffi.v3.2.1.jl", - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Libiconv-v1.15-0/build_Libiconv.v1.15.0.jl", - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Gettext-v0.19.8-0/build_Gettext.v0.19.8.jl", - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Glib-v2.59.0%2B0/build_Glib.v2.59.0.jl", - # Fontconfig-related dependencies - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_Libuuid.v2.34.0.jl", - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_Expat.v2.2.7.jl", - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_Fontconfig.v2.13.1.jl", - # HarfBuzz-related dependencies - "https://github.com/giordano/Yggdrasil/releases/download/Graphite2-v1.3.13/build_Graphite2.v1.3.13.jl", - "https://github.com/giordano/Yggdrasil/releases/download/HarfBuzz-v2.6.1/build_HarfBuzz.v2.6.1.jl", - # Cairo-related dependencies - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_X11.v1.6.8.jl", - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_LZO.v2.10.0.jl", - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Pixman-v0.36.0-0/build_Pixman.v0.36.0.jl", - "https://github.com/JuliaIO/LibpngBuilder/releases/download/v1.0.3/build_libpng.v1.6.37.jl", - "https://github.com/giordano/Yggdrasil/releases/download/Cairo-v1.14.12/build_Cairo.v1.14.12.jl", - # Pango-only dependencies - "https://github.com/JuliaPackaging/Yggdrasil/releases/download/FriBidi-v1.0.5%2B0/build_FriBidi.v1.0.5.jl", - # And finally...Pango! - "https://github.com/giordano/Yggdrasil/releases/download/Pango-v.1.42.4/build_Pango.v1.42.4.jl" -] - - -for dependency in dependencies - platform_key_abi() isa Union{MacOS,Windows} && - occursin(r"build_(Libuuid|Expat|Fontconfig|Graphite2|HarfBuzz|X11)", dependency) && - continue - - 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 - - # Build the dependencies - Mod = @eval module Anon end - Mod.include(file) -end - -# Finally, write out a deps.jl file -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/src/Cairo.jl b/src/Cairo.jl index cbc9efd..6bbfc8e 100644 --- a/src/Cairo.jl +++ b/src/Cairo.jl @@ -2,12 +2,14 @@ module Cairo import Base.Sys -depsjl = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") -isfile(depsjl) ? include(depsjl) : error("Cairo not properly ", - "installed. Please run\nPkg.build(\"Cairo\")") +# For libcairo +using Cairo_jll +# For libpangocairo +using Pango_jll +# For libgobject +using Glib_jll function __init__() - check_deps() # On Linux and FreeBSD we use FontConfig. Set FONTCONFIG_PATH only if none # of FONTCONFIG_PATH or FONTCONFIG_FILE is set. if !(Sys.isapple() || Sys.iswindows()) && get(ENV, "FONTCONFIG_PATH", "") == "" &&