Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/nexuiz/
Date: Tue, 07 Feb 2017 00:51:40
Message-Id: 1486428687.00e629e08d3634bf51c2fbcf11eda0026be3bf23.wizardedit@gentoo
1 commit: 00e629e08d3634bf51c2fbcf11eda0026be3bf23
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 7 00:50:33 2017 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 7 00:51:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00e629e0
7
8 games-fps/nexuiz: remove deprecated games eclass
9
10 Also update to EAPI 6
11
12 Gentoo-Bug: https://bugs.gentoo.org/574082
13
14 Package-Manager: Portage-2.3.2, Repoman-2.3.1
15
16 games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild | 137 ++++++++++++++++++++++++++++++++
17 1 file changed, 137 insertions(+)
18
19 diff --git a/games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild b/games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild
20 new file mode 100644
21 index 00000000..6e29066
22 --- /dev/null
23 +++ b/games-fps/nexuiz/nexuiz-2.5.2-r1.ebuild
24 @@ -0,0 +1,137 @@
25 +# Copyright 1999-2017 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +# $Id$
28 +
29 +EAPI=6
30 +inherit eutils
31 +
32 +MY_PN=Nexuiz
33 +MY_P=${PN}-${PV//./}
34 +MAPS=nexmappack_r2
35 +DESCRIPTION="Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine"
36 +HOMEPAGE="http://www.nexuiz.com/"
37 +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
38 + maps? ( mirror://sourceforge/${PN}/${MAPS}.zip )"
39 +
40 +LICENSE="GPL-2"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~ppc ~x86"
43 +IUSE="alsa dedicated maps opengl sdl"
44 +
45 +# no headers for libpng needed
46 +UIRDEPEND="
47 + media-libs/libmodplug
48 + media-libs/libogg
49 + >=media-libs/libpng-1.4:0
50 + media-libs/libtheora
51 + media-libs/libvorbis
52 + x11-libs/libX11
53 + x11-libs/libXau
54 + x11-libs/libXdmcp
55 + x11-libs/libXext
56 + x11-libs/libXpm
57 + x11-libs/libXxf86dga
58 + x11-libs/libXxf86vm
59 + virtual/opengl
60 + alsa? ( media-libs/alsa-lib )
61 + sdl? ( media-libs/libsdl[joystick,opengl,video] )"
62 +UIDEPEND="x11-proto/xextproto
63 + x11-proto/xf86dgaproto
64 + x11-proto/xf86vidmodeproto
65 + x11-proto/xproto"
66 +RDEPEND="virtual/jpeg:0
67 + net-misc/curl
68 + opengl? ( ${UIRDEPEND} )
69 + !dedicated? ( !opengl? ( ${UIRDEPEND} ) )"
70 +DEPEND="${RDEPEND}
71 + app-arch/unzip
72 + opengl? ( ${UIDEPEND} )
73 + !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
74 +
75 +S=${WORKDIR}/darkplaces
76 +
77 +PATCHES=(
78 + "${FILESDIR}"/${P}-libpng-1.4.patch
79 +)
80 +
81 +src_unpack() {
82 + unpack ${MY_P}.zip
83 +
84 + local f
85 + for f in "${MY_PN}"/sources/*.zip ; do
86 + unpack ./${f}
87 + done
88 +
89 + if use maps ; then
90 + cd "${WORKDIR}"/${MY_PN}
91 + unpack ${MAPS}.zip
92 + fi
93 +}
94 +
95 +src_prepare() {
96 + default
97 +
98 + # Make the game automatically look in the correct data directory
99 + sed -i \
100 + -e "/^CC=/d" \
101 + -e "s:-O2:${CFLAGS}:" \
102 + -e "/-lm/s:$: ${LDFLAGS}:" \
103 + -e '/^STRIP/s/strip/true/' \
104 + makefile.inc || die
105 +
106 + sed -i \
107 + -e '1i DP_LINK_TO_LIBJPEG=1' \
108 + -e "s:ifdef DP_.*:DP_FS_BASEDIR=/usr/share/${PN}\n&:" \
109 + makefile || die
110 +
111 + if ! use alsa ; then
112 + sed -i \
113 + -e "/DEFAULT_SNDAPI/s:ALSA:OSS:" \
114 + makefile || die
115 + fi
116 +}
117 +
118 +src_compile() {
119 + if use opengl || ! use dedicated ; then
120 + emake cl-${PN}
121 + if use sdl ; then
122 + emake sdl-${PN}
123 + fi
124 + fi
125 +
126 + if use dedicated ; then
127 + emake sv-${PN}
128 + fi
129 +}
130 +
131 +src_install() {
132 + if use opengl || ! use dedicated ; then
133 + dobin ${PN}-glx
134 + doicon ${PN}.xpm
135 + make_desktop_entry ${PN}-glx "Nexuiz (GLX)"
136 + if use sdl ; then
137 + dobin ${PN}-sdl
138 + make_desktop_entry ${PN}-sdl "Nexuiz (SDL)"
139 + dosym ${PN}-sdl /usr/bin/${PN}
140 + else
141 + dosym ${PN}-glx /usr/bin/${PN}
142 + fi
143 + fi
144 +
145 + if use dedicated ; then
146 + dobin ${PN}-dedicated
147 + fi
148 +
149 + cd "${WORKDIR}"/${MY_PN} || die
150 +
151 + dodoc Docs/*.txt
152 + dodoc -r readme.html Docs
153 +
154 + insinto /usr/share/${PN}
155 +
156 + if use dedicated ; then
157 + doins -r server
158 + fi
159 +
160 + doins -r data havoc
161 +}