[111727] trunk/dports/games
ryandesign at macports.org
ryandesign at macports.org
Mon Sep 30 03:10:53 PDT 2013
Revision: 111727
https://trac.macports.org/changeset/111727
Author: ryandesign at macports.org
Date: 2013-09-30 03:10:53 -0700 (Mon, 30 Sep 2013)
Log Message:
-----------
blockout2: new port, version 2.4 (#40631)
Added Paths:
-----------
trunk/dports/games/blockout2/
trunk/dports/games/blockout2/Portfile
trunk/dports/games/blockout2/files/
trunk/dports/games/blockout2/files/Makefile
trunk/dports/games/blockout2/files/patch-BlockOut-BlockOut.cpp.diff
trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLApp.cpp.diff
trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLFont.cpp.diff
trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLSprite.cpp.diff
trunk/dports/games/blockout2/files/patch-BlockOut-Makefile.diff
trunk/dports/games/blockout2/files/patch-BlockOut-Utils.cpp.diff
trunk/dports/games/blockout2/files/patch-ImageLib-src-Makefile.diff
trunk/dports/games/blockout2/files/patch-ImageLib-src-gif-gif.c.diff
trunk/dports/games/blockout2/files/patch-ImageLib-src-jpg-jpegdecoder.cpp.diff
Added: trunk/dports/games/blockout2/Portfile
===================================================================
--- trunk/dports/games/blockout2/Portfile (rev 0)
+++ trunk/dports/games/blockout2/Portfile 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,60 @@
+# -*- 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
+PortGroup app 1.0
+
+name blockout2
+version 2.4
+set short_version [strsed ${version} {g/\.//}]
+categories games
+platforms darwin
+maintainers rixon.org:jeremy
+license GPL-2+
+installs_libs no
+
+description Open source clone of the 1989 California Dreams classic game Blockout.
+long_description ${description}
+
+homepage http://www.blockout.net/blockout2/
+master_sites sourceforge:project/blockout/blockout/BlockOut%20${version}/
+distname bl${short_version}-src-linux-i586
+worksrcdir bl${short_version}_lin_src
+
+checksums rmd160 3ddbf10a71b748687f335cd5ec55a8fbf8f9e138 \
+ sha256 c95766b8d6fce9820e14a23cd1bdea28591c01d8fdf5ece06cca1071f082c088
+
+depends_lib path:lib/pkgconfig/sdl.pc:libsdl \
+ port:libsdl_mixer \
+ port:mesa
+
+post-extract {
+ copy ${filespath}/Makefile ${worksrcpath}
+}
+
+patchfiles patch-BlockOut-BlockOut.cpp.diff \
+ patch-BlockOut-GLApp-GLApp.cpp.diff \
+ patch-BlockOut-GLApp-GLFont.cpp.diff \
+ patch-BlockOut-GLApp-GLSprite.cpp.diff \
+ patch-BlockOut-Makefile.diff \
+ patch-BlockOut-Utils.cpp.diff \
+ patch-ImageLib-src-gif-gif.c.diff \
+ patch-ImageLib-src-jpg-jpegdecoder.cpp.diff \
+ patch-ImageLib-src-Makefile.diff
+
+post-patch {
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/BlockOut/Utils.cpp
+}
+
+use_configure no
+
+variant universal {}
+
+build.args CC="${configure.cc} [get_canonical_archflags cc]" \
+ CXX="${configure.cxx} [get_canonical_archflags cxx]" \
+ PREFIX=${prefix}
+
+destroot.args PREFIX=${prefix}
+
+app.name BlockOut II
+app.executable ${prefix}/bin/blockout2
Property changes on: trunk/dports/games/blockout2/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/games/blockout2/files/Makefile
===================================================================
--- trunk/dports/games/blockout2/files/Makefile (rev 0)
+++ trunk/dports/games/blockout2/files/Makefile 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,10 @@
+all:
+ cd ImageLib/src && make
+ cd BlockOut && make
+
+install:
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(PREFIX)/share/blockout2
+ install -c -m 755 BlockOut/blockout $(DESTDIR)$(PREFIX)/bin/blockout2
+ cp -R BlockOut/images $(DESTDIR)$(PREFIX)/share/blockout2
+ cp -R BlockOut/sounds $(DESTDIR)$(PREFIX)/share/blockout2
Property changes on: trunk/dports/games/blockout2/files/Makefile
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/dports/games/blockout2/files/patch-BlockOut-BlockOut.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-BlockOut.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-BlockOut.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,20 @@
+--- BlockOut/BlockOut.cpp.orig 2008-01-10 05:29:06.000000000 +1100
++++ BlockOut/BlockOut.cpp 2013-09-29 18:27:48.000000000 +1000
+@@ -340,11 +340,15 @@
+ // Handle key presses
+ if( event->type == SDL_KEYDOWN )
+ {
+- int unicode = (event->key.keysym.unicode & 0x7F);
++ int unicode = (event->key.keysym.unicode & 0x8000000);
+ if( unicode ) {
+ m_bKey[unicode] = 1;
+ } else {
+- m_bKey[event->key.keysym.sym] = 1;
++ int sym = event->key.keysym.sym;
++ if ((event->key.keysym.mod & KMOD_SHIFT) && sym >= 'a' && sym <='z') {
++ sym -= 'a' - 'A';
++ }
++ m_bKey[sym] = 1;
+ }
+ }
+
Added: trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLApp.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLApp.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLApp.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,13 @@
+--- BlockOut/GLApp/GLApp.cpp.orig 2013-09-27 13:29:33.000000000 +1000
++++ BlockOut/GLApp/GLApp.cpp 2013-09-27 13:30:22.000000000 +1000
+@@ -59,10 +59,6 @@
+ m_screenHeight = height;
+ m_bWindowed = !bFullScreen;
+
+- if( getenv("DISPLAY")==NULL ) {
+- printf("Warning, DISPLAY not defined, it may not work.\n");
+- }
+-
+ //Initialize SDL
+ if( SDL_Init( SDL_INIT_EVERYTHING ) < 0 )
+ {
Added: trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLFont.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLFont.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLFont.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,11 @@
+--- BlockOut/GLApp/GLFont.cpp.orig 2013-09-27 13:29:57.000000000 +1000
++++ BlockOut/GLApp/GLFont.cpp 2013-09-27 13:30:32.000000000 +1000
+@@ -3,7 +3,7 @@
+ // -----------------------------------------------
+ #include "GLFont.h"
+ #include <CImage.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+
Added: trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLSprite.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLSprite.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-GLApp-GLSprite.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,11 @@
+--- BlockOut/GLApp/GLSprite.cpp.orig 2013-09-27 13:33:22.000000000 +1000
++++ BlockOut/GLApp/GLSprite.cpp 2013-09-27 13:33:42.000000000 +1000
+@@ -3,7 +3,7 @@
+ // -----------------------------------------------
+ #include "GLSprite.h"
+ #include <CImage.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+
Added: trunk/dports/games/blockout2/files/patch-BlockOut-Makefile.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-Makefile.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-Makefile.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,26 @@
+--- BlockOut/Makefile.orig 2008-01-09 12:29:06.000000000 -0600
++++ BlockOut/Makefile 2013-09-30 04:49:38.000000000 -0500
+@@ -34,17 +34,17 @@
+
+ #---------------------------------------------------------------------
+
+-SDL_ROOT = /users/pons/test/opengl/SDL
+-IMGLIB_ROOT = ../ImageLib
++SDL_ROOT = $(PREFIX)
++IMGLIB_ROOT = ../ImageLib/src
+
+ CXX = g++
+
+-CXXFLAGS = -g -D_DEBUG -Dlinux -c \
+- -I$(SDL_ROOT)/include/SDL -I$(IMGLIB_ROOT) -I.
++CXXFLAGS = -g -D_DEBUG -c \
++ -I$(SDL_ROOT)/include/SDL -I$(IMGLIB_ROOT) -I. -I/usr/include -D_GNU_SOURCE=1 -D_THREAD_SAFE
+
+-LIBS = -L$(SDL_ROOT)/lib -L$(IMGLIB_ROOT)
++LIBS = -L$(SDL_ROOT)/lib -L$(IMGLIB_ROOT) -lSDLmain -Wl,-framework,AppKit -lSDL -Wl,-framework,Cocoa
+
+-LFLAGS = $(LIBS) -limagelib -lGL -lGLU -lSDL_mixer -lSDL -lpthread -lm -ldl
++LFLAGS = $(LIBS) -lGL -lGLU -limagelib -lSDL_mixer -lSDL -lSDLmain -lpthread -lm -ldl
+
+ #--------------------------------------------------------------------
+
Added: trunk/dports/games/blockout2/files/patch-BlockOut-Utils.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-BlockOut-Utils.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-BlockOut-Utils.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,33 @@
+--- BlockOut/Utils.cpp.orig 2013-09-29 15:31:26.000000000 +1000
++++ BlockOut/Utils.cpp 2013-09-29 15:32:42.000000000 +1000
+@@ -97,7 +97,8 @@
+ #ifdef LOCALTIME32
+ struct tm *ts = _localtime32((__time32_t *)&time);
+ #else
+- struct tm *ts = localtime((time_t *)&time);
++ time_t t = time;
++ struct tm *ts = localtime(&t);
+ #endif
+ sprintf(ret,"%02d-%02d-%04d %02d:%02d:%02d",ts->tm_mday,ts->tm_mon+1,ts->tm_year+1900,
+ ts->tm_hour,ts->tm_min,ts->tm_sec);
+@@ -120,7 +121,8 @@
+ #ifdef LOCALTIME32
+ struct tm *ts = _localtime32((__time32_t *)&time);
+ #else
+- struct tm *ts = localtime((time_t *)&time);
++ time_t t = time;
++ struct tm *ts = localtime(&t);
+ #endif
+ sprintf(ret,"%02d-%02d-%04d",ts->tm_mday,ts->tm_mon+1,ts->tm_year+1900);
+ } else {
+@@ -164,9 +166,7 @@
+
+ char *blockoutHome = getenv("BL2_HOME");
+ if( blockoutHome==NULL ) {
+- printf("BL2_HOME environement variable if not defined !\n");
+- printf("Please set the BL2_HOME to the BlockOut II installation directory (ex: BL2_HOME=/usr/local/bl2).\n");
+- return FALSE;
++ blockoutHome = "@PREFIX@/share/blockout2";
+ }
+ strcpy( bl2Home , blockoutHome );
+
Added: trunk/dports/games/blockout2/files/patch-ImageLib-src-Makefile.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-ImageLib-src-Makefile.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-ImageLib-src-Makefile.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,20 @@
+--- ImageLib/src/Makefile.orig 2008-01-09 12:35:38.000000000 -0600
++++ ImageLib/src/Makefile 2013-09-30 04:54:39.000000000 -0500
+@@ -36,7 +36,7 @@
+ CC = gcc
+
+ CXXFLAGS = -O2 -Dlinux -c -I.
+-CFLAGS = -O2 -Dlinux -c -I.
++CFLAGS = -O2 -Dlinux -c -I. -I/usr/include/sys -DPNG_NO_ASSEMBLER_CODE -DPNG_NO_WRITE_tIME
+
+
+ #--------------------------------------------------------------------
+@@ -46,7 +46,7 @@
+ libimagelib.a: $(OBJ)
+ @echo Making library...
+ @rm -f libimagelib.a
+- ar -rv libimagelib.a $(OBJ)
++ ar -rsv libimagelib.a $(OBJ)
+
+ clean:
+ @echo Cleaning...
Added: trunk/dports/games/blockout2/files/patch-ImageLib-src-gif-gif.c.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-ImageLib-src-gif-gif.c.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-ImageLib-src-gif-gif.c.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,11 @@
+--- ImageLib/src/gif/gif.c.orig 2008-01-10 05:35:38.000000000 +1100
++++ ImageLib/src/gif/gif.c 2013-09-27 13:11:27.000000000 +1000
+@@ -4,7 +4,7 @@
+ /* Use an ultra fast compression method */
+ /***************************************************/
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <memory.h>
+ #include "gif.h"
+
Added: trunk/dports/games/blockout2/files/patch-ImageLib-src-jpg-jpegdecoder.cpp.diff
===================================================================
--- trunk/dports/games/blockout2/files/patch-ImageLib-src-jpg-jpegdecoder.cpp.diff (rev 0)
+++ trunk/dports/games/blockout2/files/patch-ImageLib-src-jpg-jpegdecoder.cpp.diff 2013-09-30 10:10:53 UTC (rev 111727)
@@ -0,0 +1,29 @@
+--- ImageLib/src/jpg/jpegdecoder.cpp.orig 2013-09-27 13:20:15.000000000 +1000
++++ ImageLib/src/jpg/jpegdecoder.cpp 2013-09-27 13:20:34.000000000 +1000
+@@ -106,7 +106,7 @@
+ blocks[i] = q;
+
+ // Round to qword boundry, to avoid misaligned accesses with MMX code
+- return ((void *)(((uint)q + 7) & ~7));
++ return ((void *)(((ulong)q + 7) & ~7));
+ }
+ //------------------------------------------------------------------------------
+ // Clear buffer to word values.
+@@ -1884,7 +1884,7 @@
+ q = (uchar *)alloc(max_blocks_per_row * 64 * sizeof(BLOCK_TYPE) + 8);
+
+ // Align to 8-byte boundry, for MMX code
+- q = (uchar *)(((uint)q + 7) & ~7);
++ q = (uchar *)(((ulong)q + 7) & ~7);
+
+ // The block_seg[] array's name dates back to the
+ // 16-bit assembler implementation. "seg" stood for "segment".
+@@ -1894,7 +1894,7 @@
+ for (i = 0; i < max_blocks_per_row; i++)
+ block_max_zag_set[i] = 64;
+
+- Psample_buf = (uchar *)(((uint)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
++ Psample_buf = (uchar *)(((ulong)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
+
+ total_lines_left = image_y_size;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130930/22832755/attachment.html>
More information about the macports-changes
mailing list