From b8872bae4c991b74b9b9b229e2477873e442f8cb Mon Sep 17 00:00:00 2001
From: dstoecker <>
Date: Feb 24 2022 18:33:34 +0000
Subject: Update 0ad to version 0.0.25b / rev 2 via SR 957395
https://build.opensuse.org/request/show/957395
by user dstoecker + dimstar_suse
---
diff --git a/.files b/.files
index 5cb9584..52e9173 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index eb3fdfc..0a878ed 100644
--- a/.rev
+++ b/.rev
@@ -7,4 +7,12 @@
Has been patched to build with Factory's mozjs78 and the Python 2 dependency was removed.
946235
+
+ 44a4f7b7a61e6fb572aba6efbe038e50
+ 0.0.25b
+
+ dimstar_suse
+
+ 957395
+
diff --git a/0ad.changes b/0ad.changes
index 815d128..8a571b0 100644
--- a/0ad.changes
+++ b/0ad.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Sun Feb 20 14:52:56 UTC 2022 - Aaron Puchert
+
+- Add glibc-2.35.patch: Fix build with glibc 2.35.
+- Use system mozjs on Leap 15.4 as well.
+
+-------------------------------------------------------------------
Tue Jan 11 19:34:38 UTC 2022 - Simon Puchert
- Get rid of Python 2 dependency.
diff --git a/0ad.spec b/0ad.spec
index 34d0418..4f7a21b 100644
--- a/0ad.spec
+++ b/0ad.spec
@@ -22,8 +22,8 @@
%else
%bcond_with nvtt
%endif
-#
-%if 0%{?suse_version} >= 1550
+# We can use the system mozjs on Tumbleweed and Leap 15.4.
+%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
%bcond_without system_mozjs
%else
%bcond_with system_mozjs
@@ -44,6 +44,8 @@ Patch0: avoid_duplicate_global_symbol_from_asm.patch
Patch1: no-version-check.patch
# PATCH-FIX-OPENSUSE -- Use the newer variant of this function (related to mozjs78 upgrade)
Patch2: PrepareZoneForGC.patch
+# PATCH-FIX-UPSTREAM -- Don't define M_PIf if glibc already provides it
+Patch3: glibc-2.35.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libXcursor-devel
@@ -93,6 +95,7 @@ flexible game engine.
%prep
%setup -q -n %{name}-%{version}-alpha
%patch0 -p1
+%patch3 -p1
%if %{with system_mozjs}
%patch1 -p1
%patch2 -p1
diff --git a/glibc-2.35.patch b/glibc-2.35.patch
new file mode 100644
index 0000000..6d5b101
--- /dev/null
+++ b/glibc-2.35.patch
@@ -0,0 +1,13 @@
+diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp
+index d4796ec..d0e8c9a 100644
+--- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp
++++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp
+@@ -29,7 +29,9 @@ using AtlasMessage::Shareable;
+
+ static Observable g_EnvironmentSettings;
+
++#ifndef M_PIf
+ const float M_PIf = 3.14159265f;
++#endif
+
+ //////////////////////////////////////////////////////////////////////////