Skip to content

Commit

Permalink
media-fonts/noto-emoji: fix python support
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/719264
Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym committed Apr 24, 2020
1 parent 44acb05 commit 1ac4db7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
16 changes: 12 additions & 4 deletions media-fonts/noto-emoji/noto-emoji-20200311.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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}]
Expand All @@ -27,7 +27,6 @@ DEPEND="${PYTHON_DEPS}
x11-libs/cairo
|| ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
"
RDEPEND=""

RESTRICT="binchecks strip"

Expand All @@ -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=(
Expand All @@ -58,6 +61,11 @@ src_prepare() {
fi
}

src_compile() {
python_setup
default
}

src_install() {
font_src_install

Expand Down
15 changes: 10 additions & 5 deletions media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE="buildfont"

DEPEND="buildfont? (
BDEPEND="
buildfont? (
${PYTHON_DEPS}
app-arch/zopfli
$(python_gen_any_dep '
Expand All @@ -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() {
Expand All @@ -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
Expand All @@ -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
Expand Down
16 changes: 12 additions & 4 deletions media-fonts/noto-emoji/noto-emoji-20200317.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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}]
Expand All @@ -27,7 +27,6 @@ DEPEND="${PYTHON_DEPS}
x11-libs/cairo
|| ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
"
RDEPEND=""

RESTRICT="binchecks strip"

Expand All @@ -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=(
Expand All @@ -58,6 +61,11 @@ src_prepare() {
fi
}

src_compile() {
python_setup
default
}

src_install() {
font_src_install

Expand Down

0 comments on commit 1ac4db7

Please sign in to comment.