1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_5,3_6} )
6 inherit 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}]
23 dev-python/requests[${PYTHON_USEDEP}]
30 "${FILESDIR}"/${PN}-2.17-network-sandbox.patch
34 use units_cur && python-single-r1_pkg_setup
39 --sharedstatedir="${EROOT}/var/lib" \
48 emake DESTDIR="${D}" install
50 dodoc ChangeLog NEWS README
52 # we're intentionally delaying this since 'make install' would
53 # get confused if we shove 'units_cur' there, and there is no real
54 # need to add more complexity for it
55 if use units_cur; then
57 -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \
58 -e 's|^#!|&/usr/bin/python|g' \
59 units_cur_inst > units_cur || die
60 python_fix_shebang units_cur
61 python_doscript units_cur