Hello community,

here is the log from the commit of package openxcom for openSUSE:Factory 
checked in at 2016-06-19 10:50:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openxcom (Old)
 and      /work/SRC/openSUSE:Factory/.openxcom.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openxcom"

Changes:
--------
--- /work/SRC/openSUSE:Factory/openxcom/openxcom.changes        2016-03-29 
10:40:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openxcom.new/openxcom.changes   2016-06-19 
10:50:23.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Jun 17 08:17:08 UTC 2016 - tchva...@suse.com
+
+- Add patch fixing gcc6 build bnc#985174:
+  * openxcom-abs.patch
+
+-------------------------------------------------------------------

New:
----
  openxcom-abs.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openxcom.spec ++++++
--- /var/tmp/diff_new_pack.IbP5ID/_old  2016-06-19 10:50:24.000000000 +0200
+++ /var/tmp/diff_new_pack.IbP5ID/_new  2016-06-19 10:50:24.000000000 +0200
@@ -25,6 +25,8 @@
 Url:            http://openxcom.org/
 # Interesting approach to count downloads http://openxcom.org/file/1726/
 Source:         %{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM: gcc6 compat, taken from git
+Patch0:         openxcom-abs.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  SDL-devel
 BuildRequires:  SDL_gfx-devel >= 2.0.22
@@ -61,6 +63,8 @@
 
 %prep
 %setup -q
+%patch0 -p1
+
 chmod -x LICENSE.txt
 sed -i \
        -e 's:HTML_TIMESTAMP         = YES:HTML_TIMESTAMP         = NO:g' \

++++++ openxcom-abs.patch ++++++
>From 49bec0851fc6e5365cac0f71b2c40a80ddf95e77 Mon Sep 17 00:00:00 2001
From: Louis Delacroix <yoursecretsares...@googlemail.com>
Date: Sun, 16 Nov 2014 20:47:41 +0000
Subject: [PATCH] Fix use of abs() for floating point arguments

---
 src/Battlescape/ProjectileFlyBState.cpp | 2 +-
 src/Geoscape/Globe.cpp                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Battlescape/ProjectileFlyBState.cpp 
b/src/Battlescape/ProjectileFlyBState.cpp
index c890d12..2ea67ae 100644
--- a/src/Battlescape/ProjectileFlyBState.cpp
+++ b/src/Battlescape/ProjectileFlyBState.cpp
@@ -651,7 +651,7 @@ int ProjectileFlyBState::getMaxThrowDistance(int weight, 
int strength, int level
         if (curZ < 0 && dz < 0) //roll back
         {
             dz = std::max(dz, -1.0);
-            if (abs(dz)>1e-10) //rollback horizontal
+            if (std::abs(dz)>1e-10) //rollback horizontal
                 dist -= curZ / dz;
             break;
         }
diff --git a/src/Geoscape/Globe.cpp b/src/Geoscape/Globe.cpp
index e5249ce..1a360dd 100755
--- a/src/Geoscape/Globe.cpp
+++ b/src/Geoscape/Globe.cpp
@@ -1217,12 +1217,12 @@ void Globe::drawVHLine(Surface *surface, double lon1, 
double lat1, double lon2,
 
        if (fabs(sx)<0.01)
        {
-               seg = abs( sy/(2*M_PI)*48 );
+               seg = std::abs(sy/(2*M_PI)*48);
                if (seg == 0) ++seg;
        }
        else
        {
-               seg = abs( sx/(2*M_PI)*96 );
+               seg = std::abs(sx/(2*M_PI)*96);
                if (seg == 0) ++seg;
        }
 

Reply via email to