games-misc/rfksay: Remove old
[gentoo.git] / games-misc / little-inferno / little-inferno-20130509.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils gnome2-utils unpacker games
6
7 DESCRIPTION="Throw your toys into your fire, and play with them as they burn"
8 HOMEPAGE="http://tomorrowcorporation.com/"
9 SRC_URI="LittleInferno-${PV}.sh"
10
11 LICENSE="Gameplay-Group-EULA"
12 SLOT="0"
13 KEYWORDS="-* ~amd64 ~x86"
14 IUSE="bundled-libs"
15 RESTRICT="bindist fetch bundled-libs? ( splitdebug )"
16
17 MYGAMEDIR=${GAMES_PREFIX_OPT}/${PN}
18 QA_PREBUILT="${MYGAMEDIR#/}/LittleInferno.bin.x86
19         ${MYGAMEDIR#/}/lib/*"
20
21 RDEPEND="
22         >=net-misc/curl-7.37.0-r1[abi_x86_32(-)]
23         x11-libs/libX11[abi_x86_32(-)]
24         virtual/opengl[abi_x86_32(-)]
25         !bundled-libs? (
26                 >=media-libs/libogg-1.3.1[abi_x86_32(-)]
27                 >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
28                 >=media-libs/openal-1.15.1-r1[abi_x86_32(-)] )"
29 DEPEND="app-arch/xz-utils"
30
31 src_unpack() {
32         unpack_makeself ${A}
33
34         mkdir ${P} || die
35         cd ${P} || die
36
37         local i
38         for i in instarchive_{,linux_}all ; do
39                 mv ../"${i}" ../"${i}".tar.xz || die
40                 unpack ./../"${i}".tar.xz
41         done
42 }
43
44 src_prepare() {
45         if use !bundled-libs ; then
46                 rm -rv lib || die
47         fi
48 }
49
50 src_install() {
51         insinto "${MYGAMEDIR}"
52         doins -r *
53
54         doicon -s 128 LittleInferno.png
55         make_desktop_entry ${PN} "Little Inferno" LittleInferno
56         games_make_wrapper ${PN} "./LittleInferno.bin.x86" "${MYGAMEDIR}" "${MYGAMEDIR}/lib"
57
58         fperms +x "${MYGAMEDIR}"/LittleInferno.bin.x86
59
60         prepgamesdirs
61 }
62
63 pkg_preinst() {
64         games_pkg_preinst
65         gnome2_icon_savelist
66 }
67
68 pkg_postinst() {
69         games_pkg_postinst
70         gnome2_icon_cache_update
71 }
72
73 pkg_postrm() {
74         gnome2_icon_cache_update
75 }