[71149] trunk/dports/games
ryandesign at macports.org
ryandesign at macports.org
Thu Sep 2 09:11:23 PDT 2010
Revision: 71149
http://trac.macports.org/changeset/71149
Author: ryandesign at macports.org
Date: 2010-09-02 09:11:22 -0700 (Thu, 02 Sep 2010)
Log Message:
-----------
alienarena: new port, version 7.45-20100726; see #26303
Added Paths:
-----------
trunk/dports/games/alienarena/
trunk/dports/games/alienarena/Portfile
trunk/dports/games/alienarena/files/
trunk/dports/games/alienarena/files/patch-Makefile.diff
trunk/dports/games/alienarena/files/patch-client-qal.h.diff
trunk/dports/games/alienarena/files/patch-client-snd_openal.c.diff
trunk/dports/games/alienarena/files/patch-game-q_shared.h.diff
trunk/dports/games/alienarena/files/patch-ref_gl-r_main.c.diff
trunk/dports/games/alienarena/files/patch-unix-q_shunix.c.diff
trunk/dports/games/alienarena/files/patch-unix-qal_unix.c.diff
trunk/dports/games/alienarena/files/patch-unix-sys_unix.c.diff
Added: trunk/dports/games/alienarena/Portfile
===================================================================
--- trunk/dports/games/alienarena/Portfile (rev 0)
+++ trunk/dports/games/alienarena/Portfile 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,102 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+
+name alienarena
+# Keep version in sync between alienarena and alienarena-data.
+version 7.45-20100726
+set version_number [lindex [split ${version} -] 0]
+set version_date [lindex [split ${version} -] 1]
+categories games
+platforms darwin
+maintainers ryandesign
+license GPL-2+
+
+homepage http://icculus.org/alienarena/rpa/
+master_sites http://icculus.org/alienarena/Files/ \
+ http://mirror.arcadepro.org/
+
+worksrcdir alienarena[join [split ${version_number} .] _]
+distname ${worksrcdir}-Linux${version_date}
+
+# Manually emulate "use_zip yes" because we want to extract specific directories only.
+#use_zip yes
+extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
+extract.suffix .zip
+extract.pre_args -q
+extract.post_args -d ${extract.dir} ${worksrcdir}/source/* ${worksrcdir}/arena/* ${worksrcdir}/data1/*.cfg
+
+checksums sha1 9c982d097d885af0cbd06bfbe6c4185936c43c4d \
+ rmd160 d20e167c66dec8ec072ecbf5833a4a4b46458a17
+
+depends_build port:pkgconfig
+
+depends_lib port:curl \
+ port:jpeg \
+ port:libvorbis \
+ port:mesa \
+ port:xorg-libX11 \
+ port:xorg-libXext \
+ port:xorg-libXxf86dga \
+ port:xorg-libXxf86vm
+
+depends_run port:alienarena-data
+
+patch.dir ${worksrcpath}/source
+
+post-extract {
+ # DOS to UNIX line endings so we can patch properly.
+ reinplace "s|\r||g" ${patch.dir}/game/q_shared.h \
+ ${patch.dir}/ref_gl/r_main.c
+}
+
+patchfiles patch-game-q_shared.h.diff \
+ patch-unix-q_shunix.c.diff
+
+use_configure no
+
+platform darwin {
+ patchfiles-append patch-Makefile.diff \
+ patch-client-qal.h.diff \
+ patch-client-snd_openal.c.diff \
+ patch-ref_gl-r_main.c.diff \
+ patch-unix-qal_unix.c.diff \
+ patch-unix-sys_unix.c.diff
+ post-patch {
+ reinplace "s|@PREFIX@|${prefix}|g" ${patch.dir}/ref_gl/r_main.c
+ }
+ configure.cflags-append -D__unix__
+}
+
+variant universal {}
+if {[variant_isset universal]} {
+ set archflags ${configure.universal_cflags}
+} else {
+ set archflags ${configure.cc_archflags}
+}
+
+build.dir ${patch.dir}
+
+build.target build-release
+destroot.dir ${build.dir}/release
+
+build.env CC="${configure.cc}" \
+ CFLAGS="${configure.cflags} ${archflags}" \
+ LDFLAGS="${configure.ldflags} ${archflags}" \
+ PREFIX="${prefix}" \
+ LOCALBASE="${prefix}" \
+ X11BASE="${prefix}" \
+ WITH_DATADIR=yes \
+ WITH_LIBDIR=yes
+
+destroot {
+ xinstall -W ${destroot.dir} crx ${destroot}${prefix}/bin
+ xinstall -W ${destroot.dir} crded ${destroot}${prefix}/sbin
+
+ xinstall -d ${destroot}${prefix}/lib/${name}/data1
+ xinstall -W ${destroot.dir} -m 644 game.dylib ${destroot}${prefix}/lib/${name}/data1
+
+ xinstall -d ${destroot}${prefix}/share/${name}
+ copy ${worksrcpath}/arena ${worksrcpath}/data1 ${destroot}${prefix}/share/${name}
+}
Property changes on: trunk/dports/games/alienarena/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/games/alienarena/files/patch-Makefile.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-Makefile.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,28 @@
+--- Makefile (revision 1999)
++++ Makefile (working copy)
+@@ -46,11 +46,7 @@
+ NULL_DIR= $(MOUNT_DIR)/null
+ ARENA_DIR= $(GAME_DIR)
+
+-ifeq ($(ARCH),x86_64)
+- _LIB := lib64
+-else
+- _LIB := lib
+-endif
++_LIB := lib
+
+ BASE_CFLAGS=$(CFLAGS) -Dstricmp=strcasecmp -D_stricmp=strcasecmp -I$(X11BASE)/include -fno-strict-aliasing -fmerge-constants -DHAVE_CURL -lpthread
+
+@@ -108,9 +104,9 @@
+
+ GLXLDFLAGS=-L$(X11BASE)/$(_LIB) -L$(LOCALBASE)/$(_LIB) -lX11 -lXext -lXxf86dga -lXxf86vm -lm -ljpeg -lGL -lGLU
+
+-SHLIBEXT=so
+-SHLIBCFLAGS=-fPIC
+-SHLIBLDFLAGS=-shared
++SHLIBEXT=dylib
++SHLIBCFLAGS=
++SHLIBLDFLAGS=-dynamiclib -install_name $(PREFIX)/lib/alienarena/game.$(SHLIBEXT)
+
+ OPPENALCFLAGS+=$(shell pkg-config --cflags openal)
+
Added: trunk/dports/games/alienarena/files/patch-client-qal.h.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-client-qal.h.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-client-qal.h.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,13 @@
+--- client/qal.h (revision 1999)
++++ client/qal.h (working copy)
+@@ -24,8 +24,8 @@
+ #include <al.h>
+ #include <alc.h>
+ #else
+-#include <AL/al.h>
+-#include <AL/alc.h>
++#include <OpenAL/al.h>
++#include <OpenAL/alc.h>
+ #endif
+
+ /*
Added: trunk/dports/games/alienarena/files/patch-client-snd_openal.c.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-client-snd_openal.c.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-client-snd_openal.c.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,11 @@
+--- client/snd_openal.c (revision 1999)
++++ client/snd_openal.c (working copy)
+@@ -30,7 +30,7 @@
+ */
+
+ #include <stdio.h>
+-#include <malloc.h>
++#include <malloc/malloc.h>
+ #include <string.h>
+
+ #include "client.h"
Added: trunk/dports/games/alienarena/files/patch-game-q_shared.h.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-game-q_shared.h.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-game-q_shared.h.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,15 @@
+--- game/q_shared.h (revision 1999)
++++ game/q_shared.h (working copy)
+@@ -60,7 +60,11 @@
+ #endif
+
+ typedef unsigned char byte;
+-typedef enum {false, true} qboolean;
++#ifndef true
++# define false 0
++# define true 1
++#endif
++typedef byte qboolean;
+
+
+ #ifndef NULL
Added: trunk/dports/games/alienarena/files/patch-ref_gl-r_main.c.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-ref_gl-r_main.c.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-ref_gl-r_main.c.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,11 @@
+--- ref_gl/r_main.c (revision 1999)
++++ ref_gl/r_main.c (working copy)
+@@ -1185,7 +1185,7 @@
+ gl_flashblend = Cvar_Get ("gl_flashblend", "0", CVAR_ARCHIVE);
+ gl_playermip = Cvar_Get ("gl_playermip", "0", 0);
+ #ifdef __unix__
+- gl_driver = Cvar_Get( "gl_driver", "libGL.so.1", CVAR_ARCHIVE );
++ gl_driver = Cvar_Get( "gl_driver", "@PREFIX@/lib/libGL.dylib", CVAR_ARCHIVE );
+ #else
+ gl_driver = Cvar_Get( "gl_driver", "opengl32", CVAR_ARCHIVE );
+ #endif
Added: trunk/dports/games/alienarena/files/patch-unix-q_shunix.c.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-unix-q_shunix.c.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-unix-q_shunix.c.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,18 @@
+--- unix/q_shunix.c (revision 1999)
++++ unix/q_shunix.c (working copy)
+@@ -35,7 +35,15 @@
+ #ifndef __linux__
+ /* For round_page() macro. */
+ #include <machine/param.h>
++#ifndef round_page
++size_t round_page (size_t size)
++{
++ int pagesize = sysconf(_SC_PAGESIZE);
++ // This is wrong (too large) when size == 0, oh well
++ return (1 + (size - 1) / pagesize) * pagesize;
++}
+ #endif
++#endif
+
+ //===============================================================================
+
Added: trunk/dports/games/alienarena/files/patch-unix-qal_unix.c.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-unix-qal_unix.c.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-unix-qal_unix.c.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,11 @@
+--- unix/qal_unix.c (revision 1999)
++++ unix/qal_unix.c (working copy)
+@@ -32,7 +32,7 @@
+ * OpenAL Library
+ * OpenAL 1.1 required. TODO: make soname configurable
+ */
+-const char libopenal_name[] = "libopenal.so.1";
++const char libopenal_name[] = "/System/Library/Frameworks/OpenAL.framework/Versions/Current/OpenAL";
+ void *dynlib;
+ qboolean dlsym_error;
+
Added: trunk/dports/games/alienarena/files/patch-unix-sys_unix.c.diff
===================================================================
--- trunk/dports/games/alienarena/files/patch-unix-sys_unix.c.diff (rev 0)
+++ trunk/dports/games/alienarena/files/patch-unix-sys_unix.c.diff 2010-09-02 16:11:22 UTC (rev 71149)
@@ -0,0 +1,11 @@
+--- unix/sys_unix.c (revision 1999)
++++ unix/sys_unix.c (working copy)
+@@ -217,7 +217,7 @@
+ char name[MAX_OSPATH];
+ char *path;
+ char *str_p;
+- const char *gamename = "game.so";
++ const char *gamename = "game.dylib";
+
+ setreuid(getuid(), getuid());
+ setegid(getgid());
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100902/af4023b2/attachment-0001.html>
More information about the macports-changes
mailing list