1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
7 inherit eutils python-single-r1
9 DESCRIPTION="Unit conversion program"
10 HOMEPAGE="https://www.gnu.org/software/units/units.html"
11 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
13 LICENSE="FDL-1.3 GPL-3"
15 KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
17 REQUIRED_USE="units_cur? ( ${PYTHON_REQUIRED_USE} )"
22 dev-python/unidecode[${PYTHON_USEDEP}]
28 use units_cur && python-single-r1_pkg_setup
32 econf ac_cv_path_PYTHON=no
36 emake DESTDIR="${D}" install
38 dodoc ChangeLog NEWS README
40 # we're intentionally delaying this since 'make install' would
41 # get confused if we shove 'units_cur' there, and there is no real
42 # need to add more complexity for it
43 if use units_cur; then
45 python_is_python3 && pyver=3 || pyver=2
46 sed -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \
47 "units_cur${pyver}" > units_cur || die
48 python_doscript units_cur