Skip to content

Commit

Permalink
add dummy LibCURL_jll stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Sep 16, 2020
1 parent 5dc6201 commit ad2e905
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 4 deletions.
1 change: 1 addition & 0 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ let
:REPL,
:Statistics,
:MozillaCACerts_jll,
:LibCURL_jll,
]

maxlen = reduce(max, textwidth.(string.(stdlibs)); init=0)
Expand Down
2 changes: 0 additions & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions stdlib/LibCURL_jll/Project.toml
Original file line number Diff line number Diff line change
@@ -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"]
28 changes: 28 additions & 0 deletions stdlib/LibCURL_jll/src/LibCURL_jll.jl
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions stdlib/LibCURL_jll/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stdlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:https://github.com/JuliaLang/Pkg.jl.git
Expand Down
2 changes: 1 addition & 1 deletion test/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit ad2e905

Please sign in to comment.