aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'g_octave/description.py')
-rw-r--r--g_octave/description.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/g_octave/description.py b/g_octave/description.py
index 8fcd383..a19fb67 100644
--- a/g_octave/description.py
+++ b/g_octave/description.py
@@ -128,8 +128,11 @@ class Description(object):
# add the 'self_depends' key
self._desc['self_depends'] = list()
+
+ # add the 'gentoo_license' key
+ self._desc['license_gentoo'] = ''
- # parse the dependencies
+ # parse the dependencies and license
for key in self._desc:
# depends
@@ -141,6 +144,14 @@ class Description(object):
# requirements
if key in ('systemrequirements', 'buildrequires') and parse_sysreq:
self._desc[key] = self._parse_depends(self._desc[key])
+
+ # license
+ if key == 'license':
+ new_license = self._config.licenses.get(self._desc['license'])
+ if new_license not in [None, '']:
+ self._desc['license_gentoo'] = new_license
+ else:
+ self._desc['license_gentoo'] = self._desc['license']
def _parse_depends(self, depends):