1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
8 inherit eutils python-r1
10 DESCRIPTION="Unit conversion program"
11 HOMEPAGE="https://www.gnu.org/software/units/units.html"
12 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
14 LICENSE="FDL-1.3 GPL-3"
16 KEYWORDS="~alpha amd64 ~arm hppa ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
22 dev-lang/python-exec:2
28 dev-python/unidecode[${PYTHON_USEDEP}]
34 local UNITS_PYTHON_MAJOR
36 UNITS_PYTHON_MAJOR=${EPYTHON/.*}
38 echo ${UNITS_PYTHON_MAJOR/*([[:alpha:]])}
40 sed -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" units_cur${UNITS_PYTHON_MAJOR} > units_cur-${EPYTHON}
44 use units_cur && python_foreach_impl units_cur_prepare
52 python_newexe units_cur-${EPYTHON} units_cur
56 emake DESTDIR="${D}" HAVE_PYTHON=no install
58 dodoc ChangeLog NEWS README
60 use units_cur && python_foreach_impl units_cur_install