diff --git a/0001-Fix-ODR-violation-for-ShaderModelRendererInternals.patch b/0001-Fix-ODR-violation-for-ShaderModelRendererInternals.patch deleted file mode 100644 index f18face..0000000 --- a/0001-Fix-ODR-violation-for-ShaderModelRendererInternals.patch +++ /dev/null @@ -1,89 +0,0 @@ -From d5ac9cf91b3e7e6c48c7baf961ebf78fad446a21 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Mon, 3 Aug 2020 11:00:17 +0200 -Subject: [PATCH] Fix ODR violation for ShaderModelRendererInternals - -ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp -and once by HWLightingModelRenderer.cpp. Having both in the global -namespace is a violation of the C++ One-Definition-Rule. - -Move both definitions into their "parent" classes. ---- - source/renderer/HWLightingModelRenderer.cpp | 2 +- - source/renderer/HWLightingModelRenderer.h | 3 +-- - source/renderer/ModelRenderer.cpp | 2 +- - source/renderer/ModelRenderer.h | 4 +--- - 4 files changed, 4 insertions(+), 7 deletions(-) - -diff --git a/source/renderer/HWLightingModelRenderer.cpp b/source/renderer/HWLightingModelRenderer.cpp -index 97cb45c..66c83b0 100644 ---- a/source/renderer/HWLightingModelRenderer.cpp -+++ b/source/renderer/HWLightingModelRenderer.cpp -@@ -96,7 +96,7 @@ struct ShaderModel : public CModelRData - }; - - --struct ShaderModelRendererInternals -+struct ShaderModelVertexRenderer::ShaderModelRendererInternals - { - bool cpuLighting; - -diff --git a/source/renderer/HWLightingModelRenderer.h b/source/renderer/HWLightingModelRenderer.h -index cd89f45..0b99c5d 100644 ---- a/source/renderer/HWLightingModelRenderer.h -+++ b/source/renderer/HWLightingModelRenderer.h -@@ -25,8 +25,6 @@ - - #include "renderer/ModelVertexRenderer.h" - --struct ShaderModelRendererInternals; -- - /** - * Render animated models using a ShaderRenderModifier. - * This computes and binds per-vertex data; the modifier is responsible -@@ -48,6 +46,7 @@ public: - void RenderModel(const CShaderProgramPtr& shader, int streamflags, CModel* model, CModelRData* data); - - protected: -+ struct ShaderModelRendererInternals; - ShaderModelRendererInternals* m; - }; - -diff --git a/source/renderer/ModelRenderer.cpp b/source/renderer/ModelRenderer.cpp -index 49a86e4..037ce6b 100644 ---- a/source/renderer/ModelRenderer.cpp -+++ b/source/renderer/ModelRenderer.cpp -@@ -203,7 +203,7 @@ void ModelRenderer::BuildIndices( - * Separated into the source file to increase implementation hiding (and to - * avoid some causes of recompiles). - */ --struct ShaderModelRendererInternals -+struct ShaderModelRenderer::ShaderModelRendererInternals - { - ShaderModelRendererInternals(ShaderModelRenderer* r) : m_Renderer(r) { } - -diff --git a/source/renderer/ModelRenderer.h b/source/renderer/ModelRenderer.h -index eff1b63..a3c7ecd 100644 ---- a/source/renderer/ModelRenderer.h -+++ b/source/renderer/ModelRenderer.h -@@ -245,9 +245,6 @@ public: - static void GenTangents(const CModelDefPtr& mdef, std::vector& newVertices, bool gpuSkinning); - }; - -- --struct ShaderModelRendererInternals; -- - /** - * Implementation of ModelRenderer that loads the appropriate shaders for - * rendering each model, and that batches by shader (and by mesh and texture). -@@ -270,6 +267,7 @@ public: - virtual void Render(const RenderModifierPtr& modifier, const CShaderDefines& context, int cullGroup, int flags); - - private: -+ struct ShaderModelRendererInternals; - ShaderModelRendererInternals* m; - }; - --- -2.27.0 - diff --git a/0001-fix-fcollada-error.patch b/0001-fix-fcollada-error.patch deleted file mode 100644 index 645a00c..0000000 --- a/0001-fix-fcollada-error.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: https://src.fedoraproject.org/rpms/0ad/blob/master/f/0ad-fcollada.patch -From: Simon Vogl -Date: Sat, 1 Aug 2020 11:28:41 UTC -Subject: [PATCH] Fix compilation failure of 0ad on openSUSE Tumbleweed -Due to a bug in fcollada, this patch is required for 0ad to compile with GCC10. -It is already merged upstream and can safely be deleted for 0ad versions greater than 0.0.23b. -Thanks to pcpa from Fedora for this patch. - -diff -up 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h.orig 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h ---- 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h.orig 2020-03-30 16:28:20.011982827 -0300 -+++ 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.h 2020-03-31 11:43:27.669098382 -0300 -@@ -553,7 +553,16 @@ public: - - static void WritePhysicsRigidBodyParameters(FCDPhysicsRigidBodyParameters* physicsRigidBodyParameters, xmlNode* techniqueNode); - template -- static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT& value); -+ static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT& value) { -+ xmlNode* paramNode = AddChild(parentNode, name); -+ AddContent(paramNode, FUStringConversion::ToString((TYPE&) value)); -+ if (value.IsAnimated()) -+ { -+ const FCDAnimated* animated = value.GetAnimated(); -+ FArchiveXML::WriteAnimatedValue(animated, paramNode, name); -+ } -+ return paramNode; -+ } - - - // -diff -up 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp.orig 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp ---- 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp.orig 2008-09-07 19:13:25.000000000 -0300 -+++ 0ad-0.0.23b-alpha/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FAXPhysicsExport.cpp 2020-03-31 11:43:24.577115067 -0300 -@@ -329,16 +329,3 @@ void FArchiveXML::WritePhysicsRigidBodyP - FArchiveXML::LetWriteObject(physicsRigidBodyParameters->GetPhysicsShape(i), techniqueNode); - } - } -- --template --xmlNode* FArchiveXML::AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT& value) --{ -- xmlNode* paramNode = AddChild(parentNode, name); -- AddContent(paramNode, FUStringConversion::ToString((TYPE&) value)); -- if (value.IsAnimated()) -- { -- const FCDAnimated* animated = value.GetAnimated(); -- FArchiveXML::WriteAnimatedValue(animated, paramNode, name); -- } -- return paramNode; --} diff --git a/0ad-0.0.23b-alpha-unix-build.tar.xz b/0ad-0.0.23b-alpha-unix-build.tar.xz deleted file mode 100644 index 25095af..0000000 --- a/0ad-0.0.23b-alpha-unix-build.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01bff7641ee08cac896c54d518d7e4b01752513105558f212e3199d747512a37 -size 31922812 diff --git a/0ad-0.0.24b-alpha-unix-build.tar.xz b/0ad-0.0.24b-alpha-unix-build.tar.xz new file mode 100644 index 0000000..66c0aa7 --- /dev/null +++ b/0ad-0.0.24b-alpha-unix-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:325c23c9b6bfc16eb636af6a7a7bdaadbf19214b6eed0422d74cc0090bf137a8 +size 75546740 diff --git a/0ad.changes b/0ad.changes index 9c6308b..92562d4 100644 --- a/0ad.changes +++ b/0ad.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Mar 9 23:04:45 UTC 2021 - Ferdinand Thiessen + +- Update to version 0.0.24b: + * See https://play0ad.com/new-release-0-a-d-alpha-24-xsayarsa/ + * Added upstream mozjs-rust_1_50.patch for Factory +- Dropped upstream merged patches: + * 0001-fix-fcollada-error.patch + * 0001-Fix-ODR-violation-for-ShaderModelRendererInternals.patch + ------------------------------------------------------------------- Mon Aug 3 08:24:07 UTC 2020 - Stefan Brüns diff --git a/0ad.spec b/0ad.spec index fccdd40..f52b596 100644 --- a/0ad.spec +++ b/0ad.spec @@ -1,7 +1,7 @@ # # spec file for package 0ad # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,24 +16,15 @@ # -# Enable system mozjs38 only on openSUSE versions which still provide it - %if 0%{?suse_version} >= 1550 -%bcond_with system_mozjs -%else +%bcond_without system_nvtt %bcond_without system_mozjs -%endif - -# Enable NVTT only on arch supported by nvidia-texture-tools - -%ifarch %{ix86} x86_64 ppc -%bcond_without enable_nvtt %else -%bcond_with enable_nvtt +%bcond_with system_nvtt +%bcond_with system_mozjs %endif - Name: 0ad -Version: 0.0.23b +Version: 0.0.24b Release: 0 Summary: A real-time strategy game of ancient warfare License: GPL-2.0-or-later AND LGPL-3.0-or-later AND CC-BY-SA-3.0 AND MIT AND ISC AND MPL-2.0 AND BSD-3-Clause @@ -42,10 +33,8 @@ URL: https://play0ad.com/ Source: https://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz # PATCH-FIX-UPSTREAM Patch0: avoid_duplicate_global_symbol_from_asm.patch -# PATCH-FIX-UPSTREAM -- https://trac.wildfiregames.com/changeset/23794/?format=diff -Patch1: 0001-fix-fcollada-error.patch -# PATCH-FIX-UPSTREAM -Patch2: 0001-Fix-ODR-violation-for-ShaderModelRendererInternals.patch +# PATCH-FIX-UPSTREAM mozjs-rust_1_50.patch -- https://code.wildfiregames.com/D3590 +Patch1: mozjs-rust_1_50.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libXcursor-devel @@ -54,31 +43,36 @@ BuildRequires: libboost_system-devel BuildRequires: libjpeg-devel BuildRequires: libminiupnpc-devel BuildRequires: libpng-devel -%if %{with enable_nvtt} -BuildRequires: nvidia-texture-tools -%endif BuildRequires: pkgconfig BuildRequires: python BuildRequires: update-desktop-files -BuildRequires: wxWidgets-3_0-devel +BuildRequires: wxWidgets-3_0-nostl-devel BuildRequires: pkgconfig(IL) +BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(gloox) +BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libenet) +BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libsodium) >= 1.0.13 BuildRequires: pkgconfig(libxml-2.0) -%if %{with system_mozjs} -BuildRequires: pkgconfig(mozjs-38) -%else -BuildRequires: python2-xml -BuildRequires: pkgconfig(nspr) -%endif BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(zlib) Requires: 0ad-data = %{version} +%if %{with system_nvtt} +BuildRequires: nvidia-texture-tools >= 2.1 +%endif +%if %{with system_mozjs} +#FIXME: Depends on source/scriptinterface/ScriptTypes.h +BuildRequires: pkgconfig(mozjs-78) >= 78.6 +BuildRequires: pkgconfig(mozjs-78) < 78.7 +%else +BuildRequires: cargo +BuildRequires: rust +%endif %description 0 A.D. (pronounced "zero ey-dee") is a real-time strategy (RTS) game @@ -92,7 +86,6 @@ flexible game engine. %setup -q -n %{name}-%{version}-alpha %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build export CFLAGS="%{optflags}" @@ -104,17 +97,20 @@ build/workspaces/update-workspaces.sh \ --bindir=%{_bindir} \ --datadir=%{_datadir}/%{name} \ --libdir=%{_libdir}/%{name} \ -%if %{with enable_nvtt} +%if %{with system_nvtt} --with-system-nvtt \ -%else +%endif +%ifnarch %{ix86} x86_64 ppc --without-nvtt \ %endif %if %{with system_mozjs} - --with-system-mozjs38 \ + --with-system-mozjs +%else +export CARGO_PROFILE_RELEASE_LTO=true %endif pushd build/workspaces/gcc -make verbose=1 %{?_smp_mflags} +%make_build verbose=1 popd %install @@ -123,7 +119,7 @@ install -Dm 0755 binaries/system/pyrogenesis %{buildroot}%{_bindir}/pyrogenesis install -Dm 0755 binaries/system/libCollada.so %{buildroot}%{_libdir}/%{name}/libCollada.so install -Dm 0755 binaries/system/libAtlasUI.so %{buildroot}%{_libdir}/%{name}/libAtlasUI.so %if %{without system_mozjs} -install -Dm 0755 binaries/system/libmozjs38-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs38-ps-release.so +#install -Dm 0755 binaries/system/libmozjs38-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs38-ps-release.so %endif install -Dm 0644 build/resources/0ad.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop diff --git a/_constraints b/_constraints index a141008..2fd66ea 100644 --- a/_constraints +++ b/_constraints @@ -2,10 +2,10 @@ - 6 + 10 - 3500 + 5 diff --git a/mozjs-rust_1_50.patch b/mozjs-rust_1_50.patch new file mode 100644 index 0000000..ced3d76 --- /dev/null +++ b/mozjs-rust_1_50.patch @@ -0,0 +1,98 @@ +diff -Nur 0ad-0.0.24b-alpha/libraries/source/spidermonkey/build.sh new/libraries/source/spidermonkey/build.sh +--- 0ad-0.0.24b-alpha/libraries/source/spidermonkey/build.sh 2021-02-06 01:28:31.000000000 +0100 ++++ new/libraries/source/spidermonkey/build.sh 2021-04-02 04:25:01.998648215 +0200 +@@ -33,7 +33,10 @@ + + # Standalone SpiderMonkey can not use jemalloc (see https://bugzilla.mozilla.org/show_bug.cgi?id=1465038) + # Jitspew doesn't compile on VS17 in the zydis disassembler - since we don't use it, deactivate it. +-CONF_OPTS="--disable-tests ++CONF_OPTS="--enable-lto ++ --disable-crashreporter ++ --disable-tests ++ --disable-strip + --disable-jemalloc + --disable-js-shell + --without-intl-api +diff -Nur 0ad-0.0.24b-alpha/libraries/source/spidermonkey/FixRust150.diff new/libraries/source/spidermonkey/FixRust150.diff +--- 0ad-0.0.24b-alpha/libraries/source/spidermonkey/FixRust150.diff 1970-01-01 01:00:00.000000000 +0100 ++++ new/libraries/source/spidermonkey/FixRust150.diff 2021-04-02 04:24:29.626357684 +0200 +@@ -0,0 +1,65 @@ ++ ++# HG changeset patch ++# User Emilio Cobos Álvarez ++# Date 1609006565 0 ++# Node ID 0e8f444683cb9c4079d3b2250f32f986043ea582 ++# Parent 55097a5cf353f1b2a2228820bdf26bb69a1372a0 ++Bug 1684261 - Fix build with rust nightly. r=jrmuizel, a=RyanVM ++ ++Fixes errors like: ++ ++ dependency (nix) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed. ++ ++I've left the most specific dependency, but for wgpu the rev is not ++right, so I've kept the branch which effectively preserves behavior. ++ ++Differential Revision: https://phabricator.services.mozilla.com/D100485 ++ ++diff --git a/.cargo/config.in b/.cargo/config.in ++--- a/.cargo/config.in +++++ b/.cargo/config.in ++@@ -1,16 +1,16 @@ ++ # This file contains vendoring instructions for cargo. ++ # It was generated by `mach vendor rust`. ++ # Please do not edit. ++ ++ [source."https://github.com/shravanrn/nix/"] ++-branch = "r0.13.1" ++ git = "https://github.com/shravanrn/nix/" ++ replace-with = "vendored-sources" +++rev = "4af6c367603869a30fddb5ffb0aba2b9477ba92e" ++ ++ [source."https://github.com/mozilla/rkv"] ++ git = "https://github.com/mozilla/rkv" ++ replace-with = "vendored-sources" ++ rev = "e3c3388e6632cf55e08d773b32e58b1cab9b2731" ++ ++ [source."https://github.com/mozilla/neqo"] ++ git = "https://github.com/mozilla/neqo" ++diff --git a/Cargo.lock b/Cargo.lock ++--- a/Cargo.lock +++++ b/Cargo.lock ++@@ -3200,7 +3200,7 @@ ++ [[package]] ++ name = "nix" ++ version = "0.13.1" ++-source = "git+https://github.com/shravanrn/nix/?branch=r0.13.1#4af6c367603869a30fddb5ffb0aba2b9477ba92e" +++source = "git+https://github.com/shravanrn/nix/?rev=4af6c367603869a30fddb5ffb0aba2b9477ba92e#4af6c367603869a30fddb5ffb0aba2b9477ba92e" ++ dependencies = [ ++ "bitflags", ++ "cc", ++diff --git a/Cargo.toml b/Cargo.toml ++--- a/Cargo.toml +++++ b/Cargo.toml ++@@ -60,8 +60,8 @@ ++ [patch.crates-io] ++ packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="3541e3818fdc7c2a24f87e3459151a4ce955a67a" } ++ rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="d510da5999a744c563b0acd18056069d1698273f" } ++-nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } ++-spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3", rev = "20191ad2f370afd6d247edcb9ff9da32d3bedb9c" } +++nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } +++spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3" } ++ # failure's backtrace feature might break our builds, see bug 1608157. ++ failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } ++ failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } ++ +diff -Nur 0ad-0.0.24b-alpha/libraries/source/spidermonkey/patch.sh new/libraries/source/spidermonkey/patch.sh +--- 0ad-0.0.24b-alpha/libraries/source/spidermonkey/patch.sh 2021-02-06 01:28:31.000000000 +0100 ++++ new/libraries/source/spidermonkey/patch.sh 2021-04-02 04:24:29.626357684 +0200 +@@ -39,6 +39,10 @@ + # https://bugzilla.mozilla.org/show_bug.cgi?id=1536491 + patch -p1 < ../FixRpiUnalignedFpAccess.diff + ++# Bug 1684261 upstreamed from 78.8: https://hg.mozilla.org/releases/mozilla-esr78/rev/0e8f444683cb ++# Note that this isn't quite the upstream patch to match our version. ++patch -p1 < ../FixRust150.diff ++ + # Patch those separately, as they might interfere with normal behaviour. + if [ "$(uname -s)" = "FreeBSD" ]; + then