Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kajaani-kombat for openSUSE:Factory 
checked in at 2022-04-14 17:25:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kajaani-kombat (Old)
 and      /work/SRC/openSUSE:Factory/.kajaani-kombat.new.1941 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kajaani-kombat"

Thu Apr 14 17:25:23 2022 rev:4 rq:969991 version:0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/kajaani-kombat/kajaani-kombat.changes    
2021-06-12 20:10:37.437197357 +0200
+++ /work/SRC/openSUSE:Factory/.kajaani-kombat.new.1941/kajaani-kombat.changes  
2022-04-14 17:25:56.775297105 +0200
@@ -1,0 +2,7 @@
+Tue Apr 12 10:07:37 UTC 2022 - Dominique Leuenberger <[email protected]>
+
+- Add kajaani-kombat-gcc11.patch: Fix build with gcc11.
+- No longer lock Tumbleweed to use gcc10, but use the distro
+  default compiler. Instead, inject -std=c++14 into CXXFLAGS.
+
+-------------------------------------------------------------------

New:
----
  kajaani-kombat-gcc11.patch

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

Other differences:
------------------
++++++ kajaani-kombat.spec ++++++
--- /var/tmp/diff_new_pack.AoP103/_old  2022-04-14 17:25:57.263297676 +0200
+++ /var/tmp/diff_new_pack.AoP103/_new  2022-04-14 17:25:57.267297680 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kajaani-kombat
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 # Copyright (c) 2019-2021, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -28,13 +28,10 @@
 Source1:        %{name}.desktop
 Source2:        %{name}-fullscreen.desktop
 Patch0:         %{name}-fix-build.patch
+Patch1:         kajaani-kombat-gcc11.patch
 BuildRequires:  ImageMagick
 BuildRequires:  fdupes
-%if 0%{?suse_version} >= 1550
-BuildRequires:  gcc10-c++
-%else
 BuildRequires:  gcc-c++
-%endif
 BuildRequires:  hicolor-icon-theme
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
@@ -66,14 +63,13 @@
 This subpackage includes the server binary.
 
 %prep
-%setup -q
-%patch0 -p1
+%autosetup -p1
 
 %build
+export CXXFLAGS="%{optflags}"
 %if 0%{?suse_version} >= 1550
-export CXX="g++-10"
+export CXXFLAGS="${CXXFLAGS} -std=c++14"
 %endif
-export CXXFLAGS="%{optflags}"
 make all server %{?_smp_mflags}
 
 %install

++++++ kajaani-kombat-gcc11.patch ++++++
These SDL_* return NULL on error, and gcc11/clang won't allow this.
https://bugs.gentoo.org/739086
Index: kajaani-kombat-0.7/client_net.cpp
===================================================================
--- kajaani-kombat-0.7.orig/client_net.cpp
+++ kajaani-kombat-0.7/client_net.cpp
@@ -31,13 +31,13 @@ client_tcpnet::client_tcpnet(IPaddress *
   assert (ret != -1);
 
   cond = SDL_CreateCond();
-  if (cond <0)
+  if (!cond)
     {
       fprintf (stderr, "Error creating cond variable\n");
       exit(2);
     }
   mutex = SDL_CreateMutex();
-  if (mutex < 0)
+  if (!mutex)
     {
       fprintf (stderr, "Error creating mutex\n");
       exit(2);
@@ -45,13 +45,13 @@ client_tcpnet::client_tcpnet(IPaddress *
 
   active = true;
   trans_th = SDL_CreateThread (&client_tcpnet::transf_func, (void *) this);
-  if (trans_th < 0)
+  if (!trans_th)
     {
       fprintf(stderr, "Error starting thread: %s\n", SDL_GetError());
       exit(2);
     }
   input_th = SDL_CreateThread (&client_tcpnet::input_func, (void *) this);
-  if (input_th < 0)
+  if (!input_th)
     {
       fprintf(stderr, "Error starting thread: %s\n", SDL_GetError());
       exit(2);
Index: kajaani-kombat-0.7/game_server.cpp
===================================================================
--- kajaani-kombat-0.7.orig/game_server.cpp
+++ kajaani-kombat-0.7/game_server.cpp
@@ -64,7 +64,7 @@ void game_server::init_net()
   
   // OK, init server thread to listen to clients
   con_th = SDL_CreateThread (&game_server::connection_accepter, (void *) this);
-  if (con_th < 0)
+  if (!con_th)
     {
       fprintf (stderr, "[SRV] Error starting thread: %s\n", SDL_GetError());
       exit(2);

Reply via email to