Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/descent3-demo/
Date: Sat, 29 Apr 2017 19:48:07
Message-Id: 1493495278.db6219a6ff8d324b7e9082dc27bb5ed3205cdc4a.chewi@gentoo
1 commit: db6219a6ff8d324b7e9082dc27bb5ed3205cdc4a
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 29 19:46:57 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 29 19:47:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db6219a6
7
8 games-action/descent3-demo: EAPI 6, sound fixes, force OpenGL, more
9
10 * EAPI bump to 6
11 * Drop deprecated games eclass
12 * Add xdg eclass for desktop entry
13 * Add alsa and pulseaudio USE flags with wrappers in the script
14 * Force OpenGL as it tries to use GLide with openglide installed
15 * Properly apply PPics.Hog symlink fix, it was broken before
16
17 Package-Manager: Portage-2.3.5, Repoman-2.3.2
18
19 .../descent3-demo/descent3-demo-1.4.0a-r1.ebuild | 73 ++++++++++++++++++++++
20 1 file changed, 73 insertions(+)
21
22 diff --git a/games-action/descent3-demo/descent3-demo-1.4.0a-r1.ebuild b/games-action/descent3-demo/descent3-demo-1.4.0a-r1.ebuild
23 new file mode 100644
24 index 00000000000..cad5192149c
25 --- /dev/null
26 +++ b/games-action/descent3-demo/descent3-demo-1.4.0a-r1.ebuild
27 @@ -0,0 +1,73 @@
28 +# Copyright 1999-2017 Gentoo Foundation
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=6
32 +
33 +inherit eutils unpacker xdg
34 +
35 +DESCRIPTION="Indoor/outdoor 3D combat with evil robotic mining spacecraft"
36 +HOMEPAGE="http://www.lokigames.com/products/descent3/"
37 +SRC_URI="mirror://lokigames/loki_demos/${PN}.run"
38 +
39 +LICENSE="all-rights-reserved"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~x86"
42 +IUSE="alsa pulseaudio"
43 +REQUIRED_USE="?? ( alsa pulseaudio )"
44 +RESTRICT="bindist mirror strip"
45 +
46 +DEPEND="games-util/loki_patch"
47 +RDEPEND="sys-libs/glibc
48 + >=virtual/opengl-7.0-r1[abi_x86_32(-)]
49 + >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
50 + >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
51 + alsa? ( media-libs/alsa-oss[abi_x86_32(-)] )
52 + pulseaudio? ( media-sound/pulseaudio[abi_x86_32(-)] )"
53 +
54 +dir="/opt/${PN}"
55 +QA_PREBUILT="${dir:1}/descent3_demo.x86
56 + ${dir:1}/netgames/*.d3m"
57 +
58 +S="${WORKDIR}"
59 +
60 +src_install() {
61 + local \
62 + snd= \
63 + demo="data/demos/descent3_demo" \
64 + exe="descent3_demo.x86"
65 +
66 + loki_patch patch.dat data/ || die
67 +
68 + insinto "${dir}"
69 + exeinto "${dir}"
70 + doins -r "${demo}"/*
71 + doexe "${demo}/${exe}"
72 +
73 + # Required directory
74 + keepdir "${dir}"/missions
75 +
76 + # Fix for 2.6 kernel crash, bug #151148
77 + dosym ppics.hog "${dir}"/PPics.Hog
78 +
79 + if use alsa; then
80 + snd="aoss "
81 + elif use pulseaudio; then
82 + snd="env LD_PRELOAD=\"${EPREFIX}/usr/$(ABI=x86 get_libdir)/pulseaudio/libpulsedsp.so\" "
83 + fi
84 +
85 + make_wrapper ${PN} "${snd}./${exe} -G -o" "${dir}"
86 + newicon "${demo}"/launch/box.png ${PN}.png
87 + make_desktop_entry ${PN} "Descent 3 (Demo)"
88 +}
89 +
90 +pkg_postinst() {
91 + xdg_pkg_postinst
92 +
93 + echo
94 + elog "To play the game run:"
95 + elog " descent3-demo"
96 + elog
97 + elog "If the game appears blank, then run it windowed with:"
98 + elog " descent3-demo -w"
99 + echo
100 +}