Ticket #26303: alienarena2.diff
File alienarena2.diff, 6.4 KB (added by ryandesign (Ryan Carsten Schmidt), 14 years ago) |
---|
-
games/alienarena/Portfile
1 PortSystem 1.0 2 3 name alienarena 4 version 7.45-20100726 5 set version_number [lindex [split ${version} -] 0] 6 set version_date [lindex [split ${version} -] 1] 7 categories games 8 platforms darwin 9 maintainers ryandesign 10 license GPL-2+ 11 12 master_sites http://icculus.org/alienarena/Files/ 13 worksrcdir ${name}[join [split ${version_number} .] _] 14 distname ${worksrcdir}-Linux${version_date} 15 use_zip yes 16 17 checksums sha1 9c982d097d885af0cbd06bfbe6c4185936c43c4d \ 18 rmd160 d20e167c66dec8ec072ecbf5833a4a4b46458a17 19 20 depends_lib port:curl \ 21 port:jpeg \ 22 port:libvorbis \ 23 port:mesa \ 24 port:xorg-libX11 \ 25 port:xorg-libXext \ 26 port:xorg-libXxf86dga \ 27 port:xorg-libXxf86vm 28 29 build.dir ${worksrcpath}/source 30 31 post-extract { 32 # Remove pre-compiled Linux binaries. 33 delete ${worksrcpath}/crded ${worksrcpath}/crx ${worksrcpath}/data1/game.so 34 35 # DOS to UNIX line endings so we can patch properly. 36 reinplace "s|\r||g" ${build.dir}/game/q_shared.h 37 } 38 39 patchfiles patch-source-game-q_shared.h.diff \ 40 patch-source-unix-q_shunix.c.diff 41 42 use_configure no 43 44 platform darwin { 45 patchfiles-append patch-source-Makefile.diff \ 46 patch-source-client-qal.h.diff \ 47 patch-source-client-snd_openal.c.diff 48 configure.cflags-append -D__unix__ 49 } 50 51 variant universal {} 52 if {[variant_isset universal]} { 53 set archflags ${configure.universal_cflags} 54 } else { 55 set archflags ${configure.cc_archflags} 56 } 57 58 build.env CC="${configure.cc}" \ 59 CFLAGS="${configure.cflags} ${archflags}" \ 60 LDFLAGS="${configure.ldflags} ${archflags}" \ 61 PREFIX="${prefix}" \ 62 LOCALBASE="${prefix}" \ 63 X11BASE="${prefix}" \ 64 WITH_DATADIR=yes \ 65 WITH_LIBDIR=yes 66 67 destroot.dir ${build.dir}/release 68 69 destroot { 70 xinstall -W ${destroot.dir} crx ${destroot}${prefix}/bin 71 xinstall -W ${destroot.dir} crded ${destroot}${prefix}/sbin 72 73 xinstall -d ${destroot}${prefix}/lib/${name} 74 xinstall -W ${destroot.dir} -m 644 game.dylib ${destroot}${prefix}/lib/${name} 75 76 xinstall -d ${destroot}${prefix}/share/${name} 77 copy ${worksrcpath}/data1 ${worksrcpath}/arena ${destroot}${prefix}/share/${name} 78 } -
games/alienarena/files/patch-source-Makefile.diff
1 --- source/Makefile (revision 1999) 2 +++ source/Makefile (working copy) 3 @@ -46,11 +46,7 @@ 4 NULL_DIR= $(MOUNT_DIR)/null 5 ARENA_DIR= $(GAME_DIR) 6 7 -ifeq ($(ARCH),x86_64) 8 - _LIB := lib64 9 -else 10 - _LIB := lib 11 -endif 12 +_LIB := lib 13 14 BASE_CFLAGS=$(CFLAGS) -Dstricmp=strcasecmp -D_stricmp=strcasecmp -I$(X11BASE)/include -fno-strict-aliasing -fmerge-constants -DHAVE_CURL -lpthread 15 16 @@ -108,9 +104,9 @@ 17 18 GLXLDFLAGS=-L$(X11BASE)/$(_LIB) -L$(LOCALBASE)/$(_LIB) -lX11 -lXext -lXxf86dga -lXxf86vm -lm -ljpeg -lGL -lGLU 19 20 -SHLIBEXT=so 21 -SHLIBCFLAGS=-fPIC 22 -SHLIBLDFLAGS=-shared 23 +SHLIBEXT=dylib 24 +SHLIBCFLAGS= 25 +SHLIBLDFLAGS=-dynamiclib 26 27 OPPENALCFLAGS+=$(shell pkg-config --cflags openal) 28 -
games/alienarena/files/patch-source-client-qal.h.diff
1 --- source/client/qal.h (revision 1999) 2 +++ source/client/qal.h (working copy) 3 @@ -24,8 +24,8 @@ 4 #include <al.h> 5 #include <alc.h> 6 #else 7 -#include <AL/al.h> 8 -#include <AL/alc.h> 9 +#include <OpenAL/al.h> 10 +#include <OpenAL/alc.h> 11 #endif 12 13 /* -
games/alienarena/files/patch-source-client-snd_openal.c.diff
1 --- source/client/snd_openal.c (revision 1999) 2 +++ source/client/snd_openal.c (working copy) 3 @@ -30,7 +30,7 @@ 4 */ 5 6 #include <stdio.h> 7 -#include <malloc.h> 8 +#include <malloc/malloc.h> 9 #include <string.h> 10 11 #include "client.h" -
games/alienarena/files/patch-source-unix-q_shunix.c.diff
1 --- source/unix/q_shunix.c (revision 1999) 2 +++ source/unix/q_shunix.c (working copy) 3 @@ -35,7 +35,15 @@ 4 #ifndef __linux__ 5 /* For round_page() macro. */ 6 #include <machine/param.h> 7 +#ifndef round_page 8 +size_t round_page (size_t size) 9 +{ 10 + int pagesize = sysconf(_SC_PAGESIZE); 11 + // This is wrong (too large) when size == 0, oh well 12 + return (1 + (size - 1) / pagesize) * pagesize; 13 +} 14 #endif 15 +#endif 16 17 //=============================================================================== 18 -
games/alienarena/files/patch-source-game-q_shared.h.diff
1 --- source/game/q_shared.h (revision 1999) 2 +++ source/game/q_shared.h (working copy) 3 @@ -60,7 +60,11 @@ 4 #endif 5 6 typedef unsigned char byte; 7 -typedef enum {false, true} qboolean; 8 +#ifndef true 9 +# define false 0 10 +# define true 1 11 +#endif 12 +typedef byte qboolean; 13 14 15 #ifndef NULL