Accepting request 944820 from home:simonpuchert
- Make 0ad compatible with Tumbleweed's version of mozjs78: * no-version-check.patch: Disable the minor version check. This is required for a successful build using mozjs78 > 78.6.0. * PrepareZoneForGC.patch: This function got an additional parameter, change its usage accordingly. (boo#1187732) OBS-URL: https://build.opensuse.org/request/show/944820 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=112
This commit is contained in:
parent
0f819dcd81
commit
8b8674daba
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 7 18:34:02 UTC 2022 - Simon Puchert <simonpuchert@alice.de>
|
||||||
|
|
||||||
|
- Make 0ad compatible with Tumbleweed's version of mozjs78:
|
||||||
|
* no-version-check.patch: Disable the minor version check. This
|
||||||
|
is required for a successful build using mozjs78 > 78.6.0.
|
||||||
|
* PrepareZoneForGC.patch: This function got an additional
|
||||||
|
parameter, change its usage accordingly. (boo#1187732)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 29 10:25:25 UTC 2021 - ecsos <ecsos@opensuse.org>
|
Sun Aug 29 10:25:25 UTC 2021 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
12
0ad.spec
12
0ad.spec
@ -40,6 +40,10 @@ URL: https://play0ad.com/
|
|||||||
Source: https://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz
|
Source: https://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-UPSTREAM
|
||||||
Patch0: avoid_duplicate_global_symbol_from_asm.patch
|
Patch0: avoid_duplicate_global_symbol_from_asm.patch
|
||||||
|
# PATCH-FIX-OPENSUSE -- Disable the mozjs version check
|
||||||
|
Patch1: no-version-check.patch
|
||||||
|
# PATCH-FIX-OPENSUSE -- Use the newer variant of this function (related to mozjs78 upgrade)
|
||||||
|
Patch2: PrepareZoneForGC.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libXcursor-devel
|
BuildRequires: libXcursor-devel
|
||||||
@ -72,8 +76,8 @@ BuildRequires: nvidia-texture-tools >= 2.1
|
|||||||
%endif
|
%endif
|
||||||
%if %{with system_mozjs}
|
%if %{with system_mozjs}
|
||||||
#FIXME: Depends on source/scriptinterface/ScriptTypes.h
|
#FIXME: Depends on source/scriptinterface/ScriptTypes.h
|
||||||
BuildRequires: pkgconfig(mozjs-78) < 78.7
|
# This is "fixed" by disabling the version check.
|
||||||
BuildRequires: pkgconfig(mozjs-78) >= 78.6
|
BuildRequires: pkgconfig(mozjs-78) >= 78.7
|
||||||
%else
|
%else
|
||||||
BuildRequires: cargo
|
BuildRequires: cargo
|
||||||
BuildRequires: rust
|
BuildRequires: rust
|
||||||
@ -90,6 +94,10 @@ flexible game engine.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}-alpha
|
%setup -q -n %{name}-%{version}-alpha
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%if %{with system_mozjs}
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
19
PrepareZoneForGC.patch
Normal file
19
PrepareZoneForGC.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff -Nur 0ad-0.0.25b-alpha/source/scriptinterface/ScriptContext.cpp 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptContext.cpp
|
||||||
|
--- 0ad-0.0.25b-alpha/source/scriptinterface/ScriptContext.cpp 2021-07-27 23:56:58.000000000 +0200
|
||||||
|
+++ 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptContext.cpp 2021-12-30 16:58:57.749562521 +0100
|
||||||
|
@@ -143,7 +143,7 @@
|
||||||
|
// Schedule the zone for GC, which will destroy the realm.
|
||||||
|
if (JS::IsIncrementalGCInProgress(m_cx))
|
||||||
|
JS::FinishIncrementalGC(m_cx, JS::GCReason::API);
|
||||||
|
- JS::PrepareZoneForGC(js::GetRealmZone(realm));
|
||||||
|
+ JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
|
||||||
|
m_Realms.remove(realm);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -261,5 +261,5 @@
|
||||||
|
void ScriptContext::PrepareZonesForIncrementalGC() const
|
||||||
|
{
|
||||||
|
for (JS::Realm* const& realm : m_Realms)
|
||||||
|
- JS::PrepareZoneForGC(js::GetRealmZone(realm));
|
||||||
|
+ JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
|
||||||
|
}
|
19
no-version-check.patch
Normal file
19
no-version-check.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff -Nur 0ad-0.0.25b-alpha/source/scriptinterface/ScriptTypes.h 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptTypes.h
|
||||||
|
--- 0ad-0.0.25b-alpha/source/scriptinterface/ScriptTypes.h 2021-07-27 23:56:58.000000000 +0200
|
||||||
|
+++ 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptTypes.h 2021-12-30 17:18:03.719142315 +0100
|
||||||
|
@@ -81,6 +81,7 @@
|
||||||
|
include paths.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
#if MOZJS_MINOR_VERSION != 6
|
||||||
|
#error Your compiler is trying to use an untested minor version of the \
|
||||||
|
SpiderMonkey library. If you are a package maintainer, please make sure \
|
||||||
|
@@ -93,6 +94,7 @@
|
||||||
|
final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). \
|
||||||
|
For more information check this link: trac.wildfiregames.com/wiki/Debugging#Outofsync
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
class ScriptInterface;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user