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

EAPI=7

inherit cmake desktop xdg-utils

DESCRIPTION="Help a girl named Violet in the struggle with hordes of monsters"
HOMEPAGE="https://violetland.github.io/"
SRC_URI="https://github.com/ooxi/${PN}/releases/download/${PV}/${P}-source-with-dependencies.tar.gz"

LICENSE="GPL-3 CC-BY-SA-3.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-libs/boost:=[threads(+)]
	media-libs/libsdl[sound,video]
	media-libs/sdl-image[png]
	media-libs/sdl-mixer[vorbis]
	media-libs/sdl-ttf
	virtual/opengl
"

DEPEND="${RDEPEND}"

BDEPEND="
	sys-devel/gettext
"

src_prepare() {
	cmake_src_prepare

	# Bizarrely fcitx is only bundled for a CMake module to find libintl
	# but let's make sure the rest remains unused.
	rm -r lib/fcitx/src || die
}

src_configure() {
	local mycmakeargs=(
		-DDATA_INSTALL_DIR="${EPREFIX}/usr/share/${PN}"
		-DLOCALE_INSTALL_DIR=share/locale
	)

	cmake_src_configure
}

src_install() {
	cmake_src_install
	dodoc CHANGELOG.md CONTRIBUTORS.md

	# Remove duplicate READMEs.
	rm -r "${ED}"/usr/share/${PN}/README* || die

	newicon -s 64 icon-light.png ${PN}.png
	make_desktop_entry ${PN} VioletLand
}

pkg_postinst() { xdg_icon_cache_update; }
pkg_postrm() { xdg_icon_cache_update; }