aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-08-02 23:03:54 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-08-02 23:03:54 -0300
commit5f2d851c901bfa1bb8b0c08165223c5317a0aed9 (patch)
tree41a24bab5e7622a337b2466134260bd66c01fb53
parentsmall fixes (diff)
downloadg-octave-5f2d851c901bfa1bb8b0c08165223c5317a0aed9.tar.gz
g-octave-5f2d851c901bfa1bb8b0c08165223c5317a0aed9.tar.bz2
g-octave-5f2d851c901bfa1bb8b0c08165223c5317a0aed9.zip
added support to a proper manipulation of licenses
-rw-r--r--g_octave/description.py13
-rw-r--r--g_octave/ebuild.py3
2 files changed, 14 insertions, 2 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):
diff --git a/g_octave/ebuild.py b/g_octave/ebuild.py
index 442eee3..f6eacef 100644
--- a/g_octave/ebuild.py
+++ b/g_octave/ebuild.py
@@ -136,7 +136,7 @@ inherit g-octave%(eutils)s
DESCRIPTION="%(description)s"
HOMEPAGE="%(url)s"
-LICENSE="|| ( GPL-2 GPL-3 LGPL BSD GFDL )"
+LICENSE="%(license)s"
SLOT="0"
KEYWORDS="%(keywords)s"
IUSE=""
@@ -172,6 +172,7 @@ RDEPEND="${DEPEND}
'eutils': '',
'description': description,
'url': self.__desc.url,
+ 'license': self.__desc.license_gentoo,
'keywords': self.__keywords(accept_keywords),
'category': category,
'depend': '',