1 # Copyright 2021-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit font check-reqs
8 DESCRIPTION
="Nerd Fonts is a project that patches developer targeted fonts with glyphs"
9 HOMEPAGE
="https://github.com/ryanoasis/nerd-fonts"
10 COMMON_URI
="https://github.com/ryanoasis/${PN}/releases/download/v${PV}"
11 TAG_URI
="https://github.com/ryanoasis/nerd-fonts/raw/v${PV}"
81 0xproto? ( ${COMMON_URI}/0xProto.zip -> 0xProto-${PV}.zip )
82 3270? ( ${COMMON_URI}/3270.zip -> 3270-nf-${PV}.zip )
83 agave? ( ${COMMON_URI}/Agave.zip -> Agave-nf-${PV}.zip )
84 anonymouspro? ( ${COMMON_URI}/AnonymousPro.zip -> AnonymousPro-nf-${PV}.zip )
85 arimo? ( ${COMMON_URI}/Arimo.zip -> Arimo-nf-${PV}.zip )
86 aurulentsansmono? ( ${COMMON_URI}/AurulentSansMono.zip -> AurulentSansMono-nf-${PV}.zip )
87 bigblueterminal? ( ${COMMON_URI}/BigBlueTerminal.zip -> BigBlueTerminal-nf-${PV}.zip )
88 bitstreamverasansmono? ( ${COMMON_URI}/BitstreamVeraSansMono.zip -> BitstreamVeraSansMono-nf-${PV}.zip )
89 cascadiacode? ( ${COMMON_URI}/CascadiaCode.zip -> CascadiaCode-nf-${PV}.zip )
90 cascadiamono? ( ${COMMON_URI}/CascadiaMono.zip -> CascadiaMono-nf-${PV}.zip )
91 codenewroman? ( ${COMMON_URI}/CodeNewRoman.zip -> CodeNewRoman-nf-${PV}.zip )
92 comicshannsmono? ( ${COMMON_URI}/ComicShannsMono.zip -> ComicShannsMono-nf-${PV}.zip )
93 commitmono? ( ${COMMON_URI}/CommitMono.zip -> CommitMono-nf-${PV}.zip )
94 cousine? ( ${COMMON_URI}/Cousine.zip -> Cousine-nf-${PV}.zip )
95 d2coding? ( ${COMMON_URI}/D2Coding.zip -> D2Coding-nf-${PV}.zip )
96 daddytimemono? ( ${COMMON_URI}/DaddyTimeMono.zip -> DaddyTimeMono-nf-${PV}.zip )
97 envycoder? ( ${COMMON_URI}/EnvyCodeR.zip -> EnvyCodeR-nf-${PV}.zip )
98 dejavusansmono? ( ${COMMON_URI}/DejaVuSansMono.zip -> DejaVuSansMono-nf-${PV}.zip )
99 droidsansmono? ( ${COMMON_URI}/DroidSansMono.zip -> DroidSansMono-nf-${PV}.zip )
100 fantasquesansmono? ( ${COMMON_URI}/FantasqueSansMono.zip -> FantasqueSansMono-nf-${PV}.zip )
101 firacode? ( ${COMMON_URI}/FiraCode.zip -> FiraCode-nf-${PV}.zip )
102 firamono? ( ${COMMON_URI}/FiraMono.zip -> FiraMono-nf-${PV}.zip )
103 geistmono? ( ${COMMON_URI}/GeistMono.zip -> GeistMono-nf-${PV}.zip )
104 go-mono? ( ${COMMON_URI}/Go-Mono.zip -> Go-Mono-nf-${PV}.zip )
105 gohu? ( ${COMMON_URI}/Gohu.zip -> Gohu-nf-${PV}.zip )
106 hack? ( ${COMMON_URI}/Hack.zip -> Hack-nf-${PV}.zip )
107 hasklig? ( ${COMMON_URI}/Hasklig.zip -> Hasklig-nf-${PV}.zip )
108 heavydata? ( ${COMMON_URI}/HeavyData.zip -> HeavyData-nf-${PV}.zip )
109 hermit? ( ${COMMON_URI}/Hermit.zip -> Hermit-nf-${PV}.zip )
110 ia-writer? ( ${COMMON_URI}/iA-Writer.zip -> iA-Writer-nf-${PV}.zip )
111 ibmplexmono? ( ${COMMON_URI}/IBMPlexMono.zip -> IBMPlexMono-nf-${PV}.zip )
112 intelonemono? ( ${COMMON_URI}/IntelOneMono.zip -> IntelOneMono-nf-${PV}.zip )
113 inconsolata? ( ${COMMON_URI}/Inconsolata.zip -> Inconsolata-nf-${PV}.zip )
114 inconsolatago? ( ${COMMON_URI}/InconsolataGo.zip -> InconsolataGo-nf-${PV}.zip )
115 inconsolatalgc? ( ${COMMON_URI}/InconsolataLGC.zip -> InconsolataLGC-nf-${PV}.zip )
116 iosevka? ( ${COMMON_URI}/Iosevka.zip -> Iosevka-nf-${PV}.zip )
117 iosevkaterm? ( ${COMMON_URI}/IosevkaTerm.zip -> IosevkaTerm-nf-${PV}.zip )
118 iosevkatermslab? ( ${COMMON_URI}/IosevkaTermSlab.zip -> IosevkaTermSlab-nf-${PV}.zip )
119 jetbrainsmono? ( ${COMMON_URI}/JetBrainsMono.zip -> JetBrainsMono-nf-${PV}.zip )
120 lekton? ( ${COMMON_URI}/Lekton.zip -> Lekton-nf-${PV}.zip )
121 liberationmono? ( ${COMMON_URI}/LiberationMono.zip -> LiberationMono-nf-${PV}.zip )
122 lilex? ( ${COMMON_URI}/Lilex.zip -> Lilex-nf-${PV}.zip )
123 meslo? ( ${COMMON_URI}/Meslo.zip -> Meslo-nf-${PV}.zip )
124 martianmono? ( ${COMMON_URI}/MartianMono.zip -> MartianMono-nf-${PV}.zip )
125 monofur? ( ${COMMON_URI}/Monofur.zip -> Monofur-nf-${PV}.zip )
126 monoid? ( ${COMMON_URI}/Monoid.zip -> Monoid-nf-${PV}.zip )
127 mononoki? ( ${COMMON_URI}/Mononoki.zip -> Mononoki-nf-${PV}.zip )
128 monaspace? ( ${COMMON_URI}/Monaspace.zip -> Monaspace-nf-${PV}.zip )
129 mplus? ( ${COMMON_URI}/MPlus.zip -> MPlus-nf-${PV}.zip )
130 nerdfontssymbolsonly? ( ${COMMON_URI}/NerdFontsSymbolsOnly.zip -> NerdFontsSymbolsOnly-nf-${PV}.zip )
131 noto? ( ${COMMON_URI}/Noto.zip -> Noto-nf-${PV}.zip )
132 opendyslexic? ( ${COMMON_URI}/OpenDyslexic.zip -> OpenDyslexic-nf-${PV}.zip )
133 overpass? ( ${COMMON_URI}/Overpass.zip -> Overpass-nf-${PV}.zip )
134 profont? ( ${COMMON_URI}/ProFont.zip -> ProFont-nf-${PV}.zip )
135 proggyclean? ( ${COMMON_URI}/ProggyClean.zip -> ProggyClean-nf-${PV}.zip )
136 robotomono? ( ${COMMON_URI}/RobotoMono.zip -> RobotoMono-nf-${PV}.zip )
137 sharetechmono? ( ${COMMON_URI}/ShareTechMono.zip -> ShareTechMono-nf-${PV}.zip )
138 sourcecodepro? ( ${COMMON_URI}/SourceCodePro.zip -> SourceCodePro-nf-${PV}.zip )
139 spacemono? ( ${COMMON_URI}/SpaceMono.zip -> SpaceMono-nf-${PV}.zip )
140 terminus? ( ${COMMON_URI}/Terminus.zip -> Terminus-nf-${PV}.zip )
141 tinos? ( ${COMMON_URI}/Tinos.zip -> Tinos-nf-${PV}.zip )
142 ubuntu? ( ${COMMON_URI}/Ubuntu.zip -> Ubuntu-nf-${PV}.zip )
143 ubuntumono? ( ${COMMON_URI}/UbuntuMono.zip -> UbuntuMono-nf-${PV}.zip )
144 victormono? ( ${COMMON_URI}/VictorMono.zip -> VictorMono-nf-${PV}.zip )
155 UbuntuFontLicense-1.0"
157 KEYWORDS
="~amd64 ~loong ~x86"
159 DEPEND
="app-arch/unzip"
160 RDEPEND
="media-libs/fontconfig"
162 CHECKREQS_DISK_BUILD
="3G"
163 CHECKREQS_DISK_USR
="4G"
165 IUSE_FLAGS
=(${FONTS[*],,})
166 IUSE
="+nerdfontssymbolsonly ${IUSE_FLAGS[*]}"
167 REQUIRED_USE
="|| ( nerdfontssymbolsonly ${IUSE_FLAGS[*]} )"
176 declare -A font_filetypes
177 local otf_file_number ttf_file_number
179 otf_file_number
=$
(ls "${S}" |
grep -i otf |
wc -l)
180 ttf_file_number
=$
(ls "${S}" |
grep -i ttf |
wc -l)
182 if [[ ${otf_file_number} != 0 ]]; then
186 if [[ ${ttf_file_number} != 0 ]]; then
190 FONT_SUFFIX
="${!font_filetypes[@]}"
196 einfo
"Installing font-patcher via an ebuild is hard, because paths are hardcoded differently"
197 einfo
"in .sh files. You can still get it and use it by git cloning the nerd-font project and"
198 einfo
"running it from the cloned directory."
199 einfo
"https://github.com/ryanoasis/nerd-fonts"
201 elog
"You might have to enable 50-user.conf by using"
202 elog
"eselect fontconfig"