games-strategy/lightyears: Fix dependencies, https, EAPI 7
[gentoo.git] / games-strategy / dunelegacy / dunelegacy-0.96.3.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # do not use autotools related stuff in stable ebuilds
5 # unless you like random breakage: 469796, 469798, 424041
6
7 EAPI=5
8 inherit eutils gnome2-utils games # STABLE ARCH
9 #inherit autotools eutils gnome2-utils games # UNSTABLE ARCH
10
11 DESCRIPTION="Updated clone of Westood Studios' Dune2"
12 HOMEPAGE="http://dunelegacy.sourceforge.net"
13 SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
14 SRC_URI="${SRC_URI} https://dev.gentoo.org/~hasufell/distfiles/${P}-no-autoreconf.patch.xz" # STABLE ARCH
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~x86"
19 IUSE="+alsa pulseaudio"
20
21 RDEPEND="media-libs/libsdl[X,alsa?,sound,pulseaudio?,video]
22         media-libs/sdl-mixer[midi,mp3,vorbis]"
23 DEPEND="${RDEPEND}
24         virtual/pkgconfig"
25
26 # exits on start without libsdl[alsa] or libsdl[pulseaudio]
27 REQUIRED_USE="|| ( alsa pulseaudio )"
28
29 src_prepare() {
30         epatch "${DISTDIR}"/${P}-no-autoreconf.patch.xz # STABLE ARCH
31 #       epatch "${FILESDIR}"/${P}-build.patch # UNSTABLE ARCH
32 #       eautoreconf # UNSTABLE ARCH
33 }
34
35 src_install() {
36         default
37
38         doicon -s scalable ${PN}.svg
39         doicon -s 48 ${PN}.png
40         make_desktop_entry ${PN} "Dune Legacy"
41
42         prepgamesdirs
43 }
44
45 pkg_preinst() {
46         games_pkg_preinst
47         gnome2_icon_savelist
48 }
49
50 pkg_postinst() {
51         games_pkg_postinst
52         gnome2_icon_cache_update
53 }
54
55 pkg_postrm() {
56         gnome2_icon_cache_update
57 }