Skip to content

Commit

Permalink
Fill out LIBPATH_list and PATH_list in fake JLLs (JuliaLang#39507)
Browse files Browse the repository at this point in the history
Yet another minor tweak to the JLLWrappers-conformance of these packages
to make them look a little bit more like "normal" JLLs.
  • Loading branch information
staticfloat authored and ElOceanografo committed May 4, 2021
1 parent 8a16980 commit 67a628c
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgcc_s_handle = dlopen(libgcc_s)
global libgcc_s_path = dlpath(libgcc_s_handle)
global libgfortran_handle = dlopen(libgfortran)
Expand Down
1 change: 1 addition & 0 deletions stdlib/GMP_jll/src/GMP_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgmp_handle = dlopen(libgmp)
global libgmp_path = dlpath(libgmp_handle)
global libgmpxx_handle = dlopen(libgmpxx)
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibCURL_jll/src/LibCURL_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libcurl_handle = dlopen(libcurl)
global libcurl_path = dlpath(libcurl_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibGit2_jll/src/LibGit2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgit2_handle = dlopen(libgit2)
global libgit2_path = dlpath(libgit2_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const libosxunwind = "@rpath/libosxunwind.dylib"
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
# We only dlopen something on MacOS
@static if Sys.isapple()
global libosxunwind_handle = dlopen(libosxunwind)
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibSSH2_jll/src/LibSSH2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libssh2_handle = dlopen(libssh2)
global libssh2_path = dlpath(libssh2_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibUV_jll/src/LibUV_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libuv_handle = dlopen(libuv)
global libuv_path = dlpath(libuv_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibUnwind_jll/src/LibUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const libunwind = "libunwind.so.8"
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
# We only do something on Linux/FreeBSD
@static if Sys.islinux() || Sys.isfreebsd()
global libunwind_handle = dlopen(libunwind)
Expand Down
1 change: 1 addition & 0 deletions stdlib/MPFR_jll/src/MPFR_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libmpfr_handle = dlopen(libmpfr)
global libmpfr_path = dlpath(libmpfr_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libmbedcrypto_handle = dlopen(libmbedcrypto)
global libmbedcrypto_path = dlpath(libmbedcrypto_handle)
global libmbedtls_handle = dlopen(libmbedtls)
Expand Down
4 changes: 4 additions & 0 deletions stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ baremodule MozillaCACerts_jll
using Base
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]

# These get calculated in __init__()
PATH = Ref("")
LIBPATH = Ref("")
Expand All @@ -15,6 +18,7 @@ cacert = ""
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem")
end

Expand Down
1 change: 1 addition & 0 deletions stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libopenblas_handle = dlopen(libopenblas)
global libopenblas_path = dlpath(libopenblas_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libopenlibm_handle = dlopen(libopenlibm)
global libopenlibm_path = dlpath(libopenlibm_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/PCRE2_jll/src/PCRE2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libpcre2_8_handle = dlopen(libpcre2_8)
global libpcre2_8_path = dlpath(libpcre2_8_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libamd_handle = dlopen(libamd)
global libamd_path = dlpath(libamd_handle)
global libbtf_handle = dlopen(libbtf)
Expand Down
1 change: 1 addition & 0 deletions stdlib/Zlib_jll/src/Zlib_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libz_handle = dlopen(libz)
global libz_path = dlpath(libz_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/dSFMT_jll/src/dSFMT_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libdSFMT_handle = dlopen(libdSFMT)
global libdSFMT_path = dlpath(libdSFMT_handle)
end
Expand Down
2 changes: 2 additions & 0 deletions stdlib/libLLVM_jll/src/libLLVM_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libLLVM_handle = dlopen(libLLVM)
global libLLVM_path = dlpath(libLLVM_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/nghttp2_jll/src/nghttp2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libnghttp2_handle = dlopen(libnghttp2)
global libnghttp2_path = dlpath(libnghttp2_handle)
end
Expand Down
3 changes: 3 additions & 0 deletions stdlib/p7zip_jll/src/p7zip_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
init_p7zip_path()
global PATH[] = dirname(p7zip_path)
push!(PATH_list, PATH[])
end

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
Expand Down

0 comments on commit 67a628c

Please sign in to comment.