Accepting request 882671 from home:susnux:branches:games
Fixed build on Factory + update. OBS-URL: https://build.opensuse.org/request/show/882671 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=104
This commit is contained in:
committed by
Git OBS Bridge
parent
2abad13022
commit
8100bceca9
64
0ad.spec
64
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
|
||||
|
Reference in New Issue
Block a user