Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2020 20:24:19 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r522058 - branches/2020Q1/games/glest/files
Message-ID:  <202001042024.004KOJVQ069646@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Sat Jan  4 20:24:19 2020
New Revision: 522058
URL: https://svnweb.freebsd.org/changeset/ports/522058

Log:
  MFH: r522057
  
  games/glest: fix build on GCC architectures
  
  Building with GCC fails:
  ./mk/linux/glest_game/ai/ai_rule.cpp: In member function 'virtual bool Glest::Game::AiRuleMassiveAttack::test()':
  ./mk/linux/glest_game/ai/ai_rule.cpp:156:46: error: 'INT_MAX' was not declared in this scope
    156 |   return ai->beingAttacked(attackPos, field, INT_MAX);
        |                                              ^~~~~~~
  ./mk/linux/glest_game/ai/ai_rule.cpp:19:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
     18 | #include "leak_dumper.h"
    +++ |+#include <climits>
     19 |
  ./mk/linux/glest_game/ai/ai_rule.cpp: In member function 'virtual bool Glest::Game::AiRuleExpand::test()':
  ./mk/linux/glest_game/ai/ai_rule.cpp:815:22: error: 'INT_MAX' was not declared in this scope
    815 |     int minDistance= INT_MAX;
        |                      ^~~~~~~
  ./mk/linux/glest_game/ai/ai_rule.cpp:815:22: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
  ...failed C++ ./build/powerpc64-portbld-freebsd12.1/optimize/glest_game/ai/ai_rule.o ...
  
  Include climits in ai_rule.cpp to fix it.
  
  PR:		242766
  Approved by:	mmokhi (maintainer timeout)
  Approved by:	portmgr (fix build blanket)

Added:
  branches/2020Q1/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp
     - copied unchanged from r522057, head/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp
Modified:
Directory Properties:
  branches/2020Q1/   (props changed)

Copied: branches/2020Q1/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp (from r522057, head/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q1/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp	Sat Jan  4 20:24:19 2020	(r522058, copy of r522057, head/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp)
@@ -0,0 +1,10 @@
+--- source/glest_game/ai/ai_rule.cpp.orig	2019-12-21 13:33:29 UTC
++++ source/glest_game/ai/ai_rule.cpp
+@@ -16,6 +16,7 @@
+ #include "ai_interface.h"
+ #include "unit.h"
+ #include "leak_dumper.h"
++#include <climits>
+ 
+ using Shared::Graphics::Vec2i;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001042024.004KOJVQ069646>