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/dxx-rebirth/, games-action/dxx-rebirth/files/
Date: Thu, 27 Apr 2017 21:42:22
Message-Id: 1493329287.efe0a6b71b3d882ed68904026c5bc4a58d29313d.chewi@gentoo
1 commit: efe0a6b71b3d882ed68904026c5bc4a58d29313d
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 27 21:18:16 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 27 21:41:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efe0a6b7
7
8 games-action/dxx-rebirth: New package to replace d[12]x-rebirth
9
10 Thanks to Alexander Turenko for his input on this.
11
12 Package-Manager: Portage-2.3.5, Repoman-2.3.2
13
14 games-action/dxx-rebirth/Manifest | 8 ++
15 .../dxx-rebirth/dxx-rebirth-0.59.100.ebuild | 107 +++++++++++++++++++++
16 .../files/dxx-rebirth-0.59.100-flags.patch | 10 ++
17 .../files/dxx-rebirth-0.59.100-sharepath.patch | 11 +++
18 games-action/dxx-rebirth/metadata.xml | 39 ++++++++
19 5 files changed, 175 insertions(+)
20
21 diff --git a/games-action/dxx-rebirth/Manifest b/games-action/dxx-rebirth/Manifest
22 new file mode 100644
23 index 00000000000..e6f07ff6f26
24 --- /dev/null
25 +++ b/games-action/dxx-rebirth/Manifest
26 @@ -0,0 +1,8 @@
27 +DIST d1xr-briefings-ger.dxa 16798 SHA256 38f8b9dd5fcab8b675a5112290e4dda771d4bc7a613292a589f6535a8c53861a SHA512 956a3ef1fe7379b71d5f651fdcb1f26b786883a35193a0a22009204e885a12fceb3a69c6accbeb2bd20be65afe087d23532d7ef3439edd97cc8904968bf519e3 WHIRLPOOL 0c4e7934eac399b6fed216648ba35ba100234f73a802112b900064584b4fb471bafc9e377af735a4d05fa65105a40ee4db781a1e07310a1e6b5feb4a9a10a29d
28 +DIST d1xr-hires.dxa 1426884 SHA256 b30a164fa9c6dff05eda6d50f777777df843968d32053f5cc9453fe89d5bed19 SHA512 3fc84d5610ba40ee383c1720f80513a21b4644ff8b6da4b84ebca13b11c1131deb4897ded6324b54845b6c847dfc0f16700535e16afdd7ebe83bfff042892302 WHIRLPOOL 372b5edffc2694429d5c87e343f70564b73178b3d3c61abab5c93a02235547beab3046d9773fc6bcec9eea1f530ddadbfb51205049ca61297d16e08d39366d04
29 +DIST d1xr-opl3-music.dxa 81503503 SHA256 8fe8fede12ca735cac28133e4a581c4026ed22845ab016814a745b2c10b81603 SHA512 4ac82c4bc2ddb02e2941746921443e38b698c6e54cfcab317fc9108f84ada7b868ec2ee3c70b28c1dfe9f41e2aadab4124c8daa65a409905cba5d674f0aab8a8 WHIRLPOOL a7fab740a6cf885984b93f1eb2512362d7c3b05eb65e5f1eecf4c374bf6ba9e04e6d91130d8ff14d113fa9639501cba768a9d7344af291975b095a6604066735
30 +DIST d1xr-sc55-music.dxa 72803408 SHA256 b27f7b9dc5f9c2744402c56c9499dfd9503c17e73a2a5223e745529d7867962f SHA512 3cdce5b6535e28397b3216cc9ca05cccf7194349c62d64c54300f02f39248b98598d170599e5c61b6900d780e4917f905c3c31eb814fbb8429221c804cbd8bf9 WHIRLPOOL d248894b95d5a1d2d8d375cf231fbfde114548e328addf3ae71c90eb436c628b6feb7d207877fd59f815d4b4f00ea76b6e2c23c4a12cd8e2e228967beb91b693
31 +DIST d2xr-briefings-ger.dxa 11717 SHA256 e190321e657c1ad55998b91d610534fd0275f29ab12fe56018e47d3e603704f9 SHA512 479aa577dc65271c705e80404ec46e6c59ee3a5122d6e9705dbdd16b71b16c0d3447426e3e74937aa20eb7026f67a3896c5e814fbfcede9164bd557b6eb8423c WHIRLPOOL 65093403524bd82fb4396a5cabf9317effdaf447f18e421b6a59642103bc690ddaa240e0d2db3fbfe1a4bbd83d9f62bfe5b70fdfe8dc76f0cfe00433d25a9e1f
32 +DIST d2xr-opl3-music.dxa 22710919 SHA256 6890c6cf8a40c30a2b88339fe1affd25d210e45b504b0f0f76dba7ba97f813d7 SHA512 876321a9a16403f6e9d12e10bb73c9cdc57e1a106fa64833a1be8cc17b74f6f13e57e40f051a1b40e7bc88b95bfe86cff181c93c8619383dfdeb74f36f5cce86 WHIRLPOOL 86cccdbe071654b7f3ba2f774c762b3ab81797916e8a2053466320a54693a1913de9a6759eb29a4acde5a5611c58d1371338bed140a4084f7d005d48151a639b
33 +DIST d2xr-sc55-music.dxa 19579531 SHA256 ace152182c70b9a7ae6f911bddbc239566220a287ab5419cab260d5af739bf16 SHA512 290713b05627bf65bdc55fc6631a0c86e50f484a167f3fd20b3fe2bc5b772437939b5bf32eea852874dd983fbd47f160cae2412a2d6c5319f0d1583a33d28da6 WHIRLPOOL 1cc02d95dfffc36676a8cd3129580ba11c4a5cb13ee54bcdbe9e30e9fd9d8365bf0a8fc0d3e4b962607887b41bd056678d578cf9a5896ba1c9f4d1bef13c3edd
34 +DIST dxx-rebirth_v0.59.100-src.tar.gz 1809614 SHA256 6a1e1e589a007389df56efb9f7355efc36e7ea01e4c6af53b46ba1ec3f193355 SHA512 dc9b7ad263e189e779756b62613d4bc62371cb5fec2176a4013395fc18c9d03ab0c9ddc5ccf2668b87e4a77b25d500bdef373126f176bfce49f73b5a98de23d7 WHIRLPOOL 4f6bf09bd076138749ac71d9279827502c6e6b021f8d9681fad83f043eee867e945997fa4ce6eb8f7f706c4932f9d20b47588645b58eee3b2523d5a81c68e99b
35
36 diff --git a/games-action/dxx-rebirth/dxx-rebirth-0.59.100.ebuild b/games-action/dxx-rebirth/dxx-rebirth-0.59.100.ebuild
37 new file mode 100644
38 index 00000000000..d61ac5c0141
39 --- /dev/null
40 +++ b/games-action/dxx-rebirth/dxx-rebirth-0.59.100.ebuild
41 @@ -0,0 +1,107 @@
42 +# Copyright 1999-2017 Gentoo Foundation
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=6
46 +
47 +inherit eutils scons-utils toolchain-funcs xdg
48 +
49 +MY_P="${PN}_v${PV}-src"
50 +DESCRIPTION="Descent Rebirth - enhanced Descent 1 & 2 engine"
51 +HOMEPAGE="http://www.dxx-rebirth.com/"
52 +SRC_URI="http://www.dxx-rebirth.com/download/dxx/${MY_P}.tar.gz
53 + opl3-musicpack? (
54 + descent1? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-opl3-music.dxa )
55 + descent2? ( http://www.dxx-rebirth.com/download/dxx/res/d2xr-opl3-music.dxa ) )
56 + sc55-musicpack? (
57 + descent1? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-sc55-music.dxa )
58 + descent2? ( http://www.dxx-rebirth.com/download/dxx/res/d2xr-sc55-music.dxa ) )
59 + l10n_de? (
60 + descent1? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-briefings-ger.dxa )
61 + descent2? ( http://www.dxx-rebirth.com/download/dxx/res/d2xr-briefings-ger.dxa ) )
62 + textures? (
63 + descent1? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-hires.dxa ) )"
64 +
65 +LICENSE="DXX-Rebirth GPL-3 public-domain"
66 +SLOT="0"
67 +KEYWORDS="~amd64 ~x86"
68 +IUSE="+data debug +descent1 +descent2 ipv6 l10n_de +music +opengl opl3-musicpack sc55-musicpack +textures"
69 +
70 +REQUIRED_USE="|| ( descent1 descent2 )
71 + ?? ( opl3-musicpack sc55-musicpack )
72 + opl3-musicpack? ( music )
73 + sc55-musicpack? ( music )"
74 +
75 +DEPEND="dev-games/physfs:0=[hog,mvl,zip]
76 + media-libs/libsdl:0=[joystick,opengl?,sound,video]
77 + music? ( media-libs/sdl-mixer:0= )
78 + opengl? (
79 + virtual/opengl
80 + virtual/glu )"
81 +
82 +RDEPEND="${DEPEND}
83 + data? (
84 + descent1? ( || ( games-action/descent1-data games-action/descent1-demodata ) )
85 + descent2? ( || ( games-action/descent2-data games-action/descent2-demodata ) ) )
86 + music? (
87 + !opl3-musicpack? ( !sc55-musicpack? ( media-libs/sdl-mixer:0=[midi] ) )
88 + opl3-musicpack? ( media-libs/sdl-mixer:0=[vorbis] )
89 + sc55-musicpack? ( media-libs/sdl-mixer:0=[vorbis] ) )
90 + !games-action/d1x-rebirth
91 + !games-action/d2x-rebirth"
92 +
93 +S="${WORKDIR}/${MY_P}"
94 +
95 +# Remove hardcoded optimisation flags.
96 +# Change share path to use old d1x/d2x locations.
97 +PATCHES=( "${FILESDIR}"/${P}-{flags,sharepath}.patch )
98 +
99 +src_compile() {
100 + tc-export CXX
101 + escons \
102 + prefix="${EPREFIX}"/usr \
103 + d1x=$(usex descent1 1 0) \
104 + d2x=$(usex descent2 1 0) \
105 + debug=$(usex debug 1 0) \
106 + ipv6=$(usex ipv6 1 0) \
107 + opengl=$(usex opengl 1 0) \
108 + sdlmixer=$(usex music 1 0) \
109 + verbosebuild=1
110 +}
111 +
112 +src_install() {
113 + local DV PROGRAM
114 +
115 + for DV in 1 2; do
116 + use descent${DV} || continue
117 + PROGRAM=d${DV}x-rebirth
118 +
119 + docinto ${PROGRAM}
120 + edos2unix ${PROGRAM}/*.txt
121 + dodoc ${PROGRAM}/*.txt
122 +
123 + insinto /usr/share/games/d${DV}x
124 + use opl3-musicpack && doins "${DISTDIR}"/d${DV}xr-opl3-music.dxa
125 + use sc55-musicpack && doins "${DISTDIR}"/d${DV}xr-sc55-music.dxa
126 + use l10n_de && doins "${DISTDIR}"/d${DV}xr-briefings-ger.dxa
127 +
128 + dobin ${PROGRAM}/${PROGRAM}
129 + make_desktop_entry ${PROGRAM} "Descent ${DV} Rebirth" ${PROGRAM}
130 + doicon ${PROGRAM}/${PROGRAM}.xpm
131 + done
132 +
133 + if use textures && use descent1; then
134 + insinto /usr/share/games/d1x
135 + doins "${DISTDIR}"/d1xr-hires.dxa
136 + fi
137 +}
138 +
139 +pkg_postinst() {
140 + xdg_pkg_postinst
141 +
142 + if ! use data; then
143 + elog "To play the game enable USE=\"data\" or manually "
144 + elog "copy the files to ${EPREFIX}/usr/share/games/{d1x,d2x}."
145 + elog "See each game's INSTALL.txt for details."
146 + echo
147 + fi
148 +}
149
150 diff --git a/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-flags.patch b/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-flags.patch
151 new file mode 100644
152 index 00000000000..75c3a64f893
153 --- /dev/null
154 +++ b/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-flags.patch
155 @@ -0,0 +1,10 @@
156 +--- dxx-rebirth_v0.59.100-src/SConstruct 2016-12-12 02:47:40.000000000 +0300
157 ++++ dxx-rebirth_v0.59.100-src/SConstruct 2016-12-28 02:11:16.657874914 +0300
158 +@@ -3488,7 +3488,6 @@
159 + env = self.env
160 + user_settings = self.user_settings
161 +
162 +- env.Prepend(CXXFLAGS = ['-g', '-O2'])
163 + # Raspberry Pi?
164 + if user_settings.raspberrypi:
165 + rpi_vc_path = user_settings.rpi_vc_path
166
167 diff --git a/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-sharepath.patch b/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-sharepath.patch
168 new file mode 100644
169 index 00000000000..ee1b6bb9ea0
170 --- /dev/null
171 +++ b/games-action/dxx-rebirth/files/dxx-rebirth-0.59.100-sharepath.patch
172 @@ -0,0 +1,11 @@
173 +--- dxx-rebirth_v0.59.100-src/SConstruct 2016-12-12 02:47:40.000000000 +0300
174 ++++ dxx-rebirth_v0.59.100-src/SConstruct 2016-12-29 19:26:58.987760410 +0300
175 +@@ -2875,7 +2875,7 @@
176 + return 'GLESv2'
177 + return self.default_OGLES_LIB
178 + def __default_DATA_DIR(self):
179 +- return '%s/share/games/%s' % (self.prefix, self._program.target)
180 ++ return '%s/share/games/%s' % (self.prefix, self._program.shortname)
181 + def _generic_variable(key,help,default):
182 + return (key, help, default)
183 + def __get_configure_tests(tests,_filter=lambda s: s.name[0] != '_'):
184
185 diff --git a/games-action/dxx-rebirth/metadata.xml b/games-action/dxx-rebirth/metadata.xml
186 new file mode 100644
187 index 00000000000..b2765a3b029
188 --- /dev/null
189 +++ b/games-action/dxx-rebirth/metadata.xml
190 @@ -0,0 +1,39 @@
191 +<?xml version="1.0" encoding="UTF-8"?>
192 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
193 +<pkgmetadata>
194 + <maintainer type="project">
195 + <email>games@g.o</email>
196 + <name>Gentoo Games Project</name>
197 + </maintainer>
198 + <maintainer type="person">
199 + <email>totktonada.ru@×××××.com</email>
200 + <name>Alexander Turenko</name>
201 + </maintainer>
202 + <longdescription>
203 + Descent 1 is a classic first-person shooter released in 1995
204 + by Interplay and Parallax. Descent 2 released for the PC in
205 + 1996. It, along with its predecessor, was one of the first
206 + games with true 3-dimensional graphics, 6 degrees of freedom
207 + in movement, light sourcing, and the capability to join
208 + multiplayer games on-the-fly. D1X-Rebirth and DXX-Rebirth are
209 + modifications of the original Descent 1 and 2 sources that was
210 + released by Parallax (and are based on the D1X and D2X
211 + sources). It offering OpenGL graphics, advanced multiplayer,
212 + new features, and cross-platform compatibility. Now code bases
213 + of D1X-Rebirth and DXX-Rebirth merged and released as
214 + DXX-Rebirth.
215 + </longdescription>
216 + <use>
217 + <flag name="data">Install data files</flag>
218 + <flag name="descent1">Install Descent 1 resources and executable</flag>
219 + <flag name="descent2">Install Descent 2 resources and executable</flag>
220 + <flag name="l10n_de">Provides German translations for the game's briefings, robot descriptions, and outro of the original campaign</flag>
221 + <flag name="music">Enable music support</flag>
222 + <flag name="opl3-musicpack">Include alternate version of the game's music, recorded with the Yamaha YMF262 OPL3 soundchip</flag>
223 + <flag name="sc55-musicpack">Include alternate version of the game's music, recorded with the Roland Sound Canvas SC-55 MIDI module</flag>
224 + <flag name="textures">Include high resolution (640x480) backgrounds, briefing images and fonts (Descent 1)</flag>
225 + </use>
226 + <upstream>
227 + <remote-id type="github">dxx-rebirth/dxx-rebirth</remote-id>
228 + </upstream>
229 +</pkgmetadata>