From 1063b0d2a6802ef14a104a376cf6454fd4f3933b169f842294f6fe6c01935d6b Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Thu, 24 Feb 2022 14:48:49 +0000 Subject: [PATCH] Accepting request 956155 from home:aaronpuchert:branches:games - Add glibc-2.35.patch: Fix build with glibc 2.35. - Use system mozjs on Leap 15.4 as well. OBS-URL: https://build.opensuse.org/request/show/956155 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=115 --- 0ad.changes | 6 ++++++ 0ad.spec | 7 +++++-- glibc-2.35.patch | 13 +++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 glibc-2.35.patch diff --git a/0ad.changes b/0ad.changes index 525a8a4..f8216a0 100644 --- a/0ad.changes +++ b/0ad.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/0ad.spec b/0ad.spec index 40cd48b..72aee7c 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..c620bf2 --- /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 + + //////////////////////////////////////////////////////////////////////////