From 873976372f2f2169340938fba4dc0aefad6f95a2 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Fri, 31 Jan 2020 13:40:16 -0800 Subject: [PATCH 1/2] Use Zstd_jll to provide zstd, update to 1.4.4 --- Project.toml | 5 ++-- deps/build.jl | 62 ------------------------------------------------ src/CodecZstd.jl | 8 +------ 3 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 deps/build.jl diff --git a/Project.toml b/Project.toml index fe3eb29..136bccf 100644 --- a/Project.toml +++ b/Project.toml @@ -5,13 +5,12 @@ authors = ["Kenta Sato "] version = "0.6.1" [deps] -BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" -Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4" [compat] -BinaryProvider = "0.5" TranscodingStreams = "0.9" +Zstd_jll = "1.4" julia = "1" [extras] diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index cb93ff9..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,62 +0,0 @@ -using BinaryProvider - -const verbose = "--verbose" in ARGS -const prefix = Prefix(get(filter(!isequal("--verbose"), ARGS), 1, joinpath(@__DIR__, "usr"))) -products = [LibraryProduct(prefix, ["libzstd"], :libzstd)] - -bin_prefix = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Zstd-v1.4.2+0" - -download_info = Dict( - Linux(:aarch64, libc=:glibc) => - ("$bin_prefix/Zstd.v1.4.2.aarch64-linux-gnu.tar.gz", - "fa5b1a0bbaf0d0c9b68b74f985609c16212288ad1822834a8bc973dc28de7b3b"), - Linux(:aarch64, libc=:musl) => - ("$bin_prefix/Zstd.v1.4.2.aarch64-linux-musl.tar.gz", - "913f994d6c6005d2b574a1f7b00cef59fc0ad99ac1b6df91ac16ea0b7fee7f99"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => - ("$bin_prefix/Zstd.v1.4.2.arm-linux-gnueabihf.tar.gz", - "bf474a692e013b0c6e74b9a738e04c6aa12b0c0f54269a6d94eed45eec05aabb"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => - ("$bin_prefix/Zstd.v1.4.2.arm-linux-musleabihf.tar.gz", - "489e8706c27b6277b3cd604f9bfc88c8f81d2ae9b76d34062f099fe31c024e5d"), - Linux(:i686, libc=:glibc) => - ("$bin_prefix/Zstd.v1.4.2.i686-linux-gnu.tar.gz", - "ed8652f9509fd6cb6cd3cca9023326b698d1437f6d22026c7763a32658a8fca5"), - Linux(:i686, libc=:musl) => - ("$bin_prefix/Zstd.v1.4.2.i686-linux-musl.tar.gz", - "b0de4b032efa9a0108c32a00e27367352e36304f3f62c3cfbe9cdae5ff48fa2f"), - Windows(:i686) => - ("$bin_prefix/Zstd.v1.4.2.i686-w64-mingw32.tar.gz", - "785a2a97ba59fbe2529b4ded1e380d1385351b805f9d0b91df64802db36648d5"), - Linux(:powerpc64le, libc=:glibc) => - ("$bin_prefix/Zstd.v1.4.2.powerpc64le-linux-gnu.tar.gz", - "8dbc6e14931d70f5b112f9f00534c80d2b5cde18dbb74ebae31b6ff97f7863dd"), - MacOS(:x86_64) => - ("$bin_prefix/Zstd.v1.4.2.x86_64-apple-darwin14.tar.gz", - "5ff8c2b4719fd1b605413388608007e5bdeb92caa60619c32f1809dc6907fcfc"), - Linux(:x86_64, libc=:glibc) => - ("$bin_prefix/Zstd.v1.4.2.x86_64-linux-gnu.tar.gz", - "a6806ca68680bf813ff326f65f4a478574a2a4e27b8ad72c8e9a8f180a89b816"), - Linux(:x86_64, libc=:musl) => - ("$bin_prefix/Zstd.v1.4.2.x86_64-linux-musl.tar.gz", - "b00c751cfb61d160415c427a795fdc3521735c37c3c32164b8218f210e8a3d51"), - FreeBSD(:x86_64) => - ("$bin_prefix/Zstd.v1.4.2.x86_64-unknown-freebsd11.1.tar.gz", - "d38e10e988a4b7229906c1f52f1b1a12589063d1d6ad90315fbc72532650f468"), - Windows(:x86_64) => - ("$bin_prefix/Zstd.v1.4.2.x86_64-w64-mingw32.tar.gz", - "ab42350bf99389cd9118e1d10a310d6a572afcfe521e70abd42f7bfa340666bd"), -) - -unsatisfied = any(p->!satisfied(p, verbose=verbose), products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - error("Your platform (\"$(Sys.MACHINE)\", parsed as ", - "\"$(triplet(platform_key_abi()))\") is not supported by this package!") -end - -if unsatisfied || !isinstalled(dl_info..., prefix=prefix) - install(dl_info..., prefix=prefix, force=true, verbose=verbose) -end - -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/src/CodecZstd.jl b/src/CodecZstd.jl index 79e8c23..0e89952 100644 --- a/src/CodecZstd.jl +++ b/src/CodecZstd.jl @@ -15,13 +15,7 @@ import TranscodingStreams: finalize, splitkwargs -using Libdl -const libzpath = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") -if !isfile(libzpath) - error("CodecZstd.jl is not installed properly, run Pkg.build(\"CodecZstd\") and restart Julia.") -end -include(libzpath) -check_deps() +using Zstd_jll include("libzstd.jl") include("compression.jl") From b2ef351ec3062d103bb25b2514c7d25cdf09ee08 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Fri, 31 Jan 2020 14:06:45 -0800 Subject: [PATCH 2/2] Set the minimum Julia version to 1.3 This is required for using JLLs. --- .travis.yml | 3 +-- Project.toml | 4 ++-- appveyor.yml | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d554cdb..a573afc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ os: - linux - osx julia: - - 1.0 - - 1.1 + - 1.3 - nightly matrix: allow_failures: diff --git a/Project.toml b/Project.toml index 136bccf..c2e13fe 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "CodecZstd" uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2" license = "MIT" authors = ["Kenta Sato "] -version = "0.6.1" +version = "0.7.0" [deps] TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" @@ -11,7 +11,7 @@ Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4" [compat] TranscodingStreams = "0.9" Zstd_jll = "1.4" -julia = "1" +julia = "1.3" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/appveyor.yml b/appveyor.yml index c45e7e6..03b32d6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,6 @@ environment: matrix: - - julia_version: 1.0 - - julia_version: 1.1 + - julia_version: 1.3 - julia_version: nightly platform: