Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2000 22:59:59 -0400
From:      Will Andrews <andrews@technologist.com>
To:        FreeBSD Ports <ports@FreeBSD.org>
Cc:        Maxim Sobolev <sobomax@altavista.net>
Subject:   GLTron update - need help
Message-ID:  <20000425225959.C1683@argon.blackdawn.com>

next in thread | raw e-mail | index | archive | help

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii

Hi,

I've managed to upgrade GLTron to 0.59 with the recent SDL 1.1 and
SDL_mixer imports. However, I can't get the game to actually run (for some
reason every time I run it it gives me an error such as "Fatal signal:
Segmentation Fault (SDL Parachute Deployed)".

Not being a SDL expert, and not finding any coredumps, I couldn't figure
out what to do.

So, here's the patch against the current port. Note that
patches/patch-a[ab] have been removed, and the patch below will add
patches/patch-a[de]. Remember to remove *.orig's before running ``make''.

Thanks for feedback,

-- 
Will Andrews <andrews@technologist.com>
GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w---
?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ 
G++>+++ e->++++ h! r-->+++ y?

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gltron.diff"

Index: Makefile
===================================================================
RCS file: /extra/cvsroot/ports/games/gltron/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	2000/04/14 06:43:01	1.10
+++ Makefile	2000/04/25 03:52:07
@@ -6,30 +6,41 @@
 #
 
 PORTNAME=	gltron
-PORTVERSION=	0.53
+PORTVERSION=	0.59
 CATEGORIES=	games
-MASTER_SITES=	http://www.ards.net/Andreas/gltron/
+MASTER_SITES=	ftp://ftp.sourceforge.net/pub/sourceforge/gltron/
 
 MAINTAINER=	will@FreeBSD.org
 
-LIB_DEPENDS=	glut.3:${PORTSDIR}/graphics/Mesa3
+LIB_DEPENDS=	SDL.2:${PORTSDIR}/devel/sdl \
+		glut.3:${PORTSDIR}/graphics/Mesa3
 
+.if defined(NO_SOUND)
+SOUND=""
+.else
+SOUND="-DSOUND"
+.endif
+
 USE_X_PREFIX=	yes
+GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
-MAKE_ENV+=	OPT="${CFLAGS}"
+MAKE_ENV+=	OPT="${CFLAGS}" SOUND="${SOUND}"
+
+pre-build:
+	${PERL} -pi -e "s+#include <SDL\/+#include <+g" ${WRKSRC}/*.[ch]
 
 do-install:
-	@${MKDIR} ${PREFIX}/share/gltron/
-.for FILE in *.sgi *.txt t-u-low.obj tron.mtl xenotron.ftx
-	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${PREFIX}/share/gltron/
-.endfor
-	@${INSTALL_PROGRAM} ${WRKSRC}/gltron ${PREFIX}/bin
+	@${MKDIR} ${PREFIX}/share/gltron/ ${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/data/*tx* ${WRKSRC}/data/*.png ${WRKSRC}/data/*.obj \
+			${WRKSRC}/data/*mtl ${WRKSRC}/data/*.it ${WRKSRC}/sounds/*wav \
+			${PREFIX}/share/gltron
+	${INSTALL_PROGRAM} ${WRKSRC}/gltron ${PREFIX}/bin
 
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${PREFIX}/share/doc/gltron
 .for file in CHANGELOG CREDITS README
-	@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/gltron
+	${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/gltron
 .endfor
 .endif
 
Index: files/md5
===================================================================
RCS file: /extra/cvsroot/ports/games/gltron/files/md5,v
retrieving revision 1.4
diff -u -r1.4 md5
--- files/md5	2000/02/17 01:04:27	1.4
+++ files/md5	2000/04/23 17:25:01
@@ -1 +1 @@
-MD5 (gltron-0.53.tar.gz) = 596aaa813c2c11411939e89a6d40d059
+MD5 (gltron-0.59.tar.gz) = 2927d29a83e500b3f8e1eff7cb1ed3ce
Index: patches/patch-ac
===================================================================
RCS file: /extra/cvsroot/ports/games/gltron/patches/patch-ac,v
retrieving revision 1.1
diff -u -r1.1 patch-ac
--- patches/patch-ac	2000/02/17 01:04:29	1.1
+++ patches/patch-ac	2000/04/25 03:25:17
@@ -1,14 +1,16 @@
---- file.c	Mon Jan  3 19:05:10 2000
-+++ file.c.new	Sun Feb 13 02:22:14 2000
-@@ -1,13 +1,16 @@
+--- file.c	Mon Apr 24 23:19:46 2000
++++ file.c.new	Mon Apr 24 23:25:07 2000
+@@ -1,14 +1,18 @@
  #include "gltron.h"
+ 
 +#ifndef SHARE1
 +#define SHARE1 "\"/usr/local/share/gltron\""
 +#endif
 +#ifndef SHARE2
 +#define SHARE2 "\"/usr/X11R6/share/gltron\""
 +#endif
- 
++
+ static char* subdir = "data";
  char* getFullPath(char *filename) {
    char *path;
    FILE *fp = NULL;
@@ -20,7 +22,7 @@
    /* check a few directories for the files and */
    /* return the full path. */
    
-@@ -43,8 +46,8 @@
+@@ -44,8 +48,8 @@
      printf("unsuccessful\n");
    }
  
@@ -31,7 +33,7 @@
  
    printf("checking '%s'", path);
    fp = fopen(path, "r");
-@@ -56,8 +59,8 @@
+@@ -57,8 +61,8 @@
    free(path);
    printf("unsuccessful\n");
  
Index: pkg/PLIST
===================================================================
RCS file: /extra/cvsroot/ports/games/gltron/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- pkg/PLIST	2000/02/17 01:04:30	1.3
+++ pkg/PLIST	2000/04/25 03:35:47
@@ -1,17 +1,38 @@
 bin/gltron
-share/doc/gltron/CHANGELOG
-share/doc/gltron/CREDITS
-share/doc/gltron/README
-share/gltron/gltron.sgi
-share/gltron/gltron_crash.sgi
-share/gltron/gltron_floor.sgi
-share/gltron/gltron_wall.sgi
+share/gltron/babbage.0.png
+share/gltron/babbage.1.png
+share/gltron/babbage.ftx
+share/gltron/fonts.txt
+share/gltron/game_crash.wav
+share/gltron/game_engine.wav
+share/gltron/game_lose.wav
+share/gltron/game_start.wav
+share/gltron/game_win.wav
+share/gltron/gltron.it
+share/gltron/gltron.png
+share/gltron/gltron_crash.png
+share/gltron/gltron_floor.png
+share/gltron/gltron_logo.png
+share/gltron/gltron_trail.png
+share/gltron/gltron_traildecal.png
+share/gltron/gltron_wall_1.png
+share/gltron/gltron_wall_2.png
+share/gltron/gltron_wall_3.png
+share/gltron/gltron_wall_4.png
+share/gltron/lightcycle high.obj
+share/gltron/lightcycle low.obj
+share/gltron/lightcycle med.obj
 share/gltron/menu.txt
+share/gltron/menu_action.wav
+share/gltron/menu_highlight.wav
 share/gltron/settings.txt
-share/gltron/t-u-low.obj
 share/gltron/tron.mtl
-share/gltron/xenotron.0.sgi
-share/gltron/xenotron.1.sgi
+share/gltron/tron2.mtl
+share/gltron/xenotron.0.png
+share/gltron/xenotron.1.png
 share/gltron/xenotron.ftx
-@dirrm share/doc/gltron
+share/doc/gltron/CHANGELOG
+share/doc/gltron/CREDITS
+share/doc/gltron/README
 @dirrm share/gltron
+@dirrm share/doc/gltron
--- /dev/null	Tue Apr 25 22:55:51 2000
+++ patches/patch-ad	Mon Apr 24 23:47:07 2000
@@ -0,0 +1,83 @@
+--- configure	Thu Mar 30 03:22:00 2000
++++ configure.new	Mon Apr 24 23:46:58 2000
+@@ -523,7 +523,7 @@
+ 
+ 
+ 
+-LIBS='-L/usr/X11R6/lib'
++LIBS='-L$ac_default_prefix/lib -L/usr/X11R6/lib'
+ CC='gcc'
+ echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+ echo "configure:530: checking for main in -lm" >&5
+@@ -701,14 +701,14 @@
+ { echo "configure: error: GLU should come with OpenGL" 1>&2; exit 1; }
+ fi
+ 
+-echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
+-echo "configure:706: checking for main in -lpthread" >&5
++echo $ac_n "checking for main in -pthread""... $ac_c" 1>&6
++echo "configure:706: checking for main in -pthread" >&5
+ ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
+ if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+-LIBS="-lpthread  $LIBS"
++LIBS="-pthread  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 714 "configure"
+ #include "confdefs.h"
+@@ -738,7 +738,7 @@
+ #define $ac_tr_lib 1
+ EOF
+ 
+-  LIBS="-lpthread $LIBS"
++  LIBS="-pthread $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+@@ -752,7 +752,7 @@
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+-LIBS="-lSDL -lpthread $LIBS"
++LIBS="-L$ac_default_prefix/lib -lSDL -pthread $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 758 "configure"
+ #include "confdefs.h"
+@@ -782,7 +782,7 @@
+ #define $ac_tr_lib 1
+ EOF
+ 
+-  LIBS="-lSDL $LIBS"
++  LIBS="-L$ac_default_prefix/lib -lSDL $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+@@ -796,7 +796,7 @@
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+-LIBS="-lSDL_mixer  $LIBS"
++LIBS="-L$ac_default_prefix/lib -lSDL_mixer -lsmpeg $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 802 "configure"
+ #include "confdefs.h"
+@@ -826,7 +826,7 @@
+ #define $ac_tr_lib 1
+ EOF
+ 
+-  LIBS="-lSDL_mixer $LIBS"
++  LIBS="-lSDL_mixer -lsmpeg $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+@@ -840,7 +840,7 @@
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+-LIBS="-lpng  $LIBS"
++LIBS="-L$ac_default_prefix/lib -lpng  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 846 "configure"
+ #include "confdefs.h"
--- /dev/null	Tue Apr 25 22:55:51 2000
+++ patches/patch-ae	Mon Apr 24 23:52:58 2000
@@ -0,0 +1,34 @@
+--- Makefile.in	Tue Mar 21 16:34:04 2000
++++ Makefile.in.new	Mon Apr 24 23:52:40 2000
+@@ -1,11 +1,16 @@
+ # Makefile for gltron
+ 
+-SHELL = /bin/sh
+-OPT = -O2
+-CFLAGS = -c -pedantic -Wall -DSOUND
+-GL_LIBS = -lm -lGL -lGLU -lSDL -lpthread -lpng
+-XLIBS = -L/usr/X11/lib -L/usr/X11R6/lib -lX11
+-SNDLIBS =  -lSDL_mixer
++PREFIX		?=	/usr/X11R6
++LOCALBASE	?=	/usr/local
++X11BASE		?=	/usr/X11R6
++SHELL		=	/bin/sh
++SOUND		?=	-DSOUND
++OPT		=	-Wall ${SOUND} -DSHARE1="\"$(PREFIX)/share/gltron\"" -DSHARE2="\"$(X11BASE)/share/gltron\""
++INCS		=	-I$(LOCALBASE)/include -I$(X11BASE)/include -I$(LOCALBASE)/include/SDL11
++CFLAGS		?=	-O -pipe
++GL_LIBS		=	-lm -lGL -lGLU -lSDL -pthread -lpng
++XLIBS		=	-L$(X11BASE)/lib -lX11
++SNDLIBS		=	-L$(LOCALBASE)/lib -lSDL_mixer -lSDL -lsmpeg
+ 
+ GLTRON_INSTALLDIR = /usr/bin
+ GLTRON_HOME = /usr/share/games/gltron
+@@ -45,7 +50,7 @@
+ all: gltron
+ 
+ .c.o:
+-	$(CC) $(CFLAGS) $(OPT) $<
++	$(CC) -c $(CFLAGS) $(OPT) $(INCS) $<
+ 
+ gltron: $(OBJ_SOUND)
+ 	$(CC) $(OPT) -o gltron $(OBJ_SOUND) $(GL_LIBS) $(XLIBS) $(SNDLIBS)

--RnlQjJ0d97Da+TV1--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000425225959.C1683>