Preparations for windows port

This commit is contained in:
Alejandro R. Mosteo
2018-03-16 16:42:25 +01:00
parent 6f45ebc408
commit 928f317374
7 changed files with 32 additions and 22 deletions
+20 -14
View File
@@ -1,19 +1,25 @@
package Alire.Index.GNAT is
function Project is new Catalogued_Project (Projects.GNAT);
-- This is apparently a good idea but it is not, in practice
-- Since the compiler is a requisite of alr itself, there's no point in requiring it again here
-- Furthermore, the compiler might be installed but not be the one in use
-- (e.g., GPL version is in an earlier path)
-- Conclusion: use the requisite Compiler_Is_Native instead
-- If minor versions proved important they could be segregated with platform-specific knowledge
V_8 : constant Release :=
Project.Register
(V ("8"),
Native ((Debian | Ubuntu => Packaged_As ("gnat-8"),
others => Unavailable)));
V_7 : constant Release :=
Project.Register
(V ("7"),
Native ((Debian | Ubuntu => Packaged_As ("gnat-7"),
others => Unavailable)));
-- function Project is new Catalogued_Project (Projects.GNAT);
--
-- -- If minor versions proved important they could be segregated with platform-specific knowledge
--
-- V_8 : constant Release :=
-- Project.Register
-- (V ("8"),
-- Native ((Debian | Ubuntu => Packaged_As ("gnat-8"),
-- others => Unavailable)));
--
-- V_7 : constant Release :=
-- Project.Register
-- (V ("7"),
-- Native ((Debian | Ubuntu => Packaged_As ("gnat-7"),
-- others => Unavailable)));
end Alire.Index.GNAT;
+1 -1
View File
@@ -253,7 +253,7 @@ package Alire.Index is
package Plat_Reqs renames Requisites.Platform;
function Compiler is new Requisites.Platform.Compilers.Factory;
-- function Compiler_Is_Native return Release_Requisites renames Plat_Reqs.Compiler_Is_Native;
function Compiler_Is_Native return Release_Requisites renames Plat_Reqs.Compiler_Is_Native;
use all type Requisites.Platform.Compilers.Comparable;
function Distribution is new Requisites.Platform.Distributions.Factory;
+2 -2
View File
@@ -24,9 +24,9 @@ package body Alire.Platform is
-- Set_Platform --
------------------
procedure Set_Platform (P : Supported_Platform'Class) is
procedure Set (P : Supported_Platform'Class) is
begin
This.Replace_Element (P);
end Set_Platform;
end Set;
end Alire.Platform;
+1 -1
View File
@@ -9,7 +9,7 @@ package Alire.Platform with Preelaborate is
function Package_Version (P : Supported_Platform; Origin : Origins.Origin) return String is abstract;
procedure Set_Platform (P : Supported_Platform'Class);
procedure Set (P : Supported_Platform'Class);
function Current return Supported_Platform'Class
with Pre => Platform'Elaborated;
+4 -1
View File
@@ -3,9 +3,12 @@ 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_GPL_2017);
GNAT_FSF_8_Or_Newer, -- More future proofing
GNAT_GPL_Unknown,
GNAT_GPL_2017,);
type Operating_Systems is (GNU_Linux,
Windows,
+1 -1
View File
@@ -26,7 +26,7 @@ private
end record;
overriding function Image (This : Availability_Checker) return String is
("internal availability checker - OMG WHY ARE YOU SEEING THIS"); -- Don't think it should ever seen
("Availability resolver");
function New_Property (Checker : Checker_Function;
Props : Alire.Properties.Vector) return Vector is
+3 -2
View File
@@ -25,8 +25,9 @@ package Alire.Requisites.Platform with Preelaborate is
use all type Compilers.Comparable;
function Compiler is new Compilers.Factory;
-- function Compiler_Is_Native return Tree is
-- (Compiler < GNAT_GPL_2017 and Compiler /= GNAT_Unknown);
function Compiler_Is_Native return Tree is
(Compiler < GNAT_GPL_2017 and Compiler /= GNAT_Unknown);
package Distributions is new Comparables
(Ps.Distributions, Ps."<", Ps.Distributions'Image,