1 # Maintainer: chris_L <chrislcenter dash mamoru at yahoo.com dot mx>
6 pkgdesc='An enhanced SDL port of the FPS "Wolfenstein 3D" by id Software (You need the retail game files to play), svn version'
8 url="http://www.chaos-software.de.vu/"
10 depends=('sdl_mixer' 'gcc-libs')
11 makedepends=('subversion' 'pkgconfig' 'intltool' 'sed')
12 conflicts=('wolf4sdl')
14 install=$pkgname.install
15 source=(http://www.fileden.com/files/2010/12/31/3049394//pc-speaker-by-ljbade-build255.patch)
16 md5sums=('6dc6ec5817e2c6a483a2d3585ed7d002')
19 _svntrunk=svn://tron.homeunix.org:3690/wolf3d/trunk
24 svn co $_svntrunk -r $pkgver $_svnmod
26 msg "Starting build..."
27 patch -p1 < ../pc-speaker-by-ljbade-build255.patch # patch for pc-speaker emulation, by ljbade
29 # By default, it expects the GT/ID/Activision 1.4 full version files,
30 # uncomment one of the following lines if you got errors about numchecks and you are not using a mod
31 # sed -i -e 's/#define GOODTIMES/\/\/&/' -e 's/\/\/\(#define APOGEE_1_1\)/\1/' version.h # uncoment this line if you have the v1.1 apogee full version
32 # sed -i -e 's/#define GOODTIMES/\/\/&/' version.h # uncoment this line if you have the v1.4 apogee full version
35 # sed lines to make it use /usr/share/wolf3d for data files
36 find -type f |xargs -I file sed -i 's/"\([a-z0-9][a-z0-9]*\.wl[1-9]\)/"\/usr\/share\/wolf3d\/\1/g' file
37 sed -i 's/\(\[\].*\)"\([a-z0-9][a-z0-9]*\.\)"/\1"\/usr\/share\/wolf3d\/\2"/g' id_ca.cpp
38 sed -i 's/\(strcpy(fname, "\)\(gamemaps."\)/\1\/usr\/share\/wolf3d\/\2/' id_ca.cpp
39 sed -i 's/^.*fname\[13\] = "vswap\..*/static const char gvswap\[\] = "\/usr\/share\/wolf3d\/vswap."; char fname\[\]=""; strcpy(fname,gvswap);/' id_pm.cpp
40 sed -i 's/if(!stat("vswap.wl\([0-9]\)", &statbuf))/if(!stat("\/usr\/share\/wolf3d\/vswap.wl\1", \&statbuf))/' wl_menu.cpp
42 make BINARY=wolf4sdl || return 1
43 make PREFIX="$pkgdir"/usr BINARY=wolf4sdl install
45 mkdir -p "$pkgdir"/usr/share/{wolf3d,licenses/wolf4sdl}
46 install -m644 license*.txt "$pkgdir"/usr/share/licenses/wolf4sdl/