aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/supertux2/Makefile5
-rw-r--r--games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp24
2 files changed, 27 insertions, 2 deletions
diff --git a/games/supertux2/Makefile b/games/supertux2/Makefile
index 5c409a7e66c4..cfe9ff436b9c 100644
--- a/games/supertux2/Makefile
+++ b/games/supertux2/Makefile
@@ -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 iconv \
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
diff --git a/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp b/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp
new file mode 100644
index 000000000000..eb4b7bb74b93
--- /dev/null
+++ b/games/supertux2/files/patch-external_squirrel_squirrel_sqvm.cpp
@@ -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"