Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2000 02:35:18 -0500 (EST)
From:      Will Andrews <andrews@technologist.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/16694: update port: games/gltron: 0.46 -> 0.53
Message-ID:  <20000213073518.6E3911A70@argon.blackdawn.com>

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

>Number:         16694
>Category:       ports
>Synopsis:       update port: games/gltron: 0.46 -> 0.53
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 12 23:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Will Andrews
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
none
>Environment:

FreeBSD argon.blackdawn.com 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Sat Feb 12 13:20:47 EST 2000     root@argon.blackdawn.com:/usr/src/sys/compile/KRYPTON  i386

>Description:

Fix gltron on -CURRENT. Update it from 0.46 to 0.53.
Make the port respect CC/CFLAGS.
Some code was cleaned up a little bit.
I don't know if sound works now, but it links with libmikmod now.

>How-To-Repeat:

Use the patch below to fix the current port.

>Fix:

diff -urN gltron/Makefile gltron.new/Makefile
--- gltron/Makefile	Sat Dec 25 18:13:36 1999
+++ gltron.new/Makefile	Sun Feb 13 02:31:39 2000
@@ -1,13 +1,12 @@
 # New ports collection makefile for:	gltron
-# Version required:			0.46
+# Version required:			0.53
 # Date created:				24 July 1999
 # Whom:					Andrey Zakhvatov
 #
 # $FreeBSD: ports/games/gltron/Makefile,v 1.5 1999/12/25 20:29:21 jedgar Exp $
 #
 
-DISTNAME=	glTron-0.46
-PKGNAME=	gltron-0.46
+DISTNAME=	gltron-0.53
 CATEGORIES=	games
 MASTER_SITES=	http://www.ards.net/Andreas/gltron/
 
@@ -15,18 +14,25 @@
 
 LIB_DEPENDS=	MesaGL.14:${PORTSDIR}/graphics/Mesa3 \
 		MesaGLU.14:${PORTSDIR}/graphics/Mesa3 \
-		glut.3:${PORTSDIR}/graphics/Mesa3
+		glut.3:${PORTSDIR}/graphics/Mesa3 \
+		mikmod.2:${PORTSDIR}/audio/libmikmod
 
 USE_X_PREFIX=	yes
+USE_GMAKE=	yes
+MAKE_ENV+=	OPT="${CFLAGS}"
 
 do-install:
-	@ ${INSTALL_PROGRAM} ${WRKSRC}/gltron ${PREFIX}/bin
+	@${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
 
 post-install:
 .if !defined(NOPORTDOCS)
-	@ ${MKDIR} ${PREFIX}/share/doc/gltron
+	@${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
 
diff -urN gltron/files/md5 gltron.new/files/md5
--- gltron/files/md5	Sat Dec 25 18:13:36 1999
+++ gltron.new/files/md5	Sun Feb 13 01:41:24 2000
@@ -1 +1 @@
-MD5 (glTron-0.46.tar.gz) = faeaddeba285a46c8773a8307f60392a
+MD5 (gltron-0.53.tar.gz) = 596aaa813c2c11411939e89a6d40d059
diff -urN gltron/patches/patch-aa gltron.new/patches/patch-aa
--- gltron/patches/patch-aa	Sat Dec 25 18:13:36 1999
+++ gltron.new/patches/patch-aa	Sun Feb 13 02:20:51 2000
@@ -1,28 +1,61 @@
---- Makefile	Sun Oct  3 17:27:05 1999
-+++ /home/andy/tmp/wrk/Makefile	Thu Dec 23 15:57:00 1999
-@@ -1,13 +1,13 @@
+--- Makefile	Wed Jan  5 11:02:50 2000
++++ Makefile.new	Sun Feb 13 02:20:36 2000
+@@ -1,10 +1,13 @@
  # Makefile for gltron
  
+ SHELL = /bin/sh
+-CC = gcc
+-OPT = -O2
+-
++CC ?= gcc
++OPT ?= -O2
+ BASE_CFLAGS = -c -pedantic -Wall
++PREFIX ?= /usr/X11R6
++X11BASE ?= /usr/X11R6
++LOCALBASE ?= /usr/local
++MIKCONF = $(LOCALBASE)/bin/libmikmod-config
+ 
+ ifdef USE_SOUND
+ ADD1 = -DSOUND
+@@ -14,7 +17,7 @@
+ ADD2 = -DFREEGLUT -I../FreeGlut/src
+ endif
+ 
+-CFLAGS = $(BASE_CFLAGS) $(ADD1) $(ADD2)
++CFLAGS = $(BASE_CFLAGS) $(ADD1) $(ADD2) -DSHARE2=\"$(PREFIX)/share/gltron\"
+ 
+ ifdef FREEGLUT
+ GL_LIBS = -L../FreeGlut/src -lGL -lGLU -lglut
+@@ -25,16 +28,17 @@
+ # GL_LIBS = -L/usr/local/lib -lGL -lGLU -lglut
+ 
+ ifdef FREEGLUT
+-XLIBS = -L/usr/X11/lib -L/usr/X11R6/lib -lX11
++XLIBS = -L$(X11BASE)/lib -lX11
+ else
 -XLIBS = -L/usr/X11/lib -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm
 +XLIBS = -L$(X11BASE)/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm
+ endif
  
- GL_LIBS = -lMesaGL -lMesaGLU -lglut
- 
- SNDLIBS = `libmikmod-config --cflags` `libmikmod-config --libs`
- 
--CC = gcc
--COMPILE = -c -pedantic -Wall -g
-+CC ?= gcc
-+COMPILE = $(CFLAGS) -I$(X11BASE)/include -c
- DEBUG = -g
- RELEASE = -O2
- 
-@@ -22,7 +22,7 @@
- fragments: character.o computer.o texture.o input.o settings.o
- 
- gltron: gltron_source fragments
--	$(CC) $(RELEASE) -o gltron $(OBJ) $(GL_LIBS) $(XLIBS)
-+	$(CC) -o gltron $(OBJ) $(GL_LIBS) $(XLIBS)
++XINC = -I$(X11BASE)/include
++SNDLIBS = `$(MIKCONF) --libs`
++SNDCF = `$(MIKCONF) --cflags`
+ 
+-SNDLIBS = `libmikmod-config --cflags` `libmikmod-config --libs`
+-
+-GLTRON_INSTALLDIR = /usr/bin
+-GLTRON_HOME = /usr/share/games/gltron
++GLTRON_INSTALLDIR = $(PREFIX)/bin
++GLTRON_HOME = $(PREFIX)/share/games/gltron
+ 
+ CFILES = \
+ 	sgi_texture.c \
+@@ -71,7 +75,7 @@
+ all: gltron
+ 
+ .c.o:
+-	$(CC) $(CFLAGS) $(OPT) $<
++	$(CC) $(CFLAGS) $(SNDCF) $(XINC) $(OPT) $<
  
- gltron_source: gltron.c gltron.h globals.h
- 	$(CC) $(COMPILE) gltron.c
+ gltron: $(OBJ)
+ 	$(CC) $(OPT) -o gltron $(OBJ) $(GL_LIBS) $(XLIBS)
diff -urN gltron/patches/patch-ab gltron.new/patches/patch-ab
--- gltron/patches/patch-ab	Wed Dec 31 19:00:00 1969
+++ gltron.new/patches/patch-ab	Sun Feb 13 01:57:01 2000
@@ -0,0 +1,9 @@
+--- sgi_texture.c	Mon Jan  3 19:05:10 2000
++++ sgi_texture.c.new	Sun Feb 13 01:56:41 2000
+@@ -1,6 +1,5 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <error.h>
+ 
+ #ifndef WIN32
+ #include <unistd.h>
diff -urN gltron/patches/patch-ac gltron.new/patches/patch-ac
--- gltron/patches/patch-ac	Wed Dec 31 19:00:00 1969
+++ gltron.new/patches/patch-ac	Sun Feb 13 02:22:23 2000
@@ -0,0 +1,44 @@
+--- file.c	Mon Jan  3 19:05:10 2000
++++ file.c.new	Sun Feb 13 02:22:14 2000
+@@ -1,13 +1,16 @@
+ #include "gltron.h"
++#ifndef SHARE1
++#define SHARE1 "\"/usr/local/share/gltron\""
++#endif
++#ifndef SHARE2
++#define SHARE2 "\"/usr/X11R6/share/gltron\""
++#endif
+ 
+ char* getFullPath(char *filename) {
+   char *path;
+   FILE *fp = NULL;
+   char *base;
+ 
+-  char *share1 = "/usr/share/games/gltron";
+-  char *share2 = "/usr/local/share/games/gltron";
+-
+   /* check a few directories for the files and */
+   /* return the full path. */
+   
+@@ -43,8 +46,8 @@
+     printf("unsuccessful\n");
+   }
+ 
+-  path = malloc(strlen(share1) + 1 + strlen(filename) + 1);
+-  sprintf(path, "%s%c%s", share1, SEPERATOR, filename);
++  path = malloc(strlen(SHARE1) + 1 + strlen(filename) + 1);
++  sprintf(path, "%s%c%s", SHARE1, SEPERATOR, filename);
+ 
+   printf("checking '%s'", path);
+   fp = fopen(path, "r");
+@@ -56,8 +59,8 @@
+   free(path);
+   printf("unsuccessful\n");
+ 
+-  path = malloc(strlen(share2) + 1 + strlen(filename) + 1);
+-  sprintf(path, "%s%c%s", share2, SEPERATOR, filename);
++  path = malloc(strlen(SHARE2) + 1 + strlen(filename) + 1);
++  sprintf(path, "%s%c%s", SHARE2, SEPERATOR, filename);
+   
+   printf("checking '%s'", path);
+   fp = fopen(path, "r");
diff -urN gltron/pkg/PLIST gltron.new/pkg/PLIST
--- gltron/pkg/PLIST	Wed Aug 25 06:15:22 1999
+++ gltron.new/pkg/PLIST	Sun Feb 13 02:30:54 2000
@@ -2,4 +2,15 @@
 share/doc/gltron/CHANGELOG
 share/doc/gltron/CREDITS
 share/doc/gltron/README
+share/gltron/settings.txt
+share/gltron/menu.txt
+share/gltron/t-u-low.obj
+share/gltron/gltron.sgi
+share/gltron/gltron_crash.sgi
+share/gltron/gltron_floor.sgi
+share/gltron/gltron_wall.sgi
+share/gltron/xenotron.0.sgi
+share/gltron/xenotron.1.sgi
+share/gltron/xentron.ftx
 @dirrm share/doc/gltron
+@dirrm share/gltron

>Release-Note:
>Audit-Trail:
>Unformatted:


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?20000213073518.6E3911A70>