media-fonts/noto-emoji: fix python support
authorMike Gilbert <floppym@gentoo.org>
Fri, 24 Apr 2020 18:49:30 +0000 (14:49 -0400)
committerMike Gilbert <floppym@gentoo.org>
Fri, 24 Apr 2020 19:12:23 +0000 (15:12 -0400)
Closes: https://bugs.gentoo.org/719264
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
media-fonts/noto-emoji/noto-emoji-20200311.ebuild
media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild
media-fonts/noto-emoji/noto-emoji-20200317.ebuild

index 8c9d46ac17e5d06296a6acdf8a3360f831946479..96e7679fa644f94f7d61825ae12e6f0907ba5fa4 100644 (file)
@@ -17,7 +17,7 @@ SLOT="0"
 KEYWORDS="amd64"
 IUSE=""
 
-DEPEND="${PYTHON_DEPS}
+BDEPEND="${PYTHON_DEPS}
        app-arch/zopfli
        $(python_gen_any_dep '
                dev-python/fonttools[${PYTHON_USEDEP}]
@@ -27,7 +27,6 @@ DEPEND="${PYTHON_DEPS}
        x11-libs/cairo
        || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
 "
-RDEPEND=""
 
 RESTRICT="binchecks strip"
 
@@ -37,8 +36,12 @@ FONT_S="${S}"
 FONT_SUFFIX="ttf"
 
 python_check_deps() {
-       has_version "dev-python/fonttools[${PYTHON_USEDEP}]" && \
-        has_version "dev-python/nototools[${PYTHON_USEDEP}]"
+       has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" &&
+       has_version -b "dev-python/nototools[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       font_pkg_setup
 }
 
 PATCHES=(
@@ -58,6 +61,11 @@ src_prepare() {
        fi
 }
 
+src_compile() {
+       python_setup
+       default
+}
+
 src_install() {
        font_src_install
 
index e34508200bf0685e6a27acf8faac6a2f08ba7499..c676a419e557ab1e5f1ae41d54c8000c18517ccb 100644 (file)
@@ -17,7 +17,8 @@ SLOT="0"
 KEYWORDS="~amd64"
 IUSE="buildfont"
 
-DEPEND="buildfont? (
+BDEPEND="
+       buildfont? (
                ${PYTHON_DEPS}
                app-arch/zopfli
                $(python_gen_any_dep '
@@ -29,15 +30,18 @@ DEPEND="buildfont? (
                || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
        )
 "
-RDEPEND=""
 
 RESTRICT="binchecks strip"
 
 S="${WORKDIR}/${PN}-${COMMIT}"
 
 python_check_deps() {
-       has_version "dev-python/fonttools[${PYTHON_USEDEP}]" && \
-        has_version "dev-python/nototools[${PYTHON_USEDEP}]"
+       has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" &&
+       has_version -b "dev-python/nototools[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       font_pkg_setup
 }
 
 src_prepare() {
@@ -55,7 +59,7 @@ src_prepare() {
                eapply "${FILESDIR}"/${PN}-zopflipng-verbose.patch
 
                # Based on Fedora patch to allow graphicsmagick usage
-               if has_version media-gfx/graphicsmagick; then
+               if has_version -b media-gfx/graphicsmagick; then
                        eapply "${FILESDIR}/${PN}-20190328-use-gm.patch"
                fi
        fi
@@ -68,6 +72,7 @@ src_compile() {
                einfo "To build fonts based on latest images enable 'buildfont'"
                einfo "USE (that will require more time and resources too)."
        else
+               python_setup
                einfo "Building fonts..."
                default
        fi
index 73217e5becc4c19c965d8410af90fefdda09ffc5..b4230796aef14d7e0942648cf14143ca2b7fa57b 100644 (file)
@@ -17,7 +17,7 @@ SLOT="0"
 KEYWORDS="~amd64"
 IUSE=""
 
-DEPEND="${PYTHON_DEPS}
+BDEPEND="${PYTHON_DEPS}
        app-arch/zopfli
        $(python_gen_any_dep '
                dev-python/fonttools[${PYTHON_USEDEP}]
@@ -27,7 +27,6 @@ DEPEND="${PYTHON_DEPS}
        x11-libs/cairo
        || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
 "
-RDEPEND=""
 
 RESTRICT="binchecks strip"
 
@@ -37,8 +36,12 @@ FONT_S="${S}"
 FONT_SUFFIX="ttf"
 
 python_check_deps() {
-       has_version "dev-python/fonttools[${PYTHON_USEDEP}]" && \
-        has_version "dev-python/nototools[${PYTHON_USEDEP}]"
+       has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" &&
+       has_version -b "dev-python/nototools[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       font_pkg_setup
 }
 
 PATCHES=(
@@ -58,6 +61,11 @@ src_prepare() {
        fi
 }
 
+src_compile() {
+       python_setup
+       default
+}
+
 src_install() {
        font_src_install