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

EAPI=8

inherit autotools desktop

MY_P="${PN}-$(ver_rs 2 -)"

DESCRIPTION="Puzzle game based on the Logical! game released on the Commodore Amiga"
HOMEPAGE="https://changeling.ixionstudios.com/xlogical/"
SRC_URI="
	https://changeling.ixionstudios.com/xlogical/downloads/${MY_P}.tar.bz2
	https://dev.gentoo.org/~ionen/distfiles/${PN}.png"
S="${WORKDIR}/${MY_P}"

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

RDEPEND="
	acct-group/gamestat
	media-libs/libsdl[sound,video]
	media-libs/sdl-image[jpeg]
	media-libs/sdl-mixer[mod]"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${P}-gcc4.3.patch
	"${FILESDIR}"/${P}-gcc11.patch
)

src_prepare() {
	default

	sed -e "/^CXXFLAGS/d" \
		-e "s|@localstatedir@/xlogical|${EPREFIX}/var/games|" \
		-i Makefile.am || die

	eautoreconf
}

src_install() {
	dobin ${PN}

	insinto /usr/share/${PN}
	doins -r ${PN}.{properties,levels} images music sound
	find "${ED}" -name "Makefile*" -delete || die

	insinto /var/games
	doins ${PN}.scores

	fowners :gamestat /usr/bin/${PN} /var/games/${PN}.scores
	fperms g+s /usr/bin/${PN}
	fperms 660 /var/games/${PN}.scores

	einstalldocs

	doicon "${DISTDIR}"/${PN}.png
	make_desktop_entry ${PN} "XLogical"
}