aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-07-30 19:05:18 +0800
committertobik <tobik@FreeBSD.org>2018-07-30 19:05:18 +0800
commit7fd66924212d82a03a238151682a01d7371b99c6 (patch)
tree05d026c8a6c3f0057668c40e99d9177fe3474640 /games
parentf509f8f3869dce7e923ea7584204e96b01617430 (diff)
downloadfreebsd-ports-gnome-7fd66924212d82a03a238151682a01d7371b99c6.tar.gz
freebsd-ports-gnome-7fd66924212d82a03a238151682a01d7371b99c6.tar.zst
freebsd-ports-gnome-7fd66924212d82a03a238151682a01d7371b99c6.zip
games/warmux: Fix build with Clang 6
interface/weapon_menu.cpp:394:12: error: cannot initialize return object of type 'Weapon *' with an rvalue of type 'bool' return false; ^~~~~ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475478_s336801/logs/errors/warmux-11.04.1_9.log map/tile.cpp:676:30: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] SynchTileInfo info = { i, t->GetSynchsum() }; ^
Diffstat (limited to 'games')
-rw-r--r--games/warmux/Makefile5
-rw-r--r--games/warmux/files/patch-src_interface_weapon__menu.cpp15
2 files changed, 19 insertions, 1 deletions
diff --git a/games/warmux/Makefile b/games/warmux/Makefile
index 342677d0fb2f..e344396e43e5 100644
--- a/games/warmux/Makefile
+++ b/games/warmux/Makefile
@@ -19,10 +19,13 @@ LIB_DEPENDS= libxml++-2.6.so:textproc/libxml++26 \
GNU_CONFIGURE= yes
CONFIGURE_ENV= cxx_present=yes
-USES= dos2unix gmake pkgconfig tar:bzip2
+USES= compiler dos2unix gmake pkgconfig tar:bzip2
USE_SDL= sdl image mixer ttf gfx net
DOS2UNIX_GLOB= fixed_class.h
+# build ignores CXXFLAGS
+CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
+CFLAGS_clang= -Wno-c++11-narrowing
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}
OPTIONS_DEFINE= FRIBIDI SERVER NLS DEBUG
diff --git a/games/warmux/files/patch-src_interface_weapon__menu.cpp b/games/warmux/files/patch-src_interface_weapon__menu.cpp
new file mode 100644
index 000000000000..b8b44fd7bdbb
--- /dev/null
+++ b/games/warmux/files/patch-src_interface_weapon__menu.cpp
@@ -0,0 +1,15 @@
+interface/weapon_menu.cpp:394:12: error: cannot initialize return object of type 'Weapon *' with an rvalue of type 'bool'
+ return false;
+ ^~~~~
+
+--- src/interface/weapon_menu.cpp.orig 2018-07-30 10:50:34 UTC
++++ src/interface/weapon_menu.cpp
+@@ -391,7 +391,7 @@ void WeaponsMenu::Draw()
+ Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly)
+ {
+ if (!show)
+- return false;
++ return NULL;
+ const std::vector<PolygonItem *>& items = poly->GetItem();
+ WeaponMenuItem * tmp;
+ Interface::GetInstance()->SetCurrentOverflyWeapon(NULL);