xboing-2.4-r3.ebuild 1.61 KB
Newer Older
1
# Copyright 1999-2021 Gentoo Authors
Palica's avatar
Palica committed
2
3
# Distributed under the terms of the GNU General Public License v2

4
EAPI=7
Palica's avatar
Palica committed
5

6
inherit flag-o-matic toolchain-funcs
Palica's avatar
Palica committed
7
8

DESCRIPTION="Blockout type game where you bounce a ball trying to destroy blocks"
9
HOMEPAGE="http://www.techrescue.org/xboing/"
Palica's avatar
Palica committed
10
SRC_URI="http://www.techrescue.org/xboing/${PN}${PV}.tar.gz
11
12
	mirror://gentoo/${P}-debian.patch.bz2"
S="${WORKDIR}/${PN}"
Palica's avatar
Palica committed
13
14
15
16
17

LICENSE="xboing"
SLOT="0"
KEYWORDS="amd64 ~x86"

18
19
RDEPEND="
	acct-group/gamestat
Palica's avatar
Palica committed
20
	x11-libs/libXpm"
21
22
DEPEND="${RDEPEND}"
BDEPEND="
Palica's avatar
Palica committed
23
24
	app-text/rman
	x11-misc/gccmakedep
25
	>=x11-misc/imake-1.0.8-r1"
Palica's avatar
Palica committed
26

27
28
29
30
31
PATCHES=(
	"${WORKDIR}"/${P}-debian.patch
	"${FILESDIR}"/${P}-buffer.patch
	"${FILESDIR}"/${P}-sleep.patch
)
Palica's avatar
Palica committed
32
33

src_prepare() {
34
	default
Palica's avatar
Palica committed
35
	sed -i '/^#include/s:xpm\.h:X11/xpm.h:' *.c || die
36
	sed -i "s:GENTOO_VER:${PF/${PN}-/}:" Imakefile || die
Palica's avatar
Palica committed
37
38
39
}

src_configure() {
40
41
42
43
	append-cflags -fcommon #707214

	CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \
		IMAKECPP="${IMAKECPP:-$(tc-getCPP)}" xmkmf -a || die
Palica's avatar
Palica committed
44
45
46
}

src_compile() {
47
48
49
50
51
52
53
54
	local myemakeargs=(
		CC="$(tc-getCC)"
		CDEBUGFLAGS="${CFLAGS}"
		LOCAL_LDFLAGS="${LDFLAGS}"
		HIGH_SCORE_DIR="${EPREFIX}/var/games"
		XBOING_DIR="${EPREFIX}/usr/share/${PN}"
	)
	emake "${myemakeargs[@]}"
Palica's avatar
Palica committed
55
56
57
}

src_install() {
58
59
60
61
62
63
64
65
66
67
	local myemakeargs=(
		CC="$(tc-getCC)"
		LOCAL_LDFLAGS="${LDFLAGS}"
		PREFIX="${D}"
		BINDIR="${ED}/usr/bin"
		HIGH_SCORE_DIR="${EPREFIX}/var/games"
		XBOING_DIR="${EPREFIX}/usr/share/${PN}"
	)
	emake "${myemakeargs[@]}" install

Palica's avatar
Palica committed
68
69
70
71
72
73
74
	newman xboing.man xboing.6
	dodoc README docs/*.doc

	fowners root:gamestat /var/games/xboing.score /usr/bin/xboing
	fperms 660 /var/games/xboing.score
	fperms 2755 /usr/bin/xboing
}