+Community 2018, +xmlada

This commit is contained in:
Alejandro R Mosteo
2018-06-11 11:29:48 +02:00
parent 1fdb974a03
commit 14e1fbe3e8
5 changed files with 168 additions and 33 deletions
+120
View File
@@ -0,0 +1,120 @@
package Alire.Index.XMLAda is
function Project is new Catalogued_Project ("The XML/Ada toolkit");
Repo : constant URL := "https://github.com/AdaCore/xmlada.git";
Base : constant Release := Project.Unreleased
(Properties =>
Maintainer ("AdaCore") and
Website ("https://github.com/AdaCore/xmlada") and
License (GPL_3_0) and
Action_Run (Post_Fetch, "sh configure"));
---------
-- DOM --
---------
package DOM is
function Project is new Catalogued_Project
(XMLAda.Project.Description & " (DOM)");
Base : constant Release := Project.Unreleased
(Properties =>
XMLAda.Base.Properties and
Project_File ("dom/xmlada_dom.gpr"));
package V_18_2 is new Project_Release
(Base
.Replacing
(Git (Repo, "5c3c4a1621a970849601a9df36423d8974c13dec")));
end DOM;
-------------------
-- Input_Sources --
-------------------
package Input_Sources is
function Project is new Catalogued_Project
(XMLAda.Project.Description & " (Input Sources)");
Base : constant Release := Project.Unreleased
(Properties =>
XMLAda.Base.Properties and
Project_File ("input_sources/xmlada_input.gpr"));
package V_18_2 is new Project_Release
(Base
.Replacing
(Git (Repo, "5c3c4a1621a970849601a9df36423d8974c13dec")));
end Input_Sources;
---------
-- SAX --
---------
package SAX is
function Project is new Catalogued_Project
(XMLAda.Project.Description & " (SAX)");
Base : constant Release := Project.Unreleased
(Properties =>
XMLAda.Base.Properties and
Project_File ("sax/xmlada_sax.gpr"));
package V_18_2 is new Project_Release
(Base
.Replacing
(Git (Repo, "5c3c4a1621a970849601a9df36423d8974c13dec")));
end SAX;
------------
-- Schema --
------------
package Schema is
function Project is new Catalogued_Project
(XMLAda.Project.Description & " (Schema)");
Base : constant Release := Project.Unreleased
(Properties =>
XMLAda.Base.Properties and
Project_File ("schema/xmlada_schema.gpr"));
package V_18_2 is new Project_Release
(Base
.Replacing
(Git (Repo, "5c3c4a1621a970849601a9df36423d8974c13dec")));
end Schema;
-------------
-- Unicode --
-------------
package Unicode is
function Project is new Catalogued_Project
(XMLAda.Project.Description & " (Unicode)");
Base : constant Release := Project.Unreleased
(Properties =>
XMLAda.Base.Properties and
Project_File ("unicode/xmlada_unicode.gpr"));
package V_18_2 is new Project_Release
(Base
.Replacing
(Git (Repo, "5c3c4a1621a970849601a9df36423d8974c13dec")));
end Unicode;
end Alire.Index.XMLAda;
+6 -1
View File
@@ -61,6 +61,8 @@ package Alire.Index is
overriding
function Project (C : Catalog_Entry) return Alire.Project;
function Description (C : Catalog_Entry) return Description_String;
function Ada_Identifier (C : Catalog_Entry) return String;
-- Returns Name.Project, for master projects
@@ -377,7 +379,7 @@ private
Description : Description_String (1 .. Descr_Len);
Package_Name : String (1 .. Pack_Len);
Self_Name : String (1 .. Self_Len);
end record;
end record;
overriding
function New_Dependency (L : Catalog_Entry; VS : Semantic_Versioning.Version_Set)
@@ -414,6 +416,9 @@ private
function Project (C : Catalog_Entry) return Alire.Project is (C.Project);
function Description (C : Catalog_Entry) return Description_String is
(Projects.Descriptions (C.Project));
function Unavailable return Conditional.Dependencies is
(Conditional.For_Dependencies.New_Value -- A conditional (without condition) dependency vector
(Dependencies.Unavailable));
+3 -1
View File
@@ -9,7 +9,9 @@ package Alire.Platforms with Preelaborate is
GNAT_FSF_7_3_Or_Newer,
GNAT_GPL_Old,
GNAT_GPL_2017_Or_Newer);
GNAT_GPL_2017,
GNAT_Community_2018);
-- We do a minimum of future proofing. Unless newer version have known problems we don't need to
-- isolate their versions
+18 -15
View File
@@ -8,14 +8,14 @@ with Table_IO;
package body Alire.Releases is
use all type Properties.Labeled.Labels;
use all type Alire.Properties.Labeled.Labels;
--------------------
-- All_Properties --
--------------------
function All_Properties (R : Release;
P : Properties.Vector) return Properties.Vector is
P : Alire.Properties.Vector) return Alire.Properties.Vector is
(Materialize (R.Properties and R.Priv_Props, P));
@@ -196,9 +196,9 @@ package body Alire.Releases is
----------------------------
function On_Platform_Properties (R : Release;
P : Properties.Vector;
P : Alire.Properties.Vector;
Descendant_Of : Ada.Tags.Tag := Ada.Tags.No_Tag)
return Properties.Vector
return Alire.Properties.Vector
is
use Ada.Tags;
begin
@@ -206,9 +206,9 @@ package body Alire.Releases is
return Materialize (R.Properties, P) and Materialize (R.Priv_Props, P);
else
declare
Props : constant Properties.Vector := R.On_Platform_Properties (P);
Props : constant Alire.Properties.Vector := R.On_Platform_Properties (P);
begin
return Result : Properties.Vector do
return Result : Alire.Properties.Vector do
for P of Props loop
if Is_Descendant_At_Same_Level (P'Tag, Descendant_Of) then
Result.Append (P);
@@ -223,14 +223,16 @@ package body Alire.Releases is
-- Values --
------------
function Values (Props : Properties.Vector; Label : Properties.Labeled.Labels) return Utils.String_Vector is
function Values (Props : Alire.Properties.Vector;
Label : Alire.Properties.Labeled.Labels)
return Utils.String_Vector is
-- Extract values of a particular label
begin
return Strs : Utils.String_Vector do
for P of Props loop
if P in Properties.Labeled.Label'Class then
if P in Alire.Properties.Labeled.Label'Class then
declare
LP : Properties.Labeled.Label renames Properties.Labeled.Label (P);
LP : Alire.Properties.Labeled.Label renames Alire.Properties.Labeled.Label (P);
begin
if LP.Name = Label then
Strs.Append (LP.Value);
@@ -246,7 +248,7 @@ package body Alire.Releases is
----------------
function Executables (R : Release;
P : Properties.Vector)
P : Alire.Properties.Vector)
return Utils.String_Vector
is
begin
@@ -266,7 +268,7 @@ package body Alire.Releases is
-------------------
function Project_Files (R : Release;
P : Properties.Vector;
P : Alire.Properties.Vector;
With_Path : Boolean)
return Utils.String_Vector
is
@@ -300,7 +302,8 @@ package body Alire.Releases is
-------------------
function Project_Paths (R : Release;
P : Properties.Vector) return Utils.String_Set
P : Alire.Properties.Vector)
return Utils.String_Set
is
use Utils;
Files : constant String_Vector := Project_Files (R, P, With_Path => True);
@@ -319,8 +322,8 @@ package body Alire.Releases is
------------------------
function Labeled_Properties (R : Release;
P : Properties.Vector;
Label : Properties.Labeled.Labels)
P : Alire.Properties.Vector;
Label : Alire.Properties.Labeled.Labels)
return Utils.String_Vector
is
begin
@@ -426,7 +429,7 @@ package body Alire.Releases is
-- Whenever --
--------------
function Whenever (R : Release; P : Properties.Vector) return Release is
function Whenever (R : Release; P : Alire.Properties.Vector) return Release is
begin
return Solid : constant Release (R.Prj_Len, R.Notes_Len) :=
(Prj_Len => R.Prj_Len,
+21 -16
View File
@@ -103,14 +103,16 @@ package Alire.Releases with Preelaborate is
function Depends (R : Release) return Conditional.Dependencies;
function Dependencies (R : Release) return Conditional.Dependencies
renames Depends;
renames Depends;
function Properties (R : Release) return Conditional.Properties;
function Depends (R : Release;
P : Properties.Vector)
P : Alire.Properties.Vector)
return Conditional.Dependencies;
-- Not really conditional anymore, but still a potential tree
function Dependencies (R : Release;
P : Properties.Vector)
P : Alire.Properties.Vector)
return Conditional.Dependencies renames Depends;
function Origin (R : Release) return Origins.Origin;
@@ -120,17 +122,17 @@ package Alire.Releases with Preelaborate is
-- We encapsulate here the fixing of platform extension
function Executables (R : Release;
P : Properties.Vector)
P : Alire.Properties.Vector)
return Utils.String_Vector;
-- Only explicity declared ones
-- Under some conditions (usually current platform)
function Project_Paths (R : Release;
P : Properties.Vector) return Utils.String_Set;
P : Alire.Properties.Vector) return Utils.String_Set;
-- Deduced from Project_Files
function Project_Files (R : Release;
P : Properties.Vector;
P : Alire.Properties.Vector;
With_Path : Boolean)
return Utils.String_Vector;
-- with relative path on demand
@@ -140,18 +142,18 @@ package Alire.Releases with Preelaborate is
-- NOTE: property retrieval functions do not distinguish between public/private, since that's
-- merely informative for the users
function On_Platform_Actions (R : Release; P : Properties.Vector) return Properties.Vector;
function On_Platform_Actions (R : Release; P : Alire.Properties.Vector) return Alire.Properties.Vector;
-- Get only Action properties for the platform
function On_Platform_Properties (R : Release;
P : Properties.Vector;
P : Alire.Properties.Vector;
Descendant_Of : Ada.Tags.Tag := Ada.Tags.No_Tag)
return Properties.Vector;
return Alire.Properties.Vector;
-- Return properties that apply to R under platform properties P
function Labeled_Properties (R : Release;
P : Properties.Vector;
Label : Properties.Labeled.Labels)
P : Alire.Properties.Vector;
Label : Alire.Properties.Labeled.Labels)
return Utils.String_Vector;
-- Get all values for a given property for a given platform properties
@@ -175,13 +177,13 @@ private
use Semantic_Versioning;
function Materialize is new Conditional.For_Properties.Materialize
(Properties.Vector, Properties.Append);
(Alire.Properties.Vector, Alire.Properties.Append);
function Enumerate is new Conditional.For_Properties.Enumerate
(Properties.Vector, Properties.Append);
(Alire.Properties.Vector, Alire.Properties.Append);
function All_Properties (R : Release;
P : Properties.Vector) return Properties.vector;
P : Alire.Properties.Vector) return Alire.Properties.vector;
-- Properties that R has un der platform properties P
use Alire.Properties;
@@ -233,10 +235,13 @@ private
function Depends (R : Release) return Conditional.Dependencies is (R.Dependencies);
function Depends (R : Release;
P : Properties.Vector)
P : Alire.Properties.Vector)
return Conditional.Dependencies is
(R.Dependencies.Evaluate (P));
function Properties (R : Release) return Conditional.Properties is
(R.Properties);
function Origin (R : Release) return Origins.Origin is (R.Origin);
function Available (R : Release) return Requisites.Tree is (R.Available);
@@ -257,7 +262,7 @@ private
then R.Origin.Commit
else R.Origin.Commit (R.Origin.Commit'First .. R.Origin.Commit'First + 7))));
function On_Platform_Actions (R : Release; P : Properties.Vector) return Properties.Vector is
function On_Platform_Actions (R : Release; P : Alire.Properties.Vector) return Alire.Properties.Vector is
(R.On_Platform_Properties (P, Actions.Action'Tag));
function Satisfies (R : Release; Dep : Alire.Dependencies.Dependency) return Boolean is