Skip to content

Commit 2b3df72

Browse files
committed
libpolymake_julia_jll build 0.1.0+0
1 parent 5b946de commit 2b3df72

File tree

7 files changed

+337
-0
lines changed

7 files changed

+337
-0
lines changed

Artifacts.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[libpolymake_julia]]
2+
arch = "x86_64"
3+
cxxstring_abi = "cxx11"
4+
git-tree-sha1 = "d9dd3f9d94b63067ca00c37c32a3635baa839cfb"
5+
os = "macos"
6+
7+
[[libpolymake_julia.download]]
8+
sha256 = "eae3b2c4d8d43a368bf36cc70fa3a23f385606e639792eae373f075a649b05c6"
9+
url = "https://github.com/JuliaBinaryWrappers/libpolymake_julia_jll.jl/releases/download/libpolymake_julia-v0.1.0+0/libpolymake_julia.v0.1.0.x86_64-apple-darwin14-cxx11.tar.gz"
10+
[[libpolymake_julia]]
11+
arch = "x86_64"
12+
cxxstring_abi = "cxx11"
13+
git-tree-sha1 = "59ec19d51241971f4c6df61f6f6495d7b0c6f37f"
14+
libc = "glibc"
15+
os = "linux"
16+
17+
[[libpolymake_julia.download]]
18+
sha256 = "eea90236b62de0cbbeb2c7cea714d267fce94443f3ce89589587c425c4a4ab30"
19+
url = "https://github.com/JuliaBinaryWrappers/libpolymake_julia_jll.jl/releases/download/libpolymake_julia-v0.1.0+0/libpolymake_julia.v0.1.0.x86_64-linux-gnu-cxx11.tar.gz"

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
The Julia source code within this repository (all files under `src/`) are
2+
released under the terms of the MIT "Expat" License, the text of which is
3+
included below. This license does not apply to the binary package wrapped by
4+
this Julia package and automatically downloaded by the Julia package manager
5+
upon installing this wrapper package. The binary package's license is shipped
6+
alongside the binary itself and can be found within the
7+
`share/licenses/libpolymake_julia` directory within its prefix.
8+
19
MIT License
210

311
Copyright (c) 2020 JuliaBinaryWrappers

