d4d53cd4f1c9bbe54052422a9eee8a0837520791
[gentoo.git] / games-emulation / virtualjaguar / virtualjaguar-2.1.2-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit eutils versionator gnome2-utils qmake-utils toolchain-funcs
6
7 DESCRIPTION="an Atari Jaguar emulator"
8 HOMEPAGE="http://www.icculus.org/virtualjaguar/"
9 SRC_URI="http://www.icculus.org/virtualjaguar/tarballs/${P}.tar.bz2"
10
11 LICENSE="GPL-3"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE=""
15
16 RDEPEND="
17         dev-libs/libcdio
18         dev-qt/qtcore:4
19         dev-qt/qtgui:4
20         dev-qt/qtopengl:4[-egl]
21         media-libs/libsdl[joystick,opengl,sound,video]
22         sys-libs/zlib
23         virtual/opengl"
24 DEPEND="${RDEPEND}
25         >=sys-devel/gcc-4.4"
26
27 S=${WORKDIR}/${PN}
28
29 PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
30
31 src_prepare() {
32         default
33         sed -i \
34                 -e '/^Categories/s/$/;/' \
35                 virtualjaguar.desktop || die
36 }
37
38 src_configure() {
39         eqmake4 virtualjaguar.pro -o makefile-qt
40 }
41
42 src_compile() {
43         emake -j1 libs
44         emake
45 }
46
47 src_install() {
48         dobin ${PN}
49         dodoc README docs/{TODO,WHATSNEW}
50         doman docs/virtualjaguar.1
51         domenu virtualjaguar.desktop
52         newicon -s 128 res/vj-icon.png ${PN}.png
53 }
54
55 pkg_preinst() {
56         gnome2_icon_savelist
57 }
58
59 pkg_postinst() {
60         elog "The ${PN} ROM path is no-longer hardcoded, "
61         elog "set it from within, the ${PN} GUI."
62         elog
63         elog "The ROM extension supported by ${PN} is .j64, "
64         elog ".jag files will be interpreted as Jaguar Server executables."
65         gnome2_icon_cache_update
66 }
67
68 pkg_postrm() {
69         gnome2_icon_cache_update
70 }