summaryrefslogtreecommitdiff
blob: 0dfc5ede5b0b207708459039611ffc0a75a880b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 2019-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit font

DESCRIPTION="The package of IBM's typeface"
HOMEPAGE="https://github.com/IBM/plex"
SRC_URI="https://github.com/IBM/plex/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="OFL-1.1"
SLOT="0"
KEYWORDS="amd64 ~loong ~riscv x86"
IUSE="otf +ttf"

REQUIRED_USE="^^ ( otf ttf )"

S="${WORKDIR}/${P/ibm-}"

DOCS=( README.md )

FONT_SUFFIX=""

src_install() {

if use otf; then

	FONT_SUFFIX+="otf"

	FONT_S=(
		IBM-Plex-Mono/fonts/complete/otf
		IBM-Plex-Sans/fonts/complete/otf
		IBM-Plex-Sans-Arabic/fonts/complete/otf
		IBM-Plex-Sans-KR/fonts/complete/otf
		IBM-Plex-Sans-Condensed/fonts/complete/otf
		IBM-Plex-Sans-Devanagari/fonts/complete/otf
		IBM-Plex-Sans-Hebrew/fonts/complete/otf
		IBM-Plex-Serif/fonts/complete/otf
		IBM-Plex-Sans-Thai/fonts/complete/otf
		IBM-Plex-Sans-Thai-Looped/fonts/complete/otf )
fi

if use ttf; then

	FONT_SUFFIX+="ttf"

	FONT_S=(
		IBM-Plex-Mono/fonts/complete/ttf
		IBM-Plex-Sans-Arabic/fonts/complete/ttf
		IBM-Plex-Sans-KR/fonts/complete/ttf/hinted
		IBM-Plex-Sans-KR/fonts/complete/ttf/unhinted
		IBM-Plex-Sans-Condensed/fonts/complete/ttf
		IBM-Plex-Sans-Devanagari/fonts/complete/ttf
		IBM-Plex-Sans-Hebrew/fonts/complete/ttf
		IBM-Plex-Sans/fonts/complete/ttf
		IBM-Plex-Serif/fonts/complete/ttf
		IBM-Plex-Sans-Thai/fonts/complete/ttf
		IBM-Plex-Sans-Thai-Looped/fonts/complete/ttf
		IBM-Plex-Sans-Variable/fonts/complete/ttf )
fi

font_src_install

}