diff --git a/.gitignore b/.gitignore index 2e634a0..6e765ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -deps/builds -deps/downloads -deps/usr -deps/src -deps/build.log .DS_Store *~ Manifest.toml -deps/deps.jl diff --git a/.travis.yml b/.travis.yml index a48628e..f9683b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: - osx - windows julia: - - 1.2 + - 1.3 - nightly notifications: email: false diff --git a/Project.toml b/Project.toml index 9b75d2d..584a312 100644 --- a/Project.toml +++ b/Project.toml @@ -1,15 +1,14 @@ name = "Fontconfig" uuid = "186bb1d3-e1f7-5a2c-a377-96d770f13627" -version = "0.3.0" +version = "0.4.0" [deps] -BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +Fontconfig_jll = "a3f928ae-7b40-5064-980b-68af3947d34b" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [compat] -BinaryProvider = "≥ 0.3.0" -julia = "≥ 1" +julia = "1.3" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/appveyor.yml b/appveyor.yml index cbccd56..16bb9b0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ # Documentation: https://github.com/JuliaCI/Appveyor.jl environment: matrix: - - julia_version: 1.2 + - julia_version: 1.3 - julia_version: nightly platform: - x86 diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index fb5dab7..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,38 +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 = [ - LibraryProduct(prefix, ["libfontconfig"], :jl_libfontconfig), -] - -dependencies = [ - # Freetype2-related dependencies - "build_Zlib.v1.2.11.jl", - "build_Bzip2.v1.0.6.jl", - "build_FreeType2.v2.10.1.jl", - # Fontconfig-related dependencies - "build_Libuuid.v2.34.0.jl", - "build_Expat.v2.2.7.jl", - "build_Fontconfig.v2.13.1.jl", -] - -for dependency in dependencies - # On macOS let's use system libuuid, this library is not available for Windows - platform_key_abi() isa Union{MacOS,Windows} && - occursin(r"^build_Libuuid", dependency) && - continue - - # 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(dependency) -end - -# Finally, write out a deps.jl file -write_deps_file(joinpath(@__DIR__, "deps.jl"), products) diff --git a/deps/build_Bzip2.v1.0.6.jl b/deps/build_Bzip2.v1.0.6.jl deleted file mode 100644 index 8c868b6..0000000 --- a/deps/build_Bzip2.v1.0.6.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, ["libbz2"], :libbzip2), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/Bzip2_jll.jl/releases/download/Bzip2-v1.0.6+1" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Bzip2.v1.0.6.aarch64-linux-gnu.tar.gz", "f729536341dfeffb0ab2d3c87b21be852d6bdeff1e53cd3fc96a792aee57f918"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Bzip2.v1.0.6.aarch64-linux-musl.tar.gz", "f0e57be14bc34266e4211244a7b62d3ea19bd0dac5e1df02716f9f613e9f4ac0"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Bzip2.v1.0.6.arm-linux-gnueabihf.tar.gz", "2246caf56f6903514e5e3df293fcc06196c1ac9b898a62b04149b741c5578862"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Bzip2.v1.0.6.arm-linux-musleabihf.tar.gz", "67912bf11051e37b1cfcef655d3969fe7ac91458d213990e323723dc4ec1f7af"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Bzip2.v1.0.6.i686-linux-gnu.tar.gz", "24d0560bb0cee02ad7aa967d3426310857f074b7802aa47258415ddfef45381f"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Bzip2.v1.0.6.i686-linux-musl.tar.gz", "4a21bed1edb690cd1a08513f34418f316f8b1bbe98c443d8561209079b558edb"), - Windows(:i686) => ("$bin_prefix/Bzip2.v1.0.6.i686-w64-mingw32.tar.gz", "7b9d067c5ad2103c8c77cda6b0191f52217ac4e185d411b21be9a9531ef3d6ef"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Bzip2.v1.0.6.powerpc64le-linux-gnu.tar.gz", "327dc9d9e43267aed4b06ebc63e140df55e81347b89f808138da48315b2ec4c2"), - MacOS(:x86_64) => ("$bin_prefix/Bzip2.v1.0.6.x86_64-apple-darwin14.tar.gz", "c1eae6379ed54002113e63d375d9ce7b7a3f3f7c0a0c209b17793c861e8b586f"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Bzip2.v1.0.6.x86_64-linux-gnu.tar.gz", "542ac01f87f2bf247c4d3f77f6f717760faf942fb4018f47f8b87cd849ca1342"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Bzip2.v1.0.6.x86_64-linux-musl.tar.gz", "fea5a0477fcb5baef9761828eebe0ad4ce70d0f3322c86b8894e7b741bb1b1e6"), - FreeBSD(:x86_64) => ("$bin_prefix/Bzip2.v1.0.6.x86_64-unknown-freebsd11.1.tar.gz", "9f99470dfbc16f3e27493236c9b936a50f82305bb0934c4b1dc6b18d7fe1343e"), - Windows(:x86_64) => ("$bin_prefix/Bzip2.v1.0.6.x86_64-w64-mingw32.tar.gz", "d8332b44a02bf54939a0437b22636086354e60590768a4050534f903a23ba73c"), -) - -# 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_Expat.v2.2.7.jl b/deps/build_Expat.v2.2.7.jl deleted file mode 100644 index a009f7a..0000000 --- a/deps/build_Expat.v2.2.7.jl +++ /dev/null @@ -1,49 +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, ["libexpat"], :libexpat), - ExecutableProduct(prefix, "xmlwf", :xmlwf), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Expat.v2.2.7.aarch64-linux-gnu.tar.gz", "6bf46584ec3b91d8e0a173f39b6a640b6ee589dd28c76d8231e985e0e50908a4"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Expat.v2.2.7.aarch64-linux-musl.tar.gz", "42578e73b94f51701145068168d74fc69c1caa1ec503accd535ba4e896f6cebf"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Expat.v2.2.7.arm-linux-gnueabihf.tar.gz", "3941713d5ed51d3976104e80f322f60be04ea00f7268b38dbb2a8338b7276f80"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Expat.v2.2.7.arm-linux-musleabihf.tar.gz", "4d14d14abd3bb3d3abf9c7bff750b1b74faabe29daba94e7811fdafbc0c56634"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Expat.v2.2.7.i686-linux-gnu.tar.gz", "e4e8c5a7cf12bbbaa4389021020a828e6a61d616a0b5a4f260c65a38c6b6a1f4"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Expat.v2.2.7.i686-linux-musl.tar.gz", "51c13dee29fc7c7fba01b177161a9793202bcd90dc82d2ad0b1793a4d483223f"), - Windows(:i686) => ("$bin_prefix/Expat.v2.2.7.i686-w64-mingw32.tar.gz", "dfba8a20982e97bdb46fb09309d9222e063a3dd566845216e9cf29b63f1ba7c4"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Expat.v2.2.7.powerpc64le-linux-gnu.tar.gz", "b8b1d1f0b828ef0a067e25eff2ef21cc73c71b8dda72b5ab0c790e9478533bc1"), - MacOS(:x86_64) => ("$bin_prefix/Expat.v2.2.7.x86_64-apple-darwin14.tar.gz", "22bc93059fc96143e5af0fd2d84bef07207f1156ed9710598cf27e9337de2b61"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Expat.v2.2.7.x86_64-linux-gnu.tar.gz", "2de762a3d34bca7880af77a29b20ef215c362829e6c9891acb1618ae3e79ebce"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Expat.v2.2.7.x86_64-linux-musl.tar.gz", "6cfc5b7d9585bd57496b3505b2457fd2b751868f831d6b9f7d7bb931f0dddfbe"), - FreeBSD(:x86_64) => ("$bin_prefix/Expat.v2.2.7.x86_64-unknown-freebsd11.1.tar.gz", "7fd372632fb534f016a67ca3f6178dd86136b06acb8ccc50d9893d90aa7e620f"), - Windows(:x86_64) => ("$bin_prefix/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz", "256a21d92a56a4929ff9234ff09ff3b30501932f213e00aaabb1e65b6a0bda45"), -) - -# 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_Fontconfig.v2.13.1.jl b/deps/build_Fontconfig.v2.13.1.jl deleted file mode 100644 index 2df8837..0000000 --- a/deps/build_Fontconfig.v2.13.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, ["libfontconfig"], :libfontconfig), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/Fontconfig_jll.jl/releases/download/Fontconfig-v2.13.1+6" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Fontconfig.v2.13.1.aarch64-linux-gnu.tar.gz", "5246a8e19ea3daf1173ffc60c5cb6a53255e31144a813cab39def80892cb21c9"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Fontconfig.v2.13.1.aarch64-linux-musl.tar.gz", "07a4b21fa37c0d35cc9afd66dbcdc533864120dfc2f55d5136486c73995a0c87"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Fontconfig.v2.13.1.arm-linux-gnueabihf.tar.gz", "9f98deecaef1eb34a461ef41e068786d6cd1a729998f5727bf0d202581a43fc7"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Fontconfig.v2.13.1.arm-linux-musleabihf.tar.gz", "7e01b4c4e584716591ded1467fe8e0e034cb48fc5bcad6a75a81ccc4c7eadfdc"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Fontconfig.v2.13.1.i686-linux-gnu.tar.gz", "99331d81818b6754f9c48982f4758f5b8fd88b369cd6126a814dece7a0b58bae"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Fontconfig.v2.13.1.i686-linux-musl.tar.gz", "b4601b1fab56df7eb30db2b3d360465b03378579a0b9f04900f3354ba09cbd24"), - Windows(:i686) => ("$bin_prefix/Fontconfig.v2.13.1.i686-w64-mingw32.tar.gz", "0dae875ffafce57c29a0d547d108d9c7f85a22f6811075484470613c16a4af80"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Fontconfig.v2.13.1.powerpc64le-linux-gnu.tar.gz", "d2b44df3f1e7968b1f5c45c284c0f3d7e58633b6f746c9574cce3a43258649e4"), - MacOS(:x86_64) => ("$bin_prefix/Fontconfig.v2.13.1.x86_64-apple-darwin14.tar.gz", "ce268d75ac1e421a2ec41c60a6c47bf195cf2e2558a2dc830fd4708f8789209f"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Fontconfig.v2.13.1.x86_64-linux-gnu.tar.gz", "e092852fe2dbb8fd0848f030cf9a3f8b5244472f4d7ccfa50ba8fd43941799e0"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Fontconfig.v2.13.1.x86_64-linux-musl.tar.gz", "02f6d59accebe7cd61106893925d3acc766d896bc48b0c21dc8c61fefd1e1063"), - FreeBSD(:x86_64) => ("$bin_prefix/Fontconfig.v2.13.1.x86_64-unknown-freebsd11.1.tar.gz", "bb1903db96285c6453ac80440e4a2aeb5f431cfc84baa396d158028a283461f7"), - Windows(:x86_64) => ("$bin_prefix/Fontconfig.v2.13.1.x86_64-w64-mingw32.tar.gz", "7dc4cfe3d605c936f1097518043f7b7f90e6f46892a0a7ad1db64544a7200cfb"), -) - -# 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_FreeType2.v2.10.1.jl b/deps/build_FreeType2.v2.10.1.jl deleted file mode 100644 index 53ea58b..0000000 --- a/deps/build_FreeType2.v2.10.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, ["libfreetype"], :libfreetype), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/FreeType2_jll.jl/releases/download/FreeType2-v2.10.1+1" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/FreeType2.v2.10.1.aarch64-linux-gnu.tar.gz", "c7e51fa43c973ae008716842c20b420252d1ceea08b20b9042c6877b8d627ea7"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/FreeType2.v2.10.1.aarch64-linux-musl.tar.gz", "c0e9218be1c84c13328f3c6ac7c9294f28d13b86622aff92f189a7abdbb15fb1"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/FreeType2.v2.10.1.arm-linux-gnueabihf.tar.gz", "bdd75d77c0416f56b5e5bf26ce977291681fe7f644b9b2ea75de125432a11534"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/FreeType2.v2.10.1.arm-linux-musleabihf.tar.gz", "d289424ea38fd799e63b6c52833b5d623b39f35f5582e593a6e8755b4a0c475d"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/FreeType2.v2.10.1.i686-linux-gnu.tar.gz", "ca42f028de26ff54519f160062e20127a25c26fd26b6b8daf7276ad8e2d44267"), - Linux(:i686, libc=:musl) => ("$bin_prefix/FreeType2.v2.10.1.i686-linux-musl.tar.gz", "16aa8fdaa62e8c2f1f9edc91159b7149c346a15c4ea52dc64074c512bceae2c9"), - Windows(:i686) => ("$bin_prefix/FreeType2.v2.10.1.i686-w64-mingw32.tar.gz", "fda92c42111825ef39ec4d0b2bd5c9de445a3158c47d113110348c68b6321e26"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/FreeType2.v2.10.1.powerpc64le-linux-gnu.tar.gz", "9ee08f941afcc6d3d94cbf4da52b30b31a0ff65b36d44f261aa8a9149d9a3f71"), - MacOS(:x86_64) => ("$bin_prefix/FreeType2.v2.10.1.x86_64-apple-darwin14.tar.gz", "e1dc63e90b69446904c9d292b70a302fd22ec532c4edd1d758fc5fdcbd8ad17e"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/FreeType2.v2.10.1.x86_64-linux-gnu.tar.gz", "4b287a224c6d8c648ece769ab363b1ae362bed6f891f02707dbb6174978ebcd3"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/FreeType2.v2.10.1.x86_64-linux-musl.tar.gz", "2adcfedd439e341163e2c4336015ee99b79314eff05fc3ce41c078b03b5fcdf5"), - FreeBSD(:x86_64) => ("$bin_prefix/FreeType2.v2.10.1.x86_64-unknown-freebsd11.1.tar.gz", "a148ee202538b25208546c54570a59d1ea36c921cdcde9a311ab9045b8366c9d"), - Windows(:x86_64) => ("$bin_prefix/FreeType2.v2.10.1.x86_64-w64-mingw32.tar.gz", "82f5ce90389b93279d3614431897406839e8d22a3a7303786c6314918a3312e9"), -) - -# 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_Libuuid.v2.34.0.jl b/deps/build_Libuuid.v2.34.0.jl deleted file mode 100644 index 7a13338..0000000 --- a/deps/build_Libuuid.v2.34.0.jl +++ /dev/null @@ -1,45 +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, ["libuuid"], :libuuid), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/Libuuid_jll.jl/releases/download/Libuuid-v2.34.0+3" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Libuuid.v2.34.0.aarch64-linux-gnu.tar.gz", "581ef032828ea65effc19e1ad92a48321ea55714e929c8c7811f2f7f807ed32a"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Libuuid.v2.34.0.aarch64-linux-musl.tar.gz", "ead1aeba507973572b7e7a64ce132cdec6f091833137cf624a4ed0e18d5b0dac"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Libuuid.v2.34.0.arm-linux-gnueabihf.tar.gz", "1d4e08bb08561ba51a91aebf53a4c637491bb5a91647fc6c40979978a9197f54"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Libuuid.v2.34.0.arm-linux-musleabihf.tar.gz", "767baf8d2156199917e56a03f2d62f82f65d8b460d5b3f847c14e630712388f8"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Libuuid.v2.34.0.i686-linux-gnu.tar.gz", "7639e7dad7a6138d8e074cded5354d087825be6351173b8590b13a5991aa44a2"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Libuuid.v2.34.0.i686-linux-musl.tar.gz", "ac72f81bc0a746972255da7dd601b906037514f789e0646c1971efd794aa8d94"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Libuuid.v2.34.0.powerpc64le-linux-gnu.tar.gz", "41b9fce387a1333dc871cc53dc482ceea7982728e5e28b54d4b8e8df2584ba3d"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Libuuid.v2.34.0.x86_64-linux-gnu.tar.gz", "7951a589812629d98bb861491ffeb2adcea1c82b14f51671faba9b9257c8eefc"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Libuuid.v2.34.0.x86_64-linux-musl.tar.gz", "7bad57cc41fac8de3b80879aecc7d02564154c984aaefcd48a8963e8fbc1610a"), - FreeBSD(:x86_64) => ("$bin_prefix/Libuuid.v2.34.0.x86_64-unknown-freebsd11.1.tar.gz", "1e93209a96bd52d371a964310cb4f04ec6b9308e5f3dd9fc617a32a7f94da2c4"), -) - -# 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_Zlib.v1.2.11.jl b/deps/build_Zlib.v1.2.11.jl deleted file mode 100644 index ffec5bd..0000000 --- a/deps/build_Zlib.v1.2.11.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, ["libz"], :libz), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/Zlib_jll.jl/releases/download/Zlib-v1.2.11+5" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-gnu.tar.gz", "21f91fad2fd1a2903a72b1b9dbb833dbc81df115268a9e3e80350d9a5b71d950"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.aarch64-linux-musl.tar.gz", "91fcbb2d4720102deb5af81996f40b0ec11410ab8278f48b0b1cd08ffd01af45"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-gnueabihf.tar.gz", "c6210cadb32f5a8098cbbe7422d2f0ff4c029af463e740e211692a2cfaea9223"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/Zlib.v1.2.11.arm-linux-musleabihf.tar.gz", "627d93d9981ca5d0b19ead1356bffaacf8dd66e5627b60eadb449cc8618d8ee8"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-gnu.tar.gz", "12f0c3aa21aa4609b4eb4363f3ce47f8b648ee82cdaf46a2c60dc7a0d81f84ef"), - Linux(:i686, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.i686-linux-musl.tar.gz", "8deea79e1172972634e0ced27e756139cf1e205ee6b0ecc5601835c72fe42962"), - Windows(:i686) => ("$bin_prefix/Zlib.v1.2.11.i686-w64-mingw32.tar.gz", "4971a6447699fd9a806199e8a196fcd5fd1b0b3cc5a87cd5d6d78193a448b093"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.powerpc64le-linux-gnu.tar.gz", "2854a41a7f15430aed0df4e5d9208b20afb27123941ce71af4b0c99dcf4a3b28"), - MacOS(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-apple-darwin14.tar.gz", "4487aba8b584ec732ea3bb567e9b98dd9e23f256294841adb84e7cf86ca6451a"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-gnu.tar.gz", "b733a4ad486e6e4c8d9168c1f70333e7e6e64331c04a068ea608e8b820933c21"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/Zlib.v1.2.11.x86_64-linux-musl.tar.gz", "d179217caa04f5aa5fae6b7851c0344f142fca635f0561c5f4f14a86bb534d7b"), - FreeBSD(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-unknown-freebsd11.1.tar.gz", "9c87da9a21351a25fb6a1c806f14421da345649c3c6f4c8d83e0aa3e00b95922"), - Windows(:x86_64) => ("$bin_prefix/Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz", "1010aa960a0c721a88dd9c46c6d0b3bd209e8b9f2ed27a8f9a5e9523dabc8f0c"), -) - -# 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/src/Fontconfig.jl b/src/Fontconfig.jl index 82238a8..5300b36 100644 --- a/src/Fontconfig.jl +++ b/src/Fontconfig.jl @@ -1,25 +1,17 @@ module Fontconfig -depsfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") -if isfile(depsfile) - include(depsfile) -else - error("Fontconfig.jl not properly installed. Please run `Pkg.build(\"Fontconfig\")` " * - "and restart Julia.") -end - -import Base.Sys using Printf +using Fontconfig_jll export format, match, list function __init__() - ENV["FONTCONFIG_FILE"] = joinpath(dirname(jl_libfontconfig), "..", "etc", "fonts", "fonts.conf") - ccall((:FcInit, jl_libfontconfig), UInt8, ()) + ENV["FONTCONFIG_FILE"] = fonts_conf + ccall((:FcInit, libfontconfig), UInt8, ()) # By default fontconfig on OSX does not include user fonts. @static if Sys.isapple() - ccall((:FcConfigAppFontAddDir, jl_libfontconfig), + ccall((:FcConfigAppFontAddDir, libfontconfig), UInt8, (Ptr{Nothing}, Ptr{UInt8}), C_NULL, b"~/Library/Fonts") end @@ -48,30 +40,30 @@ mutable struct Pattern ptr::Ptr{Nothing} function Pattern(; args...) - ptr = ccall((:FcPatternCreate, jl_libfontconfig), Ptr{Nothing}, ()) + ptr = ccall((:FcPatternCreate, libfontconfig), Ptr{Nothing}, ()) for (attr, value) in args if attr in string_attrs - ccall((:FcPatternAddString, jl_libfontconfig), Cint, + ccall((:FcPatternAddString, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}, Ptr{UInt8}), ptr, string(attr), value) elseif attr in double_attrs - ccall((:FcPatternAddDouble, jl_libfontconfig), Cint, + ccall((:FcPatternAddDouble, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}, Cdouble), ptr, string(attr), value) elseif attr in integer_attrs - ccall((:FcPatternAddInteger, jl_libfontconfig), Cint, + ccall((:FcPatternAddInteger, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}, Cint), ptr, string(attr), value) elseif attr in bool_attrs - ccall((:FcPatternAddBool, jl_libfontconfig), Cint, + ccall((:FcPatternAddBool, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}, Cint), ptr, string(attr), value) end end pat = new(ptr) - finalizer(pat -> ccall((:FcPatternDestroy, jl_libfontconfig), Nothing, + finalizer(pat -> ccall((:FcPatternDestroy, libfontconfig), Nothing, (Ptr{Nothing},), pat.ptr), pat) return pat end @@ -81,9 +73,9 @@ mutable struct Pattern end function Pattern(name::AbstractString) - ptr = ccall((:FcNameParse, jl_libfontconfig), Ptr{Nothing}, (Ptr{UInt8},), name) + ptr = ccall((:FcNameParse, libfontconfig), Ptr{Nothing}, (Ptr{UInt8},), name) pat = new(ptr) - finalizer(pat -> ccall((:FcPatternDestroy, jl_libfontconfig), Nothing, + finalizer(pat -> ccall((:FcPatternDestroy, libfontconfig), Nothing, (Ptr{Nothing},), pat.ptr), pat) return pat end @@ -91,7 +83,7 @@ end function Base.show(io::IO, pat::Pattern) - desc = ccall((:FcNameUnparse, jl_libfontconfig), Ptr{UInt8}, + desc = ccall((:FcNameUnparse, libfontconfig), Ptr{UInt8}, (Ptr{Nothing},), pat.ptr) @printf(io, "Fontconfig.Pattern(\"%s\")", unsafe_string(desc)) Libc.free(desc) @@ -99,17 +91,17 @@ end function Base.match(pat::Pattern, default_substitute::Bool=true) - ccall((:FcConfigSubstitute, jl_libfontconfig), + ccall((:FcConfigSubstitute, libfontconfig), UInt8, (Ptr{Nothing}, Ptr{Nothing}, Int32), C_NULL, pat.ptr, FcMatchPattern) if default_substitute - ccall((:FcDefaultSubstitute, jl_libfontconfig), + ccall((:FcDefaultSubstitute, libfontconfig), Nothing, (Ptr{Nothing},), pat.ptr) end result = Int32[0] - mat = ccall((:FcFontMatch, jl_libfontconfig), + mat = ccall((:FcFontMatch, libfontconfig), Ptr{Nothing}, (Ptr{Nothing}, Ptr{Nothing}, Ptr{Int32}), C_NULL, pat.ptr, result) @@ -122,7 +114,7 @@ end function format(pat::Pattern, fmt::AbstractString="%{=fclist}") - desc = ccall((:FcPatternFormat, jl_libfontconfig), Ptr{UInt8}, + desc = ccall((:FcPatternFormat, libfontconfig), Ptr{UInt8}, (Ptr{Nothing}, Ptr{UInt8}), pat.ptr, fmt) if desc == C_NULL error("Invalid fontconfig format.") @@ -141,15 +133,15 @@ end function list(pat::Pattern=Pattern()) - os = ccall((:FcObjectSetCreate, jl_libfontconfig), Ptr{Nothing}, ()) - ccall((:FcObjectSetAdd, jl_libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), + os = ccall((:FcObjectSetCreate, libfontconfig), Ptr{Nothing}, ()) + ccall((:FcObjectSetAdd, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), os, "family") - ccall((:FcObjectSetAdd, jl_libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), + ccall((:FcObjectSetAdd, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), os, "style") - ccall((:FcObjectSetAdd, jl_libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), + ccall((:FcObjectSetAdd, libfontconfig), Cint, (Ptr{Nothing}, Ptr{UInt8}), os, "file") - fs_ptr = ccall((:FcFontList, jl_libfontconfig), Ptr{FcFontSet}, + fs_ptr = ccall((:FcFontList, libfontconfig), Ptr{FcFontSet}, (Ptr{Nothing}, Ptr{Nothing}, Ptr{Nothing}), C_NULL, pat.ptr, os) fs = unsafe_load(fs_ptr) @@ -158,7 +150,7 @@ function list(pat::Pattern=Pattern()) push!(patterns, Pattern(unsafe_load(fs.fonts, i))) end - ccall((:FcObjectSetDestroy, jl_libfontconfig), Nothing, (Ptr{Nothing},), os) + ccall((:FcObjectSetDestroy, libfontconfig), Nothing, (Ptr{Nothing},), os) return patterns end