aboutsummaryrefslogtreecommitdiff
blob: 1d21cf5914ac0ec7dd4a6bbaa911e9765c734729 (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
65
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools desktop

DESCRIPTION="Alizarin tetris"
HOMEPAGE="https://www.wkiri.com/projects/atris/"
SRC_URI="http://www.gnu-darwin.org/distfiles/${P}.tar.gz
	http://www.gnu-darwin.org/distfiles/${PN}-sounds-1.0.1.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"

IUSE="doc +sound"
DEPEND="
	acct-group/gamestat
	media-libs/freetype
	media-libs/libsdl
	media-libs/sdl-ttf
"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}"/${P}-fno-common.patch
	"${FILESDIR}"/${P}-path-and-fullscreen.patch
	"${FILESDIR}"/${P}-no-implicit.patch
)

src_prepare() {
	default
	eautoreconf
}

src_install() {
	dobin atris
	insinto /usr/share/${PN}
	doins -r styles graphics

	if use sound; then
		cd "${WORKDIR}"/${PN}-sounds-1.0.1
		doins -r sounds
		cd "${S}"
	fi

	if use doc; then
		dodoc -a html,jpg Docs
	fi
	dodoc AUTHORS NEWS README

	newicon icon.xpm ${PN}.xpm
	make_desktop_entry ${PN} Atris ${PN} BlocksGame

	echo "CONFIG_PROTECT=/var/games/${PN}/" > 99${PN}
	doenvd 99${PN}

	keepdir /var/games/${PN}
	insinto /var/games/${PN}
	doins Atris.*

	fowners :gamestat /var/games/${PN}/Atris.{Players,Scores}
	fperms 664 /var/games/${PN}/Atris.{Players,Scores}
}