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)
This commit is contained in:
parent
51e3ac26ce
commit
a00a8803a0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=465107
@ -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
|
||||
|
@ -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"
|
Loading…
Reference in New Issue
Block a user