summaryrefslogtreecommitdiff
blob: 932f8edc7412ba020c23e8b56fba158005a79c92 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils gnome2-utils

DESCRIPTION="A portable Nintendo Entertainment System emulator written in C++"
HOMEPAGE="http://0ldsk00l.ca/nestopia/"

if [[ ${PV} == *9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/rdanbrook/nestopia.git"
else
	inherit vcs-snapshot
	SRC_URI="https://github.com/rdanbrook/${PN}/archive/d7fae2aff1a93eac997d2b480652a1d068a2b6cf.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-2+"
SLOT="0"
IUSE="doc gui"

RDEPEND="
	app-arch/libarchive:=
	media-libs/libao
	media-libs/libepoxy
	media-libs/libsdl2[sound,joystick,video]
	sys-libs/zlib
	gui? ( x11-libs/gtk+:3 )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_configure() {
	local mycmakeargs=(
		-DENABLE_GTK=$(usex gui)
		-DENABLE_DOC=$(usex doc)
		-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
	)
	cmake-utils_src_configure
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}