From af12cc19d24dfb9c07473ee2a0ef28c20388922a Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 7 Feb 2020 18:57:45 +0100 Subject: sci-calculators/units: Switch to PYTHON_MULTI_USEDEP API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- sci-calculators/units/units-2.16-r1.ebuild | 60 +++++++++++++++++++++++++++ sci-calculators/units/units-2.16.ebuild | 58 -------------------------- sci-calculators/units/units-2.18.ebuild | 6 ++- sci-calculators/units/units-2.19-r1.ebuild | 66 ++++++++++++++++++++++++++++++ sci-calculators/units/units-2.19.ebuild | 64 ----------------------------- 5 files changed, 130 insertions(+), 124 deletions(-) create mode 100644 sci-calculators/units/units-2.16-r1.ebuild delete mode 100644 sci-calculators/units/units-2.16.ebuild create mode 100644 sci-calculators/units/units-2.19-r1.ebuild delete mode 100644 sci-calculators/units/units-2.19.ebuild diff --git a/sci-calculators/units/units-2.16-r1.ebuild b/sci-calculators/units/units-2.16-r1.ebuild new file mode 100644 index 000000000000..427210177539 --- /dev/null +++ b/sci-calculators/units/units-2.16-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python{2_7,3_6} ) +inherit eutils python-single-r1 + +DESCRIPTION="Unit conversion program" +HOMEPAGE="https://www.gnu.org/software/units/units.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="FDL-1.3 GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="+units--cur" +REQUIRED_USE="units--cur? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + sys-libs/readline:= + units--cur? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/future[${PYTHON_MULTI_USEDEP}] + dev-python/requests[${PYTHON_MULTI_USEDEP}] + ') + ) +" +DEPEND=" + ${RDEPEND} +" + +pkg_setup() { + use units--cur && python-single-r1_pkg_setup +} + +src_configure() { + econf ac_cv_path_PYTHON=no +} + +src_compile() { + emake ${PN} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc ChangeLog NEWS README + + # we're intentionally delaying this since 'make install' would + # get confused if we shove 'units_cur' there, and there is no real + # need to add more complexity for it + if use units--cur; then + sed \ + -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \ + -e 's|^#!|&/usr/bin/python|g' \ + units_cur_inst > units_cur || die + python_fix_shebang units_cur + python_doscript units_cur + fi +} diff --git a/sci-calculators/units/units-2.16.ebuild b/sci-calculators/units/units-2.16.ebuild deleted file mode 100644 index 9a722304b0b4..000000000000 --- a/sci-calculators/units/units-2.16.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python{2_7,3_6} ) -inherit eutils python-single-r1 - -DESCRIPTION="Unit conversion program" -HOMEPAGE="https://www.gnu.org/software/units/units.html" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="FDL-1.3 GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm hppa ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux" -IUSE="+units--cur" -REQUIRED_USE="units--cur? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - sys-libs/readline:= - units--cur? ( - ${PYTHON_DEPS} - dev-python/future[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - ) -" -DEPEND=" - ${RDEPEND} -" - -pkg_setup() { - use units--cur && python-single-r1_pkg_setup -} - -src_configure() { - econf ac_cv_path_PYTHON=no -} - -src_compile() { - emake ${PN} -} - -src_install() { - emake DESTDIR="${D}" install - - dodoc ChangeLog NEWS README - - # we're intentionally delaying this since 'make install' would - # get confused if we shove 'units_cur' there, and there is no real - # need to add more complexity for it - if use units--cur; then - sed \ - -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \ - -e 's|^#!|&/usr/bin/python|g' \ - units_cur_inst > units_cur || die - python_fix_shebang units_cur - python_doscript units_cur - fi -} diff --git a/sci-calculators/units/units-2.18.ebuild b/sci-calculators/units/units-2.18.ebuild index ab70dde6bd9a..04c2763a1ebe 100644 --- a/sci-calculators/units/units-2.18.ebuild +++ b/sci-calculators/units/units-2.18.ebuild @@ -19,8 +19,10 @@ RDEPEND=" sys-libs/readline:= units--cur? ( ${PYTHON_DEPS} - dev-python/future[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/future[${PYTHON_MULTI_USEDEP}] + dev-python/requests[${PYTHON_MULTI_USEDEP}] + ') ) " DEPEND=" diff --git a/sci-calculators/units/units-2.19-r1.ebuild b/sci-calculators/units/units-2.19-r1.ebuild new file mode 100644 index 000000000000..244e15307d80 --- /dev/null +++ b/sci-calculators/units/units-2.19-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_6} ) +inherit python-single-r1 + +DESCRIPTION="Unit conversion program" +HOMEPAGE="https://www.gnu.org/software/units/units.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="FDL-1.3 GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="+units--cur" +REQUIRED_USE="units--cur? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + sys-libs/readline:= + units--cur? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/future[${PYTHON_MULTI_USEDEP}] + dev-python/requests[${PYTHON_MULTI_USEDEP}] + ') + ) +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-2.17-network-sandbox.patch +) +DOCS=( + ChangeLog NEWS README +) + +pkg_setup() { + use units--cur && python-single-r1_pkg_setup +} + +src_configure() { + econf \ + --sharedstatedir="${EROOT}/var/lib" \ + ac_cv_path_PYTHON=no +} + +src_compile() { + emake ${PN} +} + +src_install() { + default + + # we're intentionally delaying this since 'make install' would + # get confused if we shove 'units_cur' there, and there is no real + # need to add more complexity for it + if use units--cur; then + sed \ + -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \ + -e 's|^#!|&/usr/bin/python|g' \ + units_cur_inst > units_cur || die + python_fix_shebang units_cur + python_doscript units_cur + fi +} diff --git a/sci-calculators/units/units-2.19.ebuild b/sci-calculators/units/units-2.19.ebuild deleted file mode 100644 index 33e0d4159977..000000000000 --- a/sci-calculators/units/units-2.19.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python{2_7,3_6} ) -inherit python-single-r1 - -DESCRIPTION="Unit conversion program" -HOMEPAGE="https://www.gnu.org/software/units/units.html" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="FDL-1.3 GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux" -IUSE="+units--cur" -REQUIRED_USE="units--cur? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - sys-libs/readline:= - units--cur? ( - ${PYTHON_DEPS} - dev-python/future[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - ) -" -DEPEND=" - ${RDEPEND} -" -PATCHES=( - "${FILESDIR}"/${PN}-2.17-network-sandbox.patch -) -DOCS=( - ChangeLog NEWS README -) - -pkg_setup() { - use units--cur && python-single-r1_pkg_setup -} - -src_configure() { - econf \ - --sharedstatedir="${EROOT}/var/lib" \ - ac_cv_path_PYTHON=no -} - -src_compile() { - emake ${PN} -} - -src_install() { - default - - # we're intentionally delaying this since 'make install' would - # get confused if we shove 'units_cur' there, and there is no real - # need to add more complexity for it - if use units--cur; then - sed \ - -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \ - -e 's|^#!|&/usr/bin/python|g' \ - units_cur_inst > units_cur || die - python_fix_shebang units_cur - python_doscript units_cur - fi -} -- cgit v1.2.3-65-gdbad