aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2014-03-16 04:55:33 +0800
committernemysis <nemysis@FreeBSD.org>2014-03-16 04:55:33 +0800
commit22c72db72ff7b53526c5eed72a9bc5b4a3318fd5 (patch)
treea860e4ba5dcd6412fe2c9f59d0758ff86b41720e /games
parent1273a75e2717fb987d8d4ea7fdb04a231af97618 (diff)
downloadfreebsd-ports-gnome-22c72db72ff7b53526c5eed72a9bc5b4a3318fd5.tar.gz
freebsd-ports-gnome-22c72db72ff7b53526c5eed72a9bc5b4a3318fd5.tar.zst
freebsd-ports-gnome-22c72db72ff7b53526c5eed72a9bc5b4a3318fd5.zip
- Change master sites, use GitHub=yes
- Fix build with Clang, add patches [1] - Disable Clang warnings with CFLAGS+=-Wno-return-type - Remove obsolete REINPLACE, changed by upstream - Change do-install, cosmetical changes - Change pkg-descr Reviewed by: tijl@ [1] Thanks to for help: nox@, dim@, Horia Racoviceanu <horia at racoviceanu.com>, frogs <4721 at hushmail.com>
Diffstat (limited to 'games')
-rw-r--r--games/traingame/Makefile37
-rw-r--r--games/traingame/distinfo4
-rw-r--r--games/traingame/files/patch-src__CrossoverTrack.cpp9
-rw-r--r--games/traingame/files/patch-src__SDLWindow.cpp9
-rw-r--r--games/traingame/files/patch-src__StraightTrack.cpp9
-rw-r--r--games/traingame/pkg-descr8
6 files changed, 52 insertions, 24 deletions
diff --git a/games/traingame/Makefile b/games/traingame/Makefile
index 6dd9c23eebc4..eb7e12205079 100644
--- a/games/traingame/Makefile
+++ b/games/traingame/Makefile
@@ -5,10 +5,9 @@ PORTNAME= traingame
PORTVERSION= 0.2.2
PORTREVISION= 4
CATEGORIES= games
-MASTER_SITES= http://www.nickg.me.uk/files/:game \
- SF/nemysisfreebsdp/${CATEGORIES}/:icons
-DISTFILES= TrainGame-${DISTVERSION}${EXTRACT_SUFX}:game \
- ${PORTNAME}_icons.tar.gz:icons
+MASTER_SITES= SF/nemysisfreebsdp/${CATEGORIES}/:icons
+DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \
+ ${PORTNAME}_icons${EXTRACT_SUFX}:icons
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= nemysis@FreeBSD.org
@@ -16,35 +15,37 @@ COMMENT= Game about Trains
LICENSE= GPLv3
+USE_GITHUB= yes
+GH_ACCOUNT= nickg
+GH_PROJECT= traingame
+GH_TAGNAME= ${GH_COMMIT}
+GH_COMMIT= 83abcc9
+
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
libxerces-c.so:${PORTSDIR}/textproc/xerces-c3 \
libboost_filesystem.so:${PORTSDIR}/devel/boost-libs
-WRKSRC= ${WRKDIR}/TrainGame-${PORTVERSION}
+CXXFLAGS+= -std=c++11
-USES= cmake pkgconfig
+USES= cmake compiler:c++11-lib pkgconfig
+USE_CXXSTD= gnu++11
USE_SDL= sdl image
USE_GL= glew
-USE_GCC= yes
+
+LDFLAGS+= -L${LOCALBASE}/lib
+CFLAGS+= -Wno-return-type
PORTDOCS= model_notes.txt models.gnuplot
+OPTIONS_DEFINE= DOCS
INSTALLS_ICONS= yes
ICON_SIZES= 32x32 48x48 64x64 72x72 96x96
-SUB_FILES= ${PORTNAME} \
- ${PORTNAME}-map \
- pkg-message
-
-OPTIONS_DEFINE= DOCS
-
-post-patch:
- @${REINPLACE_CMD} -e 's|shared_ptr|std::shared_ptr|' \
- ${WRKSRC}/src/Mesh.cpp
+SUB_FILES= ${PORTNAME} ${PORTNAME}-map pkg-message
do-install:
-.for d in ${PORTNAME} ${PORTNAME}-map
- ${INSTALL_SCRIPT} ${WRKDIR}/${d} ${STAGEDIR}${PREFIX}/bin/
+.for f in ${PORTNAME} ${PORTNAME}-map
+ ${INSTALL_SCRIPT} ${WRKDIR}/${f} ${STAGEDIR}${PREFIX}/bin/
.endfor
.for d in buildings engines fonts images layouts maps schemas trees waggons
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
diff --git a/games/traingame/distinfo b/games/traingame/distinfo
index 10144044818d..6b9633a0aaab 100644
--- a/games/traingame/distinfo
+++ b/games/traingame/distinfo
@@ -1,4 +1,4 @@
-SHA256 (traingame/TrainGame-0.2.2.tar.gz) = d25fdda2bdfe27543debb64f901911534006538ad5f7dbf40da5622e177436e7
-SIZE (traingame/TrainGame-0.2.2.tar.gz) = 1057361
+SHA256 (traingame/traingame-0.2.2.tar.gz) = 32bba6c133250649e6a6372a0a77cd9144fde7557e2e141c930bf1ae2bf4c695
+SIZE (traingame/traingame-0.2.2.tar.gz) = 1057378
SHA256 (traingame/traingame_icons.tar.gz) = f35937ac4893a4d803888fc2d8d3890a769bda77548a1dc45c09b95738f3dbb7
SIZE (traingame/traingame_icons.tar.gz) = 25088
diff --git a/games/traingame/files/patch-src__CrossoverTrack.cpp b/games/traingame/files/patch-src__CrossoverTrack.cpp
new file mode 100644
index 000000000000..d2dfb833ac0f
--- /dev/null
+++ b/games/traingame/files/patch-src__CrossoverTrack.cpp
@@ -0,0 +1,9 @@
+--- ./src/CrossoverTrack.cpp.orig 2013-12-21 13:18:27.000000000 +0100
++++ ./src/CrossoverTrack.cpp 2014-03-15 19:51:31.988732983 +0100
+@@ -215,5 +215,5 @@
+
+ ITrackSegmentPtr make_crossover_track()
+ {
+- return ITrackSegmentPtr(new CrossoverTrack);
++ return ITrackSegmentPtr(static_cast<ITrackSegment *>(new CrossoverTrack));
+ }
diff --git a/games/traingame/files/patch-src__SDLWindow.cpp b/games/traingame/files/patch-src__SDLWindow.cpp
new file mode 100644
index 000000000000..459ab9057096
--- /dev/null
+++ b/games/traingame/files/patch-src__SDLWindow.cpp
@@ -0,0 +1,9 @@
+--- ./src/SDLWindow.cpp.orig 2013-12-21 13:18:27.000000000 +0100
++++ ./src/SDLWindow.cpp 2014-03-15 19:52:52.290284158 +0100
+@@ -406,5 +406,5 @@
+ // Construct and initialise an OpenGL SDL window
+ IWindowPtr make_sdl_window()
+ {
+- return shared_ptr<IWindow>(new SDLWindow);
++ return shared_ptr<IWindow>(static_cast<IWindow *>(new SDLWindow));
+ }
diff --git a/games/traingame/files/patch-src__StraightTrack.cpp b/games/traingame/files/patch-src__StraightTrack.cpp
new file mode 100644
index 000000000000..88dceb57cb80
--- /dev/null
+++ b/games/traingame/files/patch-src__StraightTrack.cpp
@@ -0,0 +1,9 @@
+--- ./src/StraightTrack.cpp.orig 2013-12-21 13:18:27.000000000 +0100
++++ ./src/StraightTrack.cpp 2014-03-15 19:53:57.938221605 +0100
+@@ -259,5 +259,5 @@
+ throw runtime_error("Illegal straight track direction: "
+ + lexical_cast<string>(a_direction));
+
+- return ITrackSegmentPtr(new StraightTrack(real_dir));
++ return ITrackSegmentPtr(static_cast<ITrackSegment *>(new StraightTrack(real_dir)));
+ }
diff --git a/games/traingame/pkg-descr b/games/traingame/pkg-descr
index c86cf9516099..6317a1391219 100644
--- a/games/traingame/pkg-descr
+++ b/games/traingame/pkg-descr
@@ -1,7 +1,7 @@
-Train Game (working title) is a game about trains! Woo! You control a train
-which you drive around a 3D world picking up cargo, trundle it about,
-and deliver it for PROFIT; whilst avoiding disasters like falling off the rails,
-hitting other trains, bad weather, or privatisation.
+Train Game is a game about trains! Woo! You control a train which you drive
+around a 3D world picking up cargo, trundle it about, and deliver it for PROFIT;
+whilst avoiding disasters like falling off the rails, hitting other trains,
+bad weather, or privatisation.
Imagine Elite but with trains instead of space craft.
Cant believe no ones thought of it before.