summaryrefslogtreecommitdiff
path: root/games/traindirector
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-09-08 06:58:00 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-09-08 06:58:00 +0000
commit78707535206e8bbd4b3d29b2628f70e004ee9209 (patch)
tree9af37b4f9eee52a94e8f4772b2c5c87e28c57dea /games/traindirector
parentGnomemeeting2 port now moved to gnomemeeting (diff)
new-port: game, train control simulation
New port, game, a little simulation of a train dispatching station. Can simulate real station with real schedules. Datafiles downloadable from the home page. PR: ports/45316 Submitted by: Guido Falsi <mad@madpilot.net>
Notes
Notes: svn path=/head/; revision=88745
Diffstat (limited to 'games/traindirector')
-rw-r--r--games/traindirector/Makefile37
-rw-r--r--games/traindirector/distinfo1
-rw-r--r--games/traindirector/files/patch-MAKEFILE47
-rw-r--r--games/traindirector/files/patch-field.c10
-rw-r--r--games/traindirector/files/patch-gtkmain.c11
-rw-r--r--games/traindirector/files/patch-loadsave.c11
-rw-r--r--games/traindirector/files/patch-run.c43
-rw-r--r--games/traindirector/files/patch-tgraph.c11
-rw-r--r--games/traindirector/files/patch-track.c11
-rw-r--r--games/traindirector/files/patch-track1.c11
-rw-r--r--games/traindirector/files/patch-trsim.c11
-rw-r--r--games/traindirector/pkg-descr9
-rw-r--r--games/traindirector/pkg-plist1
13 files changed, 214 insertions, 0 deletions
diff --git a/games/traindirector/Makefile b/games/traindirector/Makefile
new file mode 100644
index 000000000000..08180a2ee51a
--- /dev/null
+++ b/games/traindirector/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: oneko
+# Date created: 15/11/2002
+# Whom: Guido Falsi <mad@madpilot.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= tdir
+PORTVERSION= 1.17f
+CATEGORIES= games
+MASTER_SITES= http://www.backerstreet.com/traindir/
+DISTNAME= tdir117s
+
+MAINTAINER= mad@madpilot.net
+COMMENT= Train controller simulation
+
+USE_ZIP= 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
+
+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
new file mode 100644
index 000000000000..e4b4e7eea3ac
--- /dev/null
+++ b/games/traindirector/distinfo
@@ -0,0 +1 @@
+MD5 (tdir117s.zip) = a395243f384798de3e1a0bd6af40a3c5
diff --git a/games/traindirector/files/patch-MAKEFILE b/games/traindirector/files/patch-MAKEFILE
new file mode 100644
index 000000000000..69d3b0364d18
--- /dev/null
+++ b/games/traindirector/files/patch-MAKEFILE
@@ -0,0 +1,47 @@
+*** 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-field.c b/games/traindirector/files/patch-field.c
new file mode 100644
index 000000000000..4b72efe9aa98
--- /dev/null
+++ b/games/traindirector/files/patch-field.c
@@ -0,0 +1,10 @@
+--- field.c.orig Sun Sep 7 23:43:51 2003
++++ field.c Sun Sep 7 23:43:58 2003
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include "trsim.h"
+ #include "gtkui.h"
+
diff --git a/games/traindirector/files/patch-gtkmain.c b/games/traindirector/files/patch-gtkmain.c
new file mode 100644
index 000000000000..e83205b93da1
--- /dev/null
+++ b/games/traindirector/files/patch-gtkmain.c
@@ -0,0 +1,11 @@
+--- 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
new file mode 100644
index 000000000000..2a94cc36bdb4
--- /dev/null
+++ b/games/traindirector/files/patch-loadsave.c
@@ -0,0 +1,11 @@
+--- 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"
diff --git a/games/traindirector/files/patch-run.c b/games/traindirector/files/patch-run.c
new file mode 100644
index 000000000000..1e80164bdb6a
--- /dev/null
+++ b/games/traindirector/files/patch-run.c
@@ -0,0 +1,43 @@
+--- 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>
++#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 @@
+ {
+ if(i >= v->size) {
+ printf("Bad index %d: only %d elements in vector!\n", i, v->size);
++#if (defined(BSD) && (BSD >= 199103))
++ abort();
++#else
+ 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);
++#if (defined(BSD) && (BSD >= 199103))
++ abort();
++#else
+ abort(0);
++#endif
+ }
+ return v->flags[i];
+ }
diff --git a/games/traindirector/files/patch-tgraph.c b/games/traindirector/files/patch-tgraph.c
new file mode 100644
index 000000000000..7848a0e0b606
--- /dev/null
+++ b/games/traindirector/files/patch-tgraph.c
@@ -0,0 +1,11 @@
+--- 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
diff --git a/games/traindirector/files/patch-track.c b/games/traindirector/files/patch-track.c
new file mode 100644
index 000000000000..357a55c5bd35
--- /dev/null
+++ b/games/traindirector/files/patch-track.c
@@ -0,0 +1,11 @@
+--- 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"
+
diff --git a/games/traindirector/files/patch-track1.c b/games/traindirector/files/patch-track1.c
new file mode 100644
index 000000000000..8ec389a61325
--- /dev/null
+++ b/games/traindirector/files/patch-track1.c
@@ -0,0 +1,11 @@
+--- 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"
+
diff --git a/games/traindirector/files/patch-trsim.c b/games/traindirector/files/patch-trsim.c
new file mode 100644
index 000000000000..816ebada3aad
--- /dev/null
+++ b/games/traindirector/files/patch-trsim.c
@@ -0,0 +1,11 @@
+--- 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"
diff --git a/games/traindirector/pkg-descr b/games/traindirector/pkg-descr
new file mode 100644
index 000000000000..dd0e53646f46
--- /dev/null
+++ b/games/traindirector/pkg-descr
@@ -0,0 +1,9 @@
+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
new file mode 100644
index 000000000000..42a9237fe7c8
--- /dev/null
+++ b/games/traindirector/pkg-plist
@@ -0,0 +1 @@
+bin/trsim