GNAT as native package
This commit is contained in:
Vendored
+1
-1
Submodule deps/semver updated: 2937c65051...ebf71f00da
@@ -4,6 +4,11 @@ package Alire.Index.Semantic_Versioning is
|
||||
|
||||
Repo : constant URL := "https://github.com/alire-project/semantic_versioning.git";
|
||||
|
||||
V_0_3 : constant Release := Project.Register
|
||||
(V ("0.3"),
|
||||
Git (Repo, "ebf71f00daba91489238f79819078a37e36be188"));
|
||||
|
||||
|
||||
V_0_2 : constant Release := Project.Register
|
||||
(V ("0.2"),
|
||||
Git (Repo, "2937c650511ad3c87af64be963eca7eba7aebb68"));
|
||||
|
||||
@@ -32,6 +32,7 @@ package Alire.Projects with Preelaborate is
|
||||
|
||||
Globe_3D,
|
||||
GLUT,
|
||||
GNAT,
|
||||
GtkAda,
|
||||
|
||||
-------
|
||||
@@ -132,6 +133,8 @@ package Alire.Projects with Preelaborate is
|
||||
"GL Object Based Engine for 3D in Ada",
|
||||
when GLUT =>
|
||||
"OpenGL Utility Toolkit",
|
||||
when GNAT =>
|
||||
"GNU Ada compiler (platform package)",
|
||||
when GtkAda =>
|
||||
"Ada binding for the GTK+ GUI",
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package Alire.Index.GNAT is
|
||||
|
||||
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,3 +1,5 @@
|
||||
with Alire.Index.GNAT;
|
||||
|
||||
package Alire.Index.GtkAda is
|
||||
|
||||
function Project is new Catalogued_Project (Projects.GtkAda);
|
||||
@@ -8,8 +10,8 @@ package Alire.Index.GtkAda is
|
||||
Native ((Debian | Ubuntu => Packaged_As ("libgtkada16.1.0-dev"),
|
||||
others => Unavailable)),
|
||||
|
||||
Available_When => Compiler_Is_Native
|
||||
-- Unfortunately packaged libs can't be used with non-platform compilers due to .ali clashes
|
||||
Dependencies =>
|
||||
GNAT.Project >= GNAT.V_7
|
||||
);
|
||||
|
||||
end Alire.Index.GtkAda;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package Alire.Index.Native_Template is
|
||||
|
||||
-- function Project is new Catalogued_Project (Projects.Name);
|
||||
|
||||
-- V : constant Release :=
|
||||
-- Register (Projects.Name
|
||||
-- V (""),
|
||||
-- Project.Register (V (""),
|
||||
-- Native ((Debian | Ubuntu => Packaged_As (""),
|
||||
-- others => Unavailable)));
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
with Alire.Index.GNAT;
|
||||
|
||||
package Alire.Index.NcursesAda is
|
||||
|
||||
function Project is new Catalogued_Project (Projects.NcursesAda);
|
||||
@@ -8,8 +10,8 @@ package Alire.Index.NcursesAda is
|
||||
Native ((Debian | Ubuntu => Packaged_As ("libncursesada5-dev"),
|
||||
others => Unavailable)),
|
||||
|
||||
Available_When => Compiler_Is_Native
|
||||
-- Unfortunately packaged libs can't be used with non-platform compilers due to .ali clashes
|
||||
Dependencies =>
|
||||
GNAT.Project >= GNAT.V_7
|
||||
);
|
||||
|
||||
V_3 : constant Release :=
|
||||
@@ -18,6 +20,8 @@ package Alire.Index.NcursesAda is
|
||||
Native ((Debian | Ubuntu => Packaged_As ("libncursesada3-dev"),
|
||||
others => Unavailable)),
|
||||
|
||||
Available_When => Compiler_Is_Native);
|
||||
Dependencies =>
|
||||
GNAT.Project >= GNAT.V_7
|
||||
);
|
||||
|
||||
end Alire.Index.NcursesAda;
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user