summaryrefslogtreecommitdiff
path: root/media-fonts/monaspace/monaspace-1.200.ebuild
blob: 59010e3353ebb4a3643e3ac2b62c62186a55d9a0 (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
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit font

DESCRIPTION="A free and open-source typeface for developers"
HOMEPAGE="https://github.com/githubnext/monaspace"
SRC_URI="https://github.com/githubnext/monaspace/releases/download/v${PV}/monaspace-v${PV}.zip"

S="${WORKDIR}/monaspace-v${PV}"
LICENSE="OFL-1.1"
SLOT="0"
KEYWORDS="~amd64"

FONT_S="${S}/fonts/total"
FONT_SUFFIX=""
IUSE="frozen +otf variable"
REQUIRED_USE="|| ( frozen otf variable )"

BDEPEND="app-arch/unzip"

src_prepare() {
	default

	mkdir "${S}/fonts/total" || die

	if use frozen ; then
		mv "${S}/fonts/frozen/"* "${S}/fonts/total" || die
		FONT_SUFFIX="${FONT_SUFFIX} ttf"
	fi

	if use otf ; then
		mv "${S}/fonts/otf/"* "${S}/fonts/total" || die
		FONT_SUFFIX="${FONT_SUFFIX} otf"
	fi

	if use variable ; then
		mv "${S}/fonts/variable/"* "${S}/fonts/total" || die
		FONT_SUFFIX="${FONT_SUFFIX} ttf"
	fi
}