Ticket #26303: alienarena3.diff
File alienarena3.diff, 6.6 KB (added by ryandesign (Ryan Carsten Schmidt), 14 years ago) |
---|
-
games/alienarena/Portfile
1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 2 # $Id$ 3 4 PortSystem 1.0 5 6 name alienarena 7 version 7.45-20100726 8 set version_number [lindex [split ${version} -] 0] 9 set version_date [lindex [split ${version} -] 1] 10 categories games 11 platforms darwin 12 maintainers ryandesign 13 license GPL-2+ 14 15 master_sites http://icculus.org/alienarena/Files/ 16 worksrcdir ${name}[join [split ${version_number} .] _] 17 distname ${worksrcdir}-Linux${version_date} 18 use_zip yes 19 20 checksums sha1 9c982d097d885af0cbd06bfbe6c4185936c43c4d \ 21 rmd160 d20e167c66dec8ec072ecbf5833a4a4b46458a17 22 23 depends_lib port:curl \ 24 port:jpeg \ 25 port:libvorbis \ 26 port:mesa \ 27 port:xorg-libX11 \ 28 port:xorg-libXext \ 29 port:xorg-libXxf86dga \ 30 port:xorg-libXxf86vm 31 32 build.dir ${worksrcpath}/source 33 34 post-extract { 35 # Remove pre-compiled Linux binaries. 36 delete ${worksrcpath}/crded ${worksrcpath}/crx ${worksrcpath}/data1/game.so 37 38 # DOS to UNIX line endings so we can patch properly. 39 reinplace "s|\r||g" ${build.dir}/game/q_shared.h 40 } 41 42 patchfiles patch-source-game-q_shared.h.diff \ 43 patch-source-unix-q_shunix.c.diff 44 45 use_configure no 46 47 platform darwin { 48 patchfiles-append patch-source-Makefile.diff \ 49 patch-source-client-qal.h.diff \ 50 patch-source-client-snd_openal.c.diff 51 configure.cflags-append -D__unix__ 52 } 53 54 variant universal {} 55 if {[variant_isset universal]} { 56 set archflags ${configure.universal_cflags} 57 } else { 58 set archflags ${configure.cc_archflags} 59 } 60 61 build.env CC="${configure.cc}" \ 62 CFLAGS="${configure.cflags} ${archflags}" \ 63 LDFLAGS="${configure.ldflags} ${archflags}" \ 64 PREFIX="${prefix}" \ 65 LOCALBASE="${prefix}" \ 66 X11BASE="${prefix}" \ 67 WITH_DATADIR=yes \ 68 WITH_LIBDIR=yes 69 70 destroot.dir ${build.dir}/release 71 72 destroot { 73 xinstall -W ${destroot.dir} crx ${destroot}${prefix}/bin 74 xinstall -W ${destroot.dir} crded ${destroot}${prefix}/sbin 75 76 xinstall -d ${destroot}${prefix}/lib/${name} 77 xinstall -W ${destroot.dir} -m 644 game.dylib ${destroot}${prefix}/lib/${name} 78 79 xinstall -d ${destroot}${prefix}/share/${name} 80 copy ${worksrcpath}/data1 ${worksrcpath}/arena ${destroot}${prefix}/share/${name} 81 } -
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 -install_name $(PREFIX)/lib/alienarena/game.$(SHLIBEXT) 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