]> git.draconx.ca Git - gentoo-draconx.git/blob - media-fonts/mplus-t-fonts/mplus-t-fonts-20180128-r2.ebuild
media-fonts/mplus-t-fonts: Update for new python eclasses.
[gentoo-draconx.git] / media-fonts / mplus-t-fonts / mplus-t-fonts-20180128-r2.ebuild
1 # Copyright © 2014, 2018-2020 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or later.
3 # There is NO WARRANTY, to the extent permitted by law.
4
5 EAPI=7
6 PYTHON_COMPAT=( python2_7 python3_{5..8} )
7
8 inherit python-any-r1 font
9
10 SHA1=5d3f16e91969123b8960e6806a9eade8a616f064
11
12 DESCRIPTION="Variant of the M+ fonts with enlarged CJK glyphs"
13 SRC_URI="https://git.draconx.ca/gitweb/scripts.git/snapshot/$SHA1.tar.xz
14                 -> scripts-$SHA1.tar.xz"
15
16 LICENSE="WTFPL-2 mplus-fonts IPAfont"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm"
19
20 BDEPEND="media-fonts/mplus-outline-fonts[ipafont]
21         $(python_gen_any_dep \
22                 'media-gfx/fontforge[python,${PYTHON_SINGLE_USEDEP}]')"
23
24 python_check_deps () {
25         has_version -b "media-gfx/fontforge[${PYTHON_SINGLE_USEDEP}]"
26 }
27
28 S=$WORKDIR/$SHA1
29 MPLUSDIR=$EPREFIX/usr/share/fonts/mplus-outline-fonts
30
31 FONT_S=$S/inst
32 FONT_SUFFIX=ttf
33
34 pkg_setup () {
35         python-any-r1_pkg_setup
36         font_pkg_setup
37 }
38
39 src_compile () {
40         ln -s "$MPLUSDIR"/*.ttf . || die
41         python mplus-t-gen.py || die
42
43         mkdir inst
44         mv M+?T+IPAG.ttf inst
45 }