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} )
6 inherit eutils python-single-r1
8 DESCRIPTION="Unit conversion program"
9 HOMEPAGE="https://www.gnu.org/software/units/units.html"
10 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
12 LICENSE="FDL-1.3 GPL-3"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
16 REQUIRED_USE="units_cur? ( ${PYTHON_REQUIRED_USE} )"
22 dev-python/future[${PYTHON_USEDEP}]
30 use units_cur && python-single-r1_pkg_setup
34 econf ac_cv_path_PYTHON=no
42 emake DESTDIR="${D}" install
44 dodoc ChangeLog NEWS README
46 # we're intentionally delaying this since 'make install' would
47 # get confused if we shove 'units_cur' there, and there is no real
48 # need to add more complexity for it
49 if use units_cur; then
51 -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \
52 -e 's|^#!|&/usr/bin/python|g' \
53 units_cur_inst > units_cur || die
54 python_fix_shebang units_cur
55 python_doscript units_cur