[34275] trunk/dports/games

simon at macports.org simon at macports.org
Wed Feb 20 02:45:53 PST 2008


Revision: 34275
          http://trac.macosforge.org/projects/macports/changeset/34275
Author:   simon at macports.org
Date:     2008-02-20 02:45:52 -0800 (Wed, 20 Feb 2008)

Log Message:
-----------
games/simutrans: New port.

Added Paths:
-----------
    trunk/dports/games/simutrans/
    trunk/dports/games/simutrans/Portfile
    trunk/dports/games/simutrans/files/
    trunk/dports/games/simutrans/files/patch-Makefile.diff
    trunk/dports/games/simutrans/files/patch-config.default.diff
    trunk/dports/games/simutrans/files/simutrans

Added: trunk/dports/games/simutrans/Portfile
===================================================================
--- trunk/dports/games/simutrans/Portfile	                        (rev 0)
+++ trunk/dports/games/simutrans/Portfile	2008-02-20 10:45:52 UTC (rev 34275)
@@ -0,0 +1,80 @@
+# $Id$
+
+PortSystem          1.0
+
+name                simutrans
+version             99-17-1
+categories          games
+platforms           darwin
+maintainers         simon
+description         Simutrans is a freeware transport simulation game.
+long_description    Simutrans Transport Simulator (short: Simutrans) is a \
+                    freeware simulation game for Windows, BeOS, Mac OS X and \
+                    Linux that focuses on the transporting of goods, people, \
+                    mail and power. It was originally written by Hansjörg \
+                    Malthaner, and is now maintained and developed by a \
+                    small team. \
+                    \
+                    This port installs simutrans with the default pak64 \
+                    image set. If you want to use another pak, download it \
+                    (for example from \
+                    http://simutrans.sourceforge.net/ufcs.htm) and put it \
+                    into \"${prefix}/share/simutrans\".
+
+homepage            http://simutrans.sourceforge.net/
+master_sites        sourceforge
+use_zip             yes
+set source          ${name}-src-${version}${extract.suffix}
+set pak64           pak64-${version}${extract.suffix}
+distfiles           ${source} \
+                    ${pak64}
+checksums           ${source} md5 2ebeb3439707c955d87f1b1ff0f1c0da \
+                    ${source} sha1 c66429cf2578fdcf6e41e443b4edac58650ac23e \
+                    ${source} rmd160 157f6e55317bb719badfd68743ce36f1ceaa1f49 \
+                    ${pak64} md5 9a7d4494ec15f4311737bfadf991a6fe \
+                    ${pak64} sha1 ab978c43b4b02a4c7eda226a4a7984f0b29135f2 \
+                    ${pak64} rmd160 682334005d38cb6516327869a935eb9a8c012ea6
+extract.mkdir       yes
+
+depends_lib         port:libpng \
+                    port:libsdl \
+                    port:zlib
+
+pre-patch {
+    copy -force ${worksrcpath}/config.template ${worksrcpath}/config.default
+}
+
+patchfiles          patch-config.default.diff \
+                    patch-Makefile.diff
+
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Makefile
+
+    # If music should not be enabled then don't use the mixer_sdl backend
+    # which is only used with music. This may speed up the game.
+    if {![variant_isset enable_music]} {
+        reinplace "s|BACKEND = mixer_sdl|#BACKEND = mixer_sdl|g" \
+            ${worksrcpath}/config.default
+    }
+}
+
+use_configure       no
+
+destroot {
+    # Install the simutrans data into share/simutrans.
+    copy ${worksrcpath}/simutrans ${destroot}${prefix}/share
+    # Install the simutrans binary to the directory in share/. Necessary as
+    # the data and binary needs to be in the same directory.
+    xinstall ${worksrcpath}/sim ${destroot}${prefix}/share/simutrans
+
+    # Install the helper script which allows to simply call simutrans. Also
+    # use the correct prefix path in the helper script.
+    xinstall ${portpath}/${filesdir}/simutrans ${destroot}${prefix}/bin
+    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/simutrans
+}
+
+
+variant enable_music description {Allows to listen to simutrans own music\
+                                  while playing. May reduce speed.} {
+    depends_lib-append  port:libsdl_mixer
+}


