Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: gltron-0.70 #18825

Merged
merged 1 commit into from Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions srcpkgs/gltron/patches/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
35 changes: 35 additions & 0 deletions srcpkgs/gltron/patches/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));
}

24 changes: 24 additions & 0 deletions srcpkgs/gltron/patches/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);
10 changes: 10 additions & 0 deletions srcpkgs/gltron/patches/stdint.patch
@@ -0,0 +1,10 @@
--- lua/src/lib/liolib.c 2003-06-30 21:15:26.000000000 +0200
+++ lua/src/lib/liolib.c.new 2020-02-04 23:08:47.840943907 +0100
@@ -6,6 +6,7 @@
*/


+#include <stdint.h>
#include <ctype.h>
#include <stdio.h>
#define __USE_MISC /* for mkstemp() */
13 changes: 13 additions & 0 deletions srcpkgs/gltron/template
@@ -0,0 +1,13 @@
# Template file for 'gltron'
pkgname=gltron
version=0.70
revision=1
build_style=gnu-configure
configure_args="--enable-warn=off"
makedepends="glu-devel SDL_sound-devel smpeg-devel zlib-devel libpng-devel"
short_desc="3d tron, just like the movie"
maintainer="Marco Bertoni <marco.bertoni.bologna@gmail.com>"
license="GPL-2.0-only"
homepage="http://gltron.org/"
distfiles="${SOURCEFORGE_SITE}/gltron/gltron-${version}-source.tar.gz"
checksum="e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0"