diff --git a/lib/pkg.g b/lib/pkg.g new file mode 100644 index 00000000..558f7722 --- /dev/null +++ b/lib/pkg.g @@ -0,0 +1,12 @@ +BindGlobal("DirectoriesPackageProgramsOverrides", rec()); +BindGlobal("DirectoriesPackageProgramsOriginal", DirectoriesPackagePrograms); + +MakeReadWriteGlobal("DirectoriesPackagePrograms"); +DirectoriesPackagePrograms := function(name) + name:= LowercaseString(name); + if IsBound(DirectoriesPackageProgramsOverrides.(name)) then + return [ Directory( DirectoriesPackageProgramsOverrides.(name) ) ]; + fi; + return DirectoriesPackageProgramsOriginal(name); +end; +MakeReadOnlyGlobal("DirectoriesPackagePrograms"); diff --git a/src/GAP.jl b/src/GAP.jl index 38a64bca..6b4374d3 100644 --- a/src/GAP.jl +++ b/src/GAP.jl @@ -156,6 +156,8 @@ function initialize(argv::Vector{String}) error("JuliaInterface could not be loaded") end + GAP.Globals.Read(GapObj(joinpath(@__DIR__, "..", "lib", "pkg.g"))) + # If we are in "stand-alone mode", stop here if handle_signals ccall((:SyInstallAnswerIntr, libgap), Cvoid, ())