summaryrefslogtreecommitdiff
path: root/media-fonts/noto-emoji/noto-emoji-99999999.ebuild
blob: ecdbbf028d1022d8e02ecad8299d3a1fe5dbe32d (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="Google Noto Emoji fonts"
HOMEPAGE="https://fonts.google.com/noto/specimen/Noto+Emoji"

LICENSE="OFL-1.1"
SLOT="0"
KEYWORDS="~*"
IUSE=""

PROPERTIES="live"

BDEPEND="
	app-arch/unzip
	|| (
		net-misc/curl
		net-misc/wget
	)
"

S="${WORKDIR}"

get() {
	if hash curl 2>/dev/null; then
		curl -Lf --retry 3 --connect-timeout 60 --speed-limit 300 --speed-time 10 "$@"
	elif hash wget 2>/dev/null; then
		wget -O- "$@"
	else
		die
	fi
}

src_unpack() {
	get https://fonts.google.com/download?family=Noto%20Emoji > Noto_Emoji.zip || die
	get https://fonts.google.com/download?family=Noto%20Color%20Emoji > Noto_Color_Emoji.zip || die
	unzip Noto_Emoji.zip NotoEmoji-VariableFont_wght.ttf || die
	unzip Noto_Color_Emoji.zip NotoColorEmoji-Regular.ttf || die
}

src_install() {
	insinto /usr/share/fonts/${PN}
	doins NotoEmoji-VariableFont_wght.ttf
	doins NotoColorEmoji-Regular.ttf
}