summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-12-23 22:02:58 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-12-23 22:02:58 +0000
commit2219c49d94ae7a1faa23b1869865869776ac0903 (patch)
tree3296186bcbe78e0025df8ffa1b137d8bcce8faea
parentgames/hitori: fix build on GCC architectures (diff)
games/stratagus: fix build on GCC architectures
-Wno-c++11-narrowing is only for clang. gcc needs -Wno-error: In file included from /wrkdirs/usr/ports/games/stratagus/work/stratagus-2.4.2/src/include/video.h:46, from /wrkdirs/usr/ports/games/stratagus/work/stratagus-2.4.2/src/action/action_attack.cpp:60: /usr/local/include/SDL/SDL_opengl.h:116: error: "GL_GLEXT_VERSION" redefined [-Werror] 116 | #define GL_GLEXT_VERSION 29 |
Notes
Notes: svn path=/head/; revision=559035
-rw-r--r--games/stratagus/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/games/stratagus/Makefile b/games/stratagus/Makefile
index e21e4119e724..609c2a0780ef 100644
--- a/games/stratagus/Makefile
+++ b/games/stratagus/Makefile
@@ -27,8 +27,6 @@ CMAKE_ARGS= -DGAMEDIR:STRING="bin" \
-DTOLUA++_LIBRARY:STRING="${LUA_LIBDIR}/libtolua++.so"
CMAKE_ON= ENABLE_DEV
-CXXFLAGS+= -Wno-c++11-narrowing
-
PORTDOCS= *
OPTIONS_DEFINE= MIKMOD MNG THEORA VORBIS X11 FLUIDSYNTH DOCS
@@ -67,4 +65,12 @@ post-install-DOCS-on:
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} "[a-z]*.html *.txt graphics scripts" \
${STAGEDIR}${DOCSDIR}
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == clang
+CXXFLAGS+= -Wno-c++11-narrowing
+.else
+CXXFLAGS+= -Wno-error
+.endif
+
+.include <bsd.port.post.mk>