diff options
author | edwin <edwin@FreeBSD.org> | 2003-09-08 20:09:47 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2003-09-08 20:09:47 +0800 |
commit | 73cdbbff4964974f3dd568fa10f41f0af4d5ad84 (patch) | |
tree | e1b4df98b25d9e33923a41a5f80706c8bb4e299e /games | |
parent | 1804f620de6414ae4df760df356754a2092347c2 (diff) | |
download | freebsd-ports-gnome-73cdbbff4964974f3dd568fa10f41f0af4d5ad84.tar.gz freebsd-ports-gnome-73cdbbff4964974f3dd568fa10f41f0af4d5ad84.tar.zst freebsd-ports-gnome-73cdbbff4964974f3dd568fa10f41f0af4d5ad84.zip |
[maintainer update] train director to 1.18e
upgrading the train director game port to 1.18e (received
a request by email too)
PR: ports/56589
Submitted by: Guido Falsi <mad@madpilot.net>
Diffstat (limited to 'games')
-rw-r--r-- | games/traindirector/Makefile | 26 | ||||
-rw-r--r-- | games/traindirector/distinfo | 2 | ||||
-rw-r--r-- | games/traindirector/files/patch-MAKEFILE | 47 | ||||
-rw-r--r-- | games/traindirector/files/patch-Makefile | 25 | ||||
-rw-r--r-- | games/traindirector/files/patch-field.c | 4 | ||||
-rw-r--r-- | games/traindirector/files/patch-gtkmain.c | 11 | ||||
-rw-r--r-- | games/traindirector/files/patch-loadsave.c | 7 | ||||
-rw-r--r-- | games/traindirector/files/patch-run.c | 20 | ||||
-rw-r--r-- | games/traindirector/files/patch-setup_trdir.sh | 51 | ||||
-rw-r--r-- | games/traindirector/files/patch-tgraph.c | 7 | ||||
-rw-r--r-- | games/traindirector/files/patch-track.c | 7 | ||||
-rw-r--r-- | games/traindirector/files/patch-track1.c | 7 | ||||
-rw-r--r-- | games/traindirector/files/patch-trsim.c | 7 | ||||
-rw-r--r-- | games/traindirector/pkg-descr | 7 | ||||
-rw-r--r-- | games/traindirector/pkg-plist | 16 |
15 files changed, 136 insertions, 108 deletions
diff --git a/games/traindirector/Makefile b/games/traindirector/Makefile index 08180a2ee51a..279bf87ab7a2 100644 --- a/games/traindirector/Makefile +++ b/games/traindirector/Makefile @@ -1,37 +1,37 @@ -# New ports collection makefile for: oneko -# Date created: 15/11/2002 +# New ports collection makefile for: traindirector +# Date created: 09/08/2003 # Whom: Guido Falsi <mad@madpilot.net> # # $FreeBSD$ # PORTNAME= tdir -PORTVERSION= 1.17f +PORTVERSION= 1.18e CATEGORIES= games -MASTER_SITES= http://www.backerstreet.com/traindir/ -DISTNAME= tdir117s +MASTER_SITES= http://xtsl.free.fr/118e/ +DISTNAME= traindir-${PORTVERSION}-src +WRKSRC= ${WRKDIR}/traindir-${PORTVERSION} MAINTAINER= mad@madpilot.net COMMENT= Train controller simulation -USE_ZIP= yes +USE_GMAKE= yes USE_XLIB= yes USE_X_PREFIX= yes USE_GNOME= gtk12 glib12 USE_REINPLACE= yes -NO_WRKSUBDIR= yes - post-extract: - ${REINPLACE_CMD} -e 's/
//' ${WRKSRC}/* +.for file in Makefile field.c loadsave.c run.c setup_trdir.sh tgraph.c track.c track1.c trsim.c + @${TR} -d '\015' < ${WRKSRC}/${file} > ${WRKDIR}/xxxx + @${MV} ${WRKDIR}/xxxx ${WRKSRC}/${file} +.endfor post-patch: - @ cd ${WRKSRC} ; ${LN} MAKEFILE Makefile ; \ - ${MV} Gdialog.c gdialog.c ; ${MV} Gtkopen.c gtkopen.c ; \ - ${MV} Gtkopen.h gtkopen.h ; ${MV} Html.c html.c ; \ - ${MV} Html.h html.h + ${REINPLACE_CMD} -e 's#PREFIX#$(PREFIX)#' $(WRKSRC)/setup_trdir.sh post-configure: ${REINPLACE_CMD} -e 's,\#include \<malloc.h\>,/* include malloc.h */,' \ ${WRKSRC}/gdialog.c + .include <bsd.port.mk> diff --git a/games/traindirector/distinfo b/games/traindirector/distinfo index e4b4e7eea3ac..3912b0381856 100644 --- a/games/traindirector/distinfo +++ b/games/traindirector/distinfo @@ -1 +1 @@ -MD5 (tdir117s.zip) = a395243f384798de3e1a0bd6af40a3c5 +MD5 (traindir-1.18e-src.tar.gz) = df82dee6e32ea9951916d900984e0cc6 diff --git a/games/traindirector/files/patch-MAKEFILE b/games/traindirector/files/patch-MAKEFILE deleted file mode 100644 index 69d3b0364d18..000000000000 --- a/games/traindirector/files/patch-MAKEFILE +++ /dev/null @@ -1,47 +0,0 @@ -*** MAKEFILE.orig Sat May 20 09:37:10 2000 ---- MAKEFILE Fri Nov 15 17:35:13 2002 -*************** -*** 1,20 **** -! OBJS = button.o clist.o field.o gtkask.o gtkmain.o loadsave.o \ -! menu.o run.o table.o track.o trsim.o - - CC = gcc - -! CFLAGS = - - DEBUG = -g - - all: trsim - - trsim: $(OBJS) -! $(CC) -o $@ $(OBJS) `gtk-config --libs` -lcurses - - .c.o: -! $(CC) `gtk-config --cflags` $(CFLAGS) $(DEBUG) -c $< - - - clean: - rm -f *.o trsim core ---- 1,22 ---- -! OBJS = button.o clist.o field.o gtkask.o gtkmain.o gtkopen.o gdialog.o \ -! loadsave.o menu.o run.o table.o track.o trsim.o html.o tgraph.o - - CC = gcc - -! CFLAGS += - - DEBUG = -g - - all: trsim - - trsim: $(OBJS) -! $(CC) -o $@ $(OBJS) `gtk12-config --libs` -lcurses - - .c.o: -! $(CC) `gtk12-config --cflags` $(CFLAGS) $(DEBUG) -c $< - -+ install: trsim -+ $(INSTALL) -o bin -g bin -m 555 trsim $(PREFIX)/bin - - clean: - rm -f *.o trsim core diff --git a/games/traindirector/files/patch-Makefile b/games/traindirector/files/patch-Makefile new file mode 100644 index 000000000000..5d656944eaa8 --- /dev/null +++ b/games/traindirector/files/patch-Makefile @@ -0,0 +1,25 @@ +--- Makefile.orig Tue Mar 25 20:50:38 2003 ++++ Makefile Mon Sep 8 12:31:58 2003 +@@ -4,8 +4,8 @@ + # + VERSION=1.18e + +-BINDIR=/usr/local/bin +-SAMPLEDIR=/usr/local/share ++BINDIR=$(PREFIX)/bin ++SAMPLEDIR=$(PREFIX)/share + + SHELL = /bin/sh + INSTALL = install +@@ -16,9 +16,9 @@ + GLIBINC=`glib-config --cflags` + GLIBLIB=`glib-config --libs` + +-CFLAGS = -g ${GLIBINC} ${GTKINC} -Dunix ++CFLAGS += -g ${GLIBINC} ${GTKINC} -Dunix + +-CC = cc ++CC ?= cc + + LIBS = ${GLIBLIB} ${GTKLIB} + diff --git a/games/traindirector/files/patch-field.c b/games/traindirector/files/patch-field.c index 4b72efe9aa98..c33edeebb336 100644 --- a/games/traindirector/files/patch-field.c +++ b/games/traindirector/files/patch-field.c @@ -1,5 +1,5 @@ ---- field.c.orig Sun Sep 7 23:43:51 2003 -+++ field.c Sun Sep 7 23:43:58 2003 +--- field.c.orig Mon Sep 8 04:53:57 2003 ++++ field.c Mon Sep 8 04:54:03 2003 @@ -22,7 +22,6 @@ #include <stdio.h> #include <string.h> diff --git a/games/traindirector/files/patch-gtkmain.c b/games/traindirector/files/patch-gtkmain.c deleted file mode 100644 index e83205b93da1..000000000000 --- a/games/traindirector/files/patch-gtkmain.c +++ /dev/null @@ -1,11 +0,0 @@ ---- gtkmain.c.orig Sun Sep 7 23:48:20 2003 -+++ gtkmain.c Sun Sep 7 23:48:30 2003 -@@ -143,7 +143,7 @@ - - #ifdef unix - if(getenv("TDHOME")) -- chdir(getenv("TDHOME")) -+ chdir(getenv("TDHOME")); - #endif - screen_width = gdk_screen_width(); - diff --git a/games/traindirector/files/patch-loadsave.c b/games/traindirector/files/patch-loadsave.c index 2a94cc36bdb4..5023a172c3ff 100644 --- a/games/traindirector/files/patch-loadsave.c +++ b/games/traindirector/files/patch-loadsave.c @@ -1,11 +1,10 @@ ---- loadsave.c.orig Sun Sep 7 23:41:44 2003 -+++ loadsave.c Sun Sep 7 23:41:51 2003 -@@ -20,7 +20,7 @@ +--- loadsave.c.orig Fri Jul 18 15:53:00 2003 ++++ loadsave.c Fri Jul 18 15:53:07 2003 +@@ -20,7 +20,6 @@ #include <stdio.h> #include <stdlib.h> -#include <malloc.h> -+#include <stdlib.h> #include <memory.h> #include <string.h> #include "trsim.h" diff --git a/games/traindirector/files/patch-run.c b/games/traindirector/files/patch-run.c index 1e80164bdb6a..b95d6fdaef17 100644 --- a/games/traindirector/files/patch-run.c +++ b/games/traindirector/files/patch-run.c @@ -1,6 +1,6 @@ ---- run.c.orig Sun Sep 7 23:40:41 2003 -+++ run.c Sun Sep 7 23:42:04 2003 -@@ -20,10 +20,15 @@ +--- run.c.orig Fri Jul 18 15:53:36 2003 ++++ run.c Fri Jul 18 15:56:59 2003 +@@ -20,9 +20,13 @@ #include <stdio.h> #include <string.h> @@ -8,33 +8,31 @@ +#include <stdlib.h> #include "ask.h" #include "trsim.h" - ++ +#if (defined(__unix__) || defined(unix)) && !defined(USG) +#include <sys/param.h> +#endif -+ -+ + int assign_ok = 1; - int changed; -@@ -56,7 +61,11 @@ +@@ -56,7 +60,11 @@ { if(i >= v->size) { printf("Bad index %d: only %d elements in vector!\n", i, v->size); +#if (defined(BSD) && (BSD >= 199103)) -+ abort(); ++ abort(); +#else abort(0); +#endif } return v->ptr[i]; } -@@ -65,7 +74,11 @@ +@@ -65,7 +73,11 @@ { if(i >= v->size) { printf("Bad index %d: only %d elements in vector!\n", i, v->size); +#if (defined(BSD) && (BSD >= 199103)) -+ abort(); ++ abort(); +#else abort(0); +#endif diff --git a/games/traindirector/files/patch-setup_trdir.sh b/games/traindirector/files/patch-setup_trdir.sh new file mode 100644 index 000000000000..33e7dcb21701 --- /dev/null +++ b/games/traindirector/files/patch-setup_trdir.sh @@ -0,0 +1,51 @@ +--- setup_trdir.sh.orig Thu Sep 19 17:28:00 2002 ++++ setup_trdir.sh Mon Sep 8 12:50:55 2003 +@@ -6,9 +6,9 @@ + # edit the folowing line + # + # This is the place where traindirector is installed +-TRAINDIR="/usr/local/bin" ++TRAINDIR="PREFIX/bin" + # This is the place where samples file is installed +-SAMPLE="/usr/local/share" ++SAMPLE="PREFIX/share" + ##################################################################" + echo "*********************************" + echo "* Traindirector Installation *" +@@ -16,25 +16,29 @@ + echo + echo "Making traindir samples directory....." + echo +-TDHOMEDIR="$HOME/traindir" +-ICONDIR="$HOME/traindir/tdicons" ++TDHOMEDIR="$HOME/.traindir" ++ICONDIR="$HOME/.traindir/tdicons" + + mkdir $TDHOMEDIR + mkdir $ICONDIR + +-cp $SAMPLE/traindir/* $TDHOMEDIR +-cp $SAMPLE/traindir/tdicons/*.* $ICONDIR ++#little hack. It works anyway. ++cp -R $SAMPLE/traindir/* $TDHOMEDIR ++#cp $SAMPLE/traindir/tdicons/*.* $ICONDIR + echo + echo "Creating start-traindir script......" + echo + echo "#!/bin/sh" > start-traindir + echo "# Startup file for traindirector" >> start-traindir + echo "#" >> start-traindir +-echo "TDHOME=\"$HOME/traindir\"" >> start-traindir ++echo "TDHOME=\"$HOME/.traindir\"" >> start-traindir + echo "export TDHOME" >> start-traindir + echo "echo starting Traindirector" >> start-traindir + echo "$TRAINDIR/traindir" >> start-traindir + + chmod 0775 start-traindir + echo "Installation complete" +-echo "You can run ~/start-traindir in a X console" +\ No newline at end of file ++#echo "You can run ./start-traindir in a X console" ++echo "a script file 'start-traindir' has been created in the current" ++echo "directory. You can launch it to start the simulation, or move it" ++echo "to your user's bin directory if you want." diff --git a/games/traindirector/files/patch-tgraph.c b/games/traindirector/files/patch-tgraph.c index 7848a0e0b606..7d0a91b1fbb8 100644 --- a/games/traindirector/files/patch-tgraph.c +++ b/games/traindirector/files/patch-tgraph.c @@ -1,11 +1,10 @@ ---- tgraph.c.orig Sun Sep 7 23:42:59 2003 -+++ tgraph.c Sun Sep 7 23:43:04 2003 -@@ -22,7 +22,7 @@ +--- tgraph.c.orig Fri Jul 18 15:57:50 2003 ++++ tgraph.c Fri Jul 18 15:57:58 2003 +@@ -22,7 +22,6 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <malloc.h> -+#include <stdlib.h> #include "trsim.h" #define STATION_WIDTH 100 diff --git a/games/traindirector/files/patch-track.c b/games/traindirector/files/patch-track.c index 357a55c5bd35..6542b2554d06 100644 --- a/games/traindirector/files/patch-track.c +++ b/games/traindirector/files/patch-track.c @@ -1,11 +1,10 @@ ---- track.c.orig Sun Sep 7 23:43:06 2003 -+++ track.c Sun Sep 7 23:43:10 2003 -@@ -20,7 +20,7 @@ +--- track.c.orig Fri Jul 18 15:58:30 2003 ++++ track.c Fri Jul 18 15:58:39 2003 +@@ -20,7 +20,6 @@ #include <stdio.h> #include <string.h> -#include <malloc.h> -+#include <stdlib.h> #include "trsim.h" #include "ask.h" diff --git a/games/traindirector/files/patch-track1.c b/games/traindirector/files/patch-track1.c index 8ec389a61325..221f2115b5fb 100644 --- a/games/traindirector/files/patch-track1.c +++ b/games/traindirector/files/patch-track1.c @@ -1,11 +1,10 @@ ---- track1.c.orig Sun Sep 7 23:43:12 2003 -+++ track1.c Sun Sep 7 23:43:16 2003 -@@ -20,7 +20,7 @@ +--- track1.c.orig Fri Jul 18 15:59:04 2003 ++++ track1.c Fri Jul 18 15:59:11 2003 +@@ -20,7 +20,6 @@ #include <stdio.h> #include <string.h> -#include <malloc.h> -+#include <stdlib.h> #include "trsim.h" #include "ask.h" diff --git a/games/traindirector/files/patch-trsim.c b/games/traindirector/files/patch-trsim.c index 816ebada3aad..7605799acb2f 100644 --- a/games/traindirector/files/patch-trsim.c +++ b/games/traindirector/files/patch-trsim.c @@ -1,11 +1,10 @@ ---- trsim.c.orig Sun Sep 7 23:43:16 2003 -+++ trsim.c Sun Sep 7 23:43:23 2003 -@@ -20,7 +20,7 @@ +--- trsim.c.orig Fri Jul 18 15:59:50 2003 ++++ trsim.c Fri Jul 18 15:59:58 2003 +@@ -20,7 +20,6 @@ #include <stdio.h> #include <string.h> -#include <malloc.h> -+#include <stdlib.h> #include <stdlib.h> #include "ask.h" #include "html.h" diff --git a/games/traindirector/pkg-descr b/games/traindirector/pkg-descr index dd0e53646f46..a30d4c4eb91b 100644 --- a/games/traindirector/pkg-descr +++ b/games/traindirector/pkg-descr @@ -1,9 +1,12 @@ +Train Director is a clone of the popular Train Dispatcher simulation +software. + With Train Director you can simulate the work of the Centralized Traffic Control by controlling the movement of trains by throwing switches and clearing signals. You can also create your own territories with the included track layout editor. - + WWW: http://www.backerstreet.com/traindir/trdireng.htm - + -- Guido Falsi <mad@madpilot.net> diff --git a/games/traindirector/pkg-plist b/games/traindirector/pkg-plist index 42a9237fe7c8..67a314ddce7d 100644 --- a/games/traindirector/pkg-plist +++ b/games/traindirector/pkg-plist @@ -1 +1,15 @@ -bin/trsim +bin/traindir +bin/gentt +bin/setup_trdir.sh +share/traindir/default.sch +share/traindir/default.trk +share/traindir/demoitin.trk +share/traindir/southst.trk +share/traindir/tdirico1.ico +share/traindir/tdirico2.ico +share/traindir/train.ico +share/traindir/tdicons/bridgeup.xpm +share/traindir/tdicons/bridgedn.xpm +share/traindir/tdicons/triangl.xpm +@dirrm share/traindir/tdicons/ +@dirrm share/traindir |