1 # Contributor: Paul Bredbury <brebs@sent.com>
6 pkgdesc="Enhanced Quake 2 engine with Lazarus mod support"
8 url="http://qudos.quakedev.com/"
10 # glib is required if compiling with xmms. openal is needed, to build.
11 depends=('alsa-lib' 'glib' 'libjpeg' 'libpng' 'libvorbis' 'libxxf86vm' 'mesa')
12 makedepends=('xf86vidmodeproto' 'openal')
13 install=kmquake2.install
14 source=(http://qudos.quakedev.com/linux/quake2/engines/KMQuake2/KMQuake2-SDL-${pkgver}_src_unix.tar.bz2
15 http://qudos.quakedev.com/linux/quake2/engines/KMQuake2/KMQuake2_data-0.19.tar
17 no-save-date-check.patch)
18 md5sums=('afd17d507c92b353a598a4109c58df74'
19 '081d2e1c149830a0863c1296ecbf0f77'
20 'ec39757b864fb855a0625dbf365ac1c1'
21 '75b3ab74e05a7fce0311b8c1f918935d')
23 _gamedir="/usr/share/quake2"
24 _libdir="/usr/lib/kmquake2"
27 cd $startdir/src/KMQuake2-SDL-${pkgver}_src_unix
29 # Fix for x86_64 - http://bugs.gentoo.org/show_bug.cgi?id=158415
31 -e "s:\#include <sys/types\.h>:\#define _GNU_SOURCE\n\#include <sys/types\.h>:" \
32 unix/qsh_unix.c || return 1
34 # Fix directory search for the game API
36 -e 's:"%s/%s/%s", curpath, path, gamename:"%s/%s", path, gamename:' \
37 unix/sys_unix.c || return 1
39 # Remove restriction on loading games from a "previous version"
40 # From http://bugs.gentoo.org/show_bug.cgi?id=140121
41 patch -Np0 -i ../no-save-date-check.patch || return 1
43 # Favours OpenGL over SDL (SDL uses OpenAL audio).
44 # Not sure whether ALSA or OSS is best, but user has choice with command-line:
45 # kmquake2 +set sndalsa 1
46 # XMMS is disabled because the Makefile blindly assumes it is installed.
47 # The dedicated server is always built anyway.
51 BUILD_KMQUAKE2_SDL=NO \
53 DATADIR="${_gamedir}" \
60 install -d $startdir/pkg/$_libdir/baseq2/
61 install -m755 quake2/baseq2/*.so $startdir/pkg/$_libdir/baseq2/ || return 1
63 install -D -m755 quake2/kmquake2 $startdir/pkg/usr/bin/kmquake2 || return 1
64 install -D -m755 quake2/kmquake2_netserver $startdir/pkg/usr/bin/kmquake2-ded || return 1
65 install -m644 ../KMQuake2_data-0.19/baseq2/*.pk3 $startdir/pkg/$_libdir/baseq2/ || return 1
68 install -D -m644 ../KMQuake2_data-0.19/kmquake2.png $startdir/pkg/usr/share/pixmaps/kmquake2.png || return 1
69 install -D -m644 ${startdir}/kmquake2.desktop $startdir/pkg/usr/share/applications/kmquake2.desktop || return 1
73 install -d $startdir/pkg/usr/share/doc/kmquake2/
74 install -m644 -t $startdir/pkg/usr/share/doc/kmquake2/ *.{txt,unix} || return 1