Accepting request 824005 from home:DarkWav
- Disable --with-system-mozjs38 option on systems which lack the mozjs38 package - Include the libmozjs38-ps-release.so binary on systems which lack the mozjs38 package - Require more build dependencies on systems which lack the mozjs38 package - Add 0001-fix-fcollada-error.patch to fix a build failure with gcc10 These are basically the steps required to make this game work on Tumbleweed again. As always, if you got any suggestions or ideas for improvement please tell me. Thanks, DarkWav OBS-URL: https://build.opensuse.org/request/show/824005 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=102
This commit is contained in:
parent
6e0bb1bcd3
commit
e09fca0b15
49
0001-fix-fcollada-error.patch
Normal file
49
0001-fix-fcollada-error.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From: https://src.fedoraproject.org/rpms/0ad/blob/master/f/0ad-fcollada.patch
|
||||
From: Simon Vogl <simon.vogl@gmx.net>
|
||||
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 <class TYPE, int QUAL>
|
||||
- static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& value);
|
||||
+ static xmlNode* AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& 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 <class TYPE, int QUAL>
|
||||
-xmlNode* FArchiveXML::AddPhysicsParameter(xmlNode* parentNode, const char* name, FCDParameterAnimatableT<TYPE,QUAL>& 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;
|
||||
-}
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 2 16:00:41 UTC 2020 - Simon Vogl <simon.vogl@gmx.net>
|
||||
|
||||
- Disable --with-system-mozjs38 option on systems which lack the mozjs38 package
|
||||
- Include the libmozjs38-ps-release.so binary on systems which lack the mozjs38 package
|
||||
- Require more build dependencies on systems which lack the mozjs38 package
|
||||
- Add 0001-fix-fcollada-error.patch to fix a build failure with gcc10
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 20 10:14:09 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
38
0ad.spec
38
0ad.spec
@ -16,7 +16,16 @@
|
||||
#
|
||||
|
||||
|
||||
# Enable system mozjs38 only on openSUSE versions which provide it
|
||||
|
||||
%if 0%{?suse_version} <= 1520
|
||||
%bcond_without enable_system_mozjs38
|
||||
%else
|
||||
%bcond_with enable_system_mozjs38
|
||||
%endif
|
||||
|
||||
# Enable NVTT only on arch supported by nvidia-texture-tools
|
||||
|
||||
%ifarch %{ix86} x86_64 ppc
|
||||
%bcond_without enable_nvtt
|
||||
%else
|
||||
@ -33,6 +42,8 @@ URL: https://play0ad.com/
|
||||
#Source: http://sourceforge.net/projects/zero-ad/files/releases/%{name}-%{version}-alpha-unix-build.tar.xz
|
||||
# SF is repeatedly not up to date. Let's use their site
|
||||
Source: https://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.tar.xz
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0001-fix-fcollada-error.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libXcursor-devel
|
||||
@ -56,7 +67,25 @@ BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libenet)
|
||||
BuildRequires: pkgconfig(libsodium) >= 1.0.13
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
%if %{with enable_system_mozjs38}
|
||||
BuildRequires: pkgconfig(mozjs-38)
|
||||
%else
|
||||
BuildRequires: ca-certificates
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: patterns-devel-perl-devel_perl
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-distribute
|
||||
BuildRequires: python-xml
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: subversion
|
||||
BuildRequires: zip
|
||||
BuildRequires: pkgconfig(libffi)
|
||||
BuildRequires: pkgconfig(nspr)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(openal)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
@ -73,6 +102,7 @@ flexible game engine.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}-alpha
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%ifarch %ix86
|
||||
@ -90,9 +120,11 @@ build/workspaces/update-workspaces.sh \
|
||||
%if %{with enable_nvtt}
|
||||
--with-system-nvtt \
|
||||
%else
|
||||
--without-nvtt \
|
||||
--without-nvtt \
|
||||
%endif
|
||||
%if %{with enable_system_mozjs38}
|
||||
--with-system-mozjs38 \
|
||||
%endif
|
||||
|
||||
pushd build/workspaces/gcc
|
||||
make verbose=1 %{?_smp_mflags}
|
||||
@ -103,7 +135,9 @@ install -Dm 0755 binaries/system/ActorEditor %{buildroot}%{_bindir}/ActorEditor
|
||||
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 enable_system_mozjs38}
|
||||
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
|
||||
install -Dm 0644 build/resources/0ad.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
|
||||
install -Dm 0644 build/resources/0ad.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||
|
Loading…
x
Reference in New Issue
Block a user