commit: bc165d784681b20934318f5e50386951c3ecdeb4 Author: Brian Evans <grknight <AT> gentoo <DOT> org> AuthorDate: Tue Dec 10 15:49:58 2019 +0000 Commit: Brian Evans <grknight <AT> gentoo <DOT> org> CommitDate: Tue Dec 10 15:49:58 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc165d78
media-fonts/liberation-fonts: Fix python-any-r1 usage Non-maintainer commit. The usage of python-any-r1 was incomplete. This commit fixes: * Adding python_gen_any_dep so valid USE are connected to python deps * Adding python_check_deps to validate if a dep is actually installed * sed the Makefile to use EPYTHON for consistent builds instead of user pref * Changing DEPEND to BDEPEND on EAPI7 as they are tools run by the build Closes: https://bugs.gentoo.org/698128 Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Brian Evans <grknight <AT> gentoo.org> .../liberation-fonts-2.00.1-r3.ebuild | 15 +++++++++++++-- .../liberation-fonts/liberation-fonts-2.00.5.ebuild | 19 +++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/media-fonts/liberation-fonts/liberation-fonts-2.00.1-r3.ebuild b/media-fonts/liberation-fonts/liberation-fonts-2.00.1-r3.ebuild index 78a09b75e22..f8b2526afc6 100644 --- a/media-fonts/liberation-fonts/liberation-fonts-2.00.1-r3.ebuild +++ b/media-fonts/liberation-fonts/liberation-fonts-2.00.1-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -25,10 +25,21 @@ DEPEND=" fontforge? ( ${PYTHON_DEPS} media-gfx/fontforge - dev-python/fonttools + $(python_gen_any_dep '<dev-python/fonttools-4.0[${PYTHON_USEDEP}]') )" RDEPEND="" +python_check_deps() { + has_version "dev-python/fonttools[${PYTHON_USEDEP}]" +} + +src_prepare() { + default + if use fontforge ; then + sed -i "s/= python/= ${EPYTHON}/" Makefile || die + fi +} + pkg_setup() { if use fontforge; then FONT_S="${S}/${PN}-ttf-${PV}" diff --git a/media-fonts/liberation-fonts/liberation-fonts-2.00.5.ebuild b/media-fonts/liberation-fonts/liberation-fonts-2.00.5.ebuild index 7cff094ba51..4f8f5081e5b 100644 --- a/media-fonts/liberation-fonts/liberation-fonts-2.00.5.ebuild +++ b/media-fonts/liberation-fonts/liberation-fonts-2.00.5.ebuild @@ -9,8 +9,8 @@ inherit font python-any-r1 DESCRIPTION="A Helvetica/Times/Courier replacement TrueType font set, courtesy of Red Hat" HOMEPAGE="https://github.com/liberationfonts/liberation-fonts" -SRC_URI="!fontforge? ( ${HOMEPAGE}/files/2926169/${PN}-ttf-${PV}.tar.gz ) -fontforge? ( ${HOMEPAGE}/files/2926167/${P}.tar.gz )" +SRC_URI="!fontforge? ( https://github.com/liberationfonts/liberation-fonts/files/2926169/${PN}-ttf-${PV}.tar.gz ) +fontforge? ( https://github.com/liberationfonts/liberation-fonts/files/2926167/${P}.tar.gz )" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-solaris" SLOT="0" @@ -21,13 +21,24 @@ FONT_SUFFIX="ttf" FONT_CONF=( "${FILESDIR}/60-liberation.conf" ) -DEPEND=" +BDEPEND=" fontforge? ( ${PYTHON_DEPS} media-gfx/fontforge - dev-python/fonttools + $(python_gen_any_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )" +python_check_deps() { + has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" +} + +src_prepare() { + default + if use fontforge ; then + sed -i "s/= python3/= ${EPYTHON}/" Makefile || die + fi +} + pkg_setup() { if use fontforge; then FONT_S="${S}/${PN}-ttf-${PV}"