From 3c8db3afa097f6324226443319d3877bce041f84 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 22 Jun 2018 21:29:21 +0000 Subject: [PATCH] - Fix build with clang 6 - Pet portlint - Regenerate patches --- games/linwarrior/Makefile | 6 +++-- games/linwarrior/files/patch-Makefile | 8 +++---- .../files/patch-source_cController.cpp | 22 +++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 games/linwarrior/files/patch-source_cController.cpp diff --git a/games/linwarrior/Makefile b/games/linwarrior/Makefile index 593480ba01f5..1369eb54720f 100644 --- a/games/linwarrior/Makefile +++ b/games/linwarrior/Makefile @@ -16,6 +16,8 @@ USES= gmake openal:al,alut USE_GL= gl glu USE_SDL= sdl +CFLAGS+= -Wno-c++11-narrowing + WRKSRC= ${WRKDIR}/${PORTNAME} PLIST_FILES= bin/${PORTNAME} @@ -29,8 +31,8 @@ DESKTOP_ENTRIES="LinWarrior 3D" \ false post-extract: - @${FIND} ${WRKSRC} -type d -exec chmod a+rx {} \; - @${FIND} ${WRKSRC} -type f -exec chmod a+r {} \; + @${FIND} ${WRKSRC} -type d -exec ${CHMOD} a+rx {} \; + @${FIND} ${WRKSRC} -type f -exec ${CHMOD} a+r {} \; post-patch: @${REINPLACE_CMD} -e '/hash_set/ d' ${WRKSRC}/source/cAlert.h diff --git a/games/linwarrior/files/patch-Makefile b/games/linwarrior/files/patch-Makefile index d2e0356d2c21..1fc2fae0ee15 100644 --- a/games/linwarrior/files/patch-Makefile +++ b/games/linwarrior/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2010-02-05 22:50:30.000000000 +0300 -+++ Makefile 2010-04-04 06:18:24.000000000 +0400 +--- Makefile.orig 2010-02-05 19:50:30 UTC ++++ Makefile @@ -2,7 +2,7 @@ # Makefile with auto-dependency generation @@ -9,7 +9,7 @@ # Automatic searching for source files. # Objects to compile are all sources (cpp) and put the .o below build-dir. -@@ -20,18 +20,17 @@ +@@ -20,18 +20,17 @@ ifneq (,$(findstring Win,$(OS))) LIMITER=$(dir \file) CFLAGS+= -static-libgcc else @@ -30,7 +30,7 @@ # Print warnings when compiling. CFLAGS += -Wall -@@ -40,7 +39,6 @@ +@@ -40,7 +39,6 @@ CFLAGS += -Wall CFLAGS += $(INCLUDES) # Optimizations. diff --git a/games/linwarrior/files/patch-source_cController.cpp b/games/linwarrior/files/patch-source_cController.cpp new file mode 100644 index 000000000000..577f3bd325a7 --- /dev/null +++ b/games/linwarrior/files/patch-source_cController.cpp @@ -0,0 +1,22 @@ +--- source/cController.cpp.orig 2018-06-22 20:39:57 UTC ++++ source/cController.cpp +@@ -182,16 +182,16 @@ void cController::attackEnemy() { + + cObject* target = cWorld::instance->mIndex[entity]; + if (mDevice->inTargetRange() < 0.01) { +- mDevice->do_aimFor(NULL); ++ mDevice->do_aimFor(0); + pop(); + return; + } + if (target == NULL) { // Target disappeared +- mDevice->do_aimFor(NULL); ++ mDevice->do_aimFor(0); + pop(); + return; + } else if (target->hasRole(DEAD)) { +- mDevice->do_aimFor(NULL); ++ mDevice->do_aimFor(0); + pop(); + return; + }