diff --git a/index/alire-index-gnatcoll.ads b/index/alire-index-gnatcoll.ads new file mode 100644 index 00000000..e9b3655d --- /dev/null +++ b/index/alire-index-gnatcoll.ads @@ -0,0 +1,66 @@ +package Alire.Index.GNATCOLL is + + function Project is new Catalogued_Project + ("GNAT Components Collection - Core packages"); + + Repo_AdaCore : constant URL := "https://github.com/AdaCore/gnatcoll-core.git"; + -- Upstream + + Repo_Alire : constant URL := "https://github.com/alire-project/gnatcoll-core.git"; + -- For slim picks + + Base : constant Release := + Project.Unreleased + (Properties => + Author ("AdaCore") and + Maintainer ("alejandro@mosteo.com") and + License (GPL_3_0) and + + Project_File ("gnatcoll.gpr") and + GPR_Scenario ("GNATCOLL_ATOMICS", + "intrinsic" or "mutex") and + GPR_Scenario ("GNATCOLL_OS", + "windows" or "unix" or "osx") and + GPR_Scenario ("BUILD", + "DEBUG" or "PROD") and + GPR_Scenario ("LIBRARY_TYPE", + "relocatable" or "static" or "static-pic"), + + Private_Properties => + GPR_External ("BUILD", "PROD") and + GPR_External ("LIBRARY_TYPE", "static-pic") and + On_Condition + (Operating_System = GNU_Linux, + GPR_External ("GNATCOLL_OS", "unix")) and + On_Condition + (Operating_System = Windows, + GPR_External ("GNATCOLL_OS", "windows")) and + On_Condition + (Operating_System = OSX, + GPR_External ("GNATCOLL_OS", "osx"))); + + package Slim is + + function Project is new Catalogued_Project + ("GNAT Components Collection - Slim version (no dependencies)"); + + package V_20180425 is new Released + (Base + .Replacing (Git (Repo_Alire, + "81bc37d7548fe40024eb0f647df65ec42f65443b"))); + + end Slim; + + package Strings is + + function Project is new Catalogued_Project + ("GNAT Components Collection - Strings-only"); + + package V_20180425 is new Released + (Base + .Replacing (Git (Repo_Alire, + "7823e31add7133b9fbc6e037d9986a823e840dc0"))); + + end Strings; + +end Alire.Index.GNATCOLL; diff --git a/index/alire-index-xstrings.ads b/index/alire-index-xstrings.ads new file mode 100644 index 00000000..1f7b826f --- /dev/null +++ b/index/alire-index-xstrings.ads @@ -0,0 +1,24 @@ +with Alire.Index.GNATCOLL; + +package Alire.Index.XStrings is + + function Project is new Catalogued_Project + ("Renaming of gnatcoll.strings without further dependencies"); + + Repo : constant URL := "https://github.com/alire-project/xstrings"; + + Base : constant Release := + Project.Unreleased + (Dependencies => + GNATCOLL.Strings.V_20180425.Within_Major or + GNATCOLL.Slim.V_20180425.Within_Major, + + Properties => + Author ("alejandro@mosteo.com") and + License (GPL_3_0)); + + package V_1_0_0 is new Released + (Base + .Replacing (Git (Repo, "40d3871dd644473aabac104666b4c83285b65ba6"))); + +end Alire.Index.XStrings; diff --git a/src/alire-index.adb b/src/alire-index.adb index 24358bf3..6f2d6387 100644 --- a/src/alire-index.adb +++ b/src/alire-index.adb @@ -267,6 +267,12 @@ package body Alire.Index is return The_Release; end Release; + function Version return Semantic_Versioning.Version is + (The_Release.Version); + + function Version return Semantic_Versioning.Version_Set is + (Exactly (The_Release.Version)); + function This_Version return Conditional.Dependencies is (The_Release.This_Version); diff --git a/src/alire-index.ads b/src/alire-index.ads index 4d11f03d..c10f7ed8 100644 --- a/src/alire-index.ads +++ b/src/alire-index.ads @@ -129,6 +129,9 @@ package Alire.Index is function Release return Index.Release; + function Version return Semantic_Versioning.Version; + function Version return Semantic_Versioning.Version_Set; + function This_Version return Conditional.Dependencies; function Within_Major return Conditional.Dependencies; function Within_Minor return Conditional.Dependencies; @@ -225,7 +228,7 @@ package Alire.Index is -- Chained conditional dependencies (use first available) function "or" (L, R : Release_Dependencies) return Release_Dependencies is (When_Available (L, R)); - -- In the sense of "or else": the first one that is resolvable will be taken + -- In the sense of "or else": the first one that is available will be taken function "and" (L, R : Release_Dependencies) return Release_Dependencies renames Conditional.For_Dependencies."and"; diff --git a/src/alire-platforms.ads b/src/alire-platforms.ads index c6968a51..b755dc0d 100644 --- a/src/alire-platforms.ads +++ b/src/alire-platforms.ads @@ -14,6 +14,7 @@ package Alire.Platforms with Preelaborate is -- isolate their versions type Operating_Systems is (GNU_Linux, + OSX, Windows, OS_Unknown);