From 8d1380b115109f69c56d2b753ebf64117070f2c6 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 26 Aug 2024 12:33:28 +0100 Subject: [PATCH] Resolve https://github.com/gap-system/gap/issues/5761 --- .github/workflows/CI.yml | 2 -- PackageInfo.g | 15 ++++++++------- init.g | 7 +++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dfee377..de94508 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,8 +27,6 @@ jobs: - master - stable-4.13 - stable-4.12 - - stable-4.11 - - stable-4.10 ABI: [''] include: - gap-branch: master diff --git a/PackageInfo.g b/PackageInfo.g index cf330d4..7f3f027 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -72,17 +72,20 @@ PackageDoc := rec( ), Dependencies := rec( - GAP := ">= 4.10", + GAP := ">= 4.12", NeededOtherPackages := [ [ "GAPDoc", ">= 1.5" ] ], SuggestedOtherPackages := [ ], ExternalConditions := [ ], ), AvailabilityTest := function() - if Filename(DirectoriesPackagePrograms("crypting"), "crypting.so") = fail then - return fail; - fi; - return true; + if not IsKernelExtensionAvailable("crypting") then + LogPackageLoadingMessage(PACKAGE_WARNING, + ["the kernel module is not compiled, ", + "the package cannot be loaded."]); + return fail; + fi; + return true; end, TestFile := "tst/testall.g", @@ -90,5 +93,3 @@ TestFile := "tst/testall.g", #Keywords := [ "TODO" ], )); - - diff --git a/init.g b/init.g index 4e8495d..4a9f482 100644 --- a/init.g +++ b/init.g @@ -3,10 +3,9 @@ # # Reading the declaration part of the package. # -_PATH_SO:=Filename(DirectoriesPackagePrograms("crypting"), "crypting.so"); -if _PATH_SO <> fail then - LoadDynamicModule(_PATH_SO); + +if not LoadKernelExtension("crypting") then + Error("failed to load the crypting package kernel extension"); fi; -Unbind(_PATH_SO); ReadPackage( "crypting", "gap/crypting.gd");