summaryrefslogtreecommitdiff
blob: 95f257d71459c651f3d7de3a45cea3874012cf8b (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )

inherit python-any-r1

DESCRIPTION="OpenGFX data files for OpenTTD"
HOMEPAGE="https://wiki.openttd.org/en/Basesets/OpenGFX https://github.com/OpenTTD/OpenGFX"
SRC_URI="https://cdn.openttd.org/${PN}-releases/${PV}/${P}-source.tar.xz"
S="${WORKDIR}/${P}-source"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"

DEPEND="
	games-util/grfcodec
	games-util/nml
	${PYTHON_DEPS}
"

DOCS=( "README.md" "changelog.txt" )

src_prepare() {
	default

	python-any-r1_pkg_setup
}

src_compile() {
	local myemakeargs=(
		GIMP=""
		PYTHON="${EPYTHON}"
	)

	emake "${myemakeargs[@]}" all
}

src_test() {
	local myemakeargs=(
		GIMP=""
		PYTHON="${EPYTHON}"
	)

	emake "${myemakeargs[@]}" check
}

src_install() {
	local myemakeargs=(
		DO_NOT_INSTALL_README="true"
		DO_NOT_INSTALL_LICENSE="true"
		DO_NOT_INSTALL_CHANGELOG="true"
		GIMP=""
		INSTALL_DIR="${ED}/usr/share/openttd/baseset/"
		PYTHON="${EPYTHON}"
	)

	emake "${myemakeargs[@]}" install

	einstalldocs
}