License names from choosealicense project

This commit is contained in:
Alejandro R. Mosteo
2018-02-25 21:58:55 +01:00
parent 19c0607407
commit 49e217afa6
4 changed files with 64 additions and 1 deletions
+1
View File
@@ -17,6 +17,7 @@ package Alire.Index.RxAda is
Executable ("rx-examples-tests") and
Executable ("rx-examples-threading") and
License (LGPL_3_0) and
Maintainer ("alejandro@mosteo.com") and
Website (Repo));
+7 -1
View File
@@ -3,10 +3,12 @@ private with Alire_Early_Elaboration; pragma Unreferenced (Alire_Early_Elaborati
with Alire.Containers;
with Alire.Compilers;
with Alire.Dependencies.Vectors;
with Alire.Licensing;
with Alire.Operating_Systems;
with Alire.Origins;
with Alire.Properties;
with Alire.Properties.Labeled;
with Alire.Properties.Licenses;
with Alire.Releases;
with Alire.Requisites;
with Alire.Requisites.Platform;
@@ -88,8 +90,12 @@ package Alire.Index is
function Maintainer is new Properties.Labeled.Generic_New_Label (Properties.Labeled.Maintainer);
function Website is new Properties.Labeled.Generic_New_Label (Properties.Labeled.Website);
function License (L : Licensing.Licenses) return Properties.Property'Class is
(Properties.Licenses.Values.New_Property (L));
use all type Alire.Dependencies.Vectors.Vector;
use all type Compilers.Compilers;
use all type Licensing.Licenses;
use all type Operating_Systems.Operating_Systems;
use all type Properties.Property'Class;
use all type Requisites.Requisite'Class;
@@ -109,7 +115,7 @@ package Alire.Index is
-- Specific shortcuts:
function Compiler_Is_At_Least (V : Compilers.Compilers) return Requisites.Requisite'Class
renames Requisites.Platform.Compiler_Is_At_Least;
renames Requisites.Platform.Compiler_Is_At_Least;
function System_is (V : Operating_Systems.Operating_Systems) return Requisites.Requisite'Class
renames Requisites.Platform.System_Is;
+41
View File
@@ -0,0 +1,41 @@
package Alire.Licensing with Preelaborate is
-- From https://github.com/github/choosealicense.com
type Licenses is (AFL_3_0,
AGPL_3_0,
Apache_2_0,
Artistic_2_0,
BSD_2_Clause,
BSD_3_Clause_Clear,
BSD_3_Clause,
BSL_1_0,
CC0_1_0,
CC_BY_4_0,
CC_BY_SA_4_0,
ECL_2_0,
EPL_1_0,
EPL_2_0,
EUPL_1_1,
EUPL_1_2,
GPL_2_0,
GPL_3_0,
ISC,
LGPL_2_1,
LGPL_3_0,
LPPL_1_3c,
MIT,
MPL_2_0,
MS_PL,
MS_RL,
NCSA,
OFL_1_1,
OSL_3_0,
PostgreSQL,
Unlicense,
WTFPL,
Zlib,
Public_Domain,
Unknown);
end Alire.Licensing;
+15
View File
@@ -0,0 +1,15 @@
with Alire.Licensing;
package Alire.Properties.Licenses is
function Image (L : Licensing.Licenses) return String;
package Values is new Properties.Values (Alire.Licensing.Licenses,
Image);
private
function Image (L : Licensing.Licenses) return String is
("License: " & L'Image);
end Alire.Properties.Licenses;