Commit 7ddd785 1 parent fa9462c commit 7ddd785 Copy full SHA for 7ddd785
File tree 2 files changed +33
-14
lines changed
2 files changed +33
-14
lines changed Original file line number Diff line number Diff line change @@ -399,13 +399,24 @@ Dependencies := rec(
399
399
400
400
AvailabilityTest := function ()
401
401
local digraphs_so;
402
- digraphs_so := Filename(DirectoriesPackagePrograms( " digraphs " ),
403
- " digraphs.so " );
404
- if ( not " digraphs" in SHOW_STAT()) and digraphs_so = fail then
405
- LogPackageLoadingMessage(PACKAGE_WARNING,
402
+
403
+ if CompareVersionNumbers(GAPInfo.Version, " 4.12 " ) then
404
+ if not IsKernelExtensionAvailable( " digraphs" ) then
405
+ LogPackageLoadingMessage(PACKAGE_WARNING,
406
406
[ " the kernel module is not compiled, " ,
407
407
" the package cannot be loaded." ] );
408
- return fail ;
408
+ return fail ;
409
+ fi ;
410
+ else
411
+ # TODO this clause can be removed once Digraphs requires GAP>=4.12.1
412
+ digraphs_so := Filename(DirectoriesPackagePrograms(" digraphs" ),
413
+ " digraphs.so" );
414
+ if (not " digraphs" in SHOW_STAT()) and digraphs_so = fail then
415
+ LogPackageLoadingMessage(PACKAGE_WARNING,
416
+ [ " the kernel module is not compiled, " ,
417
+ " the package cannot be loaded." ] );
418
+ return fail ;
419
+ fi ;
409
420
fi ;
410
421
return true ;
411
422
end ,
Original file line number Diff line number Diff line change @@ -13,15 +13,23 @@ if not IsBound(UserHomeExpand) then
13
13
BindGlobal(" UserHomeExpand" , USER_HOME_EXPAND);
14
14
fi ;
15
15
16
- # load kernel function if it is installed:
17
- if not IsBound (DIGRAPH_OUT_NBS) and " digraphs" in SHOW_STAT() then
18
- # try static module
19
- LoadStaticModule(" digraphs" );
20
- fi ;
21
- if not IsBound (DIGRAPH_OUT_NBS) and
22
- Filename(DirectoriesPackagePrograms(" digraphs" ), " digraphs.so" ) <> fail then
23
- LoadDynamicModule(Filename(DirectoriesPackagePrograms(" digraphs" ),
24
- " digraphs.so" ));
16
+ if CompareVersionNumbers(GAPInfo.Version, " 4.12" ) then
17
+ if not LoadKernelExtension(" digraphs" ) then
18
+ Error(" failed to load the Digraphs package kernel extension" );
19
+ fi ;
20
+ else
21
+ # TODO this clause can be removed once Digraphs requires GAP>=4.12.1
22
+ # load kernel function if it is installed:
23
+ if not IsBound (DIGRAPH_OUT_NBS) and " digraphs" in SHOW_STAT() then
24
+ # try static module
25
+ LoadStaticModule(" digraphs" );
26
+ fi ;
27
+ if not IsBound (DIGRAPH_OUT_NBS) and
28
+ Filename(DirectoriesPackagePrograms(" digraphs" ),
29
+ " digraphs.so" ) <> fail then
30
+ LoadDynamicModule(Filename(DirectoriesPackagePrograms(" digraphs" ),
31
+ " digraphs.so" ));
32
+ fi ;
25
33
fi ;
26
34
27
35
BindGlobal(" DIGRAPHS_IsGrapeLoaded" ,
You can’t perform that action at this time.
0 commit comments