Project.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name = "libpolymake_julia_jll"
2+
uuid = "4d8266f6-2b3b-57e3-ad7a-d431eaaac945"
3+
version = "0.1.0+0"
4+
5+
[deps]
6+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7+
CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae"
8+
libcxxwrap_julia_jll = "3eaa8342-bff7-56a5-9981-c04077f7cee7"
9+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
10+
polymake_jll = "7c209550-9012-526c-9264-55ba7a78ba2c"
11+
12+
[compat]
13+
julia = "1.0"

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# `libpolymake_julia_jll.jl` (v0.1.0+0)
2+
3+
This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl). The originating [`build_tarballs.jl`](https://github.com/JuliaPackaging/Yggdrasil/blob/655720821ada7b248e4afb374b001584c998e97f/L/libpolymake_julia/build_tarballs.jl) script can be found on [`Yggdrasil`](https://github.com/JuliaPackaging/Yggdrasil/), the community build tree.
4+
5+
For more details about JLL packages and how to use them, see `BinaryBuilder.jl` [documentation](https://juliapackaging.github.io/BinaryBuilder.jl/dev/jll/).
6+
7+
## Sources
8+
9+
The tarballs for `libpolymake_julia_jll.jl` have been built from these sources:
10+
11+
* compressed archive: https://github.com/oscar-system/libpolymake-julia/archive/v0.1.0.tar.gz (SHA256 checksum: `533237a1a1f7ff544017b9576704b2f05c6e3139443ea0aaa20bc88560675e9a`)
12+
13+
## Platforms
14+
15+
`libpolymake_julia_jll.jl` is available for the following platforms:
16+
17+
* `MacOS(:x86_64, compiler_abi=CompilerABI(cxxstring_abi=:cxx11))` (`x86_64-apple-darwin14-cxx11`)
18+
* `Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(cxxstring_abi=:cxx11))` (`x86_64-linux-gnu-cxx11`)
19+
20+
## Dependencies
21+
22+
The following JLL packages are required by `libpolymake_julia_jll.jl`:
23+
24+
* [`CompilerSupportLibraries_jll`](https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl)
25+
* [`libcxxwrap_julia_jll`](https://github.com/JuliaBinaryWrappers/libcxxwrap_julia_jll.jl)
26+
* [`polymake_jll`](https://github.com/JuliaBinaryWrappers/polymake_jll.jl)
27+
28+
## Products
29+
30+
The code bindings within this package are autogenerated from the following `Products`:
31+
32+
* `LibraryProduct`: `libpolymake_julia`
33+
* `ExecutableProduct`: `polymake_run_script`
34+
* `FileProduct`: `type_translator`

src/libpolymake_julia_jll.jl

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
module libpolymake_julia_jll
2+
3+
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
4+
@eval Base.Experimental.@optlevel 0
5+
end
6+
7+
if VERSION < v"1.3.0-rc4"
8+
# We lie a bit in the registry that JLL packages are usable on Julia 1.0-1.2.
9+
# This is to allow packages that might want to support Julia 1.0 to get the
10+
# benefits of a JLL package on 1.3 (requiring them to declare a dependence on
11+
# this JLL package in their Project.toml) but engage in heroic hacks to do
12+
# something other than actually use a JLL package on 1.0-1.2. By allowing
13+
# this package to be installed (but not loaded) on 1.0-1.2, we enable users
14+
# to avoid splitting their package versions into pre-1.3 and post-1.3 branches
15+
# if they are willing to engage in the kinds of hoop-jumping they might need
16+
# to in order to install binaries in a JLL-compatible way on 1.0-1.2. One
17+
# example of this hoop-jumping being to express a dependency on this JLL
18+
# package, then import it within a `VERSION >= v"1.3"` conditional, and use
19+
# the deprecated `build.jl` mechanism to download the binaries through e.g.
20+
# `BinaryProvider.jl`. This should work well for the simplest packages, and
21+
# require greater and greater heroics for more and more complex packages.
22+
error("Unable to import libpolymake_julia_jll on Julia versions older than 1.3!")
23+
end
24+
25+
using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl
26+
import Base: UUID
27+
28+
# We put these inter-JLL-package API values here so that they are always defined, even if there
29+
# is no underlying wrapper held within this JLL package.
30+
const PATH_list = String[]
31+
const LIBPATH_list = String[]
32+
33+
# Load Artifacts.toml file
34+
artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml")
35+
36+
# Extract all platforms
37+
artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("4d8266f6-2b3b-57e3-ad7a-d431eaaac945"))
38+
platforms = [Pkg.Artifacts.unpack_platform(e, "libpolymake_julia", artifacts_toml) for e in artifacts["libpolymake_julia"]]
39+
40+
# Filter platforms based on what wrappers we've generated on-disk
41+
filter!(p -> isfile(joinpath(@__DIR__, "wrappers", replace(triplet(p), "arm-" => "armv7l-") * ".jl")), platforms)
42+
43+
# From the available options, choose the best platform
44+
best_platform = select_platform(Dict(p => triplet(p) for p in platforms))
45+
46+
# Silently fail if there's no binaries for this platform
47+
if best_platform === nothing
48+
@debug("Unable to load libpolymake_julia; unsupported platform $(triplet(platform_key_abi()))")
49+
else
50+
# Load the appropriate wrapper. Note that on older Julia versions, we still
51+
# say "arm-linux-gnueabihf" instead of the more correct "armv7l-linux-gnueabihf",
52+
# so we manually correct for that here:
53+
best_platform = replace(best_platform, "arm-" => "armv7l-")
54+
include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl"))
55+
end
56+
57+
end # module libpolymake_julia_jll
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Autogenerated wrapper script for libpolymake_julia_jll for x86_64-apple-darwin14-cxx11
2+
export libpolymake_julia, polymake_run_script, type_translator
3+
4+
using CompilerSupportLibraries_jll
5+
using libcxxwrap_julia_jll
6+
using polymake_jll
7+
## Global variables
8+
PATH = ""
9+
LIBPATH = ""
10+
LIBPATH_env = "DYLD_FALLBACK_LIBRARY_PATH"
11+
LIBPATH_default = "~/lib:/usr/local/lib:/lib:/usr/lib"
12+
13+
# Relative path to `libpolymake_julia`
14+
const libpolymake_julia_splitpath = ["lib", "libpolymake_julia.dylib"]
15+
16+
# This will be filled out by __init__() for all products, as it must be done at runtime
17+
libpolymake_julia_path = ""
18+
19+
# libpolymake_julia-specific global declaration
20+
# This will be filled out by __init__()
21+
libpolymake_julia_handle = C_NULL
22+
23+
# This must be `const` so that we can use it with `ccall()`
24+
const libpolymake_julia = "@rpath/libpolymake_julia.dylib"
25+
26+
27+
# Relative path to `polymake_run_script`
28+
const polymake_run_script_splitpath = ["bin", "polymake_run_script"]
29+
30+
# This will be filled out by __init__() for all products, as it must be done at runtime
31+
polymake_run_script_path = ""
32+
33+
# polymake_run_script-specific global declaration
34+
function polymake_run_script(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
35+
global PATH, LIBPATH
36+
env_mapping = Dict{String,String}()
37+
if adjust_PATH
38+
if !isempty(get(ENV, "PATH", ""))
39+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
40+
else
41+
env_mapping["PATH"] = PATH
42+
end
43+
end
44+
if adjust_LIBPATH
45+
LIBPATH_base = get(ENV, LIBPATH_env, expanduser(LIBPATH_default))
46+
if !isempty(LIBPATH_base)
47+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', LIBPATH_base)
48+
else
49+
env_mapping[LIBPATH_env] = LIBPATH
50+
end
51+
end
52+
withenv(env_mapping...) do
53+
f(polymake_run_script_path)
54+
end
55+
end
56+
57+
58+
# Relative path to `type_translator`
59+
const type_translator_splitpath = ["share", "libpolymake_julia", "type_translator.jl"]
60+
61+
# This will be filled out by __init__() for all products, as it must be done at runtime
62+
type_translator_path = ""
63+
64+
# type_translator-specific global declaration
65+
# This will be filled out by __init__()
66+
type_translator = ""
67+
68+
69+
"""
70+
Open all libraries
71+
"""
72+
function __init__()
73+
global artifact_dir = abspath(artifact"libpolymake_julia")
74+
75+
# Initialize PATH and LIBPATH environment variable listings
76+
global PATH_list, LIBPATH_list
77+
# From the list of our dependencies, generate a tuple of all the PATH and LIBPATH lists,
78+
# then append them to our own.
79+
foreach(p -> append!(PATH_list, p), (CompilerSupportLibraries_jll.PATH_list, libcxxwrap_julia_jll.PATH_list, polymake_jll.PATH_list,))
80+
foreach(p -> append!(LIBPATH_list, p), (CompilerSupportLibraries_jll.LIBPATH_list, libcxxwrap_julia_jll.LIBPATH_list, polymake_jll.LIBPATH_list,))
81+
82+
global libpolymake_julia_path = normpath(joinpath(artifact_dir, libpolymake_julia_splitpath...))
83+
84+
# Manually `dlopen()` this right now so that future invocations
85+
# of `ccall` with its `SONAME` will find this path immediately.
86+
global libpolymake_julia_handle = dlopen(libpolymake_julia_path)
87+
push!(LIBPATH_list, dirname(libpolymake_julia_path))
88+
89+
global polymake_run_script_path = normpath(joinpath(artifact_dir, polymake_run_script_splitpath...))
90+
91+
push!(PATH_list, dirname(polymake_run_script_path))
92+
global type_translator_path = normpath(joinpath(artifact_dir, type_translator_splitpath...))
93+
94+
global type_translator = type_translator_path
95+
# Filter out duplicate and empty entries in our PATH and LIBPATH entries
96+
filter!(!isempty, unique!(PATH_list))
97+
filter!(!isempty, unique!(LIBPATH_list))
98+
global PATH = join(PATH_list, ':')
99+
global LIBPATH = join(vcat(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)]), ':')
100+
101+
102+
end # __init__()
103+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Autogenerated wrapper script for libpolymake_julia_jll for x86_64-linux-gnu-cxx11
2+
export libpolymake_julia, polymake_run_script, type_translator
3+
4+
using CompilerSupportLibraries_jll
5+
using libcxxwrap_julia_jll
6+
using polymake_jll
7+
## Global variables
8+
PATH = ""
9+
LIBPATH = ""
10+
LIBPATH_env = "LD_LIBRARY_PATH"
11+
LIBPATH_default = ""
12+
13+
# Relative path to `libpolymake_julia`
14+
const libpolymake_julia_splitpath = ["lib", "libpolymake_julia.so"]
15+
16+
# This will be filled out by __init__() for all products, as it must be done at runtime
17+
libpolymake_julia_path = ""
18+
19+
# libpolymake_julia-specific global declaration
20+
# This will be filled out by __init__()
21+
libpolymake_julia_handle = C_NULL
22+
23+
# This must be `const` so that we can use it with `ccall()`
24+
const libpolymake_julia = "libpolymake_julia.so"
25+
26+
27+
# Relative path to `polymake_run_script`
28+
const polymake_run_script_splitpath = ["bin", "polymake_run_script"]
29+
30+
# This will be filled out by __init__() for all products, as it must be done at runtime
31+
polymake_run_script_path = ""
32+
33+
# polymake_run_script-specific global declaration
34+
function polymake_run_script(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
35+
global PATH, LIBPATH
36+
env_mapping = Dict{String,String}()
37+
if adjust_PATH
38+
if !isempty(get(ENV, "PATH", ""))
39+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
40+
else
41+
env_mapping["PATH"] = PATH
42+
end
43+
end
44+
if adjust_LIBPATH
45+
LIBPATH_base = get(ENV, LIBPATH_env, expanduser(LIBPATH_default))
46+
if !isempty(LIBPATH_base)
47+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', LIBPATH_base)
48+
else
49+
env_mapping[LIBPATH_env] = LIBPATH
50+
end
51+
end
52+
withenv(env_mapping...) do
53+
f(polymake_run_script_path)
54+
end
55+
end
56+
57+
58+
# Relative path to `type_translator`
59+
const type_translator_splitpath = ["share", "libpolymake_julia", "type_translator.jl"]
60+
61+
# This will be filled out by __init__() for all products, as it must be done at runtime
62+
type_translator_path = ""
63+
64+
# type_translator-specific global declaration
65+
# This will be filled out by __init__()
66+
type_translator = ""
67+
68+
69+
"""
70+
Open all libraries
71+
"""
72+
function __init__()
73+
global artifact_dir = abspath(artifact"libpolymake_julia")
74+
75+
# Initialize PATH and LIBPATH environment variable listings
76+
global PATH_list, LIBPATH_list
77+
# From the list of our dependencies, generate a tuple of all the PATH and LIBPATH lists,
78+
# then append them to our own.
79+
foreach(p -> append!(PATH_list, p), (CompilerSupportLibraries_jll.PATH_list, libcxxwrap_julia_jll.PATH_list, polymake_jll.PATH_list,))
80+
foreach(p -> append!(LIBPATH_list, p), (CompilerSupportLibraries_jll.LIBPATH_list, libcxxwrap_julia_jll.LIBPATH_list, polymake_jll.LIBPATH_list,))
81+
82+
global libpolymake_julia_path = normpath(joinpath(artifact_dir, libpolymake_julia_splitpath...))
83+
84+
# Manually `dlopen()` this right now so that future invocations
85+
# of `ccall` with its `SONAME` will find this path immediately.
86+
global libpolymake_julia_handle = dlopen(libpolymake_julia_path)
87+
push!(LIBPATH_list, dirname(libpolymake_julia_path))
88+
89+
global polymake_run_script_path = normpath(joinpath(artifact_dir, polymake_run_script_splitpath...))
90+
91+
push!(PATH_list, dirname(polymake_run_script_path))
92+
global type_translator_path = normpath(joinpath(artifact_dir, type_translator_splitpath...))
93+
94+
global type_translator = type_translator_path
95+
# Filter out duplicate and empty entries in our PATH and LIBPATH entries
96+
filter!(!isempty, unique!(PATH_list))
97+
filter!(!isempty, unique!(LIBPATH_list))
98+
global PATH = join(PATH_list, ':')
99+
global LIBPATH = join(vcat(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)]), ':')
100+
101+
102+
end # __init__()
103+

0 commit comments

Comments
 (0)