app-shells/zfe: add nvchecker
[gentoo-zh.git] / media-fonts / shanggu / shanggu-1.021-r1.ebuild
blob2741ab820519b70b8bbfbd06b9229b29d9908fcf
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit font unpacker
8 DESCRIPTION="A Noto-based font for traditional Chinese characters"
9 HOMEPAGE="https://github.com/GuiWonder/Shanggu"
11 MY_PN="Shanggu"
13 SRC_URI="
14 mono? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}MonoTTFs.7z -> ${MY_PN}Mono-${PV}.7z )
15 round? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}RoundTTFs.7z -> ${MY_PN}Round-${PV}.7z )
16 sans? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}SansTTFs.7z -> ${MY_PN}Sans-${PV}.7z )
17 serif? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}SerifTTFs.7z -> ${MY_PN}Serif-${PV}.7z )
20 S="${WORKDIR}"
21 LICENSE="OFL-1.1"
22 SLOT="0"
23 KEYWORDS="~amd64"
24 IUSE="round sans +serif mono"
25 REQUIRED_USE="|| ( round sans serif mono )"
26 BDEPEND="
27 app-arch/p7zip
29 FONT_CONF=( "${FILESDIR}/70-shanggu.conf" )
30 FONT_SUFFIX="ttf"
31 FONT_S=""
33 src_unpack() {
34 use mono && unpack_7z "${MY_PN}Mono-${PV}.7z"
35 use round && unpack_7z "${MY_PN}Round-${PV}.7z"
36 use sans && unpack_7z "${MY_PN}Sans-${PV}.7z"
37 use serif && unpack_7z "${MY_PN}Serif-${PV}.7z"
40 src_install() {
41 FONT_S=()
43 if use serif; then
44 FONT_S+=(
45 "${S}/${MY_PN}Serif"
46 "${S}/${MY_PN}SerifFANTI"
47 "${S}/${MY_PN}SerifJP"
48 "${S}/${MY_PN}SerifSC"
49 "${S}/${MY_PN}SerifTC"
53 if use sans; then
54 FONT_S+=(
55 "${S}/${MY_PN}Sans"
56 "${S}/${MY_PN}SansFANTI"
57 "${S}/${MY_PN}SansJP"
58 "${S}/${MY_PN}SansSC"
59 "${S}/${MY_PN}SansTC"
63 if use mono; then
64 FONT_S+=(
65 "${S}/${MY_PN}Mono"
66 "${S}/${MY_PN}MonoJP"
67 "${S}/${MY_PN}MonoSC"
68 "${S}/${MY_PN}MonoTC"
72 if use round; then
73 FONT_S+=(
74 "${S}/${MY_PN}Round"
75 "${S}/${MY_PN}RoundFANTI"
76 "${S}/${MY_PN}RoundJP"
77 "${S}/${MY_PN}RoundSC"
78 "${S}/${MY_PN}RoundTC"
82 font_src_install