From 5f2d851c901bfa1bb8b0c08165223c5317a0aed9 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Mon, 2 Aug 2010 23:03:54 -0300 Subject: added support to a proper manipulation of licenses --- g_octave/description.py | 13 ++++++++++++- g_octave/ebuild.py | 3 ++- 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': '', -- cgit v1.2.3-65-gdbad