Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2018 08:12:06 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475510 - in head/games/simutrans: . files
Message-ID:  <201807280812.w6S8C6Ys045984@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Jul 28 08:12:06 2018
New Revision: 475510
URL: https://svnweb.freebsd.org/changeset/ports/475510

Log:
  games/simutrans: Fix build with Clang 6
  
  gui/simwin.cc:503:11: error: case value evaluates to -1, which cannot be narrowed to type 'uint32' (aka 'unsigned int') [-Wc++11-narrowing]
                                          case magic_none: return;
                                               ^
  
  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475044_s336572/logs/simutrans-120.2.2.log
  
  - While here apply dos2unix and fix patch line endings

Added:
  head/games/simutrans/files/patch-squirrel_sq__extensions.cc   (contents, props changed)
Modified:
  head/games/simutrans/Makefile
  head/games/simutrans/files/patch-gui_loadsave__frame.h   (contents, props changed)
  head/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc   (contents, props changed)

Modified: head/games/simutrans/Makefile
==============================================================================
--- head/games/simutrans/Makefile	Sat Jul 28 07:51:21 2018	(r475509)
+++ head/games/simutrans/Makefile	Sat Jul 28 08:12:06 2018	(r475510)
@@ -37,9 +37,12 @@ MAKE_ARGS=	BACKEND=mixer_sdl \
 		FLAGS="-DUSE_C -DREVISION=${SIMUTRANS_REVISION}" \
 		VERBOSE=1
 NO_WRKSUBDIR=	yes
-USES=		gmake zip
+USES=		compiler dos2unix gmake 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=	*

Modified: head/games/simutrans/files/patch-gui_loadsave__frame.h
==============================================================================
--- head/games/simutrans/files/patch-gui_loadsave__frame.h	Sat Jul 28 07:51:21 2018	(r475509)
+++ head/games/simutrans/files/patch-gui_loadsave__frame.h	Sat Jul 28 08:12:06 2018	(r475510)
@@ -1,10 +1,10 @@
---- 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;
+--- 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;

Added: head/games/simutrans/files/patch-squirrel_sq__extensions.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/simutrans/files/patch-squirrel_sq__extensions.cc	Sat Jul 28 08:12:06 2018	(r475510)
@@ -0,0 +1,27 @@
+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 {

Modified: head/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc
==============================================================================
--- head/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc	Sat Jul 28 07:51:21 2018	(r475509)
+++ head/games/simutrans/files/patch-squirrel_squirrel_sqvm.cc	Sat Jul 28 08:12:06 2018	(r475510)
@@ -1,12 +1,12 @@
---- 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"
+--- 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807280812.w6S8C6Ys045984>