-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0091b53
Showing
5 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[Git]] | ||
arch = "i686" | ||
git-tree-sha1 = "682b57bfc6b32066d58009a78a02c3263f993af3" | ||
os = "windows" | ||
|
||
[[Git.download]] | ||
sha256 = "9c85515690867047a57dd365e4a1ef9776036a01d1781a37d282acf9d5676bf8" | ||
url = "https://github.com/JuliaBinaryWrappers/Git_jll.jl/releases/download/Git-v2.23.0+0/Git.v2.23.0.i686-w64-mingw32.tar.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name = "Git_jll" | ||
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" | ||
version = "2.23.0+0" | ||
|
||
[deps] | ||
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" | ||
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" | ||
|
||
[compat] | ||
julia = "1.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Git_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 Git_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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Git_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("f8c6e375-362e-5223-8a59-34ff63f689eb")) | ||
platforms = [Pkg.Artifacts.unpack_platform(e, "Git", artifacts_toml) for e in artifacts["Git"]] | ||
|
||
# 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 Git; unsupported platform $(triplet(platform_key_abi()))") | ||
else | ||
# Load the appropriate wrapper | ||
include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl")) | ||
end | ||
|
||
end # module Git_jll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Autogenerated wrapper script for Git_jll for i686-w64-mingw32 | ||
export git | ||
|
||
## Global variables | ||
PATH = "" | ||
LIBPATH = "" | ||
LIBPATH_env = "PATH" | ||
|
||
# Relative path to `git` | ||
const git_splitpath = ["bin", "git.exe"] | ||
|
||
# This will be filled out by __init__() for all products, as it must be done at runtime | ||
git_path = "" | ||
|
||
# git-specific global declaration | ||
function git(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(git_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 git_path = abspath(joinpath(artifact"Git", git_splitpath...)) | ||
|
||
push!(PATH_list, dirname(git_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__() | ||
|