diff --git a/Artifacts.toml b/Artifacts.toml new file mode 100644 index 0000000..888c4dc --- /dev/null +++ b/Artifacts.toml @@ -0,0 +1,42 @@ +[[HDF5]] +arch = "i686" +git-tree-sha1 = "100555f5c073af801758d7ef6dcdbf0c7d17ef09" +libc = "glibc" +os = "linux" + + [[HDF5.download]] + sha256 = "1d78a51459f4c70a8627bec6c3a5f9c785dc083b4f965cd9dadd4863f86826b7" + url = "https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.10.5+0/HDF5.v1.10.5.i686-linux-gnu.tar.gz" +[[HDF5]] +arch = "x86_64" +git-tree-sha1 = "0bad13f574151fc8cebbc479d54af629dc5a9d11" +libc = "glibc" +os = "linux" + + [[HDF5.download]] + sha256 = "82979002b85c0f9a1325d2aa6d02182ea8f6114b5719dbb056527afb075379eb" + url = "https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.10.5+0/HDF5.v1.10.5.x86_64-linux-gnu.tar.gz" +[[HDF5]] +arch = "x86_64" +git-tree-sha1 = "c0469fb20beb3bc8277a88da8472b436508fc5ec" +os = "macos" + + [[HDF5.download]] + sha256 = "924a29bfaf0cc2c9f01fae6cd86cba2b66c92406d6d4bbe6fa6a12bc643fea96" + url = "https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.10.5+0/HDF5.v1.10.5.x86_64-apple-darwin14.tar.gz" +[[HDF5]] +arch = "x86_64" +git-tree-sha1 = "cfdebac7c1584f1ee48dce1f9da622daa6d028f4" +os = "windows" + + [[HDF5.download]] + sha256 = "6f00f61cbba96be2f993ffa1da3f3c354b8747cced85f6696b00ddc72b9a8ad6" + url = "https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.10.5+0/HDF5.v1.10.5.x86_64-w64-mingw32.tar.gz" +[[HDF5]] +arch = "i686" +git-tree-sha1 = "f6bed2e41f3024dc4ed751d649c012a75e4b4f6a" +os = "windows" + + [[HDF5.download]] + sha256 = "817ecdc8168f1579b2fc9f844e74e52b7ae18579f0e412c43d7c4ae204decb6f" + url = "https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.10.5+0/HDF5.v1.10.5.i686-w64-mingw32.tar.gz" diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..0714680 --- /dev/null +++ b/Project.toml @@ -0,0 +1,11 @@ +name = "HDF5_jll" +uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" +version = "1.10.5+0" + +[deps] +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Zlib_jll = "83775a58-1f1d-513f-b197-d71354ab007a" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[compat] +julia = "1.3" diff --git a/README.md b/README.md new file mode 100644 index 0000000..a0a758a --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# HDF5_jll.jl + +This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl). + +## Usage + +The code bindings within this package are autogenerated from the `Products` defined within the `build_tarballs.jl` file that generated this package. For example purposes, we will assume that the following products were defined: + +```julia +products = [ + FileProduct("src/data.txt", :data_txt), + LibraryProduct("libdataproc", :libdataproc), + ExecutableProduct("mungify", :mungify_exe) +] +``` + +With such products defined, this package will contain `data_txt`, `libdataproc` and `mungify_exe` symbols exported. For `FileProduct` variables, the exported value is a string pointing to the location of the file on-disk. For `LibraryProduct` variables, it is a string corresponding to the `SONAME` of the desired library (it will have already been `dlopen()`'ed, so typical `ccall()` usage applies), and for `ExecutableProduct` variables, the exported value is a function that can be called to set appropriate environment variables. Example: + +```julia +using HDF5_jll + +# For file products, you can access its file location directly: +data_lines = open(data_txt, "r") do io + readlines(io) +end + +# For library products, you can use the exported variable name in `ccall()` invocations directly +num_chars = ccall((libdataproc, :count_characters), Cint, (Cstring, Cint), data_lines[1], length(data_lines[1])) + +# For executable products, you can use the exported variable name as a function that you can call +mungify_exe() do mungify_exe_path + run(`$mungify_exe_path $num_chars`) +end +``` diff --git a/src/HDF5_jll.jl b/src/HDF5_jll.jl new file mode 100644 index 0000000..3486cd8 --- /dev/null +++ b/src/HDF5_jll.jl @@ -0,0 +1,31 @@ +module HDF5_jll +using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl +import Base: UUID + +# We put these inter-JLL-package API values here so that they are always defined, even if there +# is no underlying wrapper held within this JLL package. +const PATH_list = String[] +const LIBPATH_list = String[] + +# Load Artifacts.toml file +artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml") + +# Extract all platforms +artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("0234f1f7-429e-5d53-9886-15a909be8d59")) +platforms = [Pkg.Artifacts.unpack_platform(e, "HDF5", artifacts_toml) for e in artifacts["HDF5"]] + +# Filter platforms based on what wrappers we've generated on-disk +platforms = filter(p -> isfile(joinpath(@__DIR__, "wrappers", triplet(p) * ".jl")), platforms) + +# From the available options, choose the best platform +best_platform = select_platform(Dict(p => triplet(p) for p in platforms)) + +# Silently fail if there's no binaries for this platform +if best_platform === nothing + @debug("Unable to load HDF5; unsupported platform $(triplet(platform_key_abi()))") +else + # Load the appropriate wrapper + include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl")) +end + +end # module HDF5_jll diff --git a/src/wrappers/i686-linux-gnu.jl b/src/wrappers/i686-linux-gnu.jl new file mode 100644 index 0000000..737db86 --- /dev/null +++ b/src/wrappers/i686-linux-gnu.jl @@ -0,0 +1,54 @@ +# Autogenerated wrapper script for HDF5_jll for i686-linux-gnu +export libhdf5 + +using Zlib_jll +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libhdf5` +const libhdf5_splitpath = ["lib", "libhdf5.so.103.0.0"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libhdf5_path = "" + +# libhdf5-specific global declaration +# This will be filled out by __init__() +libhdf5_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libhdf5 = "libhdf5-ad97bb1b.so.103.0.0" + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + append!.(Ref(PATH_list), (Zlib_jll.PATH_list,)) + append!.(Ref(LIBPATH_list), (Zlib_jll.LIBPATH_list,)) + + global libhdf5_path = abspath(joinpath(artifact"HDF5", libhdf5_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libhdf5_handle = dlopen(libhdf5_path) + push!(LIBPATH_list, dirname(libhdf5_path)) + + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/i686-w64-mingw32.jl b/src/wrappers/i686-w64-mingw32.jl new file mode 100644 index 0000000..d298279 --- /dev/null +++ b/src/wrappers/i686-w64-mingw32.jl @@ -0,0 +1,54 @@ +# Autogenerated wrapper script for HDF5_jll for i686-w64-mingw32 +export libhdf5 + +using Zlib_jll +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "PATH" + +# Relative path to `libhdf5` +const libhdf5_splitpath = ["bin", "libhdf5-0.dll"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libhdf5_path = "" + +# libhdf5-specific global declaration +# This will be filled out by __init__() +libhdf5_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libhdf5 = "libhdf5-0.dll" + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + append!.(Ref(PATH_list), (Zlib_jll.PATH_list,)) + append!.(Ref(LIBPATH_list), (Zlib_jll.LIBPATH_list,)) + + global libhdf5_path = abspath(joinpath(artifact"HDF5", libhdf5_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libhdf5_handle = dlopen(libhdf5_path) + push!(LIBPATH_list, dirname(libhdf5_path)) + + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ';') + global LIBPATH = join(LIBPATH_list, ';') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-apple-darwin14.jl b/src/wrappers/x86_64-apple-darwin14.jl new file mode 100644 index 0000000..e8e4450 --- /dev/null +++ b/src/wrappers/x86_64-apple-darwin14.jl @@ -0,0 +1,54 @@ +# Autogenerated wrapper script for HDF5_jll for x86_64-apple-darwin14 +export libhdf5 + +using Zlib_jll +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "DYLD_FALLBACK_LIBRARY_PATH" + +# Relative path to `libhdf5` +const libhdf5_splitpath = ["lib", "libhdf5.103.dylib"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libhdf5_path = "" + +# libhdf5-specific global declaration +# This will be filled out by __init__() +libhdf5_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libhdf5 = "libhdf5.103.dylib" + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + append!.(Ref(PATH_list), (Zlib_jll.PATH_list,)) + append!.(Ref(LIBPATH_list), (Zlib_jll.LIBPATH_list,)) + + global libhdf5_path = abspath(joinpath(artifact"HDF5", libhdf5_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libhdf5_handle = dlopen(libhdf5_path) + push!(LIBPATH_list, dirname(libhdf5_path)) + + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-linux-gnu.jl b/src/wrappers/x86_64-linux-gnu.jl new file mode 100644 index 0000000..6f3d709 --- /dev/null +++ b/src/wrappers/x86_64-linux-gnu.jl @@ -0,0 +1,54 @@ +# Autogenerated wrapper script for HDF5_jll for x86_64-linux-gnu +export libhdf5 + +using Zlib_jll +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libhdf5` +const libhdf5_splitpath = ["lib", "libhdf5.so.103.0.0"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libhdf5_path = "" + +# libhdf5-specific global declaration +# This will be filled out by __init__() +libhdf5_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libhdf5 = "libhdf5-49c0b88d.so.103.0.0" + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + append!.(Ref(PATH_list), (Zlib_jll.PATH_list,)) + append!.(Ref(LIBPATH_list), (Zlib_jll.LIBPATH_list,)) + + global libhdf5_path = abspath(joinpath(artifact"HDF5", libhdf5_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libhdf5_handle = dlopen(libhdf5_path) + push!(LIBPATH_list, dirname(libhdf5_path)) + + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-w64-mingw32.jl b/src/wrappers/x86_64-w64-mingw32.jl new file mode 100644 index 0000000..028535f --- /dev/null +++ b/src/wrappers/x86_64-w64-mingw32.jl @@ -0,0 +1,54 @@ +# Autogenerated wrapper script for HDF5_jll for x86_64-w64-mingw32 +export libhdf5 + +using Zlib_jll +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "PATH" + +# Relative path to `libhdf5` +const libhdf5_splitpath = ["bin", "libhdf5-0.dll"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libhdf5_path = "" + +# libhdf5-specific global declaration +# This will be filled out by __init__() +libhdf5_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libhdf5 = "libhdf5-0.dll" + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + append!.(Ref(PATH_list), (Zlib_jll.PATH_list,)) + append!.(Ref(LIBPATH_list), (Zlib_jll.LIBPATH_list,)) + + global libhdf5_path = abspath(joinpath(artifact"HDF5", libhdf5_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libhdf5_handle = dlopen(libhdf5_path) + push!(LIBPATH_list, dirname(libhdf5_path)) + + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ';') + global LIBPATH = join(LIBPATH_list, ';') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() +