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

EAPI=7

DESCRIPTION="3D motor sports simulator"
HOMEPAGE="https://gracer.sourceforge.net/"
SRC_URI="mirror://sourceforge/gracer/${P}.tar.gz"

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

DEPEND="
	dev-lang/tcl:0=
	media-libs/freeglut
	media-libs/giflib:=
	media-libs/libpng:0=
	media-libs/plib
	virtual/glu
	virtual/jpeg:0
	virtual/opengl
	x11-libs/libXi
	x11-libs/libXmu
"

RDEPEND="${DEPEND}"

PATCHES=(
		"${FILESDIR}"/${PV}-gldefs.patch
		"${FILESDIR}"/${PN}-gcc-3.4.patch
		"${FILESDIR}/${P}"-gcc41.patch
		"${FILESDIR}"/${P}-as-needed.patch
		"${FILESDIR}"/${P}-libpng14.patch
		"${FILESDIR}"/${P}-png15.patch
		"${FILESDIR}"/${P}-giflib.patch
		"${FILESDIR}"/${P}-warnings.patch
		"${FILESDIR}"/${P}-gcc10.patch
)

src_configure() {
	econf \
		--enable-gif \
		--enable-jpeg \
		--enable-png \
		$(use_enable joystick)
	sed -i \
		-e 's:-lplibsl:-lplibsl -lplibul:' \
		$(find -name Makefile) || die
}