Skip to content

Commit 8cfcf2c

Browse files
committed
add SPDX license data version 3.26
1 parent 8f5ec4e commit 8cfcf2c

File tree

9 files changed

+10155
-353
lines changed

9 files changed

+10155
-353
lines changed

Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs

Lines changed: 67 additions & 46 deletions
Large diffs are not rendered by default.

Cabal-syntax/src/Distribution/SPDX/LicenseId.hs

Lines changed: 393 additions & 297 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SPDX_EXCEPTION_HS:=Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
100100
.PHONY: spdx
101101
spdx : $(SPDX_LICENSE_HS) $(SPDX_EXCEPTION_HS)
102102

103-
SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16 3.23 3.25
103+
SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16 3.23 3.25 3.26
104104

105105
$(SPDX_LICENSE_HS) : templates/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses-3.0.json license-list-data/licenses-3.2.json
106106
cabal run --builddir=dist-newstyle-meta --project-file=cabal.meta.project gen-spdx -- templates/SPDX.LicenseId.template.hs $(SPDX_LICENSE_VERSIONS:%=license-list-data/licenses-%.json) $(SPDX_LICENSE_HS)

cabal-dev-scripts/src/GenSPDX.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ main = generate =<< O.execParser opts where
3636
<*> licenses "3.16"
3737
<*> licenses "3.23"
3838
<*> licenses "3.25"
39+
<*> licenses "3.26"
3940

4041
template = O.strArgument $ mconcat
4142
[ O.metavar "SPDX.LicenseId.template.hs"

cabal-dev-scripts/src/GenSPDXExc.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ main = generate =<< O.execParser opts where
3636
<*> licenses "3.16"
3737
<*> licenses "3.23"
3838
<*> licenses "3.25"
39+
<*> licenses "3.26"
3940

4041
template = O.strArgument $ mconcat
4142
[ O.metavar "SPDX.LicenseExceptionId.template.hs"

cabal-dev-scripts/src/GenUtils.hs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ data SPDXLicenseListVersion
3333
| SPDXLicenseListVersion_3_16
3434
| SPDXLicenseListVersion_3_23
3535
| SPDXLicenseListVersion_3_25
36+
| SPDXLicenseListVersion_3_26
3637
deriving (Eq, Ord, Show, Enum, Bounded)
3738

3839
allVers :: Set.Set SPDXLicenseListVersion
3940
allVers = Set.fromList [minBound .. maxBound]
4041

4142
prettyVer :: SPDXLicenseListVersion -> Text
43+
prettyVer SPDXLicenseListVersion_3_26 = "SPDX License List 3.26"
4244
prettyVer SPDXLicenseListVersion_3_25 = "SPDX License List 3.25"
4345
prettyVer SPDXLicenseListVersion_3_23 = "SPDX License List 3.23"
4446
prettyVer SPDXLicenseListVersion_3_16 = "SPDX License List 3.16"
@@ -49,6 +51,7 @@ prettyVer SPDXLicenseListVersion_3_2 = "SPDX License List 3.2"
4951
prettyVer SPDXLicenseListVersion_3_0 = "SPDX License List 3.0"
5052

5153
suffixVer :: SPDXLicenseListVersion -> String
54+
suffixVer SPDXLicenseListVersion_3_26 = "_3_26"
5255
suffixVer SPDXLicenseListVersion_3_25 = "_3_25"
5356
suffixVer SPDXLicenseListVersion_3_23 = "_3_23"
5457
suffixVer SPDXLicenseListVersion_3_16 = "_3_16"
@@ -62,22 +65,23 @@ suffixVer SPDXLicenseListVersion_3_0 = "_3_0"
6265
-- Per version
6366
-------------------------------------------------------------------------------
6467

65-
data PerV a = PerV a a a a a a a a
68+
data PerV a = PerV a a a a a a a a a
6669
deriving (Show, Functor, Foldable, Traversable)
6770

6871
class Functor f => Representable i f | f -> i where
6972
index :: i -> f a -> a
7073
tabulate :: (i -> a) -> f a
7174

7275
instance Representable SPDXLicenseListVersion PerV where
73-
index SPDXLicenseListVersion_3_0 (PerV x _ _ _ _ _ _ _) = x
74-
index SPDXLicenseListVersion_3_2 (PerV _ x _ _ _ _ _ _) = x
75-
index SPDXLicenseListVersion_3_6 (PerV _ _ x _ _ _ _ _) = x
76-
index SPDXLicenseListVersion_3_9 (PerV _ _ _ x _ _ _ _) = x
77-
index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _ _) = x
78-
index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _ _) = x
79-
index SPDXLicenseListVersion_3_23 (PerV _ _ _ _ _ _ x _) = x
80-
index SPDXLicenseListVersion_3_25 (PerV _ _ _ _ _ _ _ x) = x
76+
index SPDXLicenseListVersion_3_0 (PerV x _ _ _ _ _ _ _ _) = x
77+
index SPDXLicenseListVersion_3_2 (PerV _ x _ _ _ _ _ _ _) = x
78+
index SPDXLicenseListVersion_3_6 (PerV _ _ x _ _ _ _ _ _) = x
79+
index SPDXLicenseListVersion_3_9 (PerV _ _ _ x _ _ _ _ _) = x
80+
index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _ _ _) = x
81+
index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _ _ _) = x
82+
index SPDXLicenseListVersion_3_23 (PerV _ _ _ _ _ _ x _ _) = x
83+
index SPDXLicenseListVersion_3_25 (PerV _ _ _ _ _ _ _ x _) = x
84+
index SPDXLicenseListVersion_3_26 (PerV _ _ _ _ _ _ _ _ x) = x
8185

8286
tabulate f = PerV
8387
(f SPDXLicenseListVersion_3_0)
@@ -88,6 +92,7 @@ instance Representable SPDXLicenseListVersion PerV where
8892
(f SPDXLicenseListVersion_3_16)
8993
(f SPDXLicenseListVersion_3_23)
9094
(f SPDXLicenseListVersion_3_25)
95+
(f SPDXLicenseListVersion_3_26)
9196

9297
-------------------------------------------------------------------------------
9398
-- Sorting

changelog.d/pr-11014

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
synopsis: 'add SPDX license data version 3.26'
3+
packages: [Cabal]
4+
prs: 11014
5+
---
6+
7+
Update SPDX license data to version 3.26.

0 commit comments

Comments
 (0)