gnatprove: fix building with gcc-14.3

- Fix extracting of gnat sources
When the gnat.cc.version does not match the gcc version within the
tarball, the postPatch phase could't extract the needed sources.
Use wildcards to overcome this issue.

- Changes for gcc-14.3 broke the build
Backporting a patch from spark2014 master to fsf-14
https://github.com/AdaCore/spark2014/issues/58

Changed files
+38 -2
pkgs
+33
pkgs/development/ada-modules/gnatprove/0003-Adjust-after-category-change-for-N_Formal_Package_De.patch
···
+
From 3c06fb993ae628b5069c1f3e23f11c53815e1cbe Mon Sep 17 00:00:00 2001
+
From: Eric Botcazou <ebotcazou@adacore.com>
+
Date: Sat, 8 Mar 2025 00:09:57 +0100
+
Subject: [PATCH] Adjust after category change for N_Formal_Package_Declaration
+
+
Issue: eng/toolchain/gnat#1354
+
---
+
src/why/gnat2why-borrow_checker.adb | 2 +-
+
1 file changed, 1 insertion(+), 1 deletion(-)
+
+
diff --git a/src/why/gnat2why-borrow_checker.adb b/src/why/gnat2why-borrow_checker.adb
+
index a97f225b06..f3ab8be3e9 100644
+
--- a/src/why/gnat2why-borrow_checker.adb
+
+++ b/src/why/gnat2why-borrow_checker.adb
+
@@ -1693,6 +1693,7 @@ procedure Check_Declaration (Decl : Node_Id) is
+
-- Ignored constructs for pointer checking
+
+
when N_Formal_Object_Declaration
+
+ | N_Formal_Package_Declaration
+
| N_Formal_Type_Declaration
+
| N_Incomplete_Type_Declaration
+
| N_Private_Extension_Declaration
+
@@ -3326,7 +3327,6 @@ procedure Check_Node (N : Node_Id) is
+
| N_Empty
+
| N_Enumeration_Representation_Clause
+
| N_Exception_Renaming_Declaration
+
- | N_Formal_Package_Declaration
+
| N_Formal_Subprogram_Declaration
+
| N_Freeze_Entity
+
| N_Freeze_Generic_Entity
+
--
+
2.48.1
+
+5 -2
pkgs/development/ada-modules/gnatprove/default.nix
···
# Suppress warnings on aarch64: https://github.com/AdaCore/spark2014/issues/54
./0002-mute-aarch64-warnings.patch
+
+
# Changes to the GNAT frontend: https://github.com/AdaCore/spark2014/issues/58
+
./0003-Adjust-after-category-change-for-N_Formal_Package_De.patch
];
commit_date = "2024-01-11";
};
···
postPatch = ''
# gnat2why/gnat_src points to the GNAT sources
-
tar xf ${gnat.cc.src} gcc-${gnat.cc.version}/gcc/ada
-
mv gcc-${gnat.cc.version}/gcc/ada gnat2why/gnat_src
+
tar xf ${gnat.cc.src} --wildcards 'gcc-*/gcc/ada'
+
mv gcc-*/gcc/ada gnat2why/gnat_src
'';
configurePhase = ''