New commits:
commit 7783953d1df145af28ac834bec95e03f734fd881
Author: Pol Vinogradov <vin.public AT gmail.com>
Commit: Pol Vinogradov <vin.public AT gmail.com>
games-arcade-2d/gltron: made spell use BUILD_API=2, added patchset from
Gentoo and Debian
SOURCE_HASH=sha512:297708a145d995bfd186f1745ffa674ab44238e8c2fb627245de3c1602f578afdd9223fae696107769b3b29da476cd9623ee37183618bfb13a9a9cfa59e41bf2
LICENSE[0]=GPL
ENTERED=20010922
- UPDATED=20040107
- BUILD_API=1
SHORT="gltron is a tron-like lightcycle game with a nice 3D
perspective."
cat << EOF
glTron is a tron-like lightcycle game with a nice 3D perspective. 3D
diff --git a/games-arcade-2d/gltron/HISTORY b/games-arcade-2d/gltron/HISTORY
index e04270e..e4341b2 100644
--- a/games-arcade-2d/gltron/HISTORY
+++ b/games-arcade-2d/gltron/HISTORY
@@ -1,3 +1,8 @@
+2011-01-20 Pol Vinogradov <vin.public AT gmail.com>
+ * BUILD, DETAILS: bUILD_API=2 now
+ * PRE_BUILD, gltron-0.70-configure.patch, gltron-0.70-debian.patch,
+ gltron-0.70-prototypes.patch: added patches from Gentoo and Debian
+
2006-06-12 Arwed v. Merkatz <v.merkatz AT gmx.net>
* DETAILS: inserted BUILD_API=1 line
diff --git a/games-arcade-2d/gltron/PRE_BUILD
b/games-arcade-2d/gltron/PRE_BUILD
new file mode 100755
index 0000000..3acbacb
--- /dev/null
+++ b/games-arcade-2d/gltron/PRE_BUILD
@@ -0,0 +1,8 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+sed -i "s/-lglut /-lglut -lGLU -lXi -lXmu /" configure &&
+sed -i "s/-lSDL /-lSDL -lpthread /" configure &&
+patch -p0 < "$SPELL_DIRECTORY/gltron-0.70-configure.patch" &&
+patch -p0 < "$SPELL_DIRECTORY/gltron-0.70-debian.patch" &&
+patch -p0 < "$SPELL_DIRECTORY/gltron-0.70-prototypes.patch"
diff --git a/games-arcade-2d/gltron/gltron-0.70-configure.patch
b/games-arcade-2d/gltron/gltron-0.70-configure.patch
new file mode 100644
index 0000000..91414b3
--- /dev/null
+++ b/games-arcade-2d/gltron/gltron-0.70-configure.patch
@@ -0,0 +1,24 @@
+configure.in is written poorly so it just stomps all over CFLAGS
+
+--- configure
++++ configure
+@@ -2805,7 +2805,7 @@
+ RANLIB="$ac_cv_prog_RANLIB"
+ fi
+
+-CFLAGS="-DSEPARATOR=\"'/'\""
++CFLAGS="$CFLAGS -DSEPARATOR=\"'/'\""
+
+ # Check whether --enable-warn or --disable-warn was given.
+ if test "${enable_warn+set}" = set; then
+@@ -2852,10 +2852,6 @@
+ else
+ enable_optimize=s
+ fi;
+-if test "x$enable_optimize" ; then
+- CFLAGS="$CFLAGS -O$enable_optimize"
+- CXXFLAGS="$CXXFLAGS -O$enable_optimize"
+-fi
+
+ # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
+ if test "${with_sdl_prefix+set}" = set; then
diff --git a/games-arcade-2d/gltron/gltron-0.70-debian.patch
b/games-arcade-2d/gltron/gltron-0.70-debian.patch
new file mode 100644
index 0000000..464cf59
--- /dev/null
+++ b/games-arcade-2d/gltron/gltron-0.70-debian.patch
@@ -0,0 +1,35 @@
+Ripped from Debian patchset 6
+
+--- src/include/game/game_data.h
++++ src/include/game/game_data.h
+@@ -71,7 +71,7 @@
+ typedef struct AI {
+ int active;
+ int tdiff;
+- long lasttime;
++ unsigned int lasttime;
+ segment2 left, right, front, backleft;
+ } AI;
+
+--- src/include/video/fonttex.h
++++ src/include/video/fonttex.h
+@@ -10,7 +10,7 @@
+ int lower; /* lowest ascii character (normally: 32) */
+ int upper; /* highest ascii character (normally: 126) */
+
+- int *texID;
++ unsigned int *texID;
+
+ char *fontname;
+ char *bitmapname;
+--- src/video/trail.c
++++ src/video/trail.c
+@@ -19,7 +19,7 @@
+ n[1] = s->vStart.v[1] - s->vDirection.v[0];
+ tmp[0] = eye[0] - s->vStart.v[0];
+ tmp[1] = eye[1] - s->vStart.v[1];
+- if(n[0] == n[1] == 0) return length(tmp);
++ if(n[0] == 0 && n[1] == 0) return length(tmp);
+ return abs(scalarprod2(n, tmp) / length(n));
+ }
+
diff --git a/games-arcade-2d/gltron/gltron-0.70-prototypes.patch
b/games-arcade-2d/gltron/gltron-0.70-prototypes.patch
new file mode 100644
index 0000000..d697f1a
--- /dev/null
+++ b/games-arcade-2d/gltron/gltron-0.70-prototypes.patch
@@ -0,0 +1,24 @@
+scripting.h declares these params as const so make sure they're the same.
+
+--- nebu/scripting/scripting.c
++++ nebu/scripting/scripting.c
+@@ -169,16 +169,16 @@
+ return status;
+ }
+
+-void scripting_RunFile(char *name) {
++void scripting_RunFile(const char *name) {
+ lua_dofile(L, name);
+ }
+
+-void scripting_Run(char *command) {
++void scripting_Run(const char *command) {
+ /* fprintf(stderr, "[command] %s\n", command); */
+ lua_dostring(L, command);
+ }
+
+-void scripting_RunFormat(char *format, ... ) {
++void scripting_RunFormat(const char *format, ... ) {
+ char buf[4096];
+ va_list ap;
+ va_start(ap, format);
[SM-Commit] GIT changes to master games grimoire by Pol Vinogradov (7783953d1df145af28ac834bec95e03f734fd881),
Pol Vinogradov, 01/20/2011