diff --git a/base/sysimg.jl b/base/sysimg.jl index 7d5e505041676..f6bd1b8172cf4 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -53,6 +53,7 @@ let :REPL, :Statistics, :MozillaCACerts_jll, + :LibCURL_jll, ] maxlen = reduce(max, textwidth.(string.(stdlibs)); init=0) diff --git a/deps/Makefile b/deps/Makefile index a491e4f1a6eaa..c6115eb0eb0df 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -111,11 +111,9 @@ ifeq ($(USE_SYSTEM_LIBSSH2), 0) DEP_LIBS += libssh2 endif -ifneq ($(OS), WINNT) ifeq ($(USE_SYSTEM_CURL), 0) DEP_LIBS += curl endif -endif DEP_LIBS += libgit2 endif # USE_SYSTEM_LIBGIT2 diff --git a/stdlib/LibCURL_jll/Project.toml b/stdlib/LibCURL_jll/Project.toml new file mode 100644 index 0000000000000..6fa50eedd4c7c --- /dev/null +++ b/stdlib/LibCURL_jll/Project.toml @@ -0,0 +1,11 @@ +name = "LibCURL_jll" +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[extra] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] diff --git a/stdlib/LibCURL_jll/src/LibCURL_jll.jl b/stdlib/LibCURL_jll/src/LibCURL_jll.jl new file mode 100644 index 0000000000000..6229f8118dfcf --- /dev/null +++ b/stdlib/LibCURL_jll/src/LibCURL_jll.jl @@ -0,0 +1,28 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl + +module LibCURL_jll + +using Libdl + +export libcurl + +# These get calculated in __init__() +libcurl_handle = C_NULL +libcurl_path = "" + +if Sys.iswindows() + const libcurl = "libcurl-4.dll" +elseif Sys.isapple() + const libcurl = "libcurl.4.dylib" +else + const libcurl = "libcurl.so" +end + +function __init__() + global libcurl_handle = dlopen(libcurl) + global libcurl_path = dlpath(libcurl_handle) +end + +end # module LibCURL_jll diff --git a/stdlib/LibCURL_jll/test/runtests.jl b/stdlib/LibCURL_jll/test/runtests.jl new file mode 100644 index 0000000000000..0e762827d346e --- /dev/null +++ b/stdlib/LibCURL_jll/test/runtests.jl @@ -0,0 +1,7 @@ +using Test +using LibCURL_jll + +@testset "LibCURL_jll" begin + v = unsafe_string(ccall((:curl_version, libcurl), Cstring, ())) + @test startswith(v, "libcurl/") +end diff --git a/stdlib/Makefile b/stdlib/Makefile index 3f5359f9bce84..98f3449d41aff 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -18,7 +18,7 @@ STDLIBS = Artifacts Base64 CRC32c Dates DelimitedFiles Distributed FileWatching Future InteractiveUtils Libdl LibGit2 LinearAlgebra Logging \ Markdown Mmap Printf Profile Random REPL Serialization SHA \ SharedArrays Sockets SparseArrays SuiteSparse Test TOML Unicode UUIDs \ - MozillaCACerts_jll + MozillaCACerts_jll LibCURL_jll STDLIBS_EXT = Pkg Statistics PKG_GIT_URL := git://github.com/JuliaLang/Pkg.jl.git diff --git a/test/precompile.jl b/test/precompile.jl index 9ec0c16dc5f9f..f331cc0afbaab 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -292,7 +292,7 @@ try :Future, :Libdl, :LinearAlgebra, :Logging, :Mmap, :Printf, :Profile, :Random, :Serialization, :SharedArrays, :SparseArrays, :SuiteSparse, :Test, :Unicode, :REPL, :InteractiveUtils, :Pkg, :LibGit2, :SHA, :UUIDs, :Sockets, - :Statistics, :TOML, :MozillaCACerts_jll,]), + :Statistics, :TOML, :MozillaCACerts_jll, :LibCURL_jll,]), # Plus precompilation module generated at build time let id = Base.PkgId("__PackagePrecompilationStatementModule") Dict(id => Base.module_build_id(Base.root_module(id)))