Release extensions mostly working

This commit is contained in:
Alejandro R. Mosteo
2018-03-25 23:48:27 +02:00
parent 7cb2298589
commit 22c84d89e3
51 changed files with 800 additions and 963 deletions
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.Liblua;
package Alire.Index.Ada_Lua is
function Project is new Catalogued_Project (Projects.Ada_Lua);
function Project is new Catalogued_Project ("ada_lua",
"An Ada binding for Lua");
Prj_Repo : constant URL := "https://github.com/alire-project/ada-lua.git";
Prj_Maintainer : constant String := "AdaCore";
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.NcursesAda;
package Alire.Index.Adacurses is
function Project is new Catalogued_Project (Projects.Adacurses);
function Project is new Catalogued_Project ("adacurses",
"Wrapper on different packagings of NcursesAda");
Repo : constant String := "https://github.com/alire-project/adacurses-wrapper.git";
+46 -42
View File
@@ -1,54 +1,19 @@
with Alire.Index.AUnit;
with Alire.Index.DAK_Components;
with Alire.Index.Simple_Components;
package Alire.Index.AdaYaml is
function Project is new Catalogued_Project (Projects.AdaYaml);
function Project is new Catalogued_Project ("adayaml",
"Experimental YAML 1.3 implementation in Ada");
function Server is new Extension (Base => Project,
Name => "server",
Description => "Server component");
Prj_Repo : constant URL := "https://github.com/yaml/AdaYaml.git";
Prj_Author : constant String := "Felix Krause";
Prj_Website : constant URL := "https://ada.yaml.io/";
V_0_3 : constant Release :=
Project.Register
(V ("0.3"),
Git (Prj_Repo, "2017a7c2523499c03b8d7fe06546a5a8bae6476d"),
Dependencies =>
AUnit.Project >= AUnit.V_2017,
Properties =>
Project_File ("yaml.gpr") and
Project_File ("yaml-utils.gpr") and
Project_File ("yaml-annotation_processor.gpr") and
GPR_Scenario ("Mode", "debug" or "release") and
Author (Prj_Author) and
Website (Prj_Website) and
License (MIT),
Private_Properties =>
Project_File ("yaml-tests.gpr") and
Executable ("yaml-lexer-harness") and
Executable ("yaml-parser-harness")
);
Server_V_0_3 : constant Release :=
Project.Register
(Parent => V_0_3,
Variant => "server",
Notes => "Server component",
Dependencies =>
DAK_Components.Components_Connections_V_4_27.Within_Major,
Properties =>
Project_File ("yaml-server.gpr") and
Executable ("server")
);
V_0_2 : constant Release :=
Project.Register
(V ("0.2"),
@@ -74,4 +39,43 @@ package Alire.Index.AdaYaml is
Executable ("yaml-parser-harness")
);
V_0_3 : constant Release :=
Project.Register
(V ("0.3"),
Git (Prj_Repo, "2017a7c2523499c03b8d7fe06546a5a8bae6476d"),
Dependencies =>
AUnit.Project >= AUnit.V_2017,
Properties =>
Project_File ("yaml.gpr") and
Project_File ("yaml-annotation_processor.gpr") and
Project_File ("yaml-utils.gpr") and
GPR_Scenario ("Mode", "debug" or "release") and
Author (Prj_Author) and
Website (Prj_Website) and
License (MIT),
Private_Properties =>
Project_File ("yaml-tests.gpr") and
Executable ("yaml-dumping_tests-harness") and
Executable ("yaml-loading_tests-harness") and
Executable ("yaml-transformation_tests-harness")
);
Server_V_0_3 : constant Release :=
Server.Register
(V_0_3
.Extending
(Properties =>
Project_File ("yaml-server.gpr") and
Executable ("yaml-server"),
Dependencies =>
Simple_Components.Connections_V_4_27.Within_Major));
end Alire.Index.AdaYaml;
+33 -20
View File
@@ -3,46 +3,59 @@ with Alire.Index.Simple_Logging;
package Alire.Index.Alire is
function Project is new Catalogued_Project (Projects.Alire);
function Project is new Catalogued_Project ("alire",
"Alire project catalog and support files");
Repo : constant URL := "https://github.com/alire-project/alire.git";
V_0_2 : constant Release :=
Project.Register
(V ("0.2"),
Git (Repo, "5ba81ba33dfeb184b2e644ef2996200b5fdd6ae4"),
Dependencies =>
Semantic_Versioning.V_0_2.Within_Minor and
Simple_Logging.V_1_0.Within_Major);
V_0_1_2 : constant Release :=
Project.Register
(V ("0.1.2"),
Git (Repo, "e2dee2e147ae9e4d666567b53b108cbe61bc06e8"),
Properties =>
Author ("Alejandro R. Mosteo") and
License (GPL_3_0),
Dependencies =>
Semantic_Versioning.V_0_1_2.Within_Minor and
Simple_Logging.V_1_0.Within_Major);
function Example_Project is new Catalogued_Project (Projects.Alire);
V_0_2 : constant Release :=
Project.Register
(V_0_1_2
.Upgrading
(V ("0.2"),
Git (Repo, "5ba81ba33dfeb184b2e644ef2996200b5fdd6ae4")));
Elite_Dangerous,
Half_Life_3,
Star_Citizen,
Windows_100 : Catalog_Entry := Example_Project;
-- A few fake release to spice descriptions a bit up.
-- Although they're seen as "Alire" in textual dumps
-- function Example_Project is new Catalogued_Project ("alire_indexing_example",
-- "Demo of dependencies/properties/conditionals in alire-index-alire.ads");
-- function Elite_Dangerous is new Catalogued_Project ("elite_dangerous",
-- "Elite: Dangerous");
-- function Half_Life is new Catalogued_Project ("half_life",
-- "Half-Life franchise");
-- function Star_Citizen is new Catalogued_Project ("star_citizen",
-- "Star Citizen and Squadron 42 humongousware");
-- function Windows_3000 is new Catalogued_Project ("windows_3000",
-- "Next-gen operating system for the brainz");
-- A few fake projects to spice descriptions a bit up.
function Example_Project return Catalog_Entry renames Project;
function Elite_Dangerous return Catalog_Entry renames Project;
function Half_Life return Catalog_Entry renames Project;
function Star_Citizen return Catalog_Entry renames Project;
function Windows_3000 return Catalog_Entry renames Project;
Syntax_Example : constant Release :=
Example_Project.Register
Example_Project.Bypass
(V ("0.0.1"),
Origins.New_Filesystem ("/alire"),
Notes => "Mock release with examples of complex conditions",
Dependencies =>
Half_Life_3.Current and -- unconditional
Half_Life >= "3.0" and -- unconditional
On_Condition -- conditional
(Operating_System = GNU_Linux,
When_True => Elite_Dangerous >= "2.0" and Star_Citizen >= V ("3.0"), -- Wish...
When_False => Windows_100 > V ("1.0")) and
When_False => Windows_3000 > V ("1.0")) and
When_Available -- Chained preferences
(Preferred => Within_Major (Alire.Project, V ("1.0"))) and -- or dot notation
When_Available -- Chained preferences
@@ -50,7 +63,7 @@ package Alire.Index.Alire is
Otherwise => When_Available -- Chained preferences multi-level
(Preferred => Within_Major (Alire.Project, V ("1.0")),
Otherwise => Alire.Project.Within_Major ("0.5"))) and -- V () is optional
(Star_Citizen >= "4.0" or Half_Life_3 >= "1.0"), -- Chained preferences, takes first
(Star_Citizen >= "4.0" or Half_Life >= "3.0"), -- Chained preferences, takes first
Private_Properties => -- These are only interesting to alr, not users
GPR_External ("Profile", "False"),
+13 -10
View File
@@ -3,24 +3,27 @@ with Alire.Index.Simple_Logging;
package Alire.Index.Alr is
function Project is new Catalogued_Project (Projects.Alr);
function Project is new Catalogued_Project ("alr",
"Command-line tool from the Alire project");
Repo : constant URL := "https://github.com/alire-project/alr.git";
V_0_2 : constant Release :=
Project.Register
(V ("0.2"),
Git (Repo, "481a22aceb07242cabaefedbb41b2d6fe7a8bd1e"),
Dependencies =>
Alire.V_0_2.Within_Minor and
Simple_Logging.V_1_0.Within_Major);
V_0_1_2 : constant Release :=
Project.Register
(V ("0.1.2"),
Git (Repo, "4002536beea8aee12b455077df4dd144b409bde4"),
Dependencies =>
Alire.V_0_1_2.Within_Minor and
Simple_Logging.V_1_0.Within_Major);
Simple_Logging.V_1_0.Within_Major,
Properties =>
Author ("Alejandro R. Mosteo") and
License (GPL_3_0));
V_0_2 : constant Release :=
Project.Register
(V_0_1_2.Upgrading
(V ("0.2"),
Git (Repo, "481a22aceb07242cabaefedbb41b2d6fe7a8bd1e")));
end Alire.Index.Alr;
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.APQ is
function Project is new Catalogued_Project (Projects.APQ);
function Project is new Catalogued_Project ("apq",
"APQ Ada95 Database Library (core)");
Repo : constant URL := "https://github.com/alire-project/apq.git";
+9 -7
View File
@@ -1,10 +1,14 @@
package Alire.Index.AUnit is
function Project is new Catalogued_Project (Projects.AUnit);
function Project is new Catalogued_Project ("aunit",
"Ada unit test framework");
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";
Prj_Repo : constant URL := "https://github.com/alire-project/libaunit.git";
Common_Properties : constant Release_Properties :=
Maintainer ("AdaCore") and
Website ("https://www.adacore.com/download/more") and
License (GPL_3_0);
V_2017 : constant Release :=
Project.Register
@@ -22,9 +26,7 @@ package Alire.Index.AUnit is
Executable ("test_calculator") and
Executable ("test_math") and
Maintainer (Prj_Maintainer) and
Website (Prj_Website) and
License (GPL_3_0),
Common_Properties,
Private_Properties =>
Project_File ("test/aunit_tests.gpr") and
-282
View File
@@ -1,282 +0,0 @@
with Alire.Index.LibGNUTLS;
with Alire.Index.UnixODBC;
package Alire.Index.DAK_Components is
function Project is new Catalogued_Project (Projects.DAK_Components);
function Subproject_DAK_Strings_Edit is new Catalogued_Project (DAK_Strings_Edit,
Projects.DAK_Components);
function Subproject_DAK_Tables is new Catalogued_Project (DAK_Tables,
Projects.DAK_Components);
function Subproject_DAK_Components_Connections is new Catalogued_Project (DAK_Components_Connections,
Projects.DAK_Components);
function Subproject_DAK_Components_Connections_Secure is new Catalogued_Project
(DAK_Components_Connections_Secure, Projects.DAK_Components);
function Subproject_DAK_Components_NTP is new Catalogued_Project (DAK_Components_NTP,
Projects.DAK_Components);
function Subproject_DAK_Components_ODBC is new Catalogued_Project (DAK_Components_ODBC,
Projects.DAK_Components);
function Subproject_DAK_Components_SQLite is new Catalogued_Project (DAK_Components_SQLite,
Projects.DAK_Components);
-- Simple Components by Dmitry A. Kazakov
-- Since most project names are common words, I've taken the liberty to prefix them with dak_
-- but the original sources are unchanged.
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";
Strings_Edit_V_4_27 : constant Release :=
Subproject_DAK_Strings_Edit.Register
(V ("4.27"),
Git (Repo, "8ac67a28d666dde3a0f96b5a08a7016e4f29d491"),
Properties =>
Project_File ("strings_edit.gpr") and
GPR_Scenario ("Legacy", "Ada95" or "Ada2005" or "Ada2012") and
GPR_Scenario ("Development", "Debug" or "Release") and
Executable ("test_base64") and
Executable ("test_strings_edit") and
Executable ("test_string_streams") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_strings_edit/strings_edit-test.gpr")
);
Tables_V_4_27 : constant Release :=
Subproject_DAK_Tables.Register
(V ("4.27"),
Git (Repo, "19205e4981d72242daf72da7d59c5faf2b4c91fd"),
Properties =>
Project_File ("tables.gpr") and
GPR_Scenario ("Legacy", "Ada95" or "Ada2005" or "Ada2012") and
GPR_Scenario ("Development", "Debug" or "Release") and
Executable ("test_tables") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_tables/tables-test.gpr")
);
Components_V_4_27 : constant Release :=
Project.Register
(V ("4.27"),
Git (Repo, "542f02c9be86693f759fcb784a8462bc4b25f1f2"),
Dependencies =>
Strings_Edit_V_4_27.Within_Major and
Tables_V_4_27.Within_Major,
Properties =>
Project_File ("components.gpr") and
GPR_Scenario ("Atomic_Access", "Pragma-atomic" or "GCC-built-ins" or "GCC-long-offsets") and
GPR_Scenario ("Tasking", "Multiple" or "Single") and
GPR_Scenario ("Traced_objects", "Off" or "On") and
Executable ("test_approximations") and
Executable ("test_association") and
Executable ("test_blackboard") and
Executable ("test_blackboard_performance") and
Executable ("test_blocking_files") and
Executable ("test_block_streams") and
Executable ("test_b_trees") and
Executable ("test_cubic_spline") and
Executable ("test_dining_philosophers") and
Executable ("test_fifo") and
Executable ("test_generic_indefinite_sets") and
Executable ("test_generic_maps") and
Executable ("test_generic_sets") and
Executable ("test_graphs") and
Executable ("test_handles") and
Executable ("test_ieee_754") and
Executable ("test_linked_lists") and
Executable ("test_linked_lists_scheduler_test") and
Executable ("test_parser_stream_io") and
Executable ("test_persistent_memory_pool") and
Executable ("test_persistent_storage") and
Executable ("test_sequencer") and
Executable ("test_single_file_persistence") and
Executable ("test_stack") and
Executable ("test_storage_streams") and
Executable ("test_string_streams") and
Executable ("test_synchronization_events") and
Executable ("test_transactional_blocking_files") and
Executable ("test_utf8_tables") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website) and
Comment ("Tasking=Single seems to be broken at persistent-single_file-text_io.adb"),
Private_Properties =>
Project_File ("test_components/components-tests.gpr")
);
Components_NTP_V_4_27 : constant Release :=
Subproject_DAK_Components_NTP.Register
(V ("4.27"),
Git (Repo, "34fb305d6ef360cde5e272b51409097a5de72017"),
Dependencies =>
Components_V_4_27.Within_Major,
Properties =>
Project_File ("components-ntp.gpr") and
Executable ("test_ntp") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_components/components-ntp-test_ntp.gpr")
);
Components_Sqlite_V_4_27 : constant Release :=
Subproject_DAK_Components_SQLite.Register
(V ("4.27"),
Git (Repo, "6fda0f3f7494815c87b329f7411b9a49ff97b9ba"),
Dependencies =>
Components_V_4_27.Within_Major,
Properties =>
Project_File ("components-sqlite.gpr") and
Executable ("test_sqlite_benchmark") and
Executable ("test_sqlite_persistence") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_components/components-sqlite-benchmark_tests.gpr") and
Project_File ("test_components/components-sqlite-sqlite_persistence_tests.gpr")
);
Components_Connections_V_4_27 : constant Release :=
Subproject_DAK_Components_Connections.Register
(V ("4.27"),
Git (Repo, "008935d5a89396cc0c39afb39f04bf6a89a92058"),
Dependencies =>
Components_V_4_27.Within_Major and
Components_Sqlite_V_4_27.Within_Major,
Properties =>
-- Main projects
Project_File ("components-connections_server.gpr") and
Project_File ("components-connections_server-elv_max_cube.gpr") and
Project_File ("components-connections_server-http_server.gpr") and
Project_File ("components-connections_server-http_server-sqlite_browser.gpr") and
Project_File ("components-connections_server-modbus.gpr") and
Project_File ("components-connections_server-mqtt.gpr") and
Project_File ("components-connections_server-smtp.gpr") and
Executable ("test_data_server") and
Executable ("test_echo_client") and
Executable ("test_echo_client_async") and
Executable ("test_echo_server") and
Executable ("test_elv_max_cube_client") and
Executable ("test_http_client") and
Executable ("test_http_continuous_server") and
Executable ("test_http_server") and
Executable ("test_http_sqlite_browser") and
Executable ("test_infinity_server") and
Executable ("test_modbus_client") and
Executable ("test_mqtt_client") and
Executable ("test_mqtt_server") and
Executable ("test_mqtt_webserver") and
Executable ("test_websocket_duplex_server") and
Executable ("test_websocket_server") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_components/components-connections_server-elv_max_cube-test_elv_max_cube_client.gpr") and
Project_File ("test_components/components-connections_server-http_server-test_http_server.gpr") and
Project_File ("test_components/components-connections_server-modbus-test_modbus_client.gpr") and
Project_File ("test_components/components-connections_server-mqtt-test_mqtt.gpr") and
Project_File ("test_components/components-connections_server-test_data_server.gpr") and
Project_File ("test_components/components-connections_server-test_echo_client_async.gpr") and
Project_File ("test_components/components-connections_server-test_echo_client.gpr") and
Project_File ("test_components/components-connections_server-test_echo_server.gpr") and
Project_File ("test_components/components-connections_server-test_websockets_mqtt.gpr") and
Project_File ("test_components/components-test_sqlite_browser.gpr")
);
Components_Connections_Secure_V_4_27 : constant Release :=
Subproject_DAK_Components_Connections_Secure.Register
(V ("4.27"),
Git (Repo, "ca72cf4150ae14ba6d40c3d2dd92c7846cb4cb5d"),
Dependencies =>
Components_Connections_V_4_27.Within_Major and
LibGNUTLS.V_3_5_8.Within_Major,
Properties =>
Project_File ("components-connections_server-secure.gpr") and
Project_File ("components-gnutls.gpr") and
Executable ("test_https_client") and
Executable ("test_https_server") and
Executable ("test_smtp_client") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_components/components-connections_server-http_server-test_https_server.gpr") and
Project_File ("test_components/components-connections_server-smtp-test_smtp.gpr")
);
Components_ODBC_V_4_27 : constant Release :=
Subproject_DAK_Components_ODBC.Register
(V ("4.27"),
Git (Repo, "47337f8a5dd69404087129d5cca79885d6e8cd3f"),
Dependencies =>
Components_V_4_27.Within_Major and
UnixODBC.V_2_3.Within_Major,
Properties =>
Project_File ("components-odbc.gpr") and
Executable ("test_odbc_bindings") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website),
Private_Properties =>
Project_File ("test_components/components-odbc-odbc_bindings_tests.gpr") and
On_Condition
(Operating_System = GNU_Linux,
GPR_External ("odbc", "unixODBC")) and
On_Condition
(Operating_System = Windows,
GPR_External ("odbc", "ODBC32")) and
On_Condition
(Word_Size = Bits_32,
GPR_External ("arch", "i686")) and
On_Condition
(Word_Size = Bits_64,
GPR_External ("arch", "x86_64"))
);
end Alire.Index.DAK_Components;
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.GtkAda;
package Alire.Index.Eagle_Lander is
function Project is new Catalogued_Project (Projects.Eagle_Lander);
function Project is new Catalogued_Project ("eagle_lander",
"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";
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.GLUT;
package Alire.Index.Globe_3D is
function Project is new Catalogued_Project (Projects.Globe_3D);
function Project is new Catalogued_Project ("globe_3d",
"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";
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Hangman is
function Project is new Catalogued_Project (Projects.Hangman);
function Project is new Catalogued_Project ("hangman",
"Hangman game for the console");
Prj_Repo : constant URL := "https://github.com/alire-project/Hangman.git";
Prj_Author : constant String := "Jon Hollan, Mark Hoffman, & Brandon Ball";
+5 -4
View File
@@ -2,7 +2,8 @@ with Alire.Index.Libhello;
package Alire.Index.Hello is
function Project is new Catalogued_Project (Projects.Hello);
function Project is new Catalogued_Project ("hello",
"""Hello, world!"" demonstration project");
Repo : constant URL := "https://github.com/alire-project/hello.git";
@@ -14,8 +15,8 @@ package Alire.Index.Hello is
V_1_0_1 : constant Release :=
Project.Register
(V ("1.0.1"),
Git (Repo, "65725c20778875eef12b61a01b437120932965f3"),
Dependencies => Libhello.V_1_0.Within_Major);
(V_1_0_0.Upgrading
(V ("1.0.1"),
Git (Repo, "65725c20778875eef12b61a01b437120932965f3")));
end Alire.Index.Hello;
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.AUnit;
package Alire.Index.Libadacrypt is
function Project is new Catalogued_Project (Projects.Libadacrypt);
function Project is new Catalogued_Project ("libadacrypt",
"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";
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Libhello is
function Project is new Catalogued_Project (Projects.Libhello);
function Project is new Catalogued_Project ("libhello",
"""Hello, world!"" demonstration project support library");
Repo : constant URL := "https://github.com/alire-project/libhello.git";
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Mathpaqs is
function Project is new Catalogued_Project (Projects.Mathpaqs);
function Project is new Catalogued_Project ("mathpaqs",
"A collection of mathematical, 100% portable, packages");
Prj_Repo : constant URL := "https://github.com/svn2github/Mathpaqs.git";
Prj_Author : constant String := "Gautier de Montmollin";
+2 -1
View File
@@ -3,7 +3,8 @@ with Alire.Index.LibX11;
package Alire.Index.OpenGLAda is
function Project is new Catalogued_Project (Projects.OpenGLAda);
function Project is new Catalogued_Project ("openglada",
"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>";
+11 -14
View File
@@ -1,25 +1,13 @@
package Alire.Index.PragmARC is
function Project is new Catalogued_Project (Projects.PragmARC);
function Project is new Catalogued_Project ("pragmarc",
"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
Project.Register
(V ("2017.2007.0"),
Git (Repo, "db6c1730fe825f8303c60b48f82db08bd408588d"),
Notes => "ISO/IEC 8652:2007 version",
Properties =>
Executable ("compile_all") and
License (GMGPL_2_0) and
Author (Auth) and
Website (Web1) and
Website (Web2)
);
V_2011 : constant Release := -- Pure Ada95 version
Project.Register
(V ("2011.1995.0"),
@@ -33,4 +21,13 @@ package Alire.Index.PragmARC is
Website (Web2)
);
V_2017 : constant Release := -- Experimental '07 version
Project.Register
(V_2011
.Upgrading
(V ("2017.2007.0"),
Git (Repo, "db6c1730fe825f8303c60b48f82db08bd408588d"))
.Replacing
(Notes => "ISO/IEC 8652:2007 version"));
end Alire.Index.PragmARC;
+3 -2
View File
@@ -1,6 +1,7 @@
package Alire.Index.RxAda is
function Project is new Catalogued_Project (Projects.RxAda);
function Project is new Catalogued_Project ("rxada",
"RxAda port of the Rx framewor");
Repo : constant URL := "https://bitbucket.org/amosteo/rxada";
@@ -14,7 +15,7 @@ package Alire.Index.RxAda is
Executable ("rx-examples-tests") and
Executable ("rx-examples-threading") and
Author ("alejandro@mosteo.com") and
Author ("Alejandro R. Mosteo") and
License (LGPL_3_0));
end Alire.Index.RxAda;
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.LibSDL2;
package Alire.Index.SDLAda is
function Project is new Catalogued_Project (Projects.SDLAda);
function Project is new Catalogued_Project ("sdlada",
"Ada 2012 bindings to SDL 2");
Prj_Repo : constant URL := "https://github.com/alire-project/sdlada.git";
Prj_Author : constant String := "Luke A. Guest";
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Semantic_Versioning is
function Project is new Catalogued_Project (Projects.Semantic_Versioning);
function Project is new Catalogued_Project ("semantic_versioning",
"Semantic Versioning in Ada");
Repo : constant URL := "https://github.com/alire-project/semantic_versioning.git";
+272
View File
@@ -0,0 +1,272 @@
with Alire.Index.LibGNUTLS;
with Alire.Index.UnixODBC;
package Alire.Index.Simple_Components is
-- FIXME: now packaged as different commits, but all of them can reside in the same one...
-- Simple Components by Dmitry A. Kazakov
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";
function Project is new Catalogued_Project ("simple_components",
"Simple Components (root project)");
-- This is a special project because it contains no code.
-- The first usable extension is Strings_Edit
-- Having this one though is better for canonical name and listing
function Strings_Edit is new Extension (Project,
"strings_edit",
"Simple Components (strings)");
function Tables is new Extension (Project,
"tables",
"Simple Components (tables)");
function Core is new Extension (Project,
"core",
"Simple Components (core components)");
function Connections is new Extension (Project,
"connections",
"Simple Components (clients/servers)");
function Secure is new Extension (Connections,
"secure",
"Simple Components (clients/servers over TLS)");
function NTP is new Extension (Connections,
"ntp",
"Simple Components (Network Time Protocol)");
function ODBC is new Extension (Project,
"odbc",
"Simple Components (ODBC bindings)");
function SQLite is new Extension (Project,
"sqlite",
"Simple Components (SQLite)");
Base_V_4_27 : constant Release :=
Project.Bypass
(V ("4.27"),
Git (Repo, "8ac67a28d666dde3a0f96b5a08a7016e4f29d491"),
Properties =>
GPR_Scenario ("Legacy", "Ada95" or "Ada2005" or "Ada2012") and
GPR_Scenario ("Development", "Debug" or "Release") and
License (GMGPL_2_0) and
Author (DAK_Author) and
Website (DAK_Website));
Strings_Edit_V_4_27 : constant Release :=
Strings_Edit.Register
(Base_V_4_27.Extending
(Properties =>
Project_File ("strings_edit.gpr"),
Private_Properties =>
Executable ("test_base64") and
Executable ("test_strings_edit") and
Executable ("test_string_streams") and
Project_File ("test_strings_edit/strings_edit-test.gpr")));
Tables_V_4_27 : constant Release :=
Tables.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "19205e4981d72242daf72da7d59c5faf2b4c91fd"))
.Extending
(Properties =>
Project_File ("tables.gpr"),
Private_Properties =>
Executable ("test_tables") and
Project_File ("test_tables/tables-test.gpr")));
Components_V_4_27 : constant Release :=
Core.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "542f02c9be86693f759fcb784a8462bc4b25f1f2"))
.Extending
(Dependencies =>
Strings_Edit_V_4_27.Within_Major and
Tables_V_4_27.Within_Major,
Properties =>
Project_File ("components.gpr") and
GPR_Scenario ("Atomic_Access", "Pragma-atomic" or "GCC-built-ins" or "GCC-long-offsets") and
GPR_Scenario ("Tasking", "Multiple" or "Single") and
GPR_Scenario ("Traced_objects", "Off" or "On") and
Comment ("Tasking=Single seems to be broken at persistent-single_file-text_io.adb"),
Private_Properties =>
Executable ("test_approximations") and
Executable ("test_association") and
Executable ("test_blackboard") and
Executable ("test_blackboard_performance") and
Executable ("test_blocking_files") and
Executable ("test_block_streams") and
Executable ("test_b_trees") and
Executable ("test_cubic_spline") and
Executable ("test_dining_philosophers") and
Executable ("test_fifo") and
Executable ("test_generic_indefinite_sets") and
Executable ("test_generic_maps") and
Executable ("test_generic_sets") and
Executable ("test_graphs") and
Executable ("test_handles") and
Executable ("test_ieee_754") and
Executable ("test_linked_lists") and
Executable ("test_linked_lists_scheduler_test") and
Executable ("test_parser_stream_io") and
Executable ("test_persistent_memory_pool") and
Executable ("test_persistent_storage") and
Executable ("test_sequencer") and
Executable ("test_single_file_persistence") and
Executable ("test_stack") and
Executable ("test_storage_streams") and
Executable ("test_string_streams") and
Executable ("test_synchronization_events") and
Executable ("test_transactional_blocking_files") and
Executable ("test_utf8_tables") and
Project_File ("test_components/components-tests.gpr")));
NTP_V_4_27 : constant Release :=
NTP.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "34fb305d6ef360cde5e272b51409097a5de72017"))
.Extending
(Dependencies =>
Components_V_4_27.Within_Major,
Properties =>
Project_File ("components-ntp.gpr"),
Private_Properties =>
Executable ("test_ntp") and
Project_File ("test_components/components-ntp-test_ntp.gpr")));
Sqlite_V_4_27 : constant Release :=
SQLite.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "6fda0f3f7494815c87b329f7411b9a49ff97b9ba"))
.Extending
(Dependencies =>
Components_V_4_27.Within_Major,
Properties =>
Project_File ("components-sqlite.gpr"),
Private_Properties =>
Executable ("test_sqlite_benchmark") and
Executable ("test_sqlite_persistence") and
Project_File ("test_components/components-sqlite-benchmark_tests.gpr") and
Project_File ("test_components/components-sqlite-sqlite_persistence_tests.gpr")));
Connections_V_4_27 : constant Release :=
Connections.Register
(Base_V_4_27
.Replacing (Git (Repo, "008935d5a89396cc0c39afb39f04bf6a89a92058"))
.Extending
(Dependencies =>
Components_V_4_27.Within_Major and
Sqlite_V_4_27.Within_Major,
Properties =>
-- Main projects
Project_File ("components-connections_server.gpr") and
Project_File ("components-connections_server-elv_max_cube.gpr") and
Project_File ("components-connections_server-http_server.gpr") and
Project_File ("components-connections_server-http_server-sqlite_browser.gpr") and
Project_File ("components-connections_server-modbus.gpr") and
Project_File ("components-connections_server-mqtt.gpr") and
Project_File ("components-connections_server-smtp.gpr"),
Private_Properties =>
Executable ("test_data_server") and
Executable ("test_echo_client") and
Executable ("test_echo_client_async") and
Executable ("test_echo_server") and
Executable ("test_elv_max_cube_client") and
Executable ("test_http_client") and
Executable ("test_http_continuous_server") and
Executable ("test_http_server") and
Executable ("test_http_sqlite_browser") and
Executable ("test_infinity_server") and
Executable ("test_modbus_client") and
Executable ("test_mqtt_client") and
Executable ("test_mqtt_server") and
Executable ("test_mqtt_webserver") and
Executable ("test_websocket_duplex_server") and
Executable ("test_websocket_server") and
Project_File ("test_components/components-connections_server-elv_max_cube-test_elv_max_cube_client.gpr") and
Project_File ("test_components/components-connections_server-http_server-test_http_server.gpr") and
Project_File ("test_components/components-connections_server-modbus-test_modbus_client.gpr") and
Project_File ("test_components/components-connections_server-mqtt-test_mqtt.gpr") and
Project_File ("test_components/components-connections_server-test_data_server.gpr") and
Project_File ("test_components/components-connections_server-test_echo_client_async.gpr") and
Project_File ("test_components/components-connections_server-test_echo_client.gpr") and
Project_File ("test_components/components-connections_server-test_echo_server.gpr") and
Project_File ("test_components/components-connections_server-test_websockets_mqtt.gpr") and
Project_File ("test_components/components-test_sqlite_browser.gpr")));
Secure_V_4_27 : constant Release :=
Secure.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "ca72cf4150ae14ba6d40c3d2dd92c7846cb4cb5d"))
.Extending
(Dependencies =>
Connections_V_4_27.Within_Major and
LibGNUTLS.V_3_5_8.Within_Major,
Properties =>
Project_File ("components-connections_server-secure.gpr") and
Project_File ("components-gnutls.gpr"),
Private_Properties =>
Executable ("test_https_client") and
Executable ("test_https_server") and
Executable ("test_smtp_client") and
Project_File ("test_components/components-connections_server-http_server-test_https_server.gpr") and
Project_File ("test_components/components-connections_server-smtp-test_smtp.gpr")));
ODBC_V_4_27 : constant Release :=
ODBC.Register
(Base_V_4_27
.Replacing (Origin => Git (Repo, "47337f8a5dd69404087129d5cca79885d6e8cd3f"))
.Extending
(Dependencies =>
Components_V_4_27.Within_Major and
UnixODBC.V_2_3.Within_Major,
Properties =>
Project_File ("components-odbc.gpr"),
Private_Properties =>
Executable ("test_odbc_bindings") and
Project_File ("test_components/components-odbc-odbc_bindings_tests.gpr") and
On_Condition
(Operating_System = GNU_Linux,
GPR_External ("odbc", "unixODBC")) and
On_Condition
(Operating_System = Windows,
GPR_External ("odbc", "ODBC32")) and
On_Condition
(Word_Size = Bits_32,
GPR_External ("arch", "i686")) and
On_Condition
(Word_Size = Bits_64,
GPR_External ("arch", "x86_64"))));
end Alire.Index.Simple_Components;
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Simple_Logging is
function Project is new Catalogued_Project (Projects.Simple_Logging);
function Project is new Catalogued_Project ("simple_logging",
"Simple logging to console");
Repo : constant URL := "https://github.com/alire-project/simple_logging.git";
+2 -1
View File
@@ -3,7 +3,8 @@ with Alire.Index.GtkAda;
package Alire.Index.Steamsky is
function Project is new Catalogued_Project (Projects.Steamsky);
function Project is new Catalogued_Project ("steamsky",
"Roguelike in sky with steampunk theme");
Prj_Repo : constant URL := "https://github.com/thindil/steamsky.git";
+11 -16
View File
@@ -1,12 +1,17 @@
package Alire.Index.Template is
-- function Project is new Catalogued_Project (Projects.Name);
-- function Project is new Catalogued_Project
-- ("name",
-- "description");
--
-- Prj_Repo : constant URL := "";
-- Prj_Author : constant String := "";
-- Prj_Maintainer : constant String := "";
-- Prj_Website : constant URL := "";
-- Repo : constant URL := "";
--
-- Base_Properties : constant Release_Properties :=
-- Author ("") and
-- Maintainer ("") and
-- Website ("") and
-- License (Unknown);
-- V_0_0_0 : constant Release :=
-- Project.Register
-- (V (""),
@@ -15,17 +20,7 @@ package Alire.Index.Template is
-- Notes => "",
--
-- Properties =>
-- Project_File ("") and
--
-- Executable ("main") and
--
-- Author (Prj_Author) and
-- Maintainer (Prj_Maintainer) and
-- Website (Prj_Website) and
-- License (GMGPL_2_0),
--
-- Private_Properties =>
-- GPR_File ("/")
-- Base_Properties
-- );
end Alire.Index.Template;
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Whitakers_Words is
function Project is new Catalogued_Project (Projects.Whitakers_Words);
function Project is new Catalogued_Project ("whitakers_words",
"William Whitaker's WORDS, a Latin dictionary");
Prj_Repo : constant URL := "https://github.com/mk270/whitakers-words.git";
Prj_Author : constant String := "William A. Whitaker";
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.GLUT is
function Project is new Catalogued_Project (Projects.GLUT);
function Project is new Catalogued_Project ("glut",
"OpenGL Utility Toolkit");
V_2_8_1 : constant Release :=
Project.Register
+2
View File
@@ -6,6 +6,8 @@ package Alire.Index.GNAT is
-- (e.g., GPL version is in an earlier path)
-- Conclusion: use the requisite Compiler_Is_Native instead
-- Still, this might come back for cross-compilations or sumzing
-- function Project is new Catalogued_Project (Projects.GNAT);
--
-- -- If minor versions proved important they could be segregated with platform-specific knowledge
+2 -1
View File
@@ -2,7 +2,8 @@ with Alire.Index.GNAT;
package Alire.Index.GtkAda is
function Project is new Catalogued_Project (Projects.GtkAda);
function Project is new Catalogued_Project ("gtkada",
"Ada binding for the GTK+ GUI");
V_17 : constant Release :=
Project.Register
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Libglfw3 is
function Project is new Catalogued_Project (Projects.Libglfw3);
function Project is new Catalogued_Project ("libglfw3",
"Portable library for OpenGL, window and input");
V_3 : constant Release :=
Project.Register
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.LibGNUTLS is
function Project is new Catalogued_Project (Projects.LibGNUTLS);
function Project is new Catalogued_Project ("libgnutls",
"GNU TLS library");
V_3_5_8 : constant Release :=
Project.Register
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.Liblua is
function Project is new Catalogued_Project (Projects.Liblua);
function Project is new Catalogued_Project ("liblua",
"Development files for the Lua language");
V_5_3 : constant Release :=
Project.Register
+10 -5
View File
@@ -1,10 +1,15 @@
package Alire.Index.LibSDL2 is
function Project is new Catalogued_Project (Projects.LibSDL2);
function Project is new Catalogued_Project ("libsdl2",
"Simple DirectMedia Layer development files");
function Subproject_Image is new Catalogued_Project (Projects.LibSDL2_Image, Projects.LibSDL2);
function Image is new Extension (Project,
"image",
"Image loading library for Simple DirectMedia Layer 2");
function Subproject_TTF is new Catalogued_Project (Projects.LibSDL2_TTF, Projects.LibSDL2);
function TTF is new Extension (Project,
"ttf",
"TrueType Font library for Simple DirectMedia Layer 2");
SDL_V_2 : constant Release :=
Project.Register
@@ -13,13 +18,13 @@ package Alire.Index.LibSDL2 is
others => Unavailable)));
SDL_Image_V_2 : constant Release :=
Subproject_Image.Register
Image.Register
(V ("2"),
Native ((Debian | Ubuntu => Packaged_As ("libsdl2-image-dev"),
others => Unavailable)));
SDL_TTF_V_2 : constant Release :=
Subproject_TTF.Register
TTF.Register
(V ("2"),
Native ((Debian | Ubuntu => Packaged_As ("libsdl2-ttf-dev"),
others => Unavailable)));
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.LibX11 is
function Project is new Catalogued_Project (Projects.LibX11);
function Project is new Catalogued_Project ("libx11",
"X11 client-side library");
V_2 : constant Release :=
Project.Register
+2 -3
View File
@@ -1,8 +1,7 @@
with Alire.Index.GNAT;
package Alire.Index.NcursesAda is
function Project is new Catalogued_Project (Projects.NcursesAda);
function Project is new Catalogued_Project ("ncursesada",
"Ada binding to the ncurses text interface library");
V_6 : constant Release :=
Project.Register
+2 -1
View File
@@ -1,6 +1,7 @@
package Alire.Index.UnixODBC is
function Project is new Catalogued_Project (Projects.UnixODBC);
function Project is new Catalogued_Project ("unixodbc",
"Open Database Connectivity drivers for UNIX platforms");
V_2_3 : constant Release :=
Project.Register
+2 -3
View File
@@ -1,6 +1,5 @@
with Alire.Conditional_Values;
with Alire.Dependencies.Vectors;
with Alire.Projects;
with Alire.Properties;
with Alire.Requisites;
@@ -13,7 +12,7 @@ package Alire.Conditional with Preelaborate is
Dependencies.Vectors.Image_One_Line);
subtype Dependencies is For_Dependencies.Conditional_Value;
function New_Dependency (Name : Projects.Names;
function New_Dependency (Name : Alire.Project;
Versions : Semantic_Versioning.Version_Set)
return Dependencies;
@@ -28,7 +27,7 @@ package Alire.Conditional with Preelaborate is
private
function New_Dependency (Name : Projects.Names;
function New_Dependency (Name : Alire.Project;
Versions : Semantic_Versioning.Version_Set)
return Dependencies is
(For_Dependencies.New_Value
+2 -2
View File
@@ -4,7 +4,7 @@ package body Alire.Containers is
-- Excluding --
---------------
function Excluding (Map : Release_Map; Name : Projects.Names) return Release_Map is
function Excluding (Map : Release_Map; Name : Alire.Project) return Release_Map is
begin
return Filtered : Release_Map := Map do
Filtered.Exclude (Name);
@@ -18,7 +18,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.Name, R);
M.Include (R.Project, R);
end return;
end To_Map;
+7 -4
View File
@@ -3,7 +3,6 @@ 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,16 +24,20 @@ package Alire.Containers with Preelaborate is
subtype Release_H is Release_Holders.Holder;
package Project_Description_Maps is new Ada.Containers.Indefinite_Ordered_Maps
(Alire.Project, Description_String);
package Project_Version_Maps is new Ada.Containers.Indefinite_Ordered_Maps
(Name_String, Semantic_Versioning.Version, "<", Semantic_Versioning."<");
(Alire.Project, Semantic_Versioning.Version, "<", Semantic_Versioning."<");
subtype Version_Map is Project_Version_Maps.Map;
package Project_Release_Maps is new Ada.Containers.Indefinite_Ordered_Maps
(Projects.Names, Releases.Release, Projects."<", Releases."=");
(Alire.Project, Releases.Release, "<", Releases."=");
type Release_Map is new Project_Release_Maps.Map with null record;
function Excluding (Map : Release_Map; Name : Projects.Names) return Release_Map;
function Excluding (Map : Release_Map; Name : Alire.Project) return Release_Map;
function To_Map (R : Releases.Release) return Release_Map;
+1 -1
View File
@@ -35,7 +35,7 @@ private
function New_Dependency (Name : Names;
Versions : Semantic_Versioning.Version_Set) return Vector is
(To_Vector ((Name, Versions), 1));
(To_Vector ((Name'Length, Name, Versions), 1));
--------------------
-- Image_One_Line --
+10 -11
View File
@@ -1,19 +1,18 @@
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;
subtype Names is Alire.Project;
-- A single dependency is a project name plus a version set
type Dependency (<>) is tagged private;
function New_Dependency (Name : Names;
function New_Dependency (Project : Alire.Project;
Versions : Semantic_Versioning.Version_Set) return Dependency;
function Project (Dep : Dependency) return Names;
@@ -32,30 +31,30 @@ private
use all type Semantic_Versioning.Version;
type Dependency is tagged record
Project : Projects.Names;
type Dependency (Name_Len : Natural) is tagged record
Project : Alire.Project (1 .. Name_Len);
Versions : Semantic_Versioning.Version_Set;
end record;
function New_Dependency (Name : Names;
function New_Dependency (Project : Alire.Project;
Versions : Semantic_Versioning.Version_Set) return Dependency
is (Name, Versions);
is (Project'Length, Project, Versions);
function Project (Dep : Dependency) return Names is (Dep.Project);
function Versions (Dep : Dependency) return Semantic_Versioning.Version_Set is
(Dep.Versions);
use all type Projects.Names;
use all type Alire.Project;
function Image (Dep : Dependency) return String is -- Exceptional case: alire=0.0.0 means Unavailable
(if Dep.Project = Projects.Alire and then Semantic_Versioning.Satisfies (V ("0"), Dep.Versions)
(if Dep = Unavailable
then "Unavailable"
else
(Utils.To_Lower_Case (Dep.Project'Img) & " is " &
(Utils.To_Lower_Case (+Dep.Project) & " is " &
Semantic_Versioning.Image (Dep.Versions)));
function Unavailable return Dependency is
(New_Dependency (Projects.Alire, Semantic_Versioning.Exactly (Semantic_Versioning.V ("0"))));
(New_Dependency ("alire", Semantic_Versioning.Exactly (Semantic_Versioning.V ("0"))));
end Alire.Dependencies;
+82 -73
View File
@@ -1,14 +1,16 @@
with Ada.Containers.Ordered_Maps;
with Ada.Containers.Indefinite_Ordered_Maps;
with Ada.Strings.Maps;
with Alire.Projects;
with Gnat.OS_Lib;
package body Alire.Index is
use all type Version;
package Name_Entry_Maps is new Ada.Containers.Ordered_Maps (Projects.Names,
Catalog_Entry);
package Name_Entry_Maps is new Ada.Containers.Indefinite_Ordered_Maps (Alire.Project,
Catalog_Entry);
Master_Entries : Name_Entry_Maps.Map;
@@ -16,7 +18,51 @@ package body Alire.Index is
-- Catalogued_Project --
------------------------
function Catalogued_Project return Catalog_Entry is (Name, Parent);
function Catalogued_Project return Catalog_Entry is
begin
return C : constant Catalog_Entry := (Name_Len => Project'Length,
Descr_Len => Description'Length,
Pack_Len => Package_Name'Length,
Self_Len => String'("Project")'Length,
Project => Project,
Description => Description,
Package_Name => Package_Name,
Self_Name => "Project")
do
if First_Use.all then
First_Use.all := False;
Master_Entries.Insert (C.Project, C);
Projects.Descriptions.Insert (C.Project, Description);
end if;
end return;
end Catalogued_Project;
---------------
-- Extension --
---------------
function Extension return Catalog_Entry is
begin
return C : constant Catalog_Entry := (Name_Len => Name'Length + Base.Project'Length + 1,
Descr_Len => Description'Length,
Pack_Len => Base.Package_Name'Length,
Self_Len => Ada_Identifier'Length,
Project => Base.Project & Extension_Separator & Name,
Description => Description,
Package_Name => Base.Package_Name,
Self_Name => Ada_Identifier)
do
if First_Use.all then
First_Use.all := False;
Master_Entries.Insert (C.Project, C);
Projects.Descriptions.Insert (C.Project, Description);
end if;
end return;
end Extension;
-------------
-- Current --
@@ -25,50 +71,38 @@ package body Alire.Index is
function Current (C : Catalog_Entry) return Release is
begin
for R of reverse Catalog loop
if R.Name = C.Name then
if R.Project = C.Project then
return R;
end if;
end loop;
raise Program_Error with "Catalog entry without releases: " & Image (C.Name);
raise Program_Error with "Catalog entry without releases: " & (+C.Project);
end Current;
---------
-- Get --
---------
function Get (Name : Projects.Names) return Catalog_Entry is
function Get (Name : Alire.Project) return Catalog_Entry is
(Master_Entries.Element (Name));
--------------------------
-- Is_Currently_Indexed --
--------------------------
function Is_Currently_Indexed (Name : Projects.Names) return Boolean is
function Is_Currently_Indexed (Name : Alire.Project) return Boolean is
(Master_Entries.Contains (Name));
------------
-- Exists --
------------
function Exists (Project : Name_String) return Boolean is
begin
return Names'Value (Project) = Projects.Alire or else True;
exception
when others =>
return False;
end Exists;
------------
-- Exists --
------------
function Exists (Project : Name_String;
function Exists (Project : Alire.Project;
Version : Semantic_Versioning.Version)
return Boolean is
begin
for R of Catalog loop
if R.Variant = Project and then R.Version = Version then
if R.Project = Project and then R.Version = Version then
return True;
end if;
end loop;
@@ -80,27 +114,24 @@ package body Alire.Index is
-- Find --
----------
function Find (Project : Name_String;
function Find (Project : Alire.Project;
Version : Semantic_Versioning.Version) return Release is
begin
for R of Catalog loop
if R.Variant = Project and then R.Version = Version then
if R.Project = Project and then R.Version = Version then
return R;
end if;
end loop;
raise Constraint_Error with "Not in index: " & Project & "=" & Semantic_Versioning.Image (Version);
raise Constraint_Error with "Not in index: " & (+Project) & "=" & Semantic_Versioning.Image (Version);
end Find;
--------------
-- Register --
--------------
-------------------
-- Register_Real --
-------------------
function Register (C : Catalog_Entry; R : Release) return Release is
function Register_Real (R : Release) return Release is
begin
Master_Entries.Include (R.Name, C);
-- Only once would be optimal, but we cannot do that any other way I can think of
if Catalog.Contains (R) then
Trace.Error ("Attempt to register duplicate versions: " & R.Milestone.Image);
else
@@ -108,14 +139,14 @@ package body Alire.Index is
end if;
return R;
end Register;
end Register_Real;
--------------
-- Register --
--------------
function Register (-- Mandatory
Project : Catalog_Entry;
This : Catalog_Entry;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
@@ -130,14 +161,13 @@ package body Alire.Index is
is
pragma Unreferenced (XXXXXXXXXXXXXX);
begin
return Register
(Project,
Alire.Releases.New_Release
(Project.Name,
Version,
Origin,
Notes,
Dependencies,
return Register_Real
(Alire.Releases.New_Release
(Project => This.Project,
Version => Version,
Origin => Origin,
Notes => Notes,
Dependencies => Dependencies,
Properties => Properties,
Private_Properties => Private_Properties,
Available => Available_When));
@@ -147,28 +177,13 @@ package body Alire.Index is
-- Register --
--------------
function Register (-- Mandatory
Project : Catalog_Entry;
-- we force naming beyond this point with this ugly guard:
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
Parent : Release;
Variant : Name_String;
Notes : Description_String; -- Mandatory for subrelease
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
Available_When : Release_Requisites := No_Requisites)
function Register (Extension : Catalog_Entry;
Extended_Release : Release)
return Release
is
pragma Unreferenced (XXXXXXXXXXXXXX);
begin
return Register (Project,
Parent.New_Child (Variant => Parent.Variant & ":" & Variant,
Notes => Notes,
Dependencies => Dependencies,
Properties => Properties,
Private_Properties => Private_Properties,
Available => Available_When));
return Register_Real (Extended_Release.Replacing
(Project => Extension.Project));
end Register;
------------
@@ -176,7 +191,7 @@ package body Alire.Index is
------------
function Bypass (-- Mandatory
Project : Catalog_Entry;
This : Catalog_Entry;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
@@ -192,11 +207,11 @@ package body Alire.Index is
pragma Unreferenced (XXXXXXXXXXXXXX);
begin
return
Alire.Releases.New_Release (Project.Name,
Version,
Origin,
Notes,
Dependencies,
Alire.Releases.New_Release (Project => This.Project,
Version => Version,
Origin => Origin,
Notes => Notes,
Dependencies => Dependencies,
Properties => Properties,
Private_Properties => Private_Properties,
Available => Available_When);
@@ -220,10 +235,4 @@ package body Alire.Index is
end return;
end To_Native;
-----------
-- Value --
-----------
function Value (Project : Name_String) return Names is (Names'Value (Project));
end Alire.Index;
+65 -65
View File
@@ -7,7 +7,6 @@ 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;
@@ -23,8 +22,8 @@ with Alire.Versions;
with Semantic_Versioning;
package Alire.Index is
package Alire.Index is
---------------
-- CATALOG --
---------------
@@ -32,31 +31,47 @@ package Alire.Index is
Catalog : Containers.Release_Set;
type Catalog_Entry (<>) is new Versions.Comparable with private;
function Name (C : Catalog_Entry) return Projects.Names;
-- Used to force the declaration of a single variable to refer to a project in index specs
generic
Name : Projects.Names;
-- The following two allow to group several releases in one index file
-- It's a bit of an abuse, but I'm feeling lazy right now
-- The instance should be called subproject_name instead of just project
Parent : Projects.Names := Name;
Project : Alire.Project;
Description : Description_String;
Package_Name : String := +Project; -- Override if not matching
-- For internal use:
First_Use : access Boolean := new Boolean'(True);
function Catalogued_Project return Catalog_Entry;
-- A regular project
function Callable_String (C : Catalog_Entry) return String;
generic
with function Base return Catalog_Entry;
Name : Alire.Project;
Description : Description_String;
Ada_Identifier : String := +Name;
-- For internal use
First_Use : access Boolean := new Boolean'(True);
function Extension return Catalog_Entry;
-- A "variant/flavor" project that resides in the same package.
-- It may either extend or override a base project
function Project (C : Catalog_Entry) return Alire.Project;
function Ada_Identifier (C : Catalog_Entry) return String;
-- Returns Name.Project, for master projects
-- Returns Parent.Subproject_Name, for subprojects
function Package_Name (C : Catalog_Entry) return String;
-- Returns the unique part only, e.g. Alr for Alire.Index.Alr
-- As an exception, for Alire it returns the full path
-- function Name (This : Extension_Entry) return Alire.Project;
-- base:name
-----------------
-- 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;
@@ -68,7 +83,7 @@ package Alire.Index is
subtype Release is Alire.Releases.Release;
function Register (-- Mandatory
Project : Catalog_Entry;
This : Catalog_Entry;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
@@ -83,26 +98,17 @@ package Alire.Index is
-- Properties are generally interesting to the user
-- Private_Properties are only interesting to alr
function Register (-- Mandatory
Project : Catalog_Entry;
-- we force naming beyond this point with this ugly guard:
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
Parent : Release;
Variant : Name_String;
Notes : Description_String; -- Mandatory for subrelease
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
Available_When : Release_Requisites := No_Requisites)
function Register (Extension : Catalog_Entry;
Extended_Release : Release)
return Release;
-- Register a subrelease
-- A subrelease is a secondary project in the same commit as its parent release
-- Register an extension
-- A extension is a secondary project in the same commit as its parent release
-- Essentially, another project file with additional properties/dependencies
-- A subrelease name is parent:name (e.g.: adayaml:server)
-- A extension name is parent:name (e.g.: adayaml:server)
-- It inherits all properties (including project files)
function Bypass (-- Mandatory
Project : Catalog_Entry;
This : Catalog_Entry;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
@@ -127,31 +133,27 @@ package Alire.Index is
-- BASIC QUERIES --
---------------------
function Is_Currently_Indexed (Name : Projects.Names) return Boolean;
function Is_Currently_Indexed (Name : Alire.Project) return Boolean;
-- It will depend on the compilation scope
function Current (C : Catalog_Entry) return Release;
-- Get newest release of C project
function Get (Name : Projects.Names) return Catalog_Entry;
function Get (Name : Alire.Project) return Catalog_Entry;
-- Master entry for project
function Exists (Project : Name_String) return Boolean;
function Exists (Project : Name_String;
function Exists (Project : Alire.Project;
Version : Semantic_Versioning.Version)
return Boolean;
function Find (Project : Name_String;
function Find (Project : Alire.Project;
Version : Semantic_Versioning.Version) return Release;
function Value (Project : Name_String) return Names;
------------------------
-- INDEXING SUPPORT --
------------------------
use all type Projects.Names;
use all type Alire.Project;
-- Shortcuts for origins:
@@ -312,59 +314,57 @@ package Alire.Index is
function Set_Root (Project : Catalog_Entry;
Version : Semantic_Versioning.Version)
return Roots.Root is (Alire.Root.Set (Project.Name, Version));
return Roots.Root is (Alire.Root.Set (Project.Project, Version));
-- All information will be taken from the indexed release
function Set_Root (Project : Name_String;
function Set_Root (Project : Alire.Project;
Dependencies : Conditional.Dependencies)
return Roots.Root renames Alire.Root.Set;
-- An unindexed working copy
private
type Catalog_Entry is new Versions.Comparable with record
Name : Projects.Names;
Parent : Projects.Names;
end record;
type Catalog_Entry (Name_Len, Descr_Len, Pack_Len, Self_Len : Natural) is new Versions.Comparable with record
Project : Alire.Project (1 .. Name_Len);
Description : Description_String (1 .. Descr_Len);
Package_Name : String (1 .. Pack_Len);
Self_Name : String (1 .. Self_Len);
end record;
overriding
function New_Dependency (L : Catalog_Entry; VS : Semantic_Versioning.Version_Set)
return Conditional.Dependencies is
(Conditional.For_Dependencies.New_Value -- A conditional (without condition) dependency vector
(Dependencies.Vectors.New_Dependency (L.Name, VS)));
(Dependencies.Vectors.New_Dependency (L.Project, VS)));
function Callable_String (C : Catalog_Entry) return String is
(if C.Parent = C.Name
then C.Package_Name & ".Project"
else C.Package_Name & ".Subproject_" & Utils.To_Mixed_Case (Image (C.Name)));
function Ada_Identifier (C : Catalog_Entry) return String is
((if Utils.To_Lower_Case (C.Package_Name) = "alire"
then "Alire.Index.Alire"
else Utils.To_Mixed_Case (C.Package_Name)) &
"." & Utils.To_Mixed_Case (C.Self_Name));
function Package_Name (C : Catalog_Entry) return String is
((if C.Name = Projects.Alire
then "Alire.Index."
else "") &
(if C.Parent = C.Name
then Utils.To_Mixed_Case (Projects.Image (C.Name))
else Utils.To_Mixed_Case (Projects.Image (C.Parent))));
(Utils.To_Mixed_Case (C.Package_Name));
function Current (C : Catalog_Entry) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Any));
(Conditional.New_Dependency (C.Project, Semver.Any));
function At_Version (C : Catalog_Entry; V : Version) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Exactly (V)));
(Conditional.New_Dependency (C.Project, Semver.Exactly (V)));
function At_Version (C : Catalog_Entry; V : String) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Exactly (Index.V (V))));
(Conditional.New_Dependency (C.Project, Semver.Exactly (Index.V (V))));
function Within_Major (C : Catalog_Entry; V : Version) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Within_Major (V)));
(Conditional.New_Dependency (C.Project, Semver.Within_Major (V)));
function Within_Major (C : Catalog_Entry; V : String) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Within_Major (Index.V (V))));
(Conditional.New_Dependency (C.Project, Semver.Within_Major (Index.V (V))));
function Within_Minor (C : Catalog_Entry; V : Version) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Within_Minor (V)));
(Conditional.New_Dependency (C.Project, Semver.Within_Minor (V)));
function Within_Minor (C : Catalog_Entry; V : String) return Conditional.Dependencies is
(Conditional.New_Dependency (C.Name, Semver.Within_Minor (Index.V (V))));
(Conditional.New_Dependency (C.Project, Semver.Within_Minor (Index.V (V))));
function Name (C : Catalog_Entry) return Projects.Names is (C.Name);
function Project (C : Catalog_Entry) return Alire.Project is (C.Project);
function Project_File_Unsafe is new PL.Cond_New_Label (Properties.Labeled.Project_File);
+9 -11
View File
@@ -1,5 +1,3 @@
with Alire.Projects;
with Semantic_Versioning;
package Alire.Milestones with Preelaborate is
@@ -8,10 +6,10 @@ package Alire.Milestones with Preelaborate is
function "<" (L, R : Milestone) return Boolean;
function New_Milestone (Name : Projects.Names;
function New_Milestone (Name : Alire.Project;
Version : Semantic_Versioning.Version) return Milestone;
function Project (M : Milestone) return Name_String;
function Project (M : Milestone) return Alire.Project;
function Version (M : Milestone) return Semantic_Versioning.Version;
@@ -19,10 +17,10 @@ package Alire.Milestones with Preelaborate is
private
use all type Projects.Names;
use all type Alire.Project;
type Milestone is tagged record
Name : Projects.Names;
type Milestone (Name_Len : Natural) is tagged record
Name : Alire.Project (1 .. Name_Len);
Version : Semantic_Versioning.Version;
end record;
@@ -31,15 +29,15 @@ 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 : Projects.Names;
function New_Milestone (Name : Alire.Project;
Version : Semantic_Versioning.Version) return Milestone is
(Name, Version);
(Name'Length, Name, Version);
function Project (M : Milestone) return Name_String is (Projects.Image (M.Name));
function Project (M : Milestone) return Alire.Project is (M.Name);
function Version (M : Milestone) return Semantic_Versioning.Version is (M.Version);
function Image (M : Milestone) return String is
(M.Project & "=" & Image (M.Version));
(+M.Project & "=" & Image (M.Version));
end Alire.Milestones;
+3 -248
View File
@@ -1,253 +1,8 @@
with Alire.Utils;
with Alire.Containers;
package Alire.Projects with Preelaborate is
subtype Variant_String is String;
type Project (Variant_Length, Description_Length : Natural) is tagged private;
function New_Project (Variant : Variant_String;
Description : Description_String) return Project;
function Name (P : Project) return Name_String;
function Variant (P : Project) return Variant_String;
function Description (P : Project) return Description_String;
-----------
-- Names --
-----------
-- Full list in alphabetical order
type Names is
(-------
-- A --
-------
Ada_Lua,
Adacurses,
AdaYaml,
Alire,
Alr,
APQ,
AUnit,
DAK_Components,
DAK_Components_Connections,
DAK_Components_Connections_Secure,
DAK_Components_NTP,
DAK_Components_ODBC,
DAK_Components_SQLite,
DAK_Strings_Edit,
DAK_Tables,
Eagle_Lander,
-------
-- G --
-------
Globe_3D,
GLUT,
GNAT,
GtkAda,
-------
-- H --
-------
Hangman,
Hello,
-------
-- L --
-------
Libadacrypt,
Libglfw3,
LibGNUTLS,
Libhello,
Liblua,
LibSDL2,
LibSDL2_Image,
LibSDL2_TTF,
LibX11,
-------
-- M --
-------
Mathpaqs,
NcursesAda,
OpenGLAda,
PragmARC,
RxAda,
SDLAda,
Semantic_Versioning,
Simple_Logging,
Steamsky,
UnixODBC,
Whitakers_Words);
-----------
-- Image --
-----------
function Image (Name : Names) return String;
-- Lower case
-----------------
-- Description --
-----------------
function Description (Name : Names) return Description_String is
(case Name is
-------
-- A --
-------
when Ada_Lua =>
"An Ada binding for Lua",
when Adacurses =>
"Wrapper on different packagings of NcursesAda",
when AdaYaml =>
"Experimental YAML 1.3 implementation in Ada",
when Alire =>
"Alire project catalog and support files",
when Alr =>
"Command-line tool from the Alire project",
when APQ =>
"APQ Ada95 Database Library (core)",
when AUnit
=> "Ada unit test framework",
when DAK_Components =>
"Simple Components (base)",
when DAK_Components_Connections =>
"Simple Components (clients/servers)",
when DAK_Components_Connections_Secure =>
"Simple Components (clients/servers over TLS)",
when DAK_Components_NTP =>
"Simple Components (ntp)",
when DAK_Components_ODBC =>
"Simple Components (ODBC bindings)",
when DAK_Components_SQLite =>
"Simple Components (SQLite)",
when DAK_Strings_Edit =>
"Simple Components (strings)",
when DAK_Tables =>
"Simple Components (tables)",
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 GNAT =>
"GNU Ada compiler (platform package)",
when GtkAda =>
"Ada binding for the GTK+ GUI",
-------
-- H --
-------
when Hangman =>
"Hangman game for the console",
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 =>
"GNU TLS library",
when Libhello =>
"""Hello, world!"" demonstration project support library",
when Liblua =>
"Development files for the Lua language",
when LibSDL2 =>
"Simple DirectMedia Layer development files",
when LibSDL2_Image =>
"Image loading library for Simple DirectMedia Layer 2",
when LibSDL2_TTF =>
"TrueType Font library for Simple DirectMedia Layer 2",
when LibX11 =>
"X11 client-side library",
-------
-- M --
-------
when Mathpaqs =>
"A collection of mathematical, 100% portable, packages",
when NcursesAda =>
"Ada binding to the ncurses text interface library",
when OpenGLAda =>
"Thick Ada binding for OpenGL and GLFW",
when PragmARC =>
"PragmAda Reusable Components (PragmARCs)",
when RxAda =>
"RxAda port of the Rx framework",
when SDLAda =>
"Ada 2012 bindings to SDL 2",
when Semantic_Versioning =>
"Semantic Versioning in Ada",
when Simple_Logging =>
"Simple logging to console",
when Steamsky =>
"Roguelike in sky with steampunk theme",
when UnixODBC =>
"Open Database Connectivity drivers for UNIX platforms",
when Whitakers_Words =>
"William Whitaker's WORDS, a Latin dictionary");
private
function Image (Name : Names) return String is (Utils.To_Lower_Case (Name'Img));
type Project (Variant_Length, Description_Length : Natural) is tagged record
Variant : Variant_String (1 .. Variant_Length);
Description : Description_String (1 .. Description_Length);
end record;
function New_Project (Variant : Variant_String;
Description : Description_String) return Project is
(Variant_Length => Variant'Length,
Description_Length => Description'Length,
Variant => Variant,
Description => Description);
function Name (P : Project) return Name_String is (Utils.Head (P.Variant, ':'));
function Variant (P : Project) return Variant_String is (P.Variant);
function Description (P : Project) return Description_String is (P.Description);
Descriptions : Containers.Project_Description_Maps.Map;
-- Master list of known projects & descriptions
end Alire.Projects;
+77 -38
View File
@@ -2,6 +2,7 @@ with Alire.Conditional_Values;
with Alire.Dependencies.Vectors;
with Alire.Platform;
with Alire.Platforms;
with Alire.Projects;
with Alire.Requisites.Booleans;
with GNAT.IO; -- To keep preelaborable
@@ -19,45 +20,89 @@ package body Alire.Releases is
function All_Properties (R : Release) return Conditional.Properties is
(R.Properties and R.Priv_Props);
---------------
-- New_Child --
-- Extending --
---------------
function New_Child (Parent : Release;
Variant : Projects.Variant_String;
Notes : Description_String;
Dependencies : Conditional.Dependencies;
Properties : Conditional.Properties;
Private_Properties : Conditional.Properties;
Available : Alire.Requisites.Tree) return Release
function Extending (Base : Release;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty;
Properties : Conditional.Properties := Conditional.For_Properties.Empty;
Private_Properties : Conditional.Properties := Conditional.For_Properties.Empty;
Available : Alire.Requisites.Tree := Requisites.Trees.Empty_Tree)
return Release
is
use Conditional.For_Dependencies;
use Conditional.For_Properties;
use Requisites.Trees;
use all type Conditional.Dependencies;
use all type Requisites.Tree;
begin
return Solid : constant Release (Variant'Length, Parent.Description'Length, Notes'Length) :=
(Var_Len => Variant'Length,
Descr_Len => Parent.Description'Length,
Notes_Len => Notes'Length,
return Extended : Release := Base do
Extended.Dependencies := Base.Dependencies and Dependencies;
Extended.Properties := Base.Properties and Properties;
Extended.Priv_Props := Base.Priv_Props and Private_Properties;
Extended.Available := Base.Available and Available;
end return;
end Extending;
Project => Projects.New_Project (Variant, Parent.Description),
Version => Parent.Version,
Origin => Parent.Origin,
Notes => Notes,
Dependencies => Parent.Dependencies and Dependencies,
Properties => Parent.Properties and Properties,
Priv_Props => Parent.Priv_Props and Private_Properties,
Available => Parent.Available and Available)
function Replacing (Base : Release;
Origin : Origins.Origin) return Release is
begin
return Replaced : Release := Base do
Replaced.Origin := Origin;
end return;
end Replacing;
---------------
-- Replacing --
---------------
function Replacing (Base : Release;
Project : Alire.Project := "";
Notes : Description_String := "") return Release
is
New_Project : constant Alire.Project := (if Project = ""
then Base.Project
else Project);
New_Notes : constant Description_String := (if Notes = ""
then Base.Notes
else "");
begin
return Replacement : constant Release (New_Project'Length, New_Notes'Length) :=
(Prj_Len => New_Project'Length,
Notes_Len => New_Notes'Length,
Project => New_Project,
Notes => New_Notes,
Version => Base.Version,
Origin => Base.Origin,
Dependencies => Base.Dependencies,
Properties => Base.Properties,
Priv_Props => Base.Priv_Props,
Available => Base.Available)
do
null;
end return;
end New_Child;
end Replacing;
---------------
-- Upgrading --
---------------
function Upgrading (Base : Release;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin) return Release is
begin
return Upgraded : Release := Base do
Upgraded.Version := Version;
Upgraded.Origin := Origin;
end return;
end Upgrading;
-----------------
-- New_Release --
-----------------
function New_Release (Name : Projects.Names;
function New_Release (Project : Alire.Project;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String;
@@ -65,19 +110,14 @@ package body Alire.Releases is
Properties : Conditional.Properties;
Private_Properties : Conditional.Properties;
Available : Alire.Requisites.Tree) return Release is
(Var_Len => Image (Name)'Length,
Descr_Len => Projects.Description (Name)'Length,
(Prj_Len => Project'Length,
Notes_Len => Notes'Length,
Project => Projects.New_Project (Image (Name), Projects.Description (Name)),
Project => Project,
Version => Version,
Origin => Origin,
Notes => Notes,
Dependencies => Dependencies,
Properties => Describe (Projects.Description (Name)) and
(if Notes /= ""
then Comment (Notes)
else Conditional.For_Properties.Empty) and
Properties,
Properties => Properties,
Priv_Props => Private_Properties,
Available => Available);
@@ -143,7 +183,7 @@ package body Alire.Releases is
Without : Utils.String_Vector;
begin
if With_Paths.Is_Empty then
With_Paths.Append (String'(R.Name_Img & ".gpr"));
With_Paths.Append (String'((+R.Project) & ".gpr"));
end if;
if With_Path then
@@ -255,7 +295,7 @@ package body Alire.Releases is
procedure Print_Dependencies is new Print_Conditional (Conditional.For_Dependencies, Print_Depvec);
begin
-- MILESTONE
Put_Line (R.Milestone.Image & ": " & R.Description);
Put_Line (R.Milestone.Image & ": " & Projects.Descriptions (R.Project));
if R.Notes /= "" then
Put_Line ("Notes: " & R.Notes);
@@ -358,9 +398,8 @@ package body Alire.Releases is
function Whenever (R : Release; P : Properties.Vector) return Release is
begin
return Solid : constant Release (R.Var_Len, R.Descr_Len, R.Notes_Len) :=
(Var_Len => R.Var_Len,
Descr_Len => R.Descr_Len,
return Solid : constant Release (R.Prj_Len, R.Notes_Len) :=
(Prj_Len => R.Prj_Len,
Notes_Len => R.Notes_Len,
Project => R.Project,
Version => R.Version,
+44 -45
View File
@@ -2,7 +2,6 @@ with Alire.Conditional;
with Alire.Dependencies;
with Alire.Milestones;
with Alire.Origins;
with Alire.Projects;
with Alire.Properties;
with Alire.Properties.Labeled;
with Alire.Requisites;
@@ -17,7 +16,7 @@ package Alire.Releases with Preelaborate is
type Release (<>) is new Versions.Versioned with private;
function New_Release (Name : Projects.Names;
function New_Release (Project : Alire.Project;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String;
@@ -26,35 +25,42 @@ package Alire.Releases with Preelaborate is
Private_Properties : Conditional.Properties;
Available : Alire.Requisites.Tree) return Release;
function New_Child (Parent : Release;
Variant : Projects.Variant_String;
Notes : Description_String;
Dependencies : Conditional.Dependencies;
Properties : Conditional.Properties;
Private_Properties : Conditional.Properties;
Available : Alire.Requisites.Tree) return Release;
function Extending (Base : Release;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty;
Properties : Conditional.Properties := Conditional.For_Properties.Empty;
Private_Properties : Conditional.Properties := Conditional.For_Properties.Empty;
Available : Alire.Requisites.Tree := Requisites.Trees.Empty_Tree)
return Release;
-- Takes a release and merges given fields
function Replacing (Base : Release;
Project : Alire.Project := "";
Notes : Description_String := "") return Release;
-- Takes a release and replaces the given fields
function Replacing (Base : Release;
Origin : Origins.Origin) return Release;
function Upgrading (Base : Release;
Version : Semantic_Versioning.Version;
Origin : Origins.Origin) return Release;
-- Takes a release and replaces version and origin
function "<" (L, R : Release) return Boolean;
function Whenever (R : Release; P : Properties.Vector) return Release;
-- Materialize conditions in a Release once the whatever properties are known
-- At present dependencies and properties
function Name (R : Release) return Projects.Names;
function Name_Img (R : Release) return Name_String;
overriding function Project (R : Release) return Alire.Project;
function Variant (R : Release) return String;
-- name:variant
function Is_Variant (R : Release) return Boolean;
function Project_Base (R : Release) return String;
-- Project up to first dot, if any; which is needed for extension projects in templates and so on
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) return Conditional.Dependencies;
function Depends (R : Release;
@@ -83,9 +89,7 @@ package Alire.Releases with Preelaborate is
return Utils.String_Vector;
-- with relative path on demand
function Image (R : Release) return Folder_String;
-- Unique string built as name_version_id
function Unique_Folder (R : Release) return Folder_String renames Image;
function Unique_Folder (R : Release) return Folder_String;
-- NOTE: property retrieval functions do not distinguish between public/private, since that's
-- merely informative for the users
@@ -110,7 +114,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 : Projects.Names;
-- function On (Name : Alire.Project;
-- Versions : Semantic_Versioning.Version_Set)
-- return Conditional.Dependencies;
--
@@ -122,16 +126,14 @@ private
use Semantic_Versioning;
use all type Projects.Names;
function All_Properties (R : Release) return Conditional.Properties;
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 (Var_Len, Descr_Len, Notes_Len : Natural) is new Versions.Versioned with record
Project : Projects.Project (Var_Len, Descr_Len);
type Release (Prj_Len, Notes_Len : Natural) is new Versions.Versioned with record
Project : Alire.Project (1 .. Prj_Len);
Version : Semantic_Versioning.Version;
Origin : Origins.Origin;
Notes : Description_String (1 .. Notes_Len);
@@ -144,23 +146,20 @@ private
use all type Conditional.Properties;
function "<" (L, R : Release) return Boolean is
(L.Variant < R.Variant or else
(L.Variant = R.Variant and then
L.Version < R.Version) or else
(L.Name = R.Name and then
L.Version = R.Version and then
Build (L.Version) < Build (R.Version)));
function Name (R : Release) return Projects.Names is (Projects.Names'Value (R.Project.Name));
(L.Project < R.Project or else
(L.Project = R.Project and then
L.Version < R.Version) or else
(L.Project = R.Project and then
L.Version = R.Version and then
Build (L.Version) < Build (R.Version)));
function Name_Img (R : Release) return Name_String is (Image (R.Name));
overriding function Project (R : Release) return Alire.Project is (R.Project);
function Variant (R : Release) return String is
(R.Project.Variant);
function Project_Base (R : Release) return String is
(Utils.Head (+R.Project, Extension_Separator));
function Is_Variant (R : Release) return Boolean is (Utils.Contains (R.Variant, ":"));
function Description (R : Release) return Description_String is (Projects.Description (R.Name));
function Notes (R : Release) return Description_String is (R.Notes);
function Depends (R : Release) return Conditional.Dependencies is (R.Dependencies);
@@ -173,14 +172,14 @@ private
function Available (R : Release) return Requisites.Tree is (R.Available);
function Milestone (R : Release) return Milestones.Milestone is
(Milestones.New_Milestone (R.Name, R.Version));
(Milestones.New_Milestone (R.Project, R.Version));
function Default_Executable (R : Release) return String is
(Utils.Replace (R.Variant, ":", "_") & OS_Lib.Exe_Suffix);
(Utils.Replace (+R.Project, ":", "_") & OS_Lib.Exe_Suffix);
use all type Origins.Kinds;
function Image (R : Release) return Folder_String is
(Image (R.Name) & "_" &
function Unique_Folder (R : Release) return Folder_String is
(Utils.Head (+R.Project, Extension_Separator) & "_" &
Image (R.Version) & "_" &
(case R.Origin.Kind is
when Filesystem => "filesystem",
+6 -6
View File
@@ -23,19 +23,19 @@ package body Alire.Root is
-- Set --
---------
function Set (Project : Projects.Names;
function Set (Project : Alire.Project;
Version : Semantic_Versioning.Version)
return Roots.Root
is
begin
if Index.Exists (Projects.Image (Project), Version) then
Root := new Roots.Root'(Roots.New_Root (Index.Find (Projects.Image (Project), Version)));
if Index.Exists (Project, Version) then
Root := new Roots.Root'(Roots.New_Root (Index.Find (Project, Version)));
Trace.Debug ("Storing indexed release as root: " & Root.Release.Milestone.Image);
return Root.all;
else
-- Session is outdated or outside
Trace.Warning ("Storing incomplete root for outdated session");
return Set (Projects.Image (Project),
return Set (Project,
Conditional.For_Dependencies.Empty);
end if;
end Set;
@@ -44,12 +44,12 @@ package body Alire.Root is
-- Set --
---------
function Set (Project : Name_String;
function Set (Project : Alire.Project;
Dependencies : Conditional.Dependencies)
return Roots.Root
is
begin
Trace.Debug ("Storing unindexed project as root:" & Project);
Trace.Debug ("Storing unindexed project as root:" & (+Project));
Root := new Roots.Root'(Roots.New_Root (Project, Dependencies));
return Root.all;
end Set;
+2 -3
View File
@@ -1,5 +1,4 @@
with Alire.Conditional;
with Alire.Projects;
with Alire.Roots;
with Semantic_Versioning;
@@ -10,12 +9,12 @@ package Alire.Root is
-- The two flavors distinguish when it is an already indexed project and a new unindexed one (working copy)
function Set (Project : Projects.Names;
function Set (Project : Alire.Project;
Version : Semantic_Versioning.Version)
return Roots.Root;
-- All information will be taken from the indexed release
function Set (Project : Name_String;
function Set (Project : Alire.Project;
Dependencies : Conditional.Dependencies)
return Roots.Root;
-- An unindexed working copy
+13 -8
View File
@@ -2,6 +2,7 @@ with Alire.Conditional;
with Alire.Containers;
with Alire.OS_Lib;
with Alire.Releases;
with Alire.Utils;
package Alire.Roots is
@@ -11,14 +12,15 @@ package Alire.Roots is
function New_Root (R : Releases.Release) return Root;
function New_Root (Name : Name_String;
function New_Root (Name : Alire.Project;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty)
return Root;
function Default_Executable (R : Root) return String;
function Dependencies (R : Root) return Conditional.Dependencies;
function Is_Released (R : Root) return Boolean;
function Name (R : Root) return Name_String;
function Project (R : Root) return Alire.Project;
function Project_Base (R : Root) return String; -- see Release.Project_Base
function Release (R : Root) return Releases.Release with Pre => R.Is_Released;
private
@@ -26,7 +28,7 @@ private
type Root (Name_Len : Natural; Released : Boolean) is tagged record
case Released is
when False =>
Name : String (1 .. Name_Len);
Project : Alire.Project (1 .. Name_Len);
Dependencies : Conditional.Dependencies;
when True =>
Release : Containers.Release_H;
@@ -36,7 +38,7 @@ private
function New_Root (R : Releases.Release) return Root is
(0, True, Containers.Release_Holders.To_Holder (R));
function New_Root (Name : Name_String;
function New_Root (Name : Alire.Project;
Dependencies : Conditional.Dependencies := Conditional.For_Dependencies.Empty)
return Root is
(Name'Length, False, Name, Dependencies);
@@ -44,7 +46,7 @@ private
function Default_Executable (R : Root) return String is
(if R.Released
then R.Release.Constant_Reference.Default_Executable
else R.Name & OS_Lib.Exe_Suffix);
else +R.Project & OS_Lib.Exe_Suffix);
function Dependencies (R : Root) return Conditional.Dependencies is
(if R.Released
@@ -53,10 +55,13 @@ private
function Is_Released (R : Root) return Boolean is (R.Released);
function Name (R : Root) return Name_String is
function Project (R : Root) return Alire.Project is
(if R.Released
then R.Release.Constant_Reference.Name_Img
else R.Name);
then R.Release.Constant_Reference.Project
else R.Project);
function Project_Base (R : Root) return String is
(Utils.Head (+R.Project, Extension_Separator));
function Release (R : Root) return Releases.Release is (R.Release.Element);
+4 -5
View File
@@ -1,5 +1,4 @@
with Alire.Conditional;
with Alire.Projects;
with Semantic_Versioning;
with Semantic_Versioning.Expressions;
@@ -10,7 +9,7 @@ package Alire.Versions with Preelaborate is
type Versioned is interface;
function Name (V : Versioned) return Projects.Names is abstract;
function Project (V : Versioned) return Alire.Project is abstract;
function Version (V : Versioned) return Semantic_Versioning.Version is abstract;
@@ -41,12 +40,12 @@ private
use Semantic_Versioning;
function This_Version (V : Versioned'Class) return Conditional.Dependencies is
(Conditional.New_Dependency (V.Name, Exactly (V.Version)));
(Conditional.New_Dependency (V.Project, Exactly (V.Version)));
function Within_Major (V : Versioned'Class) return Conditional.Dependencies is
(Conditional.New_Dependency (V.Name, Within_Major (V.Version)));
(Conditional.New_Dependency (V.Project, Within_Major (V.Version)));
function Within_Minor (V : Versioned'Class) return Conditional.Dependencies is
(Conditional.New_Dependency (V.Name, Within_Minor (V.Version)));
(Conditional.New_Dependency (V.Project, Within_Minor (V.Version)));
end Alire.Versions;
+12 -13
View File
@@ -10,28 +10,27 @@ 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)
Extension_Separator : constant Character := '.';
-- Refers to extension releases! Nothing to do with files
-- Strings that are used quite generally
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' | '_');
type Project is new String with Dynamic_Predicate =>
Project'Length >= 3 and then
Project (Project'First) /= '_' and then
Project (Project'First) /= ':' and then
Project (Project'Last) /= ':' and then
(for all C of Project => C in 'a' .. 'z' | '0' .. '9' | '_' | '.' );
subtype Designation_String is String with Dynamic_Predicate =>
Designation_String'Length >= 7 and then
Designation_String'Length <= Max_Name_Length * 2 + 1 and then
Designation_String (Designation_String'First) /= '_' and then
Designation_String (Designation_String'First) /= ':' and then
Designation_String (Designation_String'Last) /= ':' and then
(for all C of Designation_String => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | ':' );
function "+" (P : Project) return String is (String (P));
function "+" (P : String) return Project is (Project (P));
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
(for all C of Folder_String => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '.');
(for all C of Folder_String => C in 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | Extension_Separator);
-- Used for cross-platform folder names
---------------