Update to a new snapshot. Features SDL sound, pre-made cities and

lots of build system improvements.

ok espie
This commit is contained in:
deanna 2008-02-19 13:25:18 +00:00
parent 2147e4b0be
commit a9a7413fc2
10 changed files with 135 additions and 263 deletions

View File

@ -1,12 +1,9 @@
# $OpenBSD: Makefile,v 1.7 2008/01/27 18:16:22 espie Exp $
# $OpenBSD: Makefile,v 1.8 2008/02/19 13:25:18 deanna Exp $
COMMENT= city-building simulation
DISTNAME= micropolis-20080126
DISTNAME= micropolis-20080211
WRKDIST= ${WRKDIR}/micropolis
WRKSRC= ${WRKDIST}/src
MAKE_FILE= makefile
PKGNAME= ${DISTNAME}p0
CATEGORIES= games
@ -24,39 +21,18 @@ PERMIT_DISTFILES_FTP= Yes
NO_REGRESS= Yes
USE_X11= Yes
RUN_DEPENDS= ::audio/esound \
::devel/desktop-file-utils
RUN_DEPENDS= ::devel/desktop-file-utils
WANTLIB= c m X11 Xext Xpm pthread
LIB_DEPENDS= SDL::devel/sdl \
SDL_mixer::devel/sdl-mixer
WANTLIB= c m X11 Xext Xpm
CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
do-configure:
@perl -pi -e s,%%PREFIX%%,${PREFIX}, ${WRKDIST}/Micropolis
@perl -pi -e s,%%PREFIX%%,${PREFIX}, ${WRKDIST}/res/micropolis.tcl
@perl -pi -e s,%%LOCALBASE%%,${LOCALBASE}, ${WRKDIST}/res/micropolis.tcl
@perl -pi -e s,%%X11BASE%%,${X11BASE},g ${WRKSRC}/sim/makefile
@perl -pi -e s,%%X11BASE%%,${X11BASE},g ${WRKSRC}/tclx/config.mk
@perl -pi -e s,%%X11BASE%%,${X11BASE},g ${WRKSRC}/tk/makefile
do-install:
@${INSTALL_DATA_DIR} ${PREFIX}/share/micropolis
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/micropolis
@cd ${WRKDIST} && \
find res -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/micropolis/{} \;
@cd ${WRKDIST} && \
find images -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/micropolis/{} \;
@cd ${WRKDIST} && \
find manual -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/micropolis/{} \;
@cd ${WRKDIST} && \
find res -type f -exec ${INSTALL_DATA} {} ${PREFIX}/share/micropolis/{} \;
@cd ${WRKDIST} && \
find images -type f -exec ${INSTALL_DATA} {} ${PREFIX}/share/micropolis/{} \;
@cd ${WRKDIST} && \
find manual -type f -exec ${INSTALL_DATA} {} ${PREFIX}/share/doc/micropolis/{} \;
@${INSTALL_SCRIPT} ${WRKDIST}/Micropolis ${PREFIX}/bin/micropolis
@${INSTALL_PROGRAM} ${WRKSRC}/sim/sim ${PREFIX}/libexec/sim
@${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/
@${INSTALL_DATA} ${WRKDIST}/Micropolis.png ${PREFIX}/share/pixmaps/micropolis.png
@${INSTALL_DATA_DIR} ${PREFIX}/share/applications
@${INSTALL_DATA} ${FILESDIR}/micropolis.desktop ${PREFIX}/share/applications
@perl -pi -e s,%%X11BASE%%,${X11BASE},g ${WRKSRC}/src/tclx/config.mk
@perl -pi -e s,%%X11BASE%%,${X11BASE},g ${WRKSRC}/src/tk/makefile
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (micropolis-20080126.tar.gz) = uJ8wCXJOka4s/mY7GmZ8sQ==
RMD160 (micropolis-20080126.tar.gz) = ci56nKpQQNhD2jv9R057g9PAvGU=
SHA1 (micropolis-20080126.tar.gz) = Tthc9zHHSZuuegll4tTUni4A6pY=
SHA256 (micropolis-20080126.tar.gz) = KishRtXpjJ4JJNzueKZ7rxNJ9IjT1CtWVmQw6itdQoE=
SIZE (micropolis-20080126.tar.gz) = 7598929
MD5 (micropolis-20080211.tar.gz) = KvHQIrQsfiB/4H/RHftCzg==
RMD160 (micropolis-20080211.tar.gz) = jSQrguNBM8V4dRzvN5j3hxBtB94=
SHA1 (micropolis-20080211.tar.gz) = Zz0qtPk5/dwdKeEOL2wsJe8hsFk=
SHA256 (micropolis-20080211.tar.gz) = PFZfZKs4bUU+hTnCHq7fKL28BKggbuebhEVU57d/TXo=
SIZE (micropolis-20080211.tar.gz) = 7582055

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Micropolis
GenericName=Micropolis City Simulation Game
Comment=City simulation game, open sourced from original SimCity(tm)
Icon=micropolis.png
Exec=micropolis
Terminal=false
StartupNotify=false
Categories=Game;Simulation;

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-res_micropolis_tcl,v 1.2 2008/01/27 16:34:32 deanna Exp $
--- res/micropolis.tcl.orig Sat Jan 26 18:55:37 2008
+++ res/micropolis.tcl Sat Jan 26 18:58:20 2008
@@ -126,7 +126,8 @@ set ServerName "servername"
set RealName "realname"
set ChannelName "#Micropolis"
set HomeDir ""
-set ResourceDir ""
+set ResourceDir "%%PREFIX%%/share/micropolis/res/"
+set Prefix "%%LOCALBASE%%/bin"
set HostName ""
set LocalHostName "[exec hostname]"
set SaveCityWin ""
@@ -886,6 +887,12 @@ proc MakeWindow.frob {head {display ":0"}} {
proc UIInitializeSound {} {
+ global Prefix
+ set i [system "pgrep -x esd > /dev/null"]
+ if {$i == 1} {
+ echo "starting esd"
+ system "$Prefix/esd &"
+ }
}
@@ -940,10 +947,11 @@ proc UISetChannelVolume {win chan vol} {
proc EchoPlaySound {soundspec} {
# Temporary workaround to tell Python Sugar app to play sound.
global Sound
+ global Prefix
if {$Sound} {
#echo PlaySound [lindex $soundspec 0]
signal ignore SIGCHLD
- exec res/sounds/player res/sounds/[string tolower [lindex $soundspec 0]].wav &
+ exec $Prefix/esdplay res/sounds/[string tolower [lindex $soundspec 0]].wav &
}
}

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-src_sim_headers_sim_h,v 1.2 2008/01/27 16:34:32 deanna Exp $
--- src/sim/headers/sim.h.orig Sat Jan 26 18:16:57 2008
+++ src/sim/headers/sim.h Sat Jan 26 18:17:14 2008
@@ -103,7 +103,9 @@
#include <sys/resource.h>
#ifndef MSDOS
#ifndef HPUX
+#ifndef __OpenBSD__
#include <alloca.h>
+#endif
#endif
#include <sys/mman.h>
#include <netinet/in.h>

View File

@ -1,15 +1,14 @@
$OpenBSD: patch-src_sim_makefile,v 1.2 2008/01/27 16:34:32 deanna Exp $
--- src/sim/makefile.orig Sat Jan 26 18:23:50 2008
+++ src/sim/makefile Sat Jan 26 18:27:08 2008
@@ -1,28 +1,26 @@
$OpenBSD: patch-src_sim_makefile,v 1.3 2008/02/19 13:25:18 deanna Exp $
--- src/sim/makefile.orig Mon Feb 11 23:14:17 2008
+++ src/sim/makefile Mon Feb 11 23:14:33 2008
@@ -1,4 +1,3 @@
-XINCLUDE = /usr/include/X11
+XINCLUDE = %%X11BASE%%/include
+XLIBS = %%X11BASE%%/lib
TCLHOME = ../tcl
TKHOME = ../tk
TCLXHOME = ../tclx
TCLLIBRARY = /usr/local/lib/tcl
TKLIBRARY = /usr/local/lib/tk
@@ -8,15 +7,13 @@ TKLIBRARY = /usr/local/lib/tk
SDLINCLUDE = $$(/bin/sh ./sdl_helper cflags)
SDLLIBS = $$(/bin/sh ./sdl_helper libs)
-CC = gcc
-
@ -20,26 +19,8 @@ $OpenBSD: patch-src_sim_makefile,v 1.2 2008/01/27 16:34:32 deanna Exp $
-DEFINES = -DIS_LINUX -DNO_AIRCRASH
+DEFINES = -DIS_LINUX
-CFLAGS = $(OPTFLAGS) $(DEFINES)
-CFLAGS += $(OPTFLAGS) $(DEFINES)
+CFLAGS += $(DEFINES)
#LDFLAGS = -Bstatic
-LDFLAGS=-L/usr/X11/lib -L/usr/X11R6/lib
+LDFLAGS += -L$(XLIBS)
INSTALL = install -s
INCLUDES = \
-Iheaders \
- -I$(XPMHOME) \
-I$(XINCLUDE) \
-I$(TCLHOME) \
-I$(TCLXHOME)/src \
@@ -32,6 +30,7 @@ CPPFLAGS = $(INCLUDES)
LIBS = $(TCLXHOME)/libtk.a \
$(TCLXHOME)/libtcl.a \
+ -L$(XLIBS) \
-lm \
-lX11 \
-lXext \
LDFLAGS=-L/usr/X11/lib -L/usr/X11R6/lib

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-src_sim_w_tk_c,v 1.3 2008/01/27 18:16:22 espie Exp $
--- src/sim/w_tk.c.orig Sun Jan 27 16:10:47 2008
+++ src/sim/w_tk.c Sun Jan 27 16:19:46 2008
@@ -472,11 +472,12 @@ TileViewEventProc(ClientData clientData, XEvent *event
view->tool_x = x; view->tool_y = y;
}
+
/* XXX: redraw all views showing cursor */
/* XXX: also, make sure switching tools works w/out moving */
if (((view->tool_showing != last_showing) ||
- (view->tool_x != last_x) ||
- (view->tool_y != last_y))) {
+ ((view->tool_x >> 4) != (last_x >> 4)) ||
+ ((view->tool_y >> 4) != (last_y >> 4)))) {
#if 1
EventuallyRedrawView(view);
#else

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_tk_tkcanvas_c,v 1.1.1.1 2008/01/18 03:36:32 deanna Exp $
--- src/tk/tkcanvas.c.orig Sat Jan 12 14:49:05 2008
+++ src/tk/tkcanvas.c Sat Jan 12 14:49:14 2008
@@ -1488,7 +1488,7 @@ ConfigureCanvas(interp, canvasPtr, argc, argv, flags)
#if defined(USE_XPM3)
//#include "xpmtk.h"
-#include <xpm.h>
+#include <X11/xpm.h>
/*
*--------------------------------------------------------------
*

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_tk_tkpixmap_c,v 1.1.1.1 2008/01/18 03:36:32 deanna Exp $
--- src/tk/tkpixmap.c.orig Sat Jan 12 14:48:29 2008
+++ src/tk/tkpixmap.c Sat Jan 12 14:48:40 2008
@@ -41,7 +41,7 @@ static char *AtFSid = "$Header: tkPixmap.c[1.1] Mon Se
* Include the xpm 3 defines for color pixmaps
*/
//#include "xpmtk.h"
-#include <xpm.h>
+#include <X11/xpm.h>
/*
* One of the following data structures exists for each bitmap that is

View File

@ -1,97 +1,120 @@
@comment $OpenBSD: PLIST,v 1.4 2008/01/27 16:34:32 deanna Exp $
@comment $OpenBSD: PLIST,v 1.5 2008/02/19 13:25:18 deanna Exp $
bin/micropolis
libexec/sim
share/applications/
share/applications/micropolis.desktop
share/doc/micropolis/
share/doc/micropolis/manual/
share/doc/micropolis/manual/Ask.html
share/doc/micropolis/manual/Budget.Cancel.html
share/doc/micropolis/manual/Budget.Collected.html
share/doc/micropolis/manual/Budget.Continue.html
share/doc/micropolis/manual/Budget.Police.html
share/doc/micropolis/manual/Budget.Previous.html
share/doc/micropolis/manual/Budget.Road.html
share/doc/micropolis/manual/Budget.html
share/doc/micropolis/manual/Disaster.No.html
share/doc/micropolis/manual/Disaster.Yes.html
share/doc/micropolis/manual/Editor.BuildPie.html
share/doc/micropolis/manual/Editor.Options.html
share/doc/micropolis/manual/Editor.ToolChalk.html
share/doc/micropolis/manual/Editor.ToolInd.html
share/doc/micropolis/manual/Editor.ToolName.html
share/doc/micropolis/manual/Editor.ToolNuclear.html
share/doc/micropolis/manual/Editor.ToolPie.html
share/doc/micropolis/manual/Editor.ToolQuery.html
share/doc/micropolis/manual/Editor.ToolRail.html
share/doc/micropolis/manual/Editor.ToolRes.html
share/doc/micropolis/manual/Editor.ToolSeaport.html
share/doc/micropolis/manual/Editor.ToolStadium.html
share/doc/micropolis/manual/Editor.ToolWire.html
share/doc/micropolis/manual/Editor.View.html
share/doc/micropolis/manual/Editor.html
share/doc/micropolis/manual/Evaluation.Dismiss.html
share/doc/micropolis/manual/Evaluation.GoodJob.html
share/doc/micropolis/manual/Evaluation.Statistics.html
share/doc/micropolis/manual/Evaluation.html
share/doc/micropolis/manual/File.Cancel.html
share/doc/micropolis/manual/File.Directory.html
share/doc/micropolis/manual/File.OK.html
share/doc/micropolis/manual/File.html
share/doc/micropolis/manual/Frob.Dismiss.html
share/doc/micropolis/manual/Frob.html
share/doc/micropolis/manual/Graph.120Years.html
share/doc/micropolis/manual/Graph.Com.html
share/doc/micropolis/manual/Graph.Dismiss.html
share/doc/micropolis/manual/Graph.Money.html
share/doc/micropolis/manual/Graph.Pollution.html
share/doc/micropolis/manual/Graph.html
share/doc/micropolis/manual/Head.Demand.html
share/doc/micropolis/manual/Head.Entry.html
share/doc/micropolis/manual/Head.Funds.html
share/doc/micropolis/manual/Head.OptionsMenu.html
share/doc/micropolis/manual/Head.Scrollbar.html
share/doc/micropolis/manual/Head.TimeMenu.html
share/doc/micropolis/manual/Head.WindowsMenu.html
share/doc/micropolis/manual/Head.html
share/doc/micropolis/manual/Help.Dismiss.html
share/doc/micropolis/manual/Help.Scrollbar.html
share/doc/micropolis/manual/Help.html
share/doc/micropolis/manual/Map.Zones.html
share/doc/micropolis/manual/Map.html
share/doc/micropolis/manual/Notice.Text.html
share/doc/micropolis/manual/Notice.View.html
share/doc/micropolis/manual/Notice.html
share/doc/micropolis/manual/Plan.Goto.html
share/doc/micropolis/manual/Plan.Support.html
share/doc/micropolis/manual/Plan.Veto.html
share/doc/micropolis/manual/Player.Display.html
share/doc/micropolis/manual/Player.html
share/doc/micropolis/manual/Quit.AllQuit.html
share/doc/micropolis/manual/Quit.IQuit.html
share/doc/micropolis/manual/Quit.IResign.html
share/doc/micropolis/manual/Quit.No.html
share/doc/micropolis/manual/README
share/doc/micropolis/manual/Scenario.Bern.html
share/doc/micropolis/manual/Scenario.Detroit.html
share/doc/micropolis/manual/Scenario.LoadCity.html
share/doc/micropolis/manual/Scenario.Name.html
share/doc/micropolis/manual/Scenario.Rio.html
share/doc/micropolis/manual/Scenario.SanFran.html
share/doc/micropolis/manual/Scenario.Use.html
share/doc/micropolis/manual/Scenario.html
share/doc/micropolis/manual/SelectCity.No.html
share/doc/micropolis/manual/SelectCity.Yes.html
share/doc/micropolis/manual/Window.html
share/doc/micropolis/manual/bibliography.html
share/doc/micropolis/manual/credits.html
share/doc/micropolis/manual/history.html
share/doc/micropolis/manual/index.html
share/doc/micropolis/manual/inside.html
share/doc/micropolis/manual/intro.html
share/doc/micropolis/manual/reference.html
share/doc/micropolis/manual/tutorial.html
share/doc/micropolis/Ask.html
share/doc/micropolis/Budget.Cancel.html
share/doc/micropolis/Budget.Collected.html
share/doc/micropolis/Budget.Continue.html
share/doc/micropolis/Budget.Police.html
share/doc/micropolis/Budget.Previous.html
share/doc/micropolis/Budget.Road.html
share/doc/micropolis/Budget.html
share/doc/micropolis/Disaster.No.html
share/doc/micropolis/Disaster.Yes.html
share/doc/micropolis/Editor.BuildPie.html
share/doc/micropolis/Editor.Options.html
share/doc/micropolis/Editor.ToolChalk.html
share/doc/micropolis/Editor.ToolInd.html
share/doc/micropolis/Editor.ToolName.html
share/doc/micropolis/Editor.ToolNuclear.html
share/doc/micropolis/Editor.ToolPie.html
share/doc/micropolis/Editor.ToolQuery.html
share/doc/micropolis/Editor.ToolRail.html
share/doc/micropolis/Editor.ToolRes.html
share/doc/micropolis/Editor.ToolSeaport.html
share/doc/micropolis/Editor.ToolStadium.html
share/doc/micropolis/Editor.ToolWire.html
share/doc/micropolis/Editor.View.html
share/doc/micropolis/Editor.html
share/doc/micropolis/Evaluation.Dismiss.html
share/doc/micropolis/Evaluation.GoodJob.html
share/doc/micropolis/Evaluation.Statistics.html
share/doc/micropolis/Evaluation.html
share/doc/micropolis/File.Cancel.html
share/doc/micropolis/File.Directory.html
share/doc/micropolis/File.OK.html
share/doc/micropolis/File.html
share/doc/micropolis/Frob.Dismiss.html
share/doc/micropolis/Frob.html
share/doc/micropolis/Graph.120Years.html
share/doc/micropolis/Graph.Com.html
share/doc/micropolis/Graph.Dismiss.html
share/doc/micropolis/Graph.Money.html
share/doc/micropolis/Graph.Pollution.html
share/doc/micropolis/Graph.html
share/doc/micropolis/Head.Demand.html
share/doc/micropolis/Head.Entry.html
share/doc/micropolis/Head.Funds.html
share/doc/micropolis/Head.OptionsMenu.html
share/doc/micropolis/Head.Scrollbar.html
share/doc/micropolis/Head.TimeMenu.html
share/doc/micropolis/Head.WindowsMenu.html
share/doc/micropolis/Head.html
share/doc/micropolis/Help.Dismiss.html
share/doc/micropolis/Help.Scrollbar.html
share/doc/micropolis/Help.html
share/doc/micropolis/Map.Zones.html
share/doc/micropolis/Map.html
share/doc/micropolis/Notice.Text.html
share/doc/micropolis/Notice.View.html
share/doc/micropolis/Notice.html
share/doc/micropolis/Plan.Goto.html
share/doc/micropolis/Plan.Support.html
share/doc/micropolis/Plan.Veto.html
share/doc/micropolis/Player.Display.html
share/doc/micropolis/Player.html
share/doc/micropolis/Quit.AllQuit.html
share/doc/micropolis/Quit.IQuit.html
share/doc/micropolis/Quit.IResign.html
share/doc/micropolis/Quit.No.html
share/doc/micropolis/README
share/doc/micropolis/Scenario.Bern.html
share/doc/micropolis/Scenario.Detroit.html
share/doc/micropolis/Scenario.LoadCity.html
share/doc/micropolis/Scenario.Name.html
share/doc/micropolis/Scenario.Rio.html
share/doc/micropolis/Scenario.SanFran.html
share/doc/micropolis/Scenario.Use.html
share/doc/micropolis/Scenario.html
share/doc/micropolis/SelectCity.No.html
share/doc/micropolis/SelectCity.Yes.html
share/doc/micropolis/Window.html
share/doc/micropolis/bibliography.html
share/doc/micropolis/credits.html
share/doc/micropolis/history.html
share/doc/micropolis/index.html
share/doc/micropolis/inside.html
share/doc/micropolis/intro.html
share/doc/micropolis/reference.html
share/doc/micropolis/tutorial.html
share/micropolis/
share/micropolis/cities/
share/micropolis/cities/about.cty
share/micropolis/cities/badnews.cty
share/micropolis/cities/bluebird.cty
share/micropolis/cities/bruce.cty
share/micropolis/cities/deadwood.cty
share/micropolis/cities/finnigan.cty
share/micropolis/cities/freds.cty
share/micropolis/cities/haight.cty
share/micropolis/cities/happisle.cty
share/micropolis/cities/joffburg.cty
share/micropolis/cities/kamakura.cty
share/micropolis/cities/kobe.cty
share/micropolis/cities/kowloon.cty
share/micropolis/cities/kyoto.cty
share/micropolis/cities/linecity.cty
share/micropolis/cities/med_isle.cty
share/micropolis/cities/ndulls.cty
share/micropolis/cities/neatmap.cty
share/micropolis/cities/radial.cty
share/micropolis/cities/senri.cty
share/micropolis/cities/southpac.cty
share/micropolis/cities/splats.cty
share/micropolis/cities/wetcity.cty
share/micropolis/cities/yokohama.cty
share/micropolis/images/
share/micropolis/images/airport.xpm
share/micropolis/images/background-micropolis.xpm
@ -569,8 +592,6 @@ share/micropolis/res/wmap.tcl
share/micropolis/res/wnotice.tcl
share/micropolis/res/wplayer.tcl
share/micropolis/res/wscen.tcl
share/micropolis/res/wscen_old.tcl
share/micropolis/res/wscen_older.tcl
share/micropolis/res/wsplash.tcl
share/pixmaps/
share/pixmaps/micropolis.png