Ticket #26303: alienarena1.diff
File alienarena1.diff, 6.2 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 41 use_configure no 42 43 platform darwin { 44 patchfiles-append patch-source-Makefile.diff \ 45 patch-source-client-qal.h.diff \ 46 patch-source-client-snd_openal.c.diff \ 47 patch-source-unix-q_shunix.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 66 post-destroot { 67 xinstall -W ${worksrcpath} crx ${destroot}${prefix}/bin 68 xinstall -W ${worksrcpath} crded ${destroot}${prefix}/sbin 69 xinstall -d ${destroot}${prefix}/share/${name} 70 copy ${worksrcpath}/data1 ${worksrcpath}/arena ${destroot}${prefix}/share/${name} 71 } -
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 29 @@ -941,8 +937,6 @@ 30 cp $(BUILD_RELEASE_DIR)/game.$(SHLIBEXT) ../arena/ 31 strip ../crded 32 strip ../crx 33 - strip ../arena/game.$(SHLIBEXT) 34 - strip ../data1/game.$(SHLIBEXT) 35 36 install-debug: 37 cp $(BUILD_DEBUG_DIR)/cr* ../ -
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 @@ -87,9 +87,6 @@ 4 void * unmap_base; 5 size_t unmap_len; 6 7 - new_size = round_page(new_size); 8 - old_size = round_page(old_size); 9 - 10 if (new_size > old_size) 11 n = 0; /* error */ 12 else if (new_size < old_size) -
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