aboutsummaryrefslogtreecommitdiff
path: root/games/simutrans
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2019-12-13 23:39:22 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2019-12-13 23:39:22 +0000
commit7c309774027f036a74e5134c3645edc5aa45b4a1 (patch)
treeb1a575153fe08d268287c225c1026dbe0ece56a7 /games/simutrans
parent4fbe2a0eec084f3ccd074dfab29a1967f42e0a60 (diff)
downloadports-7c309774027f036a74e5134c3645edc5aa45b4a1.tar.gz
ports-7c309774027f036a74e5134c3645edc5aa45b4a1.zip
Notes
Diffstat (limited to 'games/simutrans')
-rw-r--r--games/simutrans/Makefile97
-rw-r--r--games/simutrans/Makefile.pak21
-rw-r--r--games/simutrans/distinfo12
-rw-r--r--games/simutrans/files/patch-Makefile19
-rw-r--r--games/simutrans/files/patch-gui_loadsave__frame.h10
-rw-r--r--games/simutrans/files/patch-simsys.cc11
-rw-r--r--games/simutrans/files/patch-squirrel_sq__extensions.cc27
-rw-r--r--games/simutrans/files/patch-squirrel_squirrel_sqvm.cc12
-rw-r--r--games/simutrans/files/simutrans5
-rw-r--r--games/simutrans/files/simutrans.in3
-rw-r--r--games/simutrans/pkg-descr10
-rw-r--r--games/simutrans/pkg-message7
12 files changed, 111 insertions, 123 deletions
diff --git a/games/simutrans/Makefile b/games/simutrans/Makefile
index fe18e7ec1f2b..7c27a71b3219 100644
--- a/games/simutrans/Makefile
+++ b/games/simutrans/Makefile
@@ -1,81 +1,66 @@
# $FreeBSD$
PORTNAME= simutrans
-DISTVERSION= 120-2-2
+DISTVERSION= 121-0
CATEGORIES= games
-MASTER_SITES= SF/simutrans/simutrans/${DISTVERSION} \
- SF/simutrans/pak64/${PAK64_SUBDIR}:pak64 \
- SF/simutrans/pak128/pak128%20for%20${PAK128_SUBDIR}:pak128
-DISTFILES= simutrans-src-${DISTVERSION}.zip \
- simulinux-${DISTVERSION}.zip
+MASTER_SITES= SF/simutrans/simutrans/${DISTVERSION}
+DISTNAME= simutrans-src-${DISTVERSION}
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Transport Simulator
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Transportation simulator
-LICENSE= ART10
-LICENSE_FILE= ${WRKSRC}/simutrans/license.txt
+LICENSE= ART10 MIT
+LICENSE_COMB= multi
+LICENSE_FILE_ART10= ${WRKSRC}/simutrans/license.txt
+LICENSE_FILE_ART10= ${WRKSRC}/simutrans/license_squirrel.txt
-PAK64_DISTVERSION= 120-2
-PAK64_SUBDIR= 120-2
-PAK128_DISTVERSION= 2.6--ST120
-PAK128_SUBDIR= ST%20120%20%282.6%2C%20completed%20elevated%20tracks%29
-SIMUTRANS_REVISION= 8163
-
-OPTIONS_DEFINE= DOCS
-OPTIONS_MULTI= PAK
-OPTIONS_MULTI_PAK= PAK64 PAK128
-OPTIONS_DEFAULT= PAK64
-PAK64_DESC= Default graphics
-PAK128_DESC= High resolution graphics
+USES= gmake sdl zip
+USE_SDL= sdl2 mixer2
# Threading disabled because FreeBSD does not have a static initializer
# for recursive mutexes.
-MAKE_ARGS= BACKEND=mixer_sdl \
+MAKE_ENV= BACKEND=mixer_sdl2 \
COLOUR_DEPTH=16 \
MULTI_THREAD=0 \
OSTYPE=freebsd \
- FLAGS="-DUSE_C -DREVISION=${SIMUTRANS_REVISION}" \
VERBOSE=1
+
NO_WRKSUBDIR= yes
-USES= compiler dos2unix gmake sdl zip
-USE_SDL= sdl mixer
-CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
-CXXFLAGS_clang= -Wno-c++11-narrowing
-DOS2UNIX_GLOB= *
-DESKTOP_ENTRIES=Simutrans "" "" simutrans "Game;Simulation;" false
-PLIST_FILES= bin/simutrans bin/simutrans-bin
-PORTDATA= *
+SUB_FILES= simutrans
-.include <bsd.port.options.mk>
+PLIST_FILES= bin/simutrans libexec/simutrans
+PORTDATA= *
+PORTDOCS= change_request.txt \
+ history.txt \
+ problem_report.txt \
+ readme.txt \
+ thanks.txt
-.if ${PORT_OPTIONS:MPAK64}
-DISTFILES+= simupak64-${PAK64_DISTVERSION}.zip:pak64
-.endif
+DESKTOP_ENTRIES=Simutrans "" "" simutrans "Game;Simulation;" false
-.if ${PORT_OPTIONS:MPAK128}
-DISTFILES+= pak128-${PAK128_DISTVERSION}.zip:pak128
-.endif
+OPTIONS_DEFINE= DOCS
+OPTIONS_MULTI= PAKS
+OPTIONS_MULTI_PAKS= PAK64 PAK128 PAK128_GERMAN
+OPTIONS_DEFAULT=PAK128
-post-patch:
- @${REINPLACE_CMD} 's/-O[^ ]*//' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} 's/simutrans/.simutrans/' ${WRKSRC}/simsys.cc
+PAKS_DESC= Graphics sets
+PAK64_DESC= Enable low resolution graphics set
+PAK64_RUN_DEPENDS= simutrans-pak64>=0:games/simutrans-pak64
+PAK128_DESC= Enable high resolution graphics set
+PAK128_RUN_DEPENDS= simutrans-pak128>=0:games/simutrans-pak128
+PAK128_GERMAN_DESC= Enable german graphics set
+PAK128_GERMAN_RUN_DEPENDS= simutrans-pak128.german>=0:games/simutrans-pak128.german
do-install:
- (cd ${WRKSRC}/simutrans && ${COPYTREE_SHARE} \
- "ai config font music script text themes" ${STAGEDIR}${DATADIR})
-.if ${PORT_OPTIONS:MPAK64}
- (cd ${WRKSRC}/simutrans && ${COPYTREE_SHARE} \
- pak ${STAGEDIR}${DATADIR})
-.endif
-.if ${PORT_OPTIONS:MPAK128}
- (cd ${WRKSRC} && ${COPYTREE_SHARE} pak128 ${STAGEDIR}${DATADIR})
-.endif
-.if ${PORT_OPTIONS:MDOCS}
- ${INSTALL_DATA} ${WRKSRC}/simutrans/readme.txt ${STAGEDIR}${DATADIR}
-.endif
+ @cd ${WRKSRC}/simutrans && ${COPYTREE_SHARE} \
+ "ai config font music script text themes" ${STAGEDIR}${DATADIR}
${INSTALL_PROGRAM} ${WRKSRC}/build/default/sim \
- ${STAGEDIR}${PREFIX}/bin/simutrans-bin
- ${INSTALL_SCRIPT} ${FILESDIR}/simutrans ${STAGEDIR}${PREFIX}/bin
+ ${STAGEDIR}${PREFIX}/libexec/simutrans
+ ${INSTALL_SCRIPT} ${WRKDIR}/simutrans ${STAGEDIR}${PREFIX}/bin
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/simutrans && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/simutrans/Makefile.pak b/games/simutrans/Makefile.pak
new file mode 100644
index 000000000000..7eed327b10c9
--- /dev/null
+++ b/games/simutrans/Makefile.pak
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+CATEGORIES= games
+
+MAINTAINER?= amdmi3@FreeBSD.org
+
+USES?= zip
+NO_BUILD= yes
+NO_ARCH= yes
+
+WRKSRC= ${WRKDIR}/simutrans
+
+DATADIR= ${PREFIX}/share/simutrans
+PORTDATA= *
+
+.if !target(do-install)
+do-install:
+ cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/simutrans/distinfo b/games/simutrans/distinfo
index b2cbe2d24c3b..80d31ae4114e 100644
--- a/games/simutrans/distinfo
+++ b/games/simutrans/distinfo
@@ -1,9 +1,3 @@
-TIMESTAMP = 1494943579
-SHA256 (simutrans-src-120-2-2.zip) = 7f22c144377abf1a0ee49432f3f6f5eb9a620567960df31d2ea6399b17cf26fa
-SIZE (simutrans-src-120-2-2.zip) = 3900947
-SHA256 (simulinux-120-2-2.zip) = 029891edb59036183a6e2757a6a01eb7eddec263043650aabaf49e948497328a
-SIZE (simulinux-120-2-2.zip) = 3437339
-SHA256 (simupak64-120-2.zip) = b3ce4fc99468e6a2601a606251f156e554d2d78f2cc5679c0d9a64a5f50561e8
-SIZE (simupak64-120-2.zip) = 4453079
-SHA256 (pak128-2.6--ST120.zip) = ac0835ff667f80a2990ae226e8a58a9c44bbd1c2bf4a9f0f3cd87614ef9da94f
-SIZE (pak128-2.6--ST120.zip) = 95151992
+TIMESTAMP = 1575983380
+SHA256 (simutrans-src-121-0.zip) = 69fd95989761a013729106b48135f772f59126398cd93ada072f963c4d1e86b8
+SIZE (simutrans-src-121-0.zip) = 4154876
diff --git a/games/simutrans/files/patch-Makefile b/games/simutrans/files/patch-Makefile
new file mode 100644
index 000000000000..394bc9afc7cb
--- /dev/null
+++ b/games/simutrans/files/patch-Makefile
@@ -0,0 +1,19 @@
+--- Makefile.orig 2019-12-03 10:58:12 UTC
++++ Makefile
+@@ -37,7 +37,7 @@ else ifeq ($(OSTYPE),beos)
+ # BeOS (obsolete)
+ LIBS += -lnet
+ else ifeq ($(OSTYPE),freebsd)
+- CFLAGS += -I/usr/local/include
++ CFLAGS += -isystem ${LOCALBASE}/include
+ else ifeq ($(OSTYPE),haiku)
+ # Haiku (needs to activate the GCC 4x)
+ LIBS += -lnetwork -lbe
+@@ -84,7 +84,6 @@ ifdef OPTIMISE
+ endif
+ endif
+ else
+- CFLAGS += -O
+ endif
+
+ ifdef DEBUG
diff --git a/games/simutrans/files/patch-gui_loadsave__frame.h b/games/simutrans/files/patch-gui_loadsave__frame.h
deleted file mode 100644
index 42bd73456e0c..000000000000
--- a/games/simutrans/files/patch-gui_loadsave__frame.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- gui/loadsave_frame.h.orig 2017-02-17 12:53:58 UTC
-+++ gui/loadsave_frame.h
-@@ -11,6 +11,7 @@
-
- #include "savegame_frame.h"
- #include "../tpl/stringhashtable_tpl.h"
-+#include <time.h>
- #include <string>
-
- class loadsave_t;
diff --git a/games/simutrans/files/patch-simsys.cc b/games/simutrans/files/patch-simsys.cc
new file mode 100644
index 000000000000..c5c6696f01f6
--- /dev/null
+++ b/games/simutrans/files/patch-simsys.cc
@@ -0,0 +1,11 @@
+--- simsys.cc.orig 2019-12-03 10:58:15 UTC
++++ simsys.cc
+@@ -357,7 +357,7 @@ char const *dr_query_homedir()
+ find_directory(B_USER_DIRECTORY, &userDir);
+ sprintf(buffer, "%s/simutrans", userDir.Path());
+ #else
+- sprintf(buffer, "%s/simutrans", getenv("HOME"));
++ sprintf(buffer, "%s/.simutrans", getenv("HOME"));
+ #endif
+
+ // create directory and subdirectories
diff --git a/games/simutrans/files/patch-squirrel_sq__extensions.cc b/games/simutrans/files/patch-squirrel_sq__extensions.cc
deleted file mode 100644
index 9de20aa70d72..000000000000
--- a/games/simutrans/files/patch-squirrel_sq__extensions.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-In file included from squirrel/sq_extensions.cc:6:
-In file included from squirrel/../tpl/ptrhashtable_tpl.h:8:
-In file included from squirrel/../tpl/hashtable_tpl.h:4:
-In file included from squirrel/../tpl/slist_tpl.h:11:
-In file included from /usr/include/c++/v1/iterator:417:
-In file included from /usr/include/c++/v1/__functional_base:19:
-/usr/include/c++/v1/utility:488:67: error: expected an identifier or template-id
- after '::'
- typename __make_tuple_indices<sizeof...(_Args1)>::type(),
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
-squirrel/squirrel/sqobject.h:131:19: note: expanded from macro 'type'
-#define type(obj) ((obj)._type)
- ^
-
---- squirrel/sq_extensions.cc.orig 2018-07-28 07:52:43 UTC
-+++ squirrel/sq_extensions.cc
-@@ -1,9 +1,9 @@
- #include "sq_extensions.h"
-
-+#include "../tpl/ptrhashtable_tpl.h"
- #include "squirrel/sqpcheader.h" // for declarations...
- #include "squirrel/sqvm.h" // for Raise_Error_vl
- #include <stdarg.h>
--#include "../tpl/ptrhashtable_tpl.h"
-
- // store data associate to vm's here
- struct my_vm_info_t {
diff --git a/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc b/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc
deleted file mode 100644
index da22dccbdb9a..000000000000
--- a/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- squirrel/squirrel/sqvm.cc.orig 2017-02-17 12:54:05 UTC
-+++ squirrel/squirrel/sqvm.cc
-@@ -1,8 +1,8 @@
- /*
- see copyright notice in squirrel.h
- */
--#include "sqpcheader.h"
- #include <math.h>
-+#include "sqpcheader.h"
- #include <stdlib.h>
- #include <limits.h>
- #include "sqopcodes.h"
diff --git a/games/simutrans/files/simutrans b/games/simutrans/files/simutrans
deleted file mode 100644
index 4bb3427a848c..000000000000
--- a/games/simutrans/files/simutrans
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-bindir=`dirname "$0"`
-bindir=`realpath "$bindir"`
-cd "$bindir/../share/simutrans"
-exec "$bindir/simutrans-bin" -use_workdir "$@"
diff --git a/games/simutrans/files/simutrans.in b/games/simutrans/files/simutrans.in
new file mode 100644
index 000000000000..6304e86941d3
--- /dev/null
+++ b/games/simutrans/files/simutrans.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cd "%%DATADIR%%" && exec "%%PREFIX%%/libexec/simutrans" -use_workdir "$@"
diff --git a/games/simutrans/pkg-descr b/games/simutrans/pkg-descr
index 529caef1a771..643c921869a4 100644
--- a/games/simutrans/pkg-descr
+++ b/games/simutrans/pkg-descr
@@ -1,6 +1,8 @@
-Establish a successful transport company. Transport passengers, mail and
-goods by land, air and water. Interconnect cities, districts, public
-buildings, industries and tourist attractions. Control and watch your
-finances and the traffic of your vehicles and goods.
+Simutrans is a freeware and open-source transportation simulator.
+Your goal is to establish a successful transport company. Transport
+passengers, mail and goods by rail, road, ship, and even air.
+Interconnect districts, cities, public buildings, industries and
+tourist attractions by building a transport network you always
+dreamed of.
WWW: https://www.simutrans.com/
diff --git a/games/simutrans/pkg-message b/games/simutrans/pkg-message
new file mode 100644
index 000000000000..cbfdf3903913
--- /dev/null
+++ b/games/simutrans/pkg-message
@@ -0,0 +1,7 @@
+[
+{ type: install
+ message: <<EOM
+You may install additional graphics sets from games/simutrans-pak* ports
+EOM
+}
+]