games/chromium: Added to 12.0 repository

This commit is contained in:
Erik Hanson 2010-05-11 20:00:32 +02:00 committed by David Somero
parent c4df1fd635
commit 09baa361ab
16 changed files with 1463 additions and 0 deletions

4
games/chromium/README Normal file
View file

@ -0,0 +1,4 @@
Chromium B.S.U. is a fast paced, arcade-style, top-scrolling space shooter.
Requires OpenAL and libglpng and optionally SMPEG for MP3 background music.
These are available at SlackBuilds.org.

Binary file not shown.

View file

@ -0,0 +1,57 @@
#!/bin/sh
# Slackware build script for Chromium B.S.U.
# Written by Erik Hanson erik@slackbuilds.org
PRGNAM=chromium
VERSION=0.9.12
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Patch the hell out of this old dog, courtesy debian.
for patch in $CWD/patches/* ; do patch -p1 < $patch || exit 1 ; done
CFLAGS="$SLKCFLAGS" \
./configure --disable-setup || exit 1
make || exit 1
# Manual installation
mkdir -p $PKG/usr/{games,share/{games/chromium,pixmaps,applications},man/man6}
/usr/bin/ginstall -s -m 755 bin/chromium $PKG/usr/games
/usr/bin/ginstall -m 644 $CWD/chromium.xpm $PKG/usr/share/pixmaps
/usr/bin/ginstall -m 644 $CWD/chromium.6.gz $PKG/usr/man/man6
cp -a data/fonts data/png data/wav $PKG/usr/share/games/chromium/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html $PKG/install
cp -a AUTHORS CHANGES INSTALL LICENSE README README.vorbis \
$PKG/usr/doc/$PRGNAM-$VERSION
cp -a data/doc/* $PKG/usr/doc/$PRGNAM-$VERSION/html
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/chromium.desktop > $PKG/usr/share/applications/chromium.desktop
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Name=Chromium
Comment=Scrolling space shooter
Exec=chromium
Icon=chromium
Terminal=false
Type=Application
Categories=Application;Game;
StartupNotify=false

View file

@ -0,0 +1,8 @@
PRGNAM="chromium"
VERSION="0.9.12"
HOMEPAGE="http://www.reptilelabour.com/software/chromium/"
DOWNLOAD="http://slackbuilds.org/sources/12.0/chromium-0.9.12.tar.bz2"
MD5SUM="e788db7aeec1e0407474da1ad10bb504"
MAINTAINER="Erik Hanson"
EMAIL="erik@slackbuilds.org"
APPROVED="David Somero"

1049
games/chromium/chromium.xpm Normal file

File diff suppressed because it is too large Load diff

3
games/chromium/doinst.sh Normal file
View file

@ -0,0 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
fi

View file

@ -0,0 +1,15 @@
Index: chromium-0.9.12/src/Makefile
===================================================================
--- chromium-0.9.12.orig/src/Makefile 2007-04-06 22:52:03.000000000 +0200
+++ chromium-0.9.12/src/Makefile 2007-04-06 22:53:10.000000000 +0200
@@ -10,8 +10,8 @@
CC = gcc
CXX = g++
-CFLAGS = -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
-CXXFLAGS= -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
+CFLAGS = -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
+CXXFLAGS= -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
INCPATH = -I../support/include -I../support/glpng/include -I/usr/X11R6/include
LINK = g++
LFLAGS =

View file

@ -0,0 +1,79 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_buildfixes.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad chromium-0.9.12~/configure chromium-0.9.12/configure
--- chromium-0.9.12~/configure 2006-03-18 16:36:41.823022701 -0500
+++ chromium-0.9.12/configure 2006-03-18 16:37:04.117957717 -0500
@@ -158,8 +158,8 @@
## set up other config.mak variables
######################################################################
GL_LIBS="-lglpng -lGL -lGLU -lm"
-AL_LIBS="-L../support/openal/lib -lopenal -ldl"
-AL_CFLAGS="-I../support/openal/linux/include -I../support/openal/include"
+AL_LIBS="-lalut -lopenal -ldl"
+AL_CFLAGS=""
## write out config.mak
######################################################################
diff -urNad chromium-0.9.12~/scripts/Makefile.no-setup chromium-0.9.12/scripts/Makefile.no-setup
--- chromium-0.9.12~/scripts/Makefile.no-setup 2006-03-18 16:36:41.824022518 -0500
+++ chromium-0.9.12/scripts/Makefile.no-setup 2006-03-18 16:36:43.188773686 -0500
@@ -6,7 +6,7 @@
./src
-all: $(SUPPORT_DIRS) chromium
+all: chromium
chromium: $(CHROMIUM_DIRS) finish
diff -urNad chromium-0.9.12~/scripts/configure_functions chromium-0.9.12/scripts/configure_functions
--- chromium-0.9.12~/scripts/configure_functions 2006-03-18 16:36:41.826022154 -0500
+++ chromium-0.9.12/scripts/configure_functions 2006-03-18 16:36:43.190773322 -0500
@@ -216,7 +216,7 @@
echo "" > /dev/null
return 1
else
- VORBIS_LIBS="-L$LIBVORBISDIR $LIBVORBIS $LIBVORBISFILE"
+ VORBIS_LIBS="$LIBVORBIS $LIBVORBISFILE"
return 0
fi
}
diff -urNad chromium-0.9.12~/src/Makefile chromium-0.9.12/src/Makefile
--- chromium-0.9.12~/src/Makefile 2006-03-18 16:36:41.829021607 -0500
+++ chromium-0.9.12/src/Makefile 2006-03-18 16:36:43.192772957 -0500
@@ -8,14 +8,15 @@
include ../config.mak
####### Compiler, tools and options
+DATA = /usr/share/games/chromium/
CC = gcc
CXX = g++
-CFLAGS = -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
-CXXFLAGS= -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DOLD_OPENAL -DAUDIO_OPENAL -D_REENTRANT
-INCPATH = -I../support/include -I../support/glpng/include -I/usr/X11R6/include
+CFLAGS = -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
+CXXFLAGS= -pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
+INCPATH = -I/usr/X11R6/include
LINK = g++
LFLAGS =
-LIBS = $(SUBLIBS) -L../support/glpng/lib -L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib $(GL_LIBS) $(AL_LIBS) $(SDL_LIBS) $(SMPEG_LIBS) $(VORBIS_LIBS)
+LIBS = $(SUBLIBS) $(GL_LIBS) $(AL_LIBS) $(SDL_LIBS) $(SMPEG_LIBS) $(VORBIS_LIBS)
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
diff -urNad chromium-0.9.12~/src/NCString.cpp chromium-0.9.12/src/NCString.cpp
--- chromium-0.9.12~/src/NCString.cpp 2006-03-18 16:36:41.831021242 -0500
+++ chromium-0.9.12/src/NCString.cpp 2006-03-18 16:36:43.194772593 -0500
@@ -1,6 +1,7 @@
#include "NCString.h"
#include <stdio.h>
+#include <stdarg.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

View file

@ -0,0 +1,18 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 15_soundfix.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./src/AudioOpenAL.cpp /tmp/dpep-work.DHdnn0/chromium-0.9.12/src/AudioOpenAL.cpp
--- ./src/AudioOpenAL.cpp 2001-05-20 21:48:16.000000000 -0400
+++ /tmp/dpep-work.DHdnn0/chromium-0.9.12/src/AudioOpenAL.cpp 2005-08-07 18:35:00.980472404 -0400
@@ -124,6 +124,7 @@
audioScale[0] = 0.5;
audioScale[1] = 0.3;
audioScale[2] = 0.3;
+ alDistanceModel(AL_NONE);
}
if(config->swapStereo())

View file

@ -0,0 +1,33 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_badcode.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./src/HiScore.cpp /tmp/dpep-work.7aaKqf/chromium-0.9.12/src/HiScore.cpp
--- ./src/HiScore.cpp 2001-02-10 15:28:16.000000000 -0500
+++ /tmp/dpep-work.7aaKqf/chromium-0.9.12/src/HiScore.cpp 2005-08-07 18:36:19.038244187 -0400
@@ -306,6 +306,8 @@
for(int j = 0; j < HI_SCORE_HIST; j++)
{
tmptr = localtime(&hiScoreDate[skill][j]);
+ if (!tmptr)
+ break;
fprintf(stderr, "%02d/%02d/%04d %16s %d\n", 1+tmptr->tm_mon, tmptr->tm_mday, 1900+tmptr->tm_year,
hiScoreName[skill][j], (int)(hiScore[skill][j]));
}
diff -urNad --exclude=CVS --exclude=.svn ./src/main.cpp /tmp/dpep-work.7aaKqf/chromium-0.9.12/src/main.cpp
--- ./src/main.cpp 2001-05-20 21:48:37.000000000 -0400
+++ /tmp/dpep-work.7aaKqf/chromium-0.9.12/src/main.cpp 2005-08-07 18:36:13.961909373 -0400
@@ -110,8 +110,8 @@
}
#ifdef PKGDATADIR
- strcpy(dataDir, PKGDATADIR);
- strcat(dataDir, "/data");
+ strncpy(dataDir, PKGDATADIR,256);
+/* strcat(dataDir, "/data");*/
#else
char *chromData = getenv("CHROMIUM_DATA");
if(chromData)

