Half-way through typed names

This commit is contained in:
Alejandro R Mosteo
2018-03-09 18:33:41 +01:00
parent 0f9b9473a1
commit f28c21357a
44 changed files with 296 additions and 324 deletions
+1 -4
View File
@@ -2,17 +2,14 @@ with Alire.Index.Liblua;
package Alire.Index.Ada_Lua is
Prj_Name : constant Project_Name := "ada_lua";
Prj_Desc : constant Project_Description := "An Ada binding for Lua";
Prj_Repo : constant URL := "https://github.com/alire-project/ada-lua.git";
Prj_Maintainer : constant String := "AdaCore";
Prj_Website : constant URL := "https://github.com/AdaCore/ada-lua";
V_0_0_0 : constant Release :=
Register (Prj_Name,
Register (Projects.Ada_Lua,
V ("0.0.0-5.3"),
Prj_Desc,
Git (Prj_Repo, "ba2fcbf9f8d54d3f6362f20523deb4371371f658"),
Dependencies =>
+2 -6
View File
@@ -2,8 +2,6 @@ with Alire.Index.NcursesAda;
package Alire.Index.Adacurses is
Name : constant String := "adacurses";
Desc : constant String := "Wrapper on different packagings of NcursesAda";
Repo : constant String := "https://github.com/alire-project/adacurses-wrapper.git";
Comments : constant Conditional.Properties :=
@@ -12,9 +10,8 @@ package Alire.Index.Adacurses is
Comment ("This package wraps these differences so clients can always safely use adacurses");
V_6 : constant Release :=
Register (Name,
Register (Projects.Adacurses,
V ("6.0+20170708-2"),
Desc,
Git (Repo, "4ccb20409becb50c0b5fd29effb676b650608326"),
Dependencies =>
@@ -28,9 +25,8 @@ package Alire.Index.Adacurses is
);
V_5_9 : constant Release :=
Register (Name,
Register (Projects.Adacurses,
V ("5.9+20140726-1build1"),
Desc,
Git (Repo, "4ccb20409becb50c0b5fd29effb676b650608326"),
Dependencies =>
+17 -17
View File
@@ -3,43 +3,43 @@ with Alire.Index.Simple_Logging;
package Alire.Index.Alire is
Name : constant Project_Name := "alire";
Repo : constant URL := "https://bitbucket.org/aleteolabs/alire.git";
Desc : constant Project_Description := "Alire project catalog and support files";
V_0_1_2 : constant Release :=
Register (Name,
Register (Projects.Alire,
V ("0.1.2"),
Desc,
Git (Repo, "e2dee2e147ae9e4d666567b53b108cbe61bc06e8"),
Dependencies =>
Within_Minor (Semantic_Versioning.V_0_1_2) and
Within_Major (Simple_Logging.V_1_0_0)
);
Elite_Dangerous,
Half_Life_3,
Star_Citizen,
Windows_100 : constant Projects.Names := Alire_Reserved;
-- A few fake release to spice descriptions a bit up.
Syntax_Example : constant Release :=
Register ("alire_example",
Register (Projects.Alire_Reserved,
V ("1.0.0"),
"Release with all index syntax features",
Origins.New_Filesystem ("/fake"),
Origins.New_Filesystem ("/alire"),
Dependencies =>
Current ("half_life_3") and -- unconditional
Current (Half_Life_3) and -- unconditional
On_Condition -- conditional
(Operating_System = GNU_Linux,
When_True => At_Least ("elite_horizons", V ("2.0")) and
At_Least ("star_citizen", V ("3.0")), -- Wish...
When_False => At_Least ("windows_100", V ("1.0"))) and
When_True => At_Least (Elite_Dangerous, V ("2.0")) and
At_Least (Star_Citizen, V ("3.0")), -- Wish...
When_False => At_Least (Windows_100, V ("1.0"))) and
When_Available -- Chained preferences
(Preferred => Within_Major ("alire", V ("1.0")),
Otherwise => Within_Major ("alire", V ("0.0"))) and
(Preferred => Within_Major (Projects.Alire, V ("1.0")),
Otherwise => Within_Major (Projects.Alire, V ("0.0"))) and
When_Available -- Chained preferences
(Preferred => Within_Major ("alire", V ("2.0")),
(Preferred => Within_Major (Projects.Alire, V ("2.0")),
Otherwise => When_Available -- Chained preferences multi-level
(Preferred => Within_Major ("alire_alt", V ("1.0")),
Otherwise => Within_Major ("alire", V ("0.5")))),
(Preferred => Within_Major (Projects.Alire, V ("1.0")),
Otherwise => Within_Major (Projects.Alire, V ("0.5")))),
Private_Properties => -- These are only interesting to alr, not users
GPR_External ("Profile", "False"),
+1 -5
View File
@@ -3,15 +3,11 @@ with Alire.Index.Simple_Logging;
package Alire.Index.Alr is
Name : constant Project_Name := "alr";
Repo : constant URL := "https://bitbucket.org/aleteolabs/alr.git";
Desc : constant Project_Description := "Command-line tool from the Alire project";
V_0_1_2 : constant Release :=
Register (Name,
Register (Projects.Alr,
V ("0.1.2"),
Desc,
Git (Repo, "4002536beea8aee12b455077df4dd144b409bde4"),
Dependencies =>
Within_Major (Alire.V_0_1_2) and
+1 -5
View File
@@ -1,14 +1,10 @@
package Alire.Index.APQ is
Name : constant Project_Name := "apq";
Repo : constant URL := "https://github.com/alire-project/apq.git";
Desc : constant Project_Description := "APQ Ada95 Database Library ";
V_3_2_0 : constant Release :=
Register (Name,
Register (Projects.APQ,
V ("3.2.0"),
Desc & "(core)",
Git (Repo, "3b5b4b99f528f853e02abf239da7db3d8c9962b4"),
Properties =>
GPR_Scenario ("OS", "Windows_NT" or "GNU/Linux" or "Darwin") and
+2 -6
View File
@@ -1,16 +1,12 @@
package Alire.Index.AUnit is
Prj_Name : constant Project_Name := "aunit";
Prj_Desc : constant Project_Description := "Ada unit test framework";
Prj_Repo : constant URL := "https://github.com/alire-project/libaunit.git";
Prj_Repo : constant URL := "https://github.com/alire-project/libaunit.git";
Prj_Maintainer : constant String := "AdaCore";
Prj_Website : constant URL := "https://www.adacore.com/download/more";
V_2017 : constant Release :=
Register (Prj_Name,
Register (Projects.AUnit,
V ("2017"),
Prj_Desc,
Git (Prj_Repo, "b66a41ceb35bfc81b9345655c5f46317a57de3b4"),
Properties =>
GPR_Scenario ("RUNTIME",
+22 -34
View File
@@ -10,19 +10,14 @@ package Alire.Index.DAK is
-- Since most project names are common words, I've taken the liberty to prefix them with dak_
-- but the original sources are unchanged.
Base : constant Project_Name := "dak_";
Repo : constant URL := "https://github.com/alire-project/dak_simple_components.git";
DAK_Author : constant String := "Dmitry A. Kazakov";
DAK_Website : constant String := "http://www.dmitry-kazakov.de/ada/components.htm";
Desc_Pre : constant String := "Simple Components ";
Desc_Post : constant String := " by Dmitry A. Kazakov";
Strings_Edit_V_4_27 : constant Release :=
Register (Base & "strings_edit",
Register (DAK_Strings_Edit,
V ("4.27"),
Desc_Pre & "(strings)" & Desc_Post,
Git (Repo, "8ac67a28d666dde3a0f96b5a08a7016e4f29d491"),
Properties =>
Project_File ("strings_edit.gpr") and
@@ -44,9 +39,8 @@ package Alire.Index.DAK is
);
Tables_V_4_27 : constant Release :=
Register (Base & "tables",
Register (DAK_Tables,
V ("4.27"),
Desc_Pre & "(tables)" & Desc_Post,
Git (Repo, "19205e4981d72242daf72da7d59c5faf2b4c91fd"),
Properties =>
Project_File ("tables.gpr") and
@@ -66,9 +60,8 @@ package Alire.Index.DAK is
);
Components_V_4_27 : constant Release :=
Register (Base & "components",
Register (DAK_Components,
V ("4.27"),
Desc_Pre & "(base components)" & Desc_Post,
Git (Repo, "542f02c9be86693f759fcb784a8462bc4b25f1f2"),
Dependencies =>
Within_Major (Strings_Edit_V_4_27) and
@@ -122,31 +115,29 @@ package Alire.Index.DAK is
);
Components_NTP_V_4_27 : constant Release :=
Register (Base & "components_ntp",
V ("4.27"),
Desc_Pre & "(ntp)" & Desc_Post,
Git (Repo, "34fb305d6ef360cde5e272b51409097a5de72017"),
Dependencies =>
Within_Major (Components_V_4_27),
Register (DAK_Components_NTP,
V ("4.27"),
Git (Repo, "34fb305d6ef360cde5e272b51409097a5de72017"),
Dependencies =>
Within_Major (Components_V_4_27),
Properties =>
Project_File ("components-ntp.gpr") and
Properties =>
Project_File ("components-ntp.gpr") and
Executable ("test_ntp") and
Executable ("test_ntp") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
GPR_File ("components-ntp.gpr") and
GPR_File ("test_components/components-ntp-test_ntp.gpr")
);
Private_Properties =>
GPR_File ("components-ntp.gpr") and
GPR_File ("test_components/components-ntp-test_ntp.gpr")
);
Components_Sqlite_V_4_27 : constant Release :=
Register (Base & "components_sqlite",
Register (DAK_Components_SQLite,
V ("4.27"),
Desc_Pre & "(sqlite)" & Desc_Post,
Git (Repo, "6fda0f3f7494815c87b329f7411b9a49ff97b9ba"),
Dependencies =>
Within_Major (Components_V_4_27),
@@ -168,9 +159,8 @@ package Alire.Index.DAK is
);
Components_Connections_V_4_27 : constant Release :=
Register (Base & "components_connections",
Register (DAK_Components_Connections,
V ("4.27"),
Desc_Pre & "(clients/servers)" & Desc_Post,
Git (Repo, "008935d5a89396cc0c39afb39f04bf6a89a92058"),
Dependencies =>
Within_Major (Components_V_4_27) and
@@ -229,9 +219,8 @@ package Alire.Index.DAK is
);
Components_Connections_Secure_V_4_27 : constant Release :=
Register (Base & "components_connections_secure",
Register (DAK_Components_Connections_Secure,
V ("4.27"),
Desc_Pre & "(client/servers over TLS)" & Desc_Post,
Git (Repo, "ca72cf4150ae14ba6d40c3d2dd92c7846cb4cb5d"),
Dependencies =>
Within_Major (Components_Connections_V_4_27) and
@@ -257,9 +246,8 @@ package Alire.Index.DAK is
);
Components_ODBC_V_4_27 : constant Release :=
Register (Base & "components_odbc",
Register (DAK_Components_ODBC,
V ("4.27"),
Desc_Pre & "(ODBC bindings)" & Desc_Post,
Git (Repo, "47337f8a5dd69404087129d5cca79885d6e8cd3f"),
Dependencies =>
Within_Major (Components_V_4_27) and
+1 -4
View File
@@ -2,17 +2,14 @@ with Alire.Index.GtkAda;
package Alire.Index.Eagle_Lander is
Prj_Name : constant Project_Name := "eagle_lander";
Prj_Desc : constant Project_Description := "Apollo 11 lunar lander simulator (Ada/Gtk/Cairo)";
Prj_Repo : constant URL := "https://github.com/alire-project/eagle-lander.git";
Prj_Author : constant String := "Fabien Chouteau";
Prj_Website : constant URL := "https://blog.adacore.com/make-with-ada-the-eagle-has-landed";
V_1_0 : constant Release :=
Register (Prj_Name,
Register (Projects.Eagle_Lander,
V ("1.0"),
Prj_Desc,
Git (Prj_Repo, "5a3bcc61eff4d60d2b741add7841410ce539d0b8"),
Dependencies =>
+1 -4
View File
@@ -2,17 +2,14 @@ with Alire.Index.GLUT;
package Alire.Index.Globe_3D is
Prj_Name : constant Project_Name := "globe_3d";
Prj_Desc : constant Project_Description := "GL Object Based Engine for 3D in Ada";
Prj_Repo : constant URL := "https://github.com/svn2github/GLOBE_3D.git";
Prj_Author : constant String := "Gautier de Montmollin";
Prj_Website : constant URL := "https://globe3d.sourceforge.io/";
V_20180111 : constant Release :=
Register (Prj_Name,
Register (Projects.Globe_3D,
V ("20180111"),
Prj_Desc,
Git (Prj_Repo, "93f7185130e2fb0db7f1f7e67eaf1b6ca561d651"),
Dependencies =>
+6 -11
View File
@@ -2,23 +2,18 @@ with Alire.Index.Libhello;
package Alire.Index.Hello is
Name : constant Project_Name := "hello";
Repo : constant URL := "https://bitbucket.org/aleteolabs/hello.git";
Desc : constant Project_Description := """Hello, world!"" demonstration project";
V_1_0_0 : constant Release :=
Register (Name,
Register (Projects.Hello,
V ("1.0.0"),
Desc,
Git (Repo, "8cac0afddc505794ae3e5634745ce0830129d241"),
Dependencies => Within_Major (Libhello.V_1_0_0));
Dependencies => Within_Major (Libhello.V_1_0));
V_1_0_1 : constant Release :=
Register (Name,
V ("1.0.1"),
Desc,
Git (Repo, "65725c20778875eef12b61a01b437120932965f3"),
Dependencies => Within_Major (Libhello.V_1_0_0));
Register (Projects.Hello,
V ("1.0.1"),
Git (Repo, "65725c20778875eef12b61a01b437120932965f3"),
Dependencies => Within_Major (Libhello.V_1_0));
end Alire.Index.Hello;
+3 -7
View File
@@ -2,16 +2,12 @@ with Alire.Index.AUnit;
package Alire.Index.Libadacrypt is
Prj_Name : constant Project_Name := "libadacrypt";
Prj_Desc : constant Project_Description := "A crypto library for Ada with a nice API";
Prj_Repo : constant URL := "https://github.com/alire-project/Ada-Crypto-Library.git";
Prj_Author : constant String := "Christian Forler";
Prj_Repo : constant URL := "https://github.com/alire-project/Ada-Crypto-Library.git";
Prj_Author : constant String := "Christian Forler";
V_0_8_7 : constant Release :=
Register (Prj_Name,
Register (Projects.Libadacrypt,
V ("0.8.7"),
Prj_Desc,
Git (Prj_Repo, "33d15283abbc6d8a51d717de2bd822e026710c0d"),
Dependencies =>
+5 -7
View File
@@ -1,14 +1,12 @@
package Alire.Index.Libhello is
Name : constant Project_Name := "libhello";
Repo : constant URL := "https://bitbucket.org/aleteolabs/libhello.git";
Desc : constant Project_Description := "A sample dependency for the hello project";
Desc : constant Description_String := "A sample dependency for the hello project";
V_1_0_0 : constant Release :=
Register (Name,
V ("1.0.0"),
Desc,
Git (Repo, "ce78e7706c9d3f97605df48d8befca5407f8d328"));
V_1_0 : constant Release :=
Register (Projects.Libhello,
V ("1.0"),
Git (Repo, "ce78e7706c9d3f97605df48d8befca5407f8d328"));
end Alire.Index.Libhello;
+1 -4
View File
@@ -3,17 +3,14 @@ with Alire.Index.LibX11;
package Alire.Index.OpenGLAda is
Prj_Name : constant Project_Name := "openglada";
Prj_Desc : constant Project_Description := "Thick Ada binding for OpenGL and GLFW";
Prj_Repo : constant URL := "https://github.com/flyx/OpenGLAda.git";
Prj_Author : constant String := "Felix Krause <contact@flyx.org>";
Prj_Website : constant URL := "http://flyx.github.io/OpenGLAda/";
V_0_0_0 : constant Release :=
Register (Prj_Name,
Register (Projects.OpenGLAda,
V ("0.6"),
Prj_Desc,
Git (Prj_Repo, "54a7a50cebab2cba0262c7f59b927e9ddf6e4649"),
Dependencies =>
+5 -11
View File
@@ -1,21 +1,15 @@
package Alire.Index.PragmARC is
Name : constant Project_Name := "pragmarc";
Repo : constant URL := "https://github.com/alire-project/PragmARC.git";
Desc : constant Project_Description :=
"PragmAda Reusable Components (PragmARCs), ";
Repo : constant URL := "https://github.com/alire-project/PragmARC.git";
Auth : constant String := "Jeffrey R. Carter";
Web1 : constant String := "https://github.com/jrcarter/PragmARC";
Web2 : constant String := "https://pragmada.x10hosting.com/";
V_2017 : constant Release := -- Experimental '07 version
Register (Name,
Register (Projects.PragmARC,
V ("2017.2007.0"),
Desc & "ISO/IEC 8652:2007 version",
Git (Repo, "db6c1730fe825f8303c60b48f82db08bd408588d"),
Notes => "ISO/IEC 8652:2007 version",
Properties =>
Executable ("compile_all") and
License (GMGPL_2_0) and
@@ -25,10 +19,10 @@ package Alire.Index.PragmARC is
);
V_2011 : constant Release := -- Pure Ada95 version
Register (Name,
Register (Projects.PragmARC,
V ("2011.1995.0"),
Desc & "Ada 95 version",
Git (Repo, "34b0e12b5f9aea63408c94cc48ba7a16687c8d76"),
Notes => "Ada 95 version",
Properties =>
Executable ("compile_all") and
License (GMGPL_2_0) and
+2 -6
View File
@@ -1,14 +1,10 @@
package Alire.Index.RxAda is
Name : constant Project_Name := "rxada";
Repo : constant URL := "https://bitbucket.org/amosteo/rxada";
Desc : constant Project_Description := "RxAda port of the Rx framework";
Repo : constant URL := "https://bitbucket.org/amosteo/rxada";
V_0_1_0 : constant Release :=
Register (Name,
Register (Projects.RxAda,
V ("0.1.0"),
Desc,
Hg (Repo, "361d4e2ab20a7dcca007e31bf7094d57b13fee6b"),
Properties =>
Executable ("rx-examples-basic") and
+1 -4
View File
@@ -2,16 +2,13 @@ with Alire.Index.LibSDL2;
package Alire.Index.SDLAda is
Prj_Name : constant Project_Name := "sdlada";
Prj_Desc : constant Project_Description := "Ada 2012 bindings to SDL 2";
Prj_Repo : constant URL := "https://github.com/alire-project/sdlada.git";
Prj_Author : constant String := "Luke A. Guest";
V_2_3_1 : constant Release :=
Register (Prj_Name,
Register (Projects.SDLAda,
V ("2.3.1"),
Prj_Desc,
Git (Prj_Repo, "570232193facb90a58f67aadac93df9dfae8bcd4"),
Dependencies =>
+2 -6
View File
@@ -1,14 +1,10 @@
package Alire.Index.Semantic_Versioning is
Name : constant Project_Name := "semantic_versioning";
Repo : constant URL := "https://bitbucket.org/aleteolabs/semver.git";
Desc : constant Project_Description := "Semantic Versioning for Ada";
Repo : constant URL := "https://bitbucket.org/aleteolabs/semver.git";
V_0_1_2 : constant Release :=
Register (Name,
Register (Projects.Semantic_Versioning,
V ("0.1.2"),
Desc,
Git (Repo, "09774d80fac62ea3a09d46b22d4807da530387e2"));
end Alire.Index.Semantic_Versioning;
+1 -5
View File
@@ -1,14 +1,10 @@
package Alire.Index.Simple_Logging is
Name : constant Project_Name := "simple_logging";
Repo : constant URL := "https://github.com/mosteo/simple_logging.git";
Desc : constant Project_Description := "Simple logging to console";
V_1_0_0 : constant Release :=
Register (Name,
Register (Projects.Simple_Logging,
V ("1.0.0"),
Desc,
Git (Repo, "d98242b8bd1c7f964cebc454e9b1206ffdbb0ca9"));
end Alire.Index.Simple_Logging;
+7 -7
View File
@@ -3,19 +3,18 @@ with Alire.Index.GtkAda;
package Alire.Index.Steamsky is
Prj_Name : constant Project_Name := "steamsky";
Prj_Desc : constant Project_Description := "Roguelike in sky with steampunk theme";
Prj_Repo : constant URL := "https://github.com/thindil/steamsky.git";
Prj_Repo : constant URL := "https://github.com/thindil/steamsky.git";
Prj_Author : constant String := "Bartek Jasicki";
Prj_Website : constant URL := "https://thindil.github.io/steamsky/";
V_2_1_Dev : constant Release :=
Register (Prj_Name,
Register (Projects.Steamsky,
V ("2.1-dev"),
Prj_Desc,
Git (Prj_Repo, "faee42a72506f2522d3db9c714d0b0a001c0032d"),
Notes => "GtkAda version",
Dependencies =>
Within_Major (Alire.Index.GtkAda.V_16_1),
@@ -26,11 +25,12 @@ package Alire.Index.Steamsky is
);
V_2_0_2 : constant Release :=
Register (Prj_Name,
Register (Projects.Steamsky,
V ("2.0.2"),
Prj_Desc,
Git (Prj_Repo, "8b4dd319c3199f4b770e39de13f9ef3d9020266f"),
Notes => "Console (ncurses) version",
Dependencies =>
Within_Major (Alire.Index.Adacurses.V_6),
+5 -8
View File
@@ -1,20 +1,17 @@
package Alire.Index.Template is
-- A Template with common fields ready to save-as
-- Prj_Name : constant Project_Name := "";
-- Prj_Desc : constant Project_Description := "";
-- Prj_Repo : constant URL := "";
--
-- Prj_Repo : constant URL := "";
-- Prj_Author : constant String := "";
-- Prj_Maintainer : constant String := "";
-- Prj_Website : constant URL := "";
-- V_0_0_0 : constant Release :=
-- Register (Prj_Name,
-- Register (Projects.Name,
-- V (""),
-- Prj_Desc,
-- Git (Prj_Repo, "commit"),
-- Notes => "",
-- Properties =>
-- Project_File ("") and
--
+2 -8
View File
@@ -1,19 +1,13 @@
package Alire.Index.Whitakers_Words is
-- A Template with common fields ready to save-as
Prj_Name : constant Project_Name := "whitakers_words";
Prj_Desc : constant Project_Description := "William Whitaker's WORDS, a Latin dictionary";
Prj_Repo : constant URL := "https://github.com/mk270/whitakers-words.git";
Prj_Repo : constant URL := "https://github.com/mk270/whitakers-words.git";
Prj_Author : constant String := "William A. Whitaker";
Prj_Maintainer : constant String := "Martin Keegan";
Prj_Website : constant URL := "http://mk270.github.io/whitakers-words/";
V_2017_09_10 : constant Release :=
Register (Prj_Name,
Register (Projects.Whitakers_Words,
V ("2017.09.10"),
Prj_Desc,
Git (Prj_Repo, "27be95b8a06d7b22c0600c824cf929ab43efcf25"),
Properties =>
Project_File ("words.gpr") and
+49 -3
View File
@@ -1,9 +1,17 @@
package Alire.Projects is
with Alire.Utils;
package Alire.Projects with Preelaborate is
-----------
-- Names --
-----------
-- Full list in alphabetical order
type Names is
(Ada_Lua,
Adacurses,
Alire,
Alire_Reserved, -- Special release for internal use
Alr,
APQ,
AUnit,
@@ -19,11 +27,21 @@ package Alire.Projects is
Eagle_Lander,
-------
-- G --
-------
Globe_3D,
GLUT,
GtkAda,
Hello,
-------
-- L --
-------
Libadacrypt,
Libglfw3,
LibGNUTLS,
Libhello,
@@ -50,7 +68,17 @@ package Alire.Projects is
Whitakers_Words);
function Description (Name : Names) return Project_Description is
-----------
-- Image --
-----------
function Image (Name : Names) return String;
-----------------
-- Description --
-----------------
function Description (Name : Names) return Description_String is
(case Name is
when Ada_Lua =>
"An Ada binding for Lua",
@@ -58,10 +86,12 @@ package Alire.Projects is
"Wrapper on different packagings of NcursesAda",
when Alire =>
"Alire project catalog and support files",
when Alire_Reserved =>
"Alire internal",
when Alr =>
"Command-line tool from the Alire project",
when APQ =>
"APQ Ada95 Database Library ",
"APQ Ada95 Database Library (core)",
when AUnit
=> "Ada unit test framework",
@@ -85,14 +115,26 @@ package Alire.Projects is
when Eagle_Lander =>
"Apollo 11 lunar lander simulator (Ada/Gtk/Cairo)",
-------
-- G --
-------
when Globe_3D =>
"GL Object Based Engine for 3D in Ada",
when GLUT =>
"OpenGL Utility Toolkit",
when GtkAda =>
"Ada binding for the GTK+ GUI",
when Hello =>
"""Hello, world!"" demonstration project",
-------
-- L --
-------
when Libadacrypt =>
"A crypto library for Ada with a nice API",
when Libglfw3 =>
"Portable library for OpenGL, window and input",
when LibGNUTLS =>
@@ -137,4 +179,8 @@ package Alire.Projects is
when Whitakers_Words =>
"William Whitaker's WORDS, a Latin dictionary");
private
function Image (Name : Names) return String is (Utils.To_Lower_Case (Name'Img));
end Alire.Projects;
+1 -5
View File
@@ -1,12 +1,8 @@
package Alire.Index.GLUT is
Name : constant String := "glut";
Desc : constant String := "OpenGL Utility Toolkit";
V_2_8_1 : constant Release :=
Register (Name,
Register (Projects.GLUT,
V ("2.8.1-3"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("freeglut3-dev"),
others => Unavailable)));
+1 -5
View File
@@ -1,12 +1,8 @@
package Alire.Index.GtkAda is
Name : constant String := "gtkada";
Desc : constant String := "Ada binding for the GTK+ GUI";
V_16_1 : constant Release :=
Register (Name,
Register (Projects.GtkAda,
V ("16.1"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libgtkada16.1.0-dev"),
others => Unavailable)),
+1 -7
View File
@@ -1,15 +1,9 @@
package Alire.Index.Libglfw3 is
Name : constant String := "libglfw3";
Desc : constant String := "Portable library for OpenGL, window and input";
V_3 : constant Release :=
Register (Name,
Register (Projects.Libglfw3,
V ("3"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libglfw3-dev"),
others => Unavailable)));
-- Note: the minor version will change with versions of distributions.
-- If this proved to be a problem several releases should be isolated using the Version property
end Alire.Index.Libglfw3;
+1 -5
View File
@@ -1,12 +1,8 @@
package Alire.Index.LibGNUTLS is
Name : constant String := "libgnutls";
Desc : constant String := "GNU TLS library";
V_3_5_8 : constant Release :=
Register (Name,
Register (Projects.LibGNUTLS,
V ("3.5.8"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libgnutls28-dev"),
others => Unavailable)));
+4 -8
View File
@@ -1,13 +1,9 @@
package Alire.Index.Liblua is
Name : constant String := "liblua";
Desc : constant String := "Development files for the Lua language";
V_5_3 : constant Release :=
Register (Name,
V ("5.3"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("liblua5.3-dev"),
others => Unavailable)));
Register (Projects.Liblua,
V ("5.3"),
Native ((Debian | Ubuntu => Packaged_As ("liblua5.3-dev"),
others => Unavailable)));
end Alire.Index.Liblua;
+3 -8
View File
@@ -1,25 +1,20 @@
package Alire.Index.LibSDL2 is
SDL_V_2 : constant Release :=
Register ("libsdl2",
Register (Projects.LibSDL2,
V ("2"),
"Simple DirectMedia Layer development files",
Native ((Debian | Ubuntu => Packaged_As ("libsdl2-dev"),
others => Unavailable)));
-- Note: the minor version will change with versions of distributions.
-- If this proved to be a problem several releases should be isolated using the Version property
SDL_Image_V_2 : constant Release :=
Register ("libsdl2_image",
Register (LibSDL2_Image,
V ("2"),
"Image loading library for Simple DirectMedia Layer 2",
Native ((Debian | Ubuntu => Packaged_As ("libsdl2-image-dev"),
others => Unavailable)));
SDL_TTF_V_2 : constant Release :=
Register ("libsdl2_ttf",
Register (LibSDL2_TTF,
V ("2"),
"TrueType Font library for Simple DirectMedia Layer 2",
Native ((Debian | Ubuntu => Packaged_As ("libsdl2-ttf-dev"),
others => Unavailable)));
+1 -7
View File
@@ -1,15 +1,9 @@
package Alire.Index.LibX11 is
Name : constant String := "libx11";
Desc : constant String := "X11 client-side library";
V_2 : constant Release :=
Register (Name,
Register (Projects.LibX11,
V ("2"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libx11-dev"),
others => Unavailable)));
-- Note: the minor version will change with versions of distributions.
-- If this proved to be a problem several releases should be isolated using the Version property
end Alire.Index.LibX11;
+1 -5
View File
@@ -1,12 +1,8 @@
package Alire.Index.Native_Template is
-- Name : constant String := "";
-- Desc : constant String := "";
--
-- V : constant Release :=
-- Register (Name,
-- Register (Projects.Name
-- V (""),
-- Desc,
-- Native ((Debian | Ubuntu => Packaged_As (""),
-- others => Unavailable)));
+2 -7
View File
@@ -1,12 +1,8 @@
package Alire.Index.NcursesAda is
Name : constant String := "ncursesada";
Desc : constant String := "Ada binding to the ncurses text interface library";
V_5 : constant Release :=
Register (Name,
Register (Projects.NcursesAda,
V ("5.0.0+6.0.20170708-2"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libncursesada5-dev"),
others => Unavailable)),
@@ -15,9 +11,8 @@ package Alire.Index.NcursesAda is
);
V_3 : constant Release :=
Register (Name,
Register (Projects.NcursesAda,
V ("3.0.0+5.9.20140726-1build1"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("libncursesada3-dev"),
others => Unavailable)),
+1 -5
View File
@@ -1,12 +1,8 @@
package Alire.Index.UnixODBC is
Name : constant String := "unixodbc";
Desc : constant String := "Open Database Connectivity drivers";
V_2_3 : constant Release :=
Register (Name,
Register (Projects.UnixODBC,
V ("2.3"),
Desc,
Native ((Debian | Ubuntu => Packaged_As ("unixodbc-dev"),
others => Unavailable)),
Properties =>
+1 -1
View File
@@ -7,7 +7,7 @@ package body Alire.Containers is
function To_Map (R : Releases.Release) return Release_Map is
begin
return M : Release_Map do
M.Include (R.Project, R);
M.Include (R.Name, R);
end return;
end To_Map;
+3 -2
View File
@@ -3,6 +3,7 @@ with Ada.Containers.Indefinite_Ordered_Maps;
with Ada.Containers.Indefinite_Ordered_Sets;
with Alire.Milestones;
with Alire.Projects;
with Alire.Releases;
with Semantic_Versioning;
@@ -25,12 +26,12 @@ package Alire.Containers with Preelaborate is
package Project_Version_Maps is new Ada.Containers.Indefinite_Ordered_Maps
(Project_Name, Semantic_Versioning.Version, "<", Semantic_Versioning."<");
(Name_String, Semantic_Versioning.Version, "<", Semantic_Versioning."<");
subtype Version_Map is Project_Version_Maps.Map;
package Project_Release_Maps is new Ada.Containers.Indefinite_Ordered_Maps
(Project_Name, Releases.Release, "<", Releases."=");
(Projects.Names, Releases.Release, Projects."<", Releases."=");
subtype Release_Map is Project_Release_Maps.Map;
function To_Map (R : Releases.Release) return Release_Map;
+3 -3
View File
@@ -17,7 +17,7 @@ package Alire.Dependencies.Vectors with Preelaborate is
-- Creation of dependency vectors
function New_Dependency (Name : Project_Name;
function New_Dependency (Name : Names;
Versions : Semantic_Versioning.Version_Set) return Vector;
function "and" (Dep1, Dep2 : Vector) return Vector is (Dep1 & Dep2);
@@ -33,9 +33,9 @@ private
-- New_Dependency --
--------------------
function New_Dependency (Name : Project_Name;
function New_Dependency (Name : Names;
Versions : Semantic_Versioning.Version_Set) return Vector is
(To_Vector ((Name'Length, Name, To_Holder (Versions)), 1));
(To_Vector ((Name, To_Holder (Versions)), 1));
--------------------
-- Image_One_Line --
+14 -8
View File
@@ -2,18 +2,23 @@ private with Ada.Containers.Indefinite_Holders;
limited with Alire.Dependencies.Vectors;
with Alire.Projects;
with Alire.Utils;
with Semantic_Versioning;
package Alire.Dependencies with Preelaborate is
subtype Names is Projects.Names;
-- A single dependency is a project name plus a version set
type Dependency (<>) is tagged private;
function New_Dependency (Name : Project_Name;
function New_Dependency (Name : Names;
Versions : Semantic_Versioning.Version_Set) return Dependency;
function Project (Dep : Dependency) return Project_Name;
function Project (Dep : Dependency) return Names;
function Versions (Dep : Dependency) return Semantic_Versioning.Version_Set;
@@ -31,21 +36,22 @@ private
type Version_Set_Holder is new Version_Holders.Holder with null record;
type Dependency (Name_Len : Positive) is tagged record
Project : Project_Name (1 .. Name_Len);
type Dependency is tagged record
Project : Projects.Names;
Versions_H : Version_Set_holder;
end record;
function New_Dependency (Name : Project_Name;
function New_Dependency (Name : Names;
Versions : Semantic_Versioning.Version_Set) return Dependency
is ((Name'Length, Name, To_Holder (Versions)));
is ((Name, To_Holder (Versions)));
function Project (Dep : Dependency) return Project_Name is (Dep.Project);
function Project (Dep : Dependency) return Names is (Dep.Project);
function Versions (Dep : Dependency) return Semantic_Versioning.Version_Set is
(Dep.Versions_H.Element);
function Image (Dep : Dependency) return String is
(Dep.Project & " is " & Semantic_Versioning.Image (Dep.Versions_H.Element));
(Utils.To_Lower_Case (Dep.Project'Img) & " is " &
Semantic_Versioning.Image (Dep.Versions_H.Element));
end Alire.Dependencies;
+31 -13
View File
@@ -9,7 +9,19 @@ package body Alire.Index is
-- Exists --
------------
function Exists (Project : Project_Name;
function Exists (Project : Name_String) return Boolean is
begin
return Names'Value (Project) = Alire_Reserved or else True;
exception
when others =>
return False;
end Exists;
------------
-- Exists --
------------
function Exists (Project : Name_String;
Version : Semantic_Versioning.Version)
return Boolean is
begin
@@ -26,7 +38,7 @@ package body Alire.Index is
-- Find --
----------
function Find (Project : Project_Name;
function Find (Project : Name_String;
Version : Semantic_Versioning.Version) return Release is
begin
for R of Catalog loop
@@ -43,17 +55,17 @@ package body Alire.Index is
--------------
function Register (-- Mandatory
Project : Project_Name;
Version : Semantic_Versioning.Version;
Description : Project_Description;
Origin : Origins.Origin;
-- Barrier
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
Project : Names;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
-- Optional
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
Available_When : Alire.Requisites.Tree := No_Requisites)
Notes : Description_String := "";
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
Available_When : Release_Requisites := No_Requisites)
return Release
is
pragma Unreferenced (XXXXXXXXXXXXXX);
@@ -61,9 +73,9 @@ package body Alire.Index is
begin
return Rel : constant Alire.Releases.Release :=
Alire.Releases.New_Release (Project,
Description,
Version,
Origin,
Notes,
Dependencies,
Properties => Properties,
Private_Properties => Private_Properties,
@@ -97,4 +109,10 @@ package body Alire.Index is
return Path;
end To_Native;
-----------
-- Value --
-----------
function Value (Project : Name_String) return Names is (Names'Value (Project));
end Alire.Index;
+15 -8
View File
@@ -7,6 +7,7 @@ with Alire.GPR;
with Alire.Licensing;
with Alire.Origins;
with Alire.Platforms;
with Alire.Projects;
with Alire.Properties;
with Alire.Properties.Labeled;
with Alire.Properties.Licenses;
@@ -32,6 +33,7 @@ package Alire.Index is
-- Index types --
-----------------
subtype Names is Projects.Names;
subtype Release_Dependencies is Conditional.Dependencies;
subtype Release_Properties is Conditional.Properties;
subtype Release_Requisites is Requisites.Tree;
@@ -43,13 +45,13 @@ package Alire.Index is
subtype Release is Alire.Releases.Release;
function Register (-- Mandatory
Project : Project_Name;
Project : Names;
Version : Semantic_Versioning.Version;
Description : Project_Description;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
-- Optional
Notes : Description_String := "";
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
@@ -69,17 +71,22 @@ package Alire.Index is
-- BASIC QUERIES --
---------------------
function Exists (Project : Name_String) return Boolean;
function Exists (Project : Project_Name;
function Exists (Project : Name_String;
Version : Semantic_Versioning.Version)
return Boolean;
function Find (Project : Project_Name;
function Find (Project : Name_String;
Version : Semantic_Versioning.Version) return Release;
function Value (Project : Name_String) return Names;
------------------------
-- INDEXING SUPPORT --
------------------------
use all type Projects.Names;
-- Shortcuts for origins:
@@ -103,7 +110,7 @@ package Alire.Index is
function V (Semantic_Version : String) return Semver.Version
renames Semver.Relaxed;
function On (Name : Project_Name;
function On (Name : Names;
Versions : Semver.Version_Set)
return Conditional.Dependencies renames Releases.On;
@@ -118,7 +125,7 @@ package Alire.Index is
-- A never available release
function Current (R : Release) return Release_Dependencies is
(On (R.Project, Semver.Within_Major (R.Version)));
(On (R.Name, Semver.Within_Major (R.Version)));
-- Within the major of R,
-- it will accept the newest/oldest version according to the resolution policy (by default, newest)
@@ -135,7 +142,7 @@ package Alire.Index is
subtype Version is Semantic_Versioning.Version;
subtype Version_Set is Semantic_Versioning.Version_Set;
function Current (P : Project_Name) return Release_Dependencies is (On (P, Semver.Any));
function Current (P : Names) return Release_Dependencies is (On (P, Semver.Any));
-- These take a project name and a semantic version (see V above)
function Within_Major is new Releases.From_Names (Semver.Within_Major);
@@ -249,7 +256,7 @@ package Alire.Index is
function Word_Size is new Requisites.Platform.Word_Sizes.Factory;
use all type Requisites.Platform.Word_Sizes.Comparable;
function Set_Root_Release (Project : Alire.Project_Name;
function Set_Root_Release (Project : Alire.Name_String;
Version : Semantic_Versioning.Version;
Dependencies : Conditional.Dependencies := No_Dependencies)
return Release renames Root_Release.Set;
+11 -7
View File
@@ -1,3 +1,5 @@
with Alire.Projects;
with Semantic_Versioning;
package Alire.Milestones with Preelaborate is
@@ -6,10 +8,10 @@ package Alire.Milestones with Preelaborate is
function "<" (L, R : Milestone) return Boolean;
function New_Milestone (Name : Project_Name;
function New_Milestone (Name : Projects.Names;
Version : Semantic_Versioning.Version) return Milestone;
function Project (M : Milestone) return Project_Name;
function Project (M : Milestone) return Name_String;
function Version (M : Milestone) return Semantic_Versioning.Version;
@@ -17,8 +19,10 @@ package Alire.Milestones with Preelaborate is
private
type Milestone (Name_Len : Positive) is tagged record
Name : Project_Name (1 .. Name_Len);
use all type Projects.Names;
type Milestone is tagged record
Name : Projects.Names;
Version : Semantic_Versioning.Version;
end record;
@@ -27,11 +31,11 @@ private
function "<" (L, R : Milestone) return Boolean is
(L.Name < R.Name or else (L.Name = R.Name and then L.Version < R.Version));
function New_Milestone (Name : Project_Name;
function New_Milestone (Name : Projects.Names;
Version : Semantic_Versioning.Version) return Milestone is
(Name'Length, Name, Version);
(Name, Version);
function Project (M : Milestone) return Project_Name is (M.Name);
function Project (M : Milestone) return Name_String is (Projects.Image (M.Name));
function Version (M : Milestone) return Semantic_Versioning.Version is (M.Version);
+7 -3
View File
@@ -166,6 +166,10 @@ package body Alire.Releases is
-- MILESTONE
Put_Line (R.Milestone.Image & ": " & R.Description);
if R.Notes /= "" then
Put_Line ("Notes: " & R.Notes);
end if;
-- ORIGIN
if R.Origin.Is_Native then
Put_Line ("Origin (native package):");
@@ -242,12 +246,12 @@ package body Alire.Releases is
function Whenever (R : Release; P : Properties.Vector) return Release is
begin
return Solid : constant Release (R.Name_Len, R.Descr_Len) :=
(R.Name_Len, R.Descr_Len,
return Solid : constant Release (R.Descr_Len) :=
(R.Descr_Len,
R.Name,
R.Description,
R.Version,
R.Origin,
R.Notes,
R.Dependencies.Evaluate (P),
R.Properties.Evaluate (P),
R.Priv_Props.Evaluate (P),
+37 -23
View File
@@ -3,6 +3,7 @@ with Alire.Dependencies;
with Alire.Dependencies.Vectors;
with Alire.Milestones;
with Alire.Origins;
with Alire.Projects;
with Alire.Properties;
with Alire.Properties.Labeled;
with Alire.Requisites;
@@ -16,10 +17,10 @@ package Alire.Releases with Preelaborate is
type Release (<>) is tagged private;
function New_Release (Name : Project_Name;
Description : Project_Description;
function New_Release (Name : Projects.Names;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String;
Dependencies : Conditional.Dependencies;
Properties : Conditional.Properties;
Private_Properties : Conditional.Properties;
@@ -31,10 +32,14 @@ package Alire.Releases with Preelaborate is
-- Materialize conditions in a Release once the whatever properties are known
-- At present dependencies and properties
function Project (R : Release) return Project_Name;
function Description (R : Release) return Project_Description;
function Name (R : Release) return Projects.Names;
function Project (R : Release) return Name_String;
function Notes (R : Release) return Description_String; -- Specific to release
function Version (R : Release) return Semantic_Versioning.Version;
function Description (R : Release) return Description_String;
-- The global project description
function Depends (R : Release;
P : Properties.Vector)
return Dependencies.Vector;
@@ -91,7 +96,7 @@ package Alire.Releases with Preelaborate is
-- Dependency generation helpers for all semantic versioning functions:
-- These are here to avoid a 'body not seen' Program_Error if they were in Index
function On (Name : Project_Name;
function On (Name : Projects.Names;
Versions : Semantic_Versioning.Version_Set)
return Conditional.Dependencies;
@@ -101,7 +106,7 @@ package Alire.Releases with Preelaborate is
generic
with function Condition (V : Semantic_Versioning.Version) return Semantic_Versioning.Version_Set;
function From_Names (P : Project_Name;
function From_Names (P : Projects.Names;
V : Semantic_Versioning.Version) return Conditional.Dependencies;
function Unavailable return Conditional.Dependencies;
@@ -109,19 +114,22 @@ package Alire.Releases with Preelaborate is
private
use all type Projects.Names;
function All_Properties (R : Release) return Conditional.Properties;
function Unavailable return Conditional.Dependencies is
(On ("alire_unavailable", Semantic_Versioning.Any));
(On (Alire_Reserved, Semantic_Versioning.Any));
use Alire.Properties;
function Comment is new Alire.Properties.Labeled.Cond_New_Label (Alire.Properties.Labeled.Comment);
function Describe is new Alire.Properties.Labeled.Cond_New_Label (Alire.Properties.Labeled.Description);
type Release (Name_Len, Descr_Len : Natural) is tagged record
Name : Project_Name (1 .. Name_Len);
Description : Project_Description (1 .. Descr_Len);
type Release (Descr_Len : Natural) is tagged record
Name : Projects.Names;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String (1 .. Descr_Len);
Dependencies : Conditional.Dependencies;
Properties : Conditional.Properties;
Priv_Props : Conditional.Properties;
@@ -130,21 +138,25 @@ private
use all type Conditional.Properties;
function New_Release (Name : Project_Name;
Description : Project_Description;
function New_Release (Name : Projects.Names;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String;
Dependencies : Conditional.Dependencies;
Properties : Conditional.Properties;
Private_Properties : Conditional.Properties;
Available : Alire.Requisites.Tree) return Release is
(Name'Length, Description'Length,
(Notes'Length,
Name,
Description,
Version,
Version,
Origin,
Notes,
Dependencies,
Describe (Description) and Properties,
Describe (Projects.Description (Name)) and
(if Notes /= ""
then Comment (notes)
else Conditional.For_Properties.Empty) and
Properties,
Private_Properties,
Available);
@@ -158,8 +170,10 @@ private
L.Version = R.Version and then
Build (L.Version) < Build (R.Version)));
function Project (R : Release) return Project_Name is (R.Name);
function Description (R : Release) return Project_Description is (R.Description);
function Name (R : Release) return Projects.Names is (R.Name);
function Project (R : Release) return Name_String is (Projects.Image (R.Name));
function Description (R : Release) return Description_String is (Projects.Description (R.Name));
function Notes (R : Release) return Description_String is (R.Notes);
function Version (R : Release) return Semantic_Versioning.Version is (R.Version);
function Depends (R : Release;
@@ -173,11 +187,11 @@ private
(Milestones.New_Milestone (R.Name, R.Version));
function Default_Executable (R : Release) return String is
(R.Name & OS_Lib.Exe_Suffix);
(R.Project & OS_Lib.Exe_Suffix);
use all type Origins.Kinds;
function Image (R : Release) return Folder_String is
(R.Name & "_" &
(R.Project & "_" &
Image (R.Version) & "_" &
(case R.Origin.Kind is
when Filesystem => "filesystem",
@@ -188,16 +202,16 @@ private
-- Dependency helpers
function On (Name : Project_Name;
function On (Name : Projects.Names;
Versions : Semantic_Versioning.Version_Set)
return Conditional.Dependencies is
(Conditional.For_Dependencies.New_Value -- A conditional (without condition) dependency vector
(Dependencies.Vectors.New_Dependency (Name, Versions))); -- A dependency vector
function From_Release (R : Release) return Conditional.Dependencies is
(On (R.Project, Condition (R.Version)));
(On (R.Name, Condition (R.Version)));
function From_Names (P : Project_Name;
function From_Names (P : Projects.Names;
V : Semantic_Versioning.Version) return Conditional.Dependencies is
(On (P, Condition (V)));
+11 -11
View File
@@ -4,6 +4,7 @@ with Ada.Directories;
with Alire.Containers;
with Alire.Index;
with Alire.Origins;
with Alire.Projects;
with Alire.Requisites;
package body Alire.Root_Release is
@@ -30,24 +31,23 @@ package body Alire.Root_Release is
-- Set --
---------
function Set (Project : Alire.Project_Name;
function Set (Project : Alire.Name_String;
Version : Semantic_Versioning.Version;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty)
return Releases.Release
is
use Origins;
Descr : constant String := "working copy of " & Project;
Rel : constant Releases.Release :=
Alire.Releases.New_Release (Project,
Descr (Descr'First .. Descr'First - 1 +
Natural'Min (Descr'Length, Max_Description_Length)),
Version,
New_Filesystem (Ada.Directories.Current_Directory),
Dependencies,
Properties => Index.No_Properties,
Private_Properties => Index.No_Properties,
Available => Requisites.No_Requisites);
Alire.Releases.New_Release
(Projects.Alire_Reserved,
Version => Version,
Origin => New_Filesystem (Ada.Directories.Current_Directory),
Notes => "Unindexed working copy",
Dependencies => Dependencies,
Properties => Index.No_Properties,
Private_Properties => Index.No_Properties,
Available => Requisites.No_Requisites);
begin
if Index.Exists (Project, Version) then
-- This is done to ensure that properties are all available
+2 -2
View File
@@ -7,8 +7,8 @@ package Alire.Root_Release is
-- When alr self-compiles it inserts a call to this function, so the dependency root is stablished
function Set (Project : Project_Name;
Version : Semantic_Versioning.Version;
function Set (Project : Name_String;
Version : Semantic_Versioning.Version;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty)
return Releases.Release;
-- This function must be called in the working project alire file.
+8 -9
View File
@@ -10,17 +10,16 @@ package Alire with Preelaborate is
Max_Name_Length : constant := 72; -- Github maximum is 100 and bitbucket 128, but since Description is 72...
Max_Description_Length : constant := 72; -- Git line recommendation (although it's 50 for subject line)
-- Basics of projects: Name and Description
-- Rest of properties are grouped in the Index
-- Strings that are used quite generally
subtype Project_Name is String with Dynamic_Predicate =>
Project_Name'Length >= 3 and then
Project_Name'Length <= Max_Name_Length and then
Project_Name (Project_Name'First) /= '_' and then
(for all C of Project_Name => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_');
subtype Name_String is String with Dynamic_Predicate =>
Name_String'Length >= 3 and then
Name_String'Length <= Max_Name_Length and then
Name_String (Name_String'First) /= '_' and then
(for all C of Name_String => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_');
subtype Project_Description is String with Dynamic_Predicate =>
Project_Description'Length <= Max_Description_Length;
subtype Description_String is String with Dynamic_Predicate =>
Description_String'Length <= Max_Description_Length;
subtype Folder_String is String with Dynamic_Predicate =>
Folder_String'Length > 0 and then