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

EAPI=7

inherit desktop xdg

DESCRIPTION="Racing game starring Tux, the Linux penguin"
HOMEPAGE="https://tuxkart.sourceforge.net/"
SRC_URI="https://downloads.sourceforge.net/tuxkart/${P}.tar.gz"

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

RDEPEND="
	>=media-libs/plib-1.8.0
	x11-libs/libX11
	x11-libs/libICE
	x11-libs/libSM
	x11-libs/libXext
	x11-libs/libXi
	x11-libs/libXmu
	virtual/opengl
"
DEPEND="
	${RDEPEND}
	x11-libs/libXt
"

src_prepare() {
	default

	# apparently <sys/perm.h> doesn't exist on alpha
	if use alpha; then
		sed -i \
			-e '/#include <sys\/perm.h>/d' src/gfx.cxx || die
	fi
	sed -i \
		-e "/^plib_suffix/ s/-lplibul/-lplibul -lplibjs/" \
		-e "s/-malign-double//; s/-O6//" configure || die
	sed -i \
		-e "/^bindir/s/=.*/=@bindir@/" src/Makefile.in || die
}

src_install() {
	default
	dodoc doc/*.html
	rm -r "${ED}"/usr/share/tuxkart/ || die

	newicon -s 256 doc/title_screen.png ${PN}.png
	make_desktop_entry ${PN} TuxKart
}