View file

@ -0,0 +1,53 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 25_gcc4.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./src/AudioOpenAL.cpp /tmp/dpep-work.e6tZc1/chromium-0.9.12/src/AudioOpenAL.cpp
--- ./src/AudioOpenAL.cpp 2005-08-07 18:55:15.030494242 -0400
+++ /tmp/dpep-work.e6tZc1/chromium-0.9.12/src/AudioOpenAL.cpp 2005-08-07 18:59:26.975561484 -0400
@@ -311,7 +311,7 @@
//-- check AttenuationScale extension
alAttenuationScale = (void (*)(ALfloat param))
- alGetProcAddress((ALubyte *)"alAttenuationScale_LOKI");
+ alGetProcAddress("alAttenuationScale_LOKI");
if(alAttenuationScale == NULL)
fprintf(stderr, "ATTENTION!! Could not load alAttenuationScale\n");
else
@@ -319,9 +319,9 @@
//-- check Audio Channel extension
alcGetAudioChannel = (float (*)(ALuint channel))
- alGetProcAddress((const ALubyte *)"alcGetAudioChannel_LOKI");
+ alGetProcAddress("alcGetAudioChannel_LOKI");
alcSetAudioChannel = (void (*)(ALuint channel, ALfloat volume))
- alGetProcAddress((const ALubyte *)"alcSetAudioChannel_LOKI");
+ alGetProcAddress("alcSetAudioChannel_LOKI");
#ifdef CD_VOLUME
if(alcGetAudioChannel)
origCDvolume = alcGetAudioChannel(ALC_CHAN_CD_LOKI);
@@ -329,10 +329,10 @@
//-- check MP3 extension
alutLoadMP3 = (ALboolean (*)(ALuint, ALvoid *, ALint))
- alGetProcAddress((const ALubyte *)"alutLoadMP3_LOKI");
+ alGetProcAddress("alutLoadMP3_LOKI");
//-- check Ogg/Vorbis extension
alutLoadVorbis = (ALboolean (*)(ALuint, ALvoid *, ALint))
- alGetProcAddress((const ALubyte *)"alutLoadVorbis_LOKI");
+ alGetProcAddress("alutLoadVorbis_LOKI");
#endif //_WIN32
}
@@ -469,7 +469,7 @@
void AudioOpenAL::loadSounds()
{
int i;
- ALsizei size, freq, bits;
+ ALsizei size, freq;
ALenum format;
ALvoid *data;

View file

@ -0,0 +1,83 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30_new_openAL.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
Index: chromium-0.9.12/src/AudioOpenAL.cpp
===================================================================
--- chromium-0.9.12.orig/src/AudioOpenAL.cpp 2007-04-06 22:26:45.000000000 +0200
+++ chromium-0.9.12/src/AudioOpenAL.cpp 2007-04-06 22:26:45.000000000 +0200
@@ -52,8 +52,8 @@
//try to use OpenAL alc[GS]etAudioChannel extensions in linux...
#ifdef __linux__
#define CD_VOLUME 1
-// #include <AL/alext.h>
- #include <AL/alexttypes.h>
+ #include <AL/alext.h>
+// #include <AL/alexttypes.h>
#endif //__linux__
#endif //USE_SDL
#endif
@@ -472,6 +472,7 @@
ALsizei size, freq;
ALenum format;
ALvoid *data;
+ ALboolean loop;
for(i = 0; i < NumSoundTypes; i++)
{
@@ -482,9 +483,9 @@
else
{
#ifndef _WIN32
- alutLoadWAV(dataLoc(fileNames[i]), &data, &format, &size, &bits, &freq);
+ alutLoadWAVFile(const_cast<ALbyte*>(dataLoc(fileNames[i])), &format, &data, &size, &freq, &loop);
alBufferData (buffer[i], format, data, size, freq);
- free(data);
+ alutUnloadWAV(format,data,size,freq);
#else //_WIN32
char nameBuffer[256];
sprintf(nameBuffer, "%s", dataLoc(fileNames[i]));
@@ -844,14 +845,16 @@
return false;
#else //USE_PLAYLIST
bool retVal;
- ALsizei size, freq, bits;
+ ALsizei size, freq;
ALenum format;
ALvoid *data;
- retVal = alutLoadWAV(filename, &data, &format, &size, &bits, &freq);
+ ALboolean loop;
+ alutLoadWAVFile(const_cast<ALbyte*>(filename), &format, &data, &size, &freq, &loop);
+ retVal = (alGetError() == AL_NO_ERROR);
if(retVal)
{
alBufferData (buffer[MusicGame], format, data, size, freq);
- free(data);
+ alutUnloadWAV(format,data,size,freq);
}
return retVal;
#endif//USE_PLAYLIST
Index: chromium-0.9.12/src/AudioOpenAL.h
===================================================================
--- chromium-0.9.12.orig/src/AudioOpenAL.h 2001-03-20 16:11:07.000000000 +0100
+++ chromium-0.9.12/src/AudioOpenAL.h 2007-04-06 22:26:45.000000000 +0200
@@ -16,6 +16,7 @@
#include <openal.h>
#else //macintosh
#include <AL/al.h>
+#include <AL/alut.h>
#endif //macintosh
/**
@@ -89,7 +90,7 @@
float origCDvolume;
- void *context_id;
+ ALCcontext *context_id;
bool initialized;
float audioScale[3];

View file

@ -0,0 +1,19 @@
Index: chromium-0.9.12/src/HeroAircraft.cpp
===================================================================
--- chromium-0.9.12.orig/src/HeroAircraft.cpp 2007-04-06 22:27:23.000000000 +0200
+++ chromium-0.9.12/src/HeroAircraft.cpp 2007-04-06 22:28:08.000000000 +0200
@@ -663,12 +663,12 @@
}
game->explosions->addExplo(Explosions::PowerBurst, pwrUp->pos);
delUp = pwrUp;
- pwrUp = powerUps->getNext();
+ pwrUp = pwrUp->next;
powerUps->remove(delUp);
}
else
{
- pwrUp = powerUps->getNext();
+ pwrUp = pwrUp->next;
}
}
}

View file

@ -0,0 +1,13 @@
Index: chromium-0.9.12/src/MainSDL_Event.cpp
===================================================================
--- chromium-0.9.12.orig/src/MainSDL_Event.cpp 2007-04-06 22:28:46.000000000 +0200
+++ chromium-0.9.12/src/MainSDL_Event.cpp 2007-04-06 22:29:28.000000000 +0200
@@ -71,6 +71,8 @@
case SDL_JOYBUTTONUP:
joystickButtonUp(event);
break;
+ case SDL_QUIT:
+ return true;
default:
break;
}

19
games/chromium/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler-----------------------------------------------------|
chromium: Chromium B.S.U. ( 3D space shooter. )
chromium:
chromium: Chromium B.S.U. is a fast paced, arcade-style, top-scrolling
chromium: space shooter. It uses SDL, OpenGL and OpenAL.
chromium:
chromium: Homepage: http://www.reptilelabour.com/software/chromium/
chromium:
chromium:
chromium:
chromium:
chromium: