Date: Mon, 8 Sep 2003 13:13:22 +0200 (CEST) From: Guido Falsi <mad@madpilot.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/56589: [maintainer update] train director to 1.18e Message-ID: <200309081113.h88BDMXd058014@wedge.madpilot.net> Resent-Message-ID: <200309081120.h88BK4qK014268@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 56589 >Category: ports >Synopsis: [maintainer update] train director to 1.18e >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Sep 08 04:20:03 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Guido Falsi >Release: FreeBSD 5.1-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD wedge.madpilot.net 5.1-RELEASE-p2 FreeBSD 5.1-RELEASE-p2 #0: Fri Aug 29 14:04:15 CEST 2003 root@wedge.madpilot.net:/usr/obj/usr/src/sys/WEDGE i386 >Description: upgrading the train director game port to 1.18e (received a request by email too) Added files: pkg-message >How-To-Repeat: >Fix: diff -ruN traindirector.old/Makefile traindirector/Makefile --- traindirector.old/Makefile Mon Sep 8 08:58:00 2003 +++ traindirector/Makefile Mon Sep 8 13:04:29 2003 @@ -1,37 +1,26 @@ -# 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: ports/games/traindirector/Makefile,v 1.1 2003/09/08 06:58:00 edwin Exp $ +# $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/ +EXTRACT_SUFX= -src.tar.gz 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}/* 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 + $(MV) $(WRKSRC)/setup_trdir.sh $(WRKSRC)/setup_trdir.sh.old + $(SED) -e 's#PREFIX#$(PREFIX)#' $(WRKSRC)/setup_trdir.sh.old >$(WRKSRC)/setup_trdir.sh -post-configure: - ${REINPLACE_CMD} -e 's,\#include \<malloc.h\>,/* include malloc.h */,' \ - ${WRKSRC}/gdialog.c .include <bsd.port.mk> diff -ruN traindirector.old/distinfo traindirector/distinfo --- traindirector.old/distinfo Mon Sep 8 08:58:00 2003 +++ traindirector/distinfo Mon Sep 8 12:57:48 2003 @@ -1 +1 @@ -MD5 (tdir117s.zip) = a395243f384798de3e1a0bd6af40a3c5 +MD5 (traindir-1.18e-src.tar.gz) = df82dee6e32ea9951916d900984e0cc6 diff -ruN traindirector.old/files/patch-MAKEFILE traindirector/files/patch-MAKEFILE --- traindirector.old/files/patch-MAKEFILE Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-MAKEFILE Thu Jan 1 01:00:00 1970 @@ -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 -ruN traindirector.old/files/patch-Makefile traindirector/files/patch-Makefile --- traindirector.old/files/patch-Makefile Thu Jan 1 01:00:00 1970 +++ traindirector/files/patch-Makefile Mon Sep 8 12:57:48 2003 @@ -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 -ruN traindirector.old/files/patch-field.c traindirector/files/patch-field.c --- traindirector.old/files/patch-field.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-field.c Mon Sep 8 12:57:48 2003 @@ -1,10 +1,10 @@ ---- field.c.orig Sun Sep 7 23:43:51 2003 -+++ field.c Sun Sep 7 23:43:58 2003 +--- field.c.orig Fri Jul 18 15:52:26 2003 ++++ field.c Fri Jul 18 15:52:32 2003 @@ -22,7 +22,6 @@ - #include <stdio.h> - #include <string.h> - #include <stdlib.h> --#include <malloc.h> - #include "trsim.h" - #include "gtkui.h" - + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +-#include <malloc.h> + #include "trsim.h" + #include "gtkui.h" + diff -ruN traindirector.old/files/patch-gdialog.c traindirector/files/patch-gdialog.c --- traindirector.old/files/patch-gdialog.c Thu Jan 1 01:00:00 1970 +++ traindirector/files/patch-gdialog.c Mon Sep 8 12:57:48 2003 @@ -0,0 +1,10 @@ +--- gdialog.c.orig Fri Jul 18 15:48:50 2003 ++++ gdialog.c Fri Jul 18 15:50:52 2003 +@@ -23,7 +23,6 @@ + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +-#include <malloc.h> + #include "trsim.h" + #include "gtkui.h" + #include "ask.h" diff -ruN traindirector.old/files/patch-gtkmain.c traindirector/files/patch-gtkmain.c --- traindirector.old/files/patch-gtkmain.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-gtkmain.c Thu Jan 1 01:00:00 1970 @@ -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 -ruN traindirector.old/files/patch-loadsave.c traindirector/files/patch-loadsave.c --- traindirector.old/files/patch-loadsave.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-loadsave.c Mon Sep 8 12:57:48 2003 @@ -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 @@ - - #include <stdio.h> - #include <stdlib.h> --#include <malloc.h> -+#include <stdlib.h> - #include <memory.h> - #include <string.h> - #include "trsim.h" +--- 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 <memory.h> + #include <string.h> + #include "trsim.h" diff -ruN traindirector.old/files/patch-run.c traindirector/files/patch-run.c --- traindirector.old/files/patch-run.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-run.c Mon Sep 8 12:57:48 2003 @@ -1,43 +1,41 @@ ---- run.c.orig Sun Sep 7 23:40:41 2003 -+++ run.c Sun Sep 7 23:42:04 2003 -@@ -20,10 +20,15 @@ - - #include <stdio.h> - #include <string.h> --#include <malloc.h> +--- 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> +-#include <malloc.h> +#include <stdlib.h> - #include "ask.h" - #include "trsim.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 @@ - { - if(i >= v->size) { - printf("Bad index %d: only %d elements in vector!\n", i, v->size); + + int assign_ok = 1; + +@@ -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); + abort(0); +#endif - } - return v->ptr[i]; - } -@@ -65,7 +74,11 @@ - { - if(i >= v->size) { - printf("Bad index %d: only %d elements in vector!\n", i, v->size); + } + return v->ptr[i]; + } +@@ -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); + abort(0); +#endif - } - return v->flags[i]; - } + } + return v->flags[i]; + } diff -ruN traindirector.old/files/patch-setup_trdir.sh traindirector/files/patch-setup_trdir.sh --- traindirector.old/files/patch-setup_trdir.sh Thu Jan 1 01:00:00 1970 +++ traindirector/files/patch-setup_trdir.sh Mon Sep 8 12:57:48 2003 @@ -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 -ruN traindirector.old/files/patch-tgraph.c traindirector/files/patch-tgraph.c --- traindirector.old/files/patch-tgraph.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-tgraph.c Mon Sep 8 12:57:48 2003 @@ -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 @@ - #include <stdio.h> - #include <string.h> - #include <stdlib.h> --#include <malloc.h> -+#include <stdlib.h> - #include "trsim.h" - - #define STATION_WIDTH 100 +--- 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 "trsim.h" + + #define STATION_WIDTH 100 diff -ruN traindirector.old/files/patch-track.c traindirector/files/patch-track.c --- traindirector.old/files/patch-track.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-track.c Mon Sep 8 12:57:48 2003 @@ -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 @@ - - #include <stdio.h> - #include <string.h> --#include <malloc.h> -+#include <stdlib.h> - #include "trsim.h" - #include "ask.h" - +--- 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 "trsim.h" + #include "ask.h" + diff -ruN traindirector.old/files/patch-track1.c traindirector/files/patch-track1.c --- traindirector.old/files/patch-track1.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-track1.c Mon Sep 8 12:57:48 2003 @@ -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 @@ - - #include <stdio.h> - #include <string.h> --#include <malloc.h> -+#include <stdlib.h> - #include "trsim.h" - #include "ask.h" - +--- 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 "trsim.h" + #include "ask.h" + diff -ruN traindirector.old/files/patch-trsim.c traindirector/files/patch-trsim.c --- traindirector.old/files/patch-trsim.c Mon Sep 8 08:58:00 2003 +++ traindirector/files/patch-trsim.c Mon Sep 8 12:57:48 2003 @@ -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 @@ - - #include <stdio.h> - #include <string.h> --#include <malloc.h> -+#include <stdlib.h> - #include <stdlib.h> - #include "ask.h" - #include "html.h" +--- 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 "ask.h" + #include "html.h" diff -ruN traindirector.old/pkg-descr traindirector/pkg-descr --- traindirector.old/pkg-descr Mon Sep 8 08:58:00 2003 +++ traindirector/pkg-descr Mon Sep 8 12:57:48 2003 @@ -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 -ruN traindirector.old/pkg-message traindirector/pkg-message --- traindirector.old/pkg-message Thu Jan 1 01:00:00 1970 +++ traindirector/pkg-message Mon Sep 8 12:57:48 2003 @@ -0,0 +1,8 @@ +================================================ +The game installs a script setup_trdir.sh which +you should launch to create a directory in your +home with the needed files before starting the +simulation. + +Have fun! +================================================ diff -ruN traindirector.old/pkg-plist traindirector/pkg-plist --- traindirector.old/pkg-plist Mon Sep 8 08:58:00 2003 +++ traindirector/pkg-plist Mon Sep 8 12:57:48 2003 @@ -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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309081113.h88BDMXd058014>