-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use of JLLs for some GAP packages with kernel extensions
- Loading branch information
Showing
5 changed files
with
100 additions
and
4 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
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
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
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
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,49 @@ | ||
using BinaryWrappers | ||
|
||
const pkg_bindirs = Dict{Symbol, String}() | ||
|
||
for pkg in [ | ||
:ace, | ||
:anupq, | ||
:browse, | ||
:cddinterface, | ||
:crypting, | ||
:cvec, | ||
:datastructures, | ||
:deepthought, | ||
:digraphs, | ||
:edim, | ||
:ferret, | ||
:float, | ||
:fplsa, | ||
:gauss, | ||
:guava, | ||
:io, | ||
:json, | ||
:normalizinterface, | ||
:nq, | ||
:orb, | ||
:simpcomp, | ||
] | ||
jll = Symbol("GAP_pkg_$(pkg)_jll") | ||
@eval begin | ||
using $jll | ||
# Crude heuristic: if the JLL has a `bin` directory then we assume it | ||
# contains executables the packages uses; otherwise assume it contains | ||
# a kernel extension `lib/gap/BLAH.so`. | ||
# | ||
# This fails if a package has both executables and a kernel extension. | ||
pkg_bindirs[Symbol($(string(pkg)))] = | ||
if isdir(joinpath($jll.find_artifact_dir(), "bin")) | ||
@generate_wrappers($jll) | ||
else | ||
joinpath($jll.find_artifact_dir(), "lib", "gap") | ||
end | ||
end | ||
end | ||
|
||
function setup_gap_pkg_overrides() | ||
for (pkg, dir) in pkg_bindirs | ||
setproperty!(GAP.Globals.DirectoriesPackageProgramsOverrides, pkg, GapObj(dir)) | ||
end | ||
end |