Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2018 19:07:35 +0000 (UTC)
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r465107 - in head/games/supertux2: . files
Message-ID:  <201803201907.w2KJ7ZAr096532@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adridg
Date: Tue Mar 20 19:07:35 2018
New Revision: 465107
URL: https://svnweb.freebsd.org/changeset/ports/465107

Log:
  Fix games/supertux2 build (noticed in CMake update, although this is
  unrelated). The explanation is in the patch: C++ code that #defines type
  is asking for trouble in other headers.
  
  Approved by:	tcberner (mentor, implicit)

Added:
  head/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp   (contents, props changed)
Modified:
  head/games/supertux2/Makefile

Modified: head/games/supertux2/Makefile
==============================================================================
--- head/games/supertux2/Makefile	Tue Mar 20 18:42:37 2018	(r465106)
+++ head/games/supertux2/Makefile	Tue Mar 20 19:07:35 2018	(r465107)
@@ -2,7 +2,7 @@
 
 PORTNAME=	supertux
 PORTVERSION=	0.4.0
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	games
 MASTER_SITES=	https://github.com/SuperTux/supertux/releases/download/v${PORTVERSION}/
 PKGNAMESUFFIX=	2
@@ -25,7 +25,8 @@ USES=		cmake:outsource compiler:c++11-lib dos2unix ico
 CFLAGS+=	-D_GLIBCXX_USE_C99
 CMAKE_ARGS=	-DINSTALL_SUBDIR_BIN=bin \
 		-DBUILD_SHARED_LIBS=off
-DOS2UNIX_FILES=	external/squirrel/CMakeLists.txt
+DOS2UNIX_FILES=	external/squirrel/CMakeLists.txt \
+		external/squirrel/squirrel/sqvm.cpp
 DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
 
 OPTIONS_DEFINE=	DOCS

Added: head/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp	Tue Mar 20 19:07:35 2018	(r465107)
@@ -0,0 +1,24 @@
+The squirrel headers #define type , which plays havoc with
+other headers that use type as a variable name or structure member.
+Move other headers before the offending squirrel header.
+
+In file included from /usr/include/c++/v1/math.h:310:
+/usr/include/c++/v1/limits:232:90: error: member reference base type 'int' is not a structure or union
+    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
+                                                                                         ^~~~~~~
+/wrkdirs/usr/ports/games/supertux2/work/supertux-0.4.0/external/squirrel/squirrel/sqobject.h:131:25: note: expanded from macro 'type'
+#define type(obj) ((obj)._type)
+
+
+--- external/squirrel/squirrel/sqvm.cpp.orig	2018-03-20 18:48:11.028369000 +0000
++++ external/squirrel/squirrel/sqvm.cpp	2018-03-20 18:48:32.059836000 +0000
+@@ -1,8 +1,8 @@
+ /*
+ 	see copyright notice in squirrel.h
+ */
+-#include "sqpcheader.h"
+ #include <math.h>
++#include "sqpcheader.h"
+ #include <stdlib.h>
+ #include "sqopcodes.h"
+ #include "sqvm.h"



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