GNAT as native package

This commit is contained in:
Alejandro R Mosteo
2018-03-14 19:35:25 +01:00
parent 21970b592b
commit e550916f3b
11 changed files with 58 additions and 17 deletions
+2 -1
View File
@@ -143,6 +143,7 @@ package Alire.Index is
renames Semver.Relaxed;
use Versions.Expressions;
use Versions.Expressions_With_Versioned;
function Unavailable return Release_Dependencies;
-- A never available release
@@ -252,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;
+7 -6
View File
@@ -4,36 +4,37 @@ package Alire.Platforms with Preelaborate is
type Compilers is (GNAT_Unknown,
GNAT_FSF_7_2,
GNAT_FSF_7_3,
GNAT_GPL_2017);
type Operating_Systems is (GNU_Linux,
Windows,
Unsupported);
OS_Unknown);
type Distributions is (Debian,
Ubuntu,
Unsupported);
Distro_Unknown);
type Versions is (Debian_Buster,
Ubuntu_Xenial,
Ubuntu_Yakkety,
Ubunty_Zesty,
Ubuntu_Artful,
Unsupported);
Distro_Version_Unsupported);
-- Known flavors of OSs
-- It turns out that Debian uses no numbers for its non-stable releases, so we'll prefer the codename
-- Not really used very much for now
type Word_Sizes is (Bits_32,
Bits_64,
Unsupported);
Bits_Unknown);
type Package_Managers is (Apt,
Unsupported);
Packager_Unknown);
function Package_Manager (D : Distributions) return Package_Managers is
(case D is
when Debian | Ubuntu => Apt,
when others => Unsupported);
when others => Packager_Unknown);
end Alire.Platforms;
+2 -2
View File
@@ -25,8 +25,8 @@ 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,
+5
View File
@@ -14,6 +14,8 @@ package Alire.Versions with Preelaborate is
function Version (V : Versioned) return Semantic_Versioning.Version is abstract;
function Version_Classwide (V : Versioned'Class) return Semantic_Versioning.Version is (V.Version);
function This_Version (V : Versioned'Class) return Conditional.Dependencies;
function Within_Major (V : Versioned'Class) return Conditional.Dependencies;
function Within_Minor (V : Versioned'Class) return Conditional.Dependencies;
@@ -31,6 +33,9 @@ package Alire.Versions with Preelaborate is
Conditional.Dependencies,
New_Dependency_Classwide);
package Expressions_With_Versioned is new Expressions.Against (Versioned'Class,
Version_Classwide);
private
use Semantic_Versioning;