From 724acc47f5da9c8ea06d4d920199f9771e574bc0 Mon Sep 17 00:00:00 2001 From: amdmi3 Date: Fri, 13 Dec 2019 23:39:22 +0000 Subject: - Update games/simutrans to 121.0 - Take maintainership - Move graphic sets into separate ports --- games/Makefile | 3 + games/simutrans-pak128.german/Makefile | 13 +++ games/simutrans-pak128.german/distinfo | 3 + games/simutrans-pak128.german/pkg-descr | 7 ++ games/simutrans-pak128/Makefile | 12 +++ games/simutrans-pak128/distinfo | 3 + games/simutrans-pak128/pkg-descr | 7 ++ games/simutrans-pak64/Makefile | 11 +++ games/simutrans-pak64/distinfo | 3 + games/simutrans-pak64/pkg-descr | 5 ++ games/simutrans/Makefile | 97 +++++++++------------- games/simutrans/Makefile.pak | 21 +++++ games/simutrans/distinfo | 12 +-- games/simutrans/files/patch-Makefile | 19 +++++ games/simutrans/files/patch-gui_loadsave__frame.h | 10 --- games/simutrans/files/patch-simsys.cc | 11 +++ .../files/patch-squirrel_sq__extensions.cc | 27 ------ .../files/patch-squirrel_squirrel_sqvm.cc | 12 --- games/simutrans/files/simutrans | 5 -- games/simutrans/files/simutrans.in | 3 + games/simutrans/pkg-descr | 10 ++- games/simutrans/pkg-message | 7 ++ 22 files changed, 178 insertions(+), 123 deletions(-) create mode 100644 games/simutrans-pak128.german/Makefile create mode 100644 games/simutrans-pak128.german/distinfo create mode 100644 games/simutrans-pak128.german/pkg-descr create mode 100644 games/simutrans-pak128/Makefile create mode 100644 games/simutrans-pak128/distinfo create mode 100644 games/simutrans-pak128/pkg-descr create mode 100644 games/simutrans-pak64/Makefile create mode 100644 games/simutrans-pak64/distinfo create mode 100644 games/simutrans-pak64/pkg-descr create mode 100644 games/simutrans/Makefile.pak create mode 100644 games/simutrans/files/patch-Makefile delete mode 100644 games/simutrans/files/patch-gui_loadsave__frame.h create mode 100644 games/simutrans/files/patch-simsys.cc delete mode 100644 games/simutrans/files/patch-squirrel_sq__extensions.cc delete mode 100644 games/simutrans/files/patch-squirrel_squirrel_sqvm.cc delete mode 100644 games/simutrans/files/simutrans create mode 100644 games/simutrans/files/simutrans.in create mode 100644 games/simutrans/pkg-message (limited to 'games') diff --git a/games/Makefile b/games/Makefile index 6fad3ceaea48..2b410f8bc17d 100644 --- a/games/Makefile +++ b/games/Makefile @@ -854,6 +854,9 @@ SUBDIR += simplevaders SUBDIR += simsu SUBDIR += simutrans + SUBDIR += simutrans-pak128 + SUBDIR += simutrans-pak128.german + SUBDIR += simutrans-pak64 SUBDIR += sjeng SUBDIR += ski SUBDIR += sl diff --git a/games/simutrans-pak128.german/Makefile b/games/simutrans-pak128.german/Makefile new file mode 100644 index 000000000000..bcadae54580c --- /dev/null +++ b/games/simutrans-pak128.german/Makefile @@ -0,0 +1,13 @@ +# Created by: Dmitry Marakasov +# $FreeBSD$ + +PORTNAME= simutrans-pak128.german +DISTVERSION= 1.2 +MASTER_SITES= SF/simutrans/PAK128.german/pak128.german_${DISTVERSION}_for_ST_${SIMUTRANSVER:S/-/./g} +DISTNAME= PAK128.german_${DISTVERSION}_for_ST_${SIMUTRANSVER:S/./-/g} + +SIMUTRANSVER= 121-0 + +COMMENT= German graphics set for Simutrans + +.include "${.CURDIR}/../simutrans/Makefile.pak" diff --git a/games/simutrans-pak128.german/distinfo b/games/simutrans-pak128.german/distinfo new file mode 100644 index 000000000000..6358f94491f5 --- /dev/null +++ b/games/simutrans-pak128.german/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1576272128 +SHA256 (PAK128.german_1.2_for_ST_121-0.zip) = f1a95dfdf27951614e07196e6a5d03e4e02b55bd83fdb06bd85e8045fe64b2cb +SIZE (PAK128.german_1.2_for_ST_121-0.zip) = 156036866 diff --git a/games/simutrans-pak128.german/pkg-descr b/games/simutrans-pak128.german/pkg-descr new file mode 100644 index 000000000000..977e008eb7f2 --- /dev/null +++ b/games/simutrans-pak128.german/pkg-descr @@ -0,0 +1,7 @@ +Brings the German transportation system embedded in typical German +towns and industries according to the respective topographic region +(coasts, the Alps, etc.). Trains and lorries are taller than they +are in standard pak128. Every building and factory has four views +and each type of factory has different aspects. + +WWW: https://www.simutrans.com/ diff --git a/games/simutrans-pak128/Makefile b/games/simutrans-pak128/Makefile new file mode 100644 index 000000000000..74c76a66bdbb --- /dev/null +++ b/games/simutrans-pak128/Makefile @@ -0,0 +1,12 @@ +# Created by: Dmitry Marakasov +# $FreeBSD$ + +PORTNAME= simutrans-pak128 +DISTVERSION= 2.8.1 +MASTER_SITES= SF/simutrans/pak128/pak128%20for%20ST%20120.4.1%20%28${DISTVERSION}%2C%20priority%20signals%20%2B%20bugfix%29/ +DISTNAME= pak128 +DIST_SUBDIR= ${PORTNAME}-${DISTVERSION} + +COMMENT= High resolution graphics set for Simutrans + +.include "${.CURDIR}/../simutrans/Makefile.pak" diff --git a/games/simutrans-pak128/distinfo b/games/simutrans-pak128/distinfo new file mode 100644 index 000000000000..91b344ed3576 --- /dev/null +++ b/games/simutrans-pak128/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1576270212 +SHA256 (simutrans-pak128-2.8.1/pak128.zip) = bc17793e9d64c7f56e58bc050f6f8d59cac5deb46b9d90773af8fc0cf2f1017c +SIZE (simutrans-pak128-2.8.1/pak128.zip) = 97430218 diff --git a/games/simutrans-pak128/pkg-descr b/games/simutrans-pak128/pkg-descr new file mode 100644 index 000000000000..f15ea93fd1bd --- /dev/null +++ b/games/simutrans-pak128/pkg-descr @@ -0,0 +1,7 @@ +When Simutrans could only support 64px size graphics, pak128 already +started. First pak to feature a complex economy and have a very +wide variety of objects. It contains roughly 7 times more graphic +data than pak64 and thus requires by far the largest amount of RAM +and processing power of all Simutrans sets. + +WWW: https://www.simutrans.com/ diff --git a/games/simutrans-pak64/Makefile b/games/simutrans-pak64/Makefile new file mode 100644 index 000000000000..87fe25674d83 --- /dev/null +++ b/games/simutrans-pak64/Makefile @@ -0,0 +1,11 @@ +# Created by: Dmitry Marakasov +# $FreeBSD$ + +PORTNAME= simutrans-pak64 +DISTVERSION= 121-0 +MASTER_SITES= SF/simutrans/pak64/${DISTVERSION}/ +DISTNAME= simupak64-${DISTVERSION} + +COMMENT= Low resolution graphics set for Simutrans + +.include "${.CURDIR}/../simutrans/Makefile.pak" diff --git a/games/simutrans-pak64/distinfo b/games/simutrans-pak64/distinfo new file mode 100644 index 000000000000..cf8186c17c30 --- /dev/null +++ b/games/simutrans-pak64/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1576269354 +SHA256 (simupak64-121-0.zip) = acd44278650944cd197ef8d5da7106f3d26c5fd3c3f2586c83a1c286e02c63cc +SIZE (simupak64-121-0.zip) = 4422401 diff --git a/games/simutrans-pak64/pkg-descr b/games/simutrans-pak64/pkg-descr new file mode 100644 index 000000000000..027ae8ad5def --- /dev/null +++ b/games/simutrans-pak64/pkg-descr @@ -0,0 +1,5 @@ +Pak64 is the evolution of the original Simutrans pakset, which now +we call pak.Classic. Many artists contributed to this pakset since +the 8 bit age. + +WWW: https://www.simutrans.com/ 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 +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 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 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 - #include - - 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::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 --#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 -+#include "sqpcheader.h" - #include - #include - #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: <