Property changes on: trunk/dports/games/simutrans/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/games/simutrans/files/patch-Makefile.diff
===================================================================
--- trunk/dports/games/simutrans/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/games/simutrans/files/patch-Makefile.diff	2008-02-20 10:45:52 UTC (rev 34275)
@@ -0,0 +1,13 @@
+--- Makefile	2008-02-11 15:37:02.000000000 +0100
++++ Makefile	2008-02-11 15:37:16.000000000 +0100
+@@ -92,8 +92,8 @@
+   LDFLAGS  += -pg
+ endif
+ 
+-CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wstrict-prototypes $(OS_INC) $(OS_OPT) $(FLAGS)
+-CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(OS_INC) $(OS_OPT) $(FLAGS)
++CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wstrict-prototypes $(OS_INC) $(OS_OPT) $(FLAGS) -I__PREFIX__/include -L__PREFIX__/lib
++CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(OS_INC) $(OS_OPT) $(FLAGS) -I__PREFIX__/include -L__PREFIX__/lib
+ 
+ 
+ SOURCES += bauer/brueckenbauer.cc


Property changes on: trunk/dports/games/simutrans/files/patch-Makefile.diff
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/dports/games/simutrans/files/patch-config.default.diff
===================================================================
--- trunk/dports/games/simutrans/files/patch-config.default.diff	                        (rev 0)
+++ trunk/dports/games/simutrans/files/patch-config.default.diff	2008-02-20 10:45:52 UTC (rev 34275)
@@ -0,0 +1,39 @@
+--- config.default	2007-12-17 22:01:56.000000000 +0100
++++ config.default	2008-02-11 15:29:41.000000000 +0100
+@@ -5,29 +5,29 @@
+ 
+ #BACKEND = allegro
+ #BACKEND = gdi
+-#BACKEND = sdl
+-#BACKEND = mixer_sdl
++BACKEND = sdl
++BACKEND = mixer_sdl
+ #BACKEND = x11
+ 
+ #COLOUR_DEPTH = 8
+-#COLOUR_DEPTH = 16
++COLOUR_DEPTH = 16
+ 
+ #OSTYPE = beos
+ #OSTYPE = cygwin
+ #OSTYPE = freebsd
+ #OSTYPE = linux
+ #OSTYPE = mingw
+-#OSTYPE = mac
++OSTYPE = mac
+ 
+-#DEBUG = 3    # Level 1-3, higher number means more debug-friendly, see Makefile
+-#OPTIMISE = 1 # Add umpteen optimisation flags
++DEBUG = 3    # Level 1-3, higher number means more debug-friendly, see Makefile
++OPTIMISE = 1 # Add umpteen optimisation flags
+ #PROFILE = 1
+ 
+ # Define these as empty strings, if you don't have allegro/sdl-config
+ #ALLEGRO_CONFIG = allegro-config
+ #SDL_CONFIG = sdl-config
+ 
+-#VERBOSE = 1
++VERBOSE = 1
+ 
+ # Do not determine dependencies
+ # Header dependencies get NOT tracked this way, so if a header changes you're


Property changes on: trunk/dports/games/simutrans/files/patch-config.default.diff
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/dports/games/simutrans/files/simutrans
===================================================================
--- trunk/dports/games/simutrans/files/simutrans	                        (rev 0)
+++ trunk/dports/games/simutrans/files/simutrans	2008-02-20 10:45:52 UTC (rev 34275)
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+
+# This is a shell wrapper to make executing simutrans simpler.
+#
+
+__PREFIX__/share/simutrans/sim $@


Property changes on: trunk/dports/games/simutrans/files/simutrans
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080220/74c42a46/attachment.html 


More information about the macports-changes mailing list