Initial PKGBUILD status as of 28.11.2014

This commit is contained in:
Jaroslav Lichtblau 2014-11-28 20:17:14 +01:00
commit 1417be7776
6 changed files with 171 additions and 0 deletions

30
.SRCINFO Normal file
View file

@ -0,0 +1,30 @@
pkgbase = gltron
pkgdesc = A tron-like lightcycle game with a nice 3D perspective
pkgver = 0.70
pkgrel = 4
url = http://www.gltron.org
arch = i686
arch = x86_64
license = GPL
makedepends = patch
depends = libgl
depends = gcc-libs
depends = smpeg
depends = sdl_sound
depends = libpng
depends = glu
source = http://downloads.sourceforge.net/sourceforge/gltron/gltron-0.70-source.tar.gz
source = http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLTron.png/120px-GLTron.png
source = gltron-0.70-configure.patch
source = gltron-0.70-prototypes.patch
source = gltron-0.70-debian.patch
source = gltron.desktop
md5sums = 300e54914844f36c199415d6d8b0372a
md5sums = 794e6160e815040951af7ec7fcba9278
md5sums = 9cd844f561d537df49a35fac21d5b51c
md5sums = 744c0f80394f8713aebdf7038044570e
md5sums = d53c903bba366af12c1fdcc578d32da1
md5sums = 1f36bf3e65cc8791301b79b9024ab51a
pkgname = gltron

47
PKGBUILD Normal file
View file

@ -0,0 +1,47 @@
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
pkgname=gltron
pkgver=0.70
pkgrel=4
pkgdesc="A tron-like lightcycle game with a nice 3D perspective"
arch=('i686' 'x86_64')
url="http://www.gltron.org"
license=('GPL')
depends=('libgl' 'gcc-libs' 'smpeg' 'sdl_sound' 'libpng' 'glu')
makedepends=('patch')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver-source.tar.gz \
http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLTron.png/120px-GLTron.png \
gltron-0.70-configure.patch \
gltron-0.70-prototypes.patch \
gltron-0.70-debian.patch \
gltron.desktop)
md5sums=('300e54914844f36c199415d6d8b0372a'
'794e6160e815040951af7ec7fcba9278'
'9cd844f561d537df49a35fac21d5b51c'
'744c0f80394f8713aebdf7038044570e'
'd53c903bba366af12c1fdcc578d32da1'
'1f36bf3e65cc8791301b79b9024ab51a')
build() {
cd $srcdir/$pkgname-$pkgver
patch -Np0 -i $srcdir/gltron-0.70-configure.patch
patch -Np0 -i $srcdir/gltron-0.70-prototypes.patch
if [ "$CARCH" = "x86_64" ]; then
patch -Np0 -i $srcdir/gltron-0.70-debian.patch
fi
./configure --prefix=/usr --enable-warn=off
make
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -D -m644 "$srcdir/120px-GLTron.png" \
"$pkgdir/usr/share/gltron/pics/gltron.png"
install -D -m644 "$srcdir/gltron.desktop" \
"$pkgdir/usr/share/applications/gltron.desktop"
}

View file

@ -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

35
gltron-0.70-debian.patch Normal file
View file

@ -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));
}

View file

@ -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);

11
gltron.desktop Normal file
View file

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=GLTron
GenericName=GLTron
Comment=Lightcycle game with a nice 3D perspective.
Icon=/usr/share/gltron/pics/gltron.png
Exec=gltron
StartupNotify=true
Terminal=False
Categories=Application;Game;