Gentoo Archives: gentoo-commits

From: "Tristan Heaven (nyhm)" <nyhm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-fps/ut2004-data: ChangeLog ut2004-data-3186-r4.ebuild
Date: Tue, 16 Feb 2010 17:40:02
Message-Id: E1NhROw-0003SG-8V@stork.gentoo.org
1 nyhm 10/02/16 17:39:58
2
3 Modified: ChangeLog
4 Added: ut2004-data-3186-r4.ebuild
5 Log:
6 Add support for Unreal Anthology (and similar), bug #159164
7 (Portage version: 2.2_rc62/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.25 games-fps/ut2004-data/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-fps/ut2004-data/ChangeLog?rev=1.25&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-fps/ut2004-data/ChangeLog?rev=1.25&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-fps/ut2004-data/ChangeLog?r1=1.24&r2=1.25
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/games-fps/ut2004-data/ChangeLog,v
19 retrieving revision 1.24
20 retrieving revision 1.25
21 diff -u -r1.24 -r1.25
22 --- ChangeLog 30 Sep 2009 00:58:31 -0000 1.24
23 +++ ChangeLog 16 Feb 2010 17:39:57 -0000 1.25
24 @@ -1,6 +1,11 @@
25 # ChangeLog for games-fps/ut2004-data
26 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/games-fps/ut2004-data/ChangeLog,v 1.24 2009/09/30 00:58:31 nyhm Exp $
28 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/games-fps/ut2004-data/ChangeLog,v 1.25 2010/02/16 17:39:57 nyhm Exp $
30 +
31 +*ut2004-data-3186-r4 (16 Feb 2010)
32 +
33 + 16 Feb 2010; Tristan Heaven <nyhm@g.o> +ut2004-data-3186-r4.ebuild:
34 + Add support for Unreal Anthology (and similar), bug #159164
35
36 30 Sep 2009; Tristan Heaven <nyhm@g.o> ut2004-data-3186-r3.ebuild:
37 Move check_dvd function from games-ut2k4mod.eclass to here
38
39
40
41 1.1 games-fps/ut2004-data/ut2004-data-3186-r4.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ut2004-data-3186-r4.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/games-fps/ut2004-data/ut2004-data-3186-r4.ebuild,v 1.1 2010/02/16 17:39:57 nyhm Exp $
51
52 inherit eutils portability games
53
54 DESCRIPTION="Unreal Tournament 2004 - This is the data portion of UT2004"
55 HOMEPAGE="http://www.unrealtournament2004.com/"
56 SRC_URI=""
57
58 LICENSE="ut2003"
59 SLOT="0"
60 KEYWORDS="~amd64 ~x86"
61 IUSE=""
62
63 DEPEND="games-util/uz2unpack
64 >=app-arch/unshield-0.5-r1"
65 PDEPEND="games-fps/ut2004"
66
67 S=${WORKDIR}
68 dir=${GAMES_PREFIX_OPT}/ut2004
69 Ddir=${D}/${dir}
70
71 GAMES_LICENSE_CHECK="yes"
72
73 check_dvd() {
74 # The following is a nasty mess to determine if we are installing from
75 # a DVD or from multiple CDs. Anyone feel free to submit patches to this
76 # to bugs.gentoo.org as I know it is a very ugly hack.
77
78 USE_DVD=
79 USE_ECE_DVD=
80 USE_MIDWAY_DVD=
81 USE_GERMAN_MIDWAY_DVD=
82
83 local point foo fs mnts=()
84 while read point foo fs foo ; do
85 [[ ${fs} =~ (9660|udf) ]] && mnts+=( "${point//\040/ }" )
86 done < <(get_mounts)
87
88 local r
89 for r in "${CD_ROOT}" "${CD_ROOT_1}" "${mnts[@]}" ; do
90 if [[ -n ${r} ]] ; then
91 einfo "Searching ${r}"
92 if [[ -f ${r}/AutoRunData/Unreal.ico ]] \
93 && [[ -f ${r}/Disk5/data6.cab ]] ; then
94 USE_MIDWAY_DVD=1
95 USE_DVD=1
96 elif [[ -f ${r}/autorund/unreal.ico ]] \
97 && [[ -f ${r}/disk7/data8.cab ]] ; then
98 USE_MIDWAY_DVD=1
99 USE_GERMAN_MIDWAY_DVD=1
100 USE_DVD=1
101 else
102 [[ -d ${r}/CD1 ]] && USE_DVD=1
103 [[ -d ${r}/CD7 ]] && USE_ECE_DVD=1
104 fi
105 fi
106 done
107 }
108
109 grabdirs() {
110 local d
111 for d in {Music,Sounds,Speech,StaticMeshes,Textures} ; do
112 local srcdir=${CDROM_ROOT}/${1}/${d}
113 # Is flexible to handle CD_ROOT vs CD_ROOT_1 mixups
114 [[ -d ${srcdir} ]] || srcdir=${CDROM_ROOT}/${d}
115 if [[ -d ${srcdir} ]] ; then
116 insinto "${dir}"
117 doins -r "${srcdir}" || die "doins ${srcdir} failed"
118 fi
119 done
120 }
121
122 pkg_setup() {
123 games_pkg_setup
124
125 ewarn "This is a huge package. If you do not have at least 7GB of free"
126 ewarn "disk space in ${PORTAGE_TMPDIR} and also in ${GAMES_PREFIX_OPT}"
127 ewarn "then you should abort this installation now and free up some space."
128 }
129
130 src_unpack() {
131 check_dvd
132
133 if [[ ${USE_DVD} -eq 1 ]] ; then
134 if [[ ${USE_MIDWAY_DVD} -eq 1 ]] ; then
135 # Is 1 DVD, either UT2004-only or Anthology
136 if [[ ${USE_GERMAN_MIDWAY_DVD} -eq 1 ]] ; then
137 cdrom_get_cds autorund/unreal.ico
138 else
139 cdrom_get_cds AutoRunData/Unreal.ico
140 fi
141 else
142 DISK1="CD1"
143 DISK2="CD2"
144 DISK3="CD3"
145 DISK4="CD4"
146 DISK5="CD5"
147 DISK6="CD6"
148 if [[ ${USE_ECE_DVD} -eq 1 ]] ; then
149 # Editor's Choice Edition DVD
150 cdrom_get_cds \
151 ${DISK1}/System/UT2004.ini \
152 ${DISK2}/Textures/2K4Fonts.utx.uz2 \
153 ${DISK3}/Textures/ONSDeadVehicles-TX.utx.uz2 \
154 ${DISK4}/Textures/XGameShaders2004.utx.uz2 \
155 ${DISK5}/Speech/ons.xml \
156 ${DISK6}/Sounds/TauntPack.det_uax.uz2
157 else
158 # Original DVD
159 cdrom_get_cds \
160 ${DISK1}/System/UT2004.ini \
161 ${DISK2}/Textures/2K4Fonts.utx.uz2 \
162 ${DISK3}/Textures/ONSDeadVehicles-TX.utx.uz2 \
163 ${DISK4}/StaticMeshes/AlienTech.usx.uz2 \
164 ${DISK5}/Speech/ons.xml \
165 ${DISK6}/Sounds/TauntPack.det_uax.uz2
166 fi
167 fi
168 else
169 # 6 CDs
170 cdrom_get_cds \
171 System/UT2004.ini \
172 Textures/2K4Fonts.utx.uz2 \
173 Textures/ONSDeadVehicles-TX.utx.uz2 \
174 StaticMeshes/AlienTech.usx.uz2 \
175 Speech/ons.xml \
176 Sounds/TauntPack.det_uax.uz2
177 fi
178
179 if [[ ${USE_MIDWAY_DVD} -ne 1 ]] ; then
180 unpack_makeself "${CDROM_ROOT}"/linux-installer.sh
181 use x86 && unpack ./linux-x86.tar
182 use amd64 && unpack ./linux-amd64.tar
183 fi
184 }
185
186 src_install() {
187 local j
188
189 if [[ ${USE_MIDWAY_DVD} -eq 1 ]] ; then
190 einfo "Copying files from UT2004 Midway DVD."
191
192 if [[ -f ${CDROM_ROOT}/Manual/Manual.pdf ]] ; then
193 insinto "${dir}"/Manual
194 doins "${CDROM_ROOT}"/Manual/Manual.pdf \
195 || die "doins Manual.pdf failed"
196 elif [[ -f ${CDROM_ROOT}/Manual.pdf ]] ; then
197 insinto "${dir}"/Manual
198 doins "${CDROM_ROOT}"/Manual.pdf \
199 || die "doins Manual.pdf failed"
200 fi
201
202 # Symlinks for unshield. data1&2.cab are both in Disk1.
203 # unshield needs data1.hdr
204 # The Midway Anthology DVD contains up to data9.cab
205 local cabfile
206 for cabfile in "${CDROM_ROOT}"/[dD]isk*/data*.{cab,hdr} ; do
207 ln -sfn "${cabfile}" .
208 done
209
210 # The big extraction
211 einfo "Extracting from CAB files - this will take several minutes..."
212 unshield x data1.cab || die "unshield data1.cab failed"
213
214 if [[ -d 4_UT2004_Animations ]] ; then
215 # Delete the other games on the Anthology DVD
216 rm -rf {1,2,3}_Unreal* 4_UT2004_EXE Launcher_* OCXFiles
217 # Rename directories to be same as Midway UT2004-only DVD,
218 # i.e. rename "4_UT2004_Animations" to "Animations".
219 for j in 4_UT2004_* ; do
220 mv -f ${j} ${j/4_UT2004_} || die "mv ${j} failed"
221 done
222 fi
223
224 # The "logging" subdirectory is created by unshield.
225 rm -rf logging
226 rm -f *.{cab,hdr}
227
228 for j in Animations Benchmark ForceFeedback Help KarmaData \
229 Manual Maps Music Sounds Speech StaticMeshes \
230 System Textures Web ; do
231
232 # UT2004-only DVD has "All_*" dirs, and Anthology DVD has "*_All"
233 if [[ -d All_${j} ]] ; then
234 if [[ -d ${j} ]] ; then
235 cp -rf All_${j}/* ${j}/ || die "cp All_${j} failed"
236 else
237 mv -f All_${j} ${j} || die "mv All_${j} failed"
238 fi
239 fi
240 if [[ -d ${j}_All ]] ; then
241 if [[ -d ${j} ]] ; then
242 cp -rf ${j}_All/* ${j}/ || die "cp ${j}_All failed"
243 else
244 mv -f ${j}_All ${j} || die "mv ${j}_All failed"
245 fi
246 fi
247
248 if [[ -d English_${j} ]] ; then
249 if [[ -d ${j} ]] ; then
250 cp -rf English_${j}/* ${j}/ || die "cp English_${j} failed"
251 else
252 mv -f English_${j} ${j} || die "mv English_${j}"
253 fi
254 fi
255 if [[ -d ${j}_English ]] ; then
256 if [[ -d ${j} ]] ; then
257 cp -rf ${j}_English/* ${j}/ || die "cp ${j}_English failed"
258 else
259 mv -f ${j}_English ${j} || die "mv ${j}_English failed"
260 fi
261 fi
262
263 # Ensure that the directory exists
264 mkdir -p ${j}
265 done
266
267 # Rearrange directories
268 if [[ -d English_Sounds_Speech_System_Help ]] ; then
269 # http://utforums.epicgames.com/showthread.php?t=558146
270 for j in Sounds Speech System Help ; do
271 cp -rf English_Sounds_Speech_System_Help/${j}/* ${j}/ \
272 || die "cp English_Sounds_Speech_System_Help/${j} failed"
273 done
274 fi
275
276 if [[ ! -d Benchmark/Stuff ]] ; then
277 mkdir -p Benchmark/Stuff || die
278 cp -f BenchmarkStuff/timedemo.txt Benchmark/Stuff || die
279 fi
280
281 if [[ ! -d System/editorres ]] ; then
282 mkdir -p System/editorres || die
283 cp -rf Systemeditorres/* System/editorres || die
284 fi
285
286 if [[ ! -d Web/images ]] ; then
287 mkdir -p Web/{images,ServerAdmin,Src} || die
288 cp -rf Webimages/* Web/images || die
289 cp -rf WebServerAdmin/* Web/ServerAdmin || die
290 cp -rf WebSrc/* Web/Src || die
291 fi
292
293 # Other languages
294 for j in Help_* Sounds_* System_* ; do
295 [[ ! -d ${j} ]] && continue
296 mv -n ${j}/* ${j/_*}/ || die
297 done
298
299 # Remove unnecessary directories
300 rm -rf Benchmark{CSVs,Logs,Results,Stuff}
301 rm -rf Systemeditorres Web{images,ServerAdmin,Src}
302 rm -rf Help_* Sounds_* Speech_* System_*
303 rm -rf \<* \[* _* All_* English_* *_All *_English
304
305 # These files are replaced later, for all installations
306 rm -f $(find . -type f -name 'DO_NOT_DELETE.ME')
307
308 # Install icon
309 if [[ -f ut2004.xpm ]] ; then
310 doicon ut2004.xpm
311 elif [[ -f Help/Unreal.ico ]] ; then
312 newicon Help/Unreal.ico ut2004.ico
313 elif [[ -f ${CDROM_ROOT}/AutoRunData/Unreal.ico ]] ; then
314 newicon "${CDROM_ROOT}"/AutoRunData/Unreal.ico ut2004.ico
315 elif [[ -f Help/Unreal.bmp ]] ; then
316 newicon Help/Unreal.bmp ut2004.bmp
317 fi
318
319 # The big install
320 einfo "Installing UT2004 directories..."
321 insinto "${dir}"
322 doins -r * || die "doins -r * failed"
323 else
324 # Disk 1
325 einfo "Copying files from Disk 1..."
326 insinto "${dir}"
327 doins -r "${CDROM_ROOT}"/${DISK1}/{Animations,ForceFeedback,Help,KarmaData,Maps,Sounds,Web} \
328 || die "doins failed"
329 insinto "${dir}"/System
330 doins -r "${CDROM_ROOT}"/${DISK1}/System/{editorres,*.{bat,bmp,dat,det,est,frt,ini,int,itt,kot,md5,smt,tmt,u,ucl,upl,url}} \
331 || die "doins System failed"
332 insinto "${dir}"/Manual
333 doins "${CDROM_ROOT}"/${DISK1}/Manual/Manual.pdf \
334 || die "doins Manual.pdf failed"
335 insinto "${dir}"/Benchmark/Stuff
336 doins -r "${CDROM_ROOT}"/${DISK1}/Benchmark/Stuff/* \
337 || die "doins Benchmark failed"
338 cdrom_load_next_cd
339
340 local diskno
341 for diskno in {2..5} ; do
342 einfo "Copying files from Disk ${diskno}..."
343 local varname="DISK${diskno}"
344 grabdirs ${!varname}
345 cdrom_load_next_cd
346 done
347
348 # Disk 6
349 einfo "Copying files from Disk 6..."
350 grabdirs "${DISK6}"
351
352 # Install extra help files
353 insinto "${dir}"/Help
354 doins README.linux Unreal.bmp UT2004_EULA.txt ut2004.xpm
355
356 doicon ut2004.xpm
357
358 # Uncompress files
359 einfo "Uncompressing files... this *will* take a while..."
360 for j in Animations Maps Sounds StaticMeshes Textures ; do
361 fperms -R u+w "${dir}/${j}" || die "fperms ${j} failed"
362 games_ut_unpack "${Ddir}"/${j}
363 done
364 fi
365
366 # Create empty files in Benchmark
367 for j in {CSVs,Logs,Results} ;do
368 keepdir "${dir}"/Benchmark/${j}
369 done
370
371 make_wrapper ut2004 ./ut2004-bin "${dir}"/System "${dir}"/System "${dir}"
372
373 # Remove unneccessary files
374 rm -f "${Ddir}"/*.{bat,exe,EXE,int}
375 rm -f "${Ddir}"/Help/{.DS_Store,SAPI-EULA.txt}
376 rm -f "${Ddir}"/Manual/*.exe
377 rm -rf "${Ddir}"/Speech/Redist
378 rm -f "${Ddir}"/System/*.{bat,dll,exe,tar}
379 rm -f "${Ddir}"/System/{{License,Manifest}.smt,{ucc,StdOut}.log}
380 rm -f "${Ddir}"/System/{User,UT2004}.ini
381
382 # Remove file collisions with ut2004-3369-r4
383 rm -f "${Ddir}"/Animations/ONSNewTank-A.ukx
384 rm -f "${Ddir}"/Help/UT2004Logo.bmp
385 rm -f "${Ddir}"/System/{ALAudio.kot,AS-{Convoy,FallenCity,Glacier}.kot,AS-{Convoy,FallenCity,Glacier,Junkyard,Mothership,RobotFactory}.int,bonuspack.{det,est,frt},BonusPack.{int,itt,u},BR-Serenity.int}
386 rm -f "${Ddir}"/System/CTF-{AbsoluteZero,BridgeOfFate,DE-ElecFields,DoubleDammage,January,LostFaith}.int
387 rm -f "${Ddir}"/System/DM-{1on1-Albatross,1on1-Desolation,1on1-Mixer,Corrugation,IronDeity,JunkYard}.int
388 rm -f "${Ddir}"/System/{DOM-Atlantis.int,OnslaughtBP.{kot,u,ucl},OnslaughtFull.int}
389 rm -f "${Ddir}"/System/{Build.ini,CacheRecords.ucl,Core.{est,frt,kot,int,itt,u},CTF-January.kot,D3DDrv.kot,DM-1on1-Squader.kot}
390 rm -f "${Ddir}"/System/{Editor,Engine,Gameplay,GamePlay,UnrealGame,UT2k4Assault,XInterface,XPickups,xVoting,XVoting,XWeapons,XWebAdmin}.{det,est,frt,int,itt,u}
391 rm -f "${Ddir}"/System/{Fire.u,IpDrv.u,License.int,ONS-ArcticStronghold.kot}
392 rm -f "${Ddir}"/System/{OnslaughtFull,onslaughtfull,UT2k4AssaultFull}.{det,est,frt,itt,u}
393 rm -f "${Ddir}"/System/{GUI2K4,Onslaught,skaarjpack,SkaarjPack,XGame}.{det,est,frt,int,itt,kot,u}
394 rm -f "${Ddir}"/System/{Setup,Window}.{det,est,frt,int,itt,kot}
395 rm -f "${Ddir}"/System/XPlayers.{det,est,frt,int,itt}
396 rm -f "${Ddir}"/System/{UnrealEd.u,UTClassic.u,UTV2004c.u,UTV2004s.u,UWeb.u,Vehicles.kot,Vehicles.u,Xweapons.itt,UT2K4AssaultFull.int,UTV2004.kot,UTV2004s.kot}
397 rm -f "${Ddir}"/System/{XAdmin.kot,XAdmin.u,XMaps.det,XMaps.est}
398 rm -f "${Ddir}"/Textures/jwfasterfiles.utx
399 rm -f "${Ddir}"/Web/ServerAdmin/{admins_home.htm,current_bots.htm,ut2003.css,current_bots_species_group.inc}
400 rm -f "${Ddir}"/Web/ServerAdmin/ClassicUT/current_bots.htm
401 rm -f "${Ddir}"/Web/ServerAdmin/UnrealAdminPage/{adminsframe.htm,admins_home.htm,admins_menu.htm,current_bots.htm,currentframe.htm,current_menu.htm}
402 rm -f "${Ddir}"/Web/ServerAdmin/UnrealAdminPage/{defaultsframe.htm,defaults_menu.htm,footer.inc,mainmenu.htm,mainmenu_itemd.inc,rootframe.htm,UnrealAdminPage.css}
403 rm -f "${Ddir}"/Web/ServerAdmin/UT2K3Stats/{admins_home.htm,current_bots.htm,ut2003stats.css}
404
405 # Remove file collisions with ut2004-bonuspack-ece
406 rm -f "${Ddir}"/Animations/{MechaSkaarjAnims,MetalGuardAnim,NecrisAnim,ONSBPAnimations}.ukx
407 rm -f "${Ddir}"/Help/BonusPackReadme.txt
408 rm -f "${Ddir}"/Maps/ONS-{Adara,IslandHop,Tricky,Urban}.ut2
409 rm -f "${Ddir}"/Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax
410 rm -f "${Ddir}"/StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx
411 rm -f "${Ddir}"/System/{ONS-Adara.int,ONS-IslandHop.int,ONS-Tricky.int,ONS-Urban.int,OnslaughtBP.int,xaplayersl3.upl}
412 rm -f "${Ddir}"/Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S}.utx
413 rm -f "${Ddir}"/Textures/{HourAdaraTexor,ONSBPTextures,ONSBP_DestroyedVehicles,PC_UrbanTex,UT2004ECEPlayerSkins}.utx
414
415 # Remove file collisions with ut2004-bonuspack-mega
416 rm -f "${Ddir}"/Help/MegapackReadme.txt
417 rm -f "${Ddir}"/Maps/{AS-BP2-Acatana,AS-BP2-Jumpship,AS-BP2-Outback,AS-BP2-SubRosa,AS-BP2-Thrust}.ut2
418 rm -f "${Ddir}"/Maps/{CTF-BP2-Concentrate,CTF-BP2-Pistola,DM-BP2-Calandras,DM-BP2-GoopGod}.ut2
419 rm -f "${Ddir}"/Music/APubWithNoBeer.ogg
420 rm -f "${Ddir}"/Sounds/A_Announcer_BP2.uax
421 rm -f "${Ddir}"/StaticMeshes/{JumpShipObjects,Ty_RocketSMeshes}.usx
422 rm -f "${Ddir}"/System/{AssaultBP.u,Manifest.in{i,t},Packages.md5}
423 rm -f "${Ddir}"/Textures/{JumpShipTextures,T_Epic2k4BP2,Ty_RocketTextures}.utx
424
425 prepgamesdirs
426 }
427
428 pkg_postinst() {
429 games_pkg_postinst
430
431 elog "This is only the data portion of the game. To play UT2004,"
432 elog "you still need to install games-fps/ut2004."
433 }