Skip to content

Commit

Permalink
Expat_jll build 2.2.7+0
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Aug 30, 2019
0 parents commit 6501421
Show file tree
Hide file tree
Showing 17 changed files with 1,300 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
[[Expat]]
arch = "x86_64"
git-tree-sha1 = "77c33dcc3348075693a7176338e29e26bafef4b2"
libc = "glibc"
os = "linux"

[[Expat.download]]
sha256 = "2de762a3d34bca7880af77a29b20ef215c362829e6c9891acb1618ae3e79ebce"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-linux-gnu.tar.gz"
[[Expat]]
arch = "x86_64"
git-tree-sha1 = "7cfe3f0159ef9a38727cff7dafed8e4576d5644c"
os = "macos"

[[Expat.download]]
sha256 = "22bc93059fc96143e5af0fd2d84bef07207f1156ed9710598cf27e9337de2b61"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-apple-darwin14.tar.gz"
[[Expat]]
arch = "i686"
git-tree-sha1 = "f5000e8a121e7f546447fbcabf6259b209bd9670"
os = "windows"

[[Expat.download]]
sha256 = "dfba8a20982e97bdb46fb09309d9222e063a3dd566845216e9cf29b63f1ba7c4"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.i686-w64-mingw32.tar.gz"
[[Expat]]
arch = "aarch64"
git-tree-sha1 = "12488c65662c4d341a360c3deb77ab1e3650dfe6"
libc = "glibc"
os = "linux"

[[Expat.download]]
sha256 = "6bf46584ec3b91d8e0a173f39b6a640b6ee589dd28c76d8231e985e0e50908a4"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.aarch64-linux-gnu.tar.gz"
[[Expat]]
arch = "i686"
git-tree-sha1 = "022731e2e4a71f44bef4e1085f7eddfbacac862c"
libc = "musl"
os = "linux"

[[Expat.download]]
sha256 = "51c13dee29fc7c7fba01b177161a9793202bcd90dc82d2ad0b1793a4d483223f"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.i686-linux-musl.tar.gz"
[[Expat]]
arch = "x86_64"
git-tree-sha1 = "382f097610817e9c8bacee774504a77f56cb69f5"
os = "windows"

[[Expat.download]]
sha256 = "256a21d92a56a4929ff9234ff09ff3b30501932f213e00aaabb1e65b6a0bda45"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz"
[[Expat]]
arch = "powerpc64le"
git-tree-sha1 = "6f291bfd7f4400987503a8076123976b3ab35f68"
libc = "glibc"
os = "linux"

[[Expat.download]]
sha256 = "b8b1d1f0b828ef0a067e25eff2ef21cc73c71b8dda72b5ab0c790e9478533bc1"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.powerpc64le-linux-gnu.tar.gz"
[[Expat]]
arch = "x86_64"
git-tree-sha1 = "93c1bf69d91d5b53500f41c822afb323b0e17b13"
os = "freebsd"

[[Expat.download]]
sha256 = "7fd372632fb534f016a67ca3f6178dd86136b06acb8ccc50d9893d90aa7e620f"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-unknown-freebsd11.1.tar.gz"
[[Expat]]
arch = "armv7l"
git-tree-sha1 = "9c02c0c3536fbc0e0cce612ff655751700fe786d"
libc = "musl"
os = "linux"

[[Expat.download]]
sha256 = "4d14d14abd3bb3d3abf9c7bff750b1b74faabe29daba94e7811fdafbc0c56634"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.arm-linux-musleabihf.tar.gz"
[[Expat]]
arch = "aarch64"
git-tree-sha1 = "d42f4c52afc6c4a4a533d8ff1882f9d9b9b775b5"
libc = "musl"
os = "linux"

[[Expat.download]]
sha256 = "42578e73b94f51701145068168d74fc69c1caa1ec503accd535ba4e896f6cebf"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.aarch64-linux-musl.tar.gz"
[[Expat]]
arch = "i686"
git-tree-sha1 = "e5b5f85f8dfd2de020b0b25862aa7a693f20b1a7"
libc = "glibc"
os = "linux"

[[Expat.download]]
sha256 = "e4e8c5a7cf12bbbaa4389021020a828e6a61d616a0b5a4f260c65a38c6b6a1f4"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.i686-linux-gnu.tar.gz"
[[Expat]]
arch = "x86_64"
git-tree-sha1 = "984051c067ee772c12f87258692a42bce7bdcb13"
libc = "musl"
os = "linux"

[[Expat.download]]
sha256 = "6cfc5b7d9585bd57496b3505b2457fd2b751868f831d6b9f7d7bb931f0dddfbe"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-linux-musl.tar.gz"
[[Expat]]
arch = "armv7l"
git-tree-sha1 = "493b16bf903d68f94c9e4b36cff78f78597c9486"
libc = "glibc"
os = "linux"

[[Expat.download]]
sha256 = "3941713d5ed51d3976104e80f322f60be04ea00f7268b38dbb2a8338b7276f80"
url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.arm-linux-gnueabihf.tar.gz"
10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = "Expat_jll"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.2.7+0"

[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[compat]
julia = "1.3"
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Expat_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 Expat_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
```
25 changes: 25 additions & 0 deletions src/Expat_jll.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module Expat_jll
using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl
import Base: UUID

# Load Artifacts.toml file
artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml")

# Extract all platforms
artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("2e619515-83b5-522b-bb60-26c02a35a201"))
platforms = [Pkg.Artifacts.unpack_platform(e, "Expat", artifacts_toml) for e in artifacts["Expat"]]

# 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))

if best_platform === nothing
error("Unable to load Expat; unsupported platform $(triplet(platform_key_abi()))")
end

# Load the appropriate wrapper
include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl"))

end # module Expat_jll
86 changes: 86 additions & 0 deletions src/wrappers/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Autogenerated wrapper script for Expat_jll for aarch64-linux-gnu
export libexpat, xmlwf

## Global variables
const PATH_list = String[]
const LIBPATH_list = String[]
PATH = ""
LIBPATH = ""
LIBPATH_env = "LD_LIBRARY_PATH"

# Relative path to `libexpat`
const libexpat_splitpath = ["lib", "libexpat.so"]

# This will be filled out by __init__() for all products, as it must be done at runtime
libexpat_path = ""

# libexpat-specific global declaration
# This will be filled out by __init__()
libexpat_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libexpat = "libexpat.so.1"


# Relative path to `xmlwf`
const xmlwf_splitpath = ["bin", "xmlwf"]

# This will be filled out by __init__() for all products, as it must be done at runtime
xmlwf_path = ""

# xmlwf-specific global declaration
function xmlwf(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
global PATH, LIBPATH
env_mapping = Dict{String,String}()
if adjust_PATH
if !isempty(get(ENV, "PATH", ""))
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
else
env_mapping["PATH"] = PATH
end
end
if adjust_LIBPATH
if !isempty(get(ENV, LIBPATH_env, ""))
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
else
env_mapping[LIBPATH_env] = LIBPATH
end
end
withenv(env_mapping...) do
f(xmlwf_path)
end
end


"""
Open all libraries
"""
function __init__()
global prefix = abspath(joinpath(@__DIR__, ".."))

# Initialize PATH and LIBPATH environment variable listings
global PATH_list, LIBPATH_list

global libexpat_path = abspath(joinpath(artifact"Expat", libexpat_splitpath...))

# Manually `dlopen()` this right now so that future invocations
# of `ccall` with its `SONAME` will find this path immediately.
global libexpat_handle = dlopen(libexpat_path)
push!(LIBPATH_list, dirname(libexpat_path))

global xmlwf_path = abspath(joinpath(artifact"Expat", xmlwf_splitpath...))

push!(PATH_list, dirname(xmlwf_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__()

86 changes: 86 additions & 0 deletions src/wrappers/aarch64-linux-musl.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Autogenerated wrapper script for Expat_jll for aarch64-linux-musl
export libexpat, xmlwf

## Global variables
const PATH_list = String[]
const LIBPATH_list = String[]
PATH = ""
LIBPATH = ""
LIBPATH_env = "LD_LIBRARY_PATH"

# Relative path to `libexpat`
const libexpat_splitpath = ["lib", "libexpat.so"]

# This will be filled out by __init__() for all products, as it must be done at runtime
libexpat_path = ""

# libexpat-specific global declaration
# This will be filled out by __init__()
libexpat_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libexpat = "libexpat.so.1"


# Relative path to `xmlwf`
const xmlwf_splitpath = ["bin", "xmlwf"]

# This will be filled out by __init__() for all products, as it must be done at runtime
xmlwf_path = ""

# xmlwf-specific global declaration
function xmlwf(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
global PATH, LIBPATH
env_mapping = Dict{String,String}()
if adjust_PATH
if !isempty(get(ENV, "PATH", ""))
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
else
env_mapping["PATH"] = PATH
end
end
if adjust_LIBPATH
if !isempty(get(ENV, LIBPATH_env, ""))
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
else
env_mapping[LIBPATH_env] = LIBPATH
end
end
withenv(env_mapping...) do
f(xmlwf_path)
end
end


"""
Open all libraries
"""
function __init__()
global prefix = abspath(joinpath(@__DIR__, ".."))

# Initialize PATH and LIBPATH environment variable listings
global PATH_list, LIBPATH_list

global libexpat_path = abspath(joinpath(artifact"Expat", libexpat_splitpath...))

# Manually `dlopen()` this right now so that future invocations
# of `ccall` with its `SONAME` will find this path immediately.
global libexpat_handle = dlopen(libexpat_path)
push!(LIBPATH_list, dirname(libexpat_path))

global xmlwf_path = abspath(joinpath(artifact"Expat", xmlwf_splitpath...))

push!(PATH_list, dirname(xmlwf_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__()

Loading

0 comments on commit 6501421

Please sign in to comment.