From 3b5348806f8baedec7dc3ea1a3ca5b83cf223777 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Sat, 17 Mar 2018 17:11:08 +0100 Subject: [PATCH] Better compiler versioning --- index/native/alire-index-gtkada.ads | 4 ++-- index/native/alire-index-ncursesada.ads | 8 ++++---- src/alire-platforms.ads | 15 +++++++++------ src/alire-properties-dependencies.ads | 2 +- src/alire-requisites-platform.ads | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/index/native/alire-index-gtkada.ads b/index/native/alire-index-gtkada.ads index cdb375a1..979f8302 100644 --- a/index/native/alire-index-gtkada.ads +++ b/index/native/alire-index-gtkada.ads @@ -10,8 +10,8 @@ package Alire.Index.GtkAda is Native ((Debian | Ubuntu => Packaged_As ("libgtkada16.1.0-dev"), others => Unavailable)), - Dependencies => - GNAT.Project >= GNAT.V_7 + Available_When => + Compiler_Is_Native ); end Alire.Index.GtkAda; diff --git a/index/native/alire-index-ncursesada.ads b/index/native/alire-index-ncursesada.ads index 69a3f51e..9ade87db 100644 --- a/index/native/alire-index-ncursesada.ads +++ b/index/native/alire-index-ncursesada.ads @@ -10,8 +10,8 @@ package Alire.Index.NcursesAda is Native ((Debian | Ubuntu => Packaged_As ("libncursesada5-dev"), others => Unavailable)), - Dependencies => - GNAT.Project >= GNAT.V_7 + Available_When => + Compiler_Is_Native ); V_3 : constant Release := @@ -20,8 +20,8 @@ package Alire.Index.NcursesAda is Native ((Debian | Ubuntu => Packaged_As ("libncursesada3-dev"), others => Unavailable)), - Dependencies => - GNAT.Project >= GNAT.V_7 + Available_When => + Compiler_Is_Native ); end Alire.Index.NcursesAda; diff --git a/src/alire-platforms.ads b/src/alire-platforms.ads index 287210a8..a2ca090b 100644 --- a/src/alire-platforms.ads +++ b/src/alire-platforms.ads @@ -3,12 +3,15 @@ package Alire.Platforms with Preelaborate is -- Platform information necessary for some releases type Compilers is (GNAT_Unknown, - GNAT_FSF_7_X, -- Future proofing for Compiler_Is_Native - GNAT_FSF_7_2, - GNAT_FSF_7_3, - GNAT_FSF_8_Or_Newer, -- More future proofing - GNAT_GPL_Unknown, - GNAT_GPL_2017,); + + GNAT_FSF_Old, + GNAT_FSF_7_2, -- Has known bugs compared to 2017 + GNAT_FSF_7_3_Or_Newer, + + GNAT_GPL_Old, + GNAT_GPL_2017_Or_Newer); + -- We do a minimum of future proofing. Unless newer version have known problems we don't need to + -- isolate their versions type Operating_Systems is (GNU_Linux, Windows, diff --git a/src/alire-properties-dependencies.ads b/src/alire-properties-dependencies.ads index 0b8c0cd2..cab04177 100644 --- a/src/alire-properties-dependencies.ads +++ b/src/alire-properties-dependencies.ads @@ -26,7 +26,7 @@ private end record; overriding function Image (This : Availability_Checker) return String is - ("Availability resolver"); + ("Availability_Resolver"); function New_Property (Checker : Checker_Function; Props : Alire.Properties.Vector) return Vector is diff --git a/src/alire-requisites-platform.ads b/src/alire-requisites-platform.ads index 7bb4dd16..75093d1b 100644 --- a/src/alire-requisites-platform.ads +++ b/src/alire-requisites-platform.ads @@ -27,7 +27,7 @@ package Alire.Requisites.Platform with Preelaborate is function Compiler is new Compilers.Factory; function Compiler_Is_Native return Tree is - (Compiler < GNAT_GPL_2017 and Compiler /= GNAT_Unknown); + (Compiler >= GNAT_FSF_Old and Compiler < GNAT_GPL_Old); package Distributions is new Comparables (Ps.Distributions, Ps."<", Ps.Distributions'Image,