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

EAPI=7

CMAKE_MAKEFILE_GENERATOR=emake
inherit cmake desktop wrapper xdg

DESCRIPTION="Free 2D Zelda fangame"
HOMEPAGE="https://www.solarus-games.org/"
SRC_URI="https://gitlab.com/solarus-games/${PN}/-/archive/${PN}-${PV}/${PN}-${PN}-${PV}.tar.gz"
S="${WORKDIR}/${PN}-${PN}-${PV}"

LICENSE="all-rights-reserved CC-BY-SA-3.0 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror"

RDEPEND="
	>=games-engines/solarus-1.3.0
	<games-engines/solarus-1.4.0
"
BDEPEND="app-arch/zip"

DOCS=( ChangeLog readme.txt )

src_prepare() {
	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DSOLARUS_INSTALL_DATAROOTDIR="/usr/share"
		-DSOLARUS_INSTALL_BINDIR="/usr/bin"
	)
	cmake_src_configure
}

src_install() {
	cmake_src_install
	newicon -s 48 build/icons/${PN}_icon_48.png ${PN}.png
	newicon -s 256 build/icons/${PN}_icon_256.png ${PN}.png

	# install proper wrapper script
	rm "${ED}"/usr/bin/${PN} || die
	make_wrapper ${PN} "solarus \"/usr/share/solarus/${PN}\""

	make_desktop_entry "${PN}" "Zelda: Mystery of Solarus DX"
}