summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorhollywoodb <hollywoodb@fastmail.fm>2010-05-11 22:22:56 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-11 22:22:56 +0200
commit49c607a73d8c72b295683978fbded03811d35e9d (patch)
tree74b53b14f86553eb26a0757dd119301464ebbf46 /games
parent7b433a1fc39f6b7cc931158d87b86ab8d73a6ffd (diff)
downloadslackbuilds-49c607a73d8c72b295683978fbded03811d35e9d.tar.gz
games/blobAndConquer: Updated for version 0.93
Diffstat (limited to 'games')
-rw-r--r--games/blobAndConquer/README4
-rw-r--r--games/blobAndConquer/blobAndConquer.SlackBuild17
-rw-r--r--games/blobAndConquer/blobAndConquer.info8
-rw-r--r--games/blobAndConquer/blobandconquer_0.93-2.patch291
4 files changed, 309 insertions, 11 deletions
diff --git a/games/blobAndConquer/README b/games/blobAndConquer/README
index 2eb4086032..1d5a38fa8d 100644
--- a/games/blobAndConquer/README
+++ b/games/blobAndConquer/README
@@ -6,7 +6,3 @@ Blobs and fought many battles, but now he had an ever bigger task ahead of
him. The Blobs' homeworld is still littered with the alien forces and Bob
once again makes it his task to lead the counter attack. But even without
Galdov the aliens are still extremely well organised...
-
-Please note that using the direct link from the info file doesn't work
-when using it with wget. Copying and pasting the link in browser such
-as firefox seems to work.
diff --git a/games/blobAndConquer/blobAndConquer.SlackBuild b/games/blobAndConquer/blobAndConquer.SlackBuild
index 6ce86933b6..613e9b24f6 100644
--- a/games/blobAndConquer/blobAndConquer.SlackBuild
+++ b/games/blobAndConquer/blobAndConquer.SlackBuild
@@ -4,11 +4,13 @@
# Written by Wade Nelson <hollywoodb@fastmail.fm>
+# Modified by SlackBuilds.org
+
set -e
PRGNAM=blobAndConquer
-VERSION=0.91
-SUBVER=1
+VERSION=0.93
+SUBVER=2
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -32,13 +34,22 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# Patches:
+# Turn off DEBUG output, fix .desktop file.
+# From debian:
+# Apply patch from Michel Dänzer to use SDL_Swap32() in swapBytes(), and
+# to move it to the top of bsp.cpp. Closes: #482570
+# Remove superfluous typedefs from CBSP.h and CGame.h.
+patch -p1 < $CWD/blobandconquer_0.93-2.patch
+
sed -i '16s|share/doc/$(PROG)|doc/$(PROG)-$(VERSION)|g' makefile
sed -i '17s|share/icons|share/pixmaps|g' makefile
make
make install DESTDIR=$PKG
-sed -i 's|0.7|0.91|g' $PKG/usr/share/applications/$PRGNAM.desktop
+# Fix stray permissions:
+find $PKG/usr/share -type f -exec chmod 0644 {} \;
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/games/blobAndConquer/blobAndConquer.info b/games/blobAndConquer/blobAndConquer.info
index 0a23ad11b5..fb02394885 100644
--- a/games/blobAndConquer/blobAndConquer.info
+++ b/games/blobAndConquer/blobAndConquer.info
@@ -1,8 +1,8 @@
PRGNAM="blobAndConquer"
-VERSION="0.91"
+VERSION="0.93"
HOMEPAGE="http://www.parallelrealities.co.uk/blobAndConquer.php"
-DOWNLOAD="http://www.parallelrealities.co.uk/download.php?file=blobAndConquer-0.91-1.tar.gz&type=zip"
-MD5SUM="b96c6bb80b0be8f46df2af3c1a716e86"
+DOWNLOAD="http://localhost/blobAndConquer-0.93-2.tar.gz"
+MD5SUM="db54cb515f1906e1d5953a2d6158a89b"
MAINTAINER="hollywoodb"
EMAIL="hollywoodb@fastmail.fm"
-APPROVED="rworkman"
+APPROVED="Erik Hanson"
diff --git a/games/blobAndConquer/blobandconquer_0.93-2.patch b/games/blobAndConquer/blobandconquer_0.93-2.patch
new file mode 100644
index 0000000000..b9625606bf
--- /dev/null
+++ b/games/blobAndConquer/blobandconquer_0.93-2.patch
@@ -0,0 +1,291 @@
+diff -Naur blobAndConquer-0.93.orig/icons/blobAndConquer.desktop blobAndConquer-0.93/icons/blobAndConquer.desktop
+--- blobAndConquer-0.93.orig/icons/blobAndConquer.desktop 2008-06-01 01:20:49.000000000 -0500
++++ blobAndConquer-0.93/icons/blobAndConquer.desktop 2008-06-01 02:29:30.000000000 -0500
+@@ -1,10 +1,9 @@
+ [Desktop Entry]
+-Version=0.7
+-Encoding=UTF-8
+-Name=Blob Wars : Blob And Conquer
+-GenericName=Game
++Categories=ArcadeGame;Game;
++X-Desktop-File-Install-Version=1.0
++Name=Blob And Conquer
+ Comment=Mission and Objective based 3D Action Game
+-Type=Application
+-Exec=blobAndConquer
+ Icon=blobAndConquer
+-Categories=Game;ArcadeGame;
++Exec=blobAndConquer
++Terminal=false
++Type=Application
+diff -Naur blobAndConquer-0.93.orig/makefile blobAndConquer-0.93/makefile
+--- blobAndConquer-0.93.orig/makefile 2008-06-01 01:20:49.000000000 -0500
++++ blobAndConquer-0.93/makefile 2008-06-01 02:29:24.000000000 -0500
+@@ -79,7 +79,7 @@
+ LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
+
+ # top-level rule to create the program.
+-all: $(PROG) pak
++all: $(PROG)
+
+ %.o: %.cpp %.h data/gameDefs/defines.h defs.h headers.h
+ $(CXX) $(CXXFLAGS) -c $<
+diff -Naur blobAndConquer-0.93.orig/src/3d/CBSP.h blobAndConquer-0.93/src/3d/CBSP.h
+--- blobAndConquer-0.93.orig/src/3d/CBSP.h 2008-06-01 01:20:48.000000000 -0500
++++ blobAndConquer-0.93/src/3d/CBSP.h 2008-06-01 02:29:24.000000000 -0500
+@@ -42,18 +42,18 @@
+ kMaxLumps
+ };
+
+-typedef struct BSPHeader {
++struct BSPHeader {
+
+ char strID[4];
+ int version;
+ };
+
+-typedef struct BSPLump {
++struct BSPLump {
+
+ int offset, length;
+ };
+
+-typedef struct BSPVertex {
++struct BSPVertex {
+
+ Vector position;
+ Point textureCoord;
+@@ -62,7 +62,7 @@
+ unsigned char color[4];
+ };
+
+-typedef struct BSPFace {
++struct BSPFace {
+
+ int textureID, effect, type;
+ int startVertIndex, numOfVerts, meshVertIndex;
+@@ -75,18 +75,18 @@
+ int size[2];
+ };
+
+-typedef struct BSPTexture {
++struct BSPTexture {
+
+ char strName[64];
+ int flags, contents;
+ };
+
+-typedef struct BSPLightmap {
++struct BSPLightmap {
+
+ unsigned char lightmapData[128*128*3];
+ };
+
+-typedef struct BSPNode {
++struct BSPNode {
+
+ int plane;
+ int children[2];
+@@ -94,7 +94,7 @@
+ Vectori max;
+ };
+
+-typedef struct BSPLeaf {
++struct BSPLeaf {
+
+ int cluster, area;
+ Vectori min, max;
+@@ -102,53 +102,53 @@
+ int leafBrush, numOfLeafBrushes;
+ };
+
+-typedef struct BSPBrush {
++struct BSPBrush {
+
+ int brushSide, numOfBrushSides, textureID;
+ };
+
+-typedef struct BSPBrushSide {
++struct BSPBrushSide {
+
+ int plane, textureID;
+ };
+
+-typedef struct BSPShader {
++struct BSPShader {
+
+ char strName[64];
+ int brushID, unknown;
+ };
+
+-typedef struct BSPVisData {
++struct BSPVisData {
+
+ int numOfClusters, bytesPerCluster;
+ unsigned char *pBitsets;
+ };
+
+-typedef struct Bitset {
++struct Bitset {
+
+ unsigned int *bits;
+ int size;
+ };
+
+-typedef struct BSPBiQuadraticPatch {
++struct BSPBiQuadraticPatch {
+
+ int *trianglesPerRow;
+ unsigned int **rowIndexPointers, *indices;
+ BSPVertex controlPoints[9], *verts;
+ };
+
+-typedef struct BSPPatch {
++struct BSPPatch {
+
+ int textureID, lightmapID;
+ int width, height, numQuadPatches;
+ BSPBiQuadraticPatch *quadPatches;
+ };
+
+-typedef struct BSPModel {
++struct BSPModel {
+ Vector mins, maxs;
+ int faceIndex, numOfFaces;
+ int brushIndex, numOfBrushes;
+-} BSPModel;
++};
+
+ typedef union {
+ unsigned char i[sizeof(float)];
+diff -Naur blobAndConquer-0.93.orig/src/defs.h blobAndConquer-0.93/src/defs.h
+--- blobAndConquer-0.93.orig/src/defs.h 2008-06-01 01:20:48.000000000 -0500
++++ blobAndConquer-0.93/src/defs.h 2008-06-01 02:29:11.000000000 -0500
+@@ -337,9 +337,9 @@
+ /* ############# debug ################## */
+
+ //#if USEPAK
+-// #define debug(x)
++ #define debug(x)
+ //#else
+- #define debug(x) {printf("[DEBUG (%d)] ", SDL_GetTicks()); printf x; fflush(stdout);}
++// #define debug(x) {printf("[DEBUG (%d)] ", SDL_GetTicks()); printf x; fflush(stdout);}
+ //#endif
+
+ #ifndef IGNORE_FLAGTOKEN_ERRORS
+diff -Naur blobAndConquer-0.93.orig/src/game/CGame.h blobAndConquer-0.93/src/game/CGame.h
+--- blobAndConquer-0.93.orig/src/game/CGame.h 2008-06-01 01:20:48.000000000 -0500
++++ blobAndConquer-0.93/src/game/CGame.h 2008-06-01 02:29:24.000000000 -0500
+@@ -20,7 +20,7 @@
+
+ #include "../attributes.h"
+
+-typedef struct InfoMessage {
++struct InfoMessage {
+
+ bool redraw;
+ String message;
+diff -Naur blobAndConquer-0.93.orig/src/world/bsp.cpp blobAndConquer-0.93/src/world/bsp.cpp
+--- blobAndConquer-0.93.orig/src/world/bsp.cpp 2008-06-01 01:20:48.000000000 -0500
++++ blobAndConquer-0.93/src/world/bsp.cpp 2008-06-01 02:29:24.000000000 -0500
+@@ -20,9 +20,19 @@
+
+ #include "bsp.h"
+
+-#define TESSELATION 10
++#if SDL_BYTEORDER != SDL_LIL_ENDIAN
++static float swapBytes(float f)
++{
++ union { float f; uint32_t u; } fu;
+
+-float swapBytes(float);
++ fu.f = f;
++ fu.u = SDL_Swap32(fu.u);
++
++ return fu.f;
++}
++#endif
++
++#define TESSELATION 10
+
+ TextureSpec *getTextureSpec(const char *basename)
+ {
+@@ -101,7 +111,7 @@
+
+ if (quadPatch->verts == NULL)
+ {
+- graphics->showErrorAndExit("BSP - Failed to allocate %u bytes for tesselation", (bsp->tesselation + 1) * (bsp->tesselation + 1) * sizeof(BSPVertex));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for tesselation", (bsp->tesselation + 1) * (bsp->tesselation + 1) * sizeof(BSPVertex));
+ }
+
+ for (v=0;v<=bsp->tesselation;v++)
+@@ -193,7 +203,7 @@
+
+ if (quadPatch->indices == NULL)
+ {
+- graphics->showErrorAndExit("BSP - Failed to allocate %u bytes for indices", bsp->tesselation * (bsp->tesselation + 1) * 2 * sizeof(unsigned int));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for indices", bsp->tesselation * (bsp->tesselation + 1) * 2 * sizeof(unsigned int));
+ }
+
+ for (row=0;row<bsp->tesselation;row++)
+@@ -211,12 +221,12 @@
+
+ if (quadPatch->trianglesPerRow == NULL)
+ {
+- graphics->showErrorAndExit("BSP - Failed to allocate %d bytes for trianglesPerRow", bsp->tesselation * sizeof(int));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for trianglesPerRow", bsp->tesselation * sizeof(int));
+ }
+
+ if (quadPatch->rowIndexPointers == NULL)
+ {
+- graphics->showErrorAndExit("BSP - Failed to allocate %u bytes for rowIndexPointers", bsp->tesselation * sizeof(unsigned int));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for rowIndexPointers", bsp->tesselation * sizeof(unsigned int));
+ }
+
+ for (row=0;row<bsp->tesselation;row++)
+@@ -369,7 +379,7 @@
+ if (bsp->textures == NULL)
+ {
+
+- graphics->showErrorAndExit("BSP - Failed to allocate %u bytes for textures", bsp->numOfTextures * sizeof(BSPTexture));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for textures", bsp->numOfTextures * sizeof(BSPTexture));
+ }
+
+ bsp->textureSpec = (TextureSpec **)malloc(bsp->numOfTextures * sizeof(TextureSpec *));
+@@ -377,7 +387,7 @@
+ if (bsp->textureSpec == NULL)
+ {
+
+- graphics->showErrorAndExit("BSP - Failed to allocate %u bytes for texture validation", bsp->numOfTextures * sizeof(TextureSpec));
++ graphics->showErrorAndExit("BSP - Failed to allocate %lu bytes for texture validation", bsp->numOfTextures * sizeof(TextureSpec));
+ }
+
+ buffer += lumps[kTextures].offset;
+@@ -834,7 +844,7 @@
+
+ if (bsp->patches == NULL)
+ {
+- printf("Failed to allocate %u bytes for patches\n", bsp->numOfPatches * sizeof(BSPPatch));
++ printf("Failed to allocate %lu bytes for patches\n", bsp->numOfPatches * sizeof(BSPPatch));
+
+ exit(1);
+ }
+@@ -1536,18 +1546,3 @@
+
+ debug(("loadBSP() :: Done\n"));
+ }
+-
+-float swapBytes(float f)
+-{
+- unsigned int i;
+- Convert c1, c2;
+-
+- c1.f = f;
+-
+- for (i=0;i<sizeof(float);i++)
+- {
+- c2.i[sizeof(float) - (i + 1)] = c1.i[i];
+- }
+-
+- return c2.f;
+-}