|
|
8529cf |
#
|
|
|
8529cf |
# spec file for package citra
|
|
|
8529cf |
#
|
|
|
d00b81 |
# Copyright (c) 2021 SUSE LLC
|
|
|
8529cf |
# Copyright (c) 2017–2019 Markus S. <kamikazow@opensuse.org>
|
|
|
8529cf |
#
|
|
|
8529cf |
# All modifications and additions to the file contributed by third parties
|
|
|
8529cf |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
8529cf |
# upon. The license for this file, and modifications and additions to the
|
|
|
8529cf |
# file, is the same license as for the pristine package itself (unless the
|
|
|
8529cf |
# license for the pristine package is not an Open Source License, in which
|
|
|
8529cf |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
8529cf |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
8529cf |
# published by the Open Source Initiative.
|
|
|
8529cf |
|
|
|
8529cf |
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
8529cf |
#
|
|
|
8529cf |
|
|
|
8529cf |
|
|
|
8529cf |
Name: citra
|
|
|
524e73 |
Version: nightly1812
|
|
|
8529cf |
Release: 0
|
|
|
8529cf |
Summary: Nintendo 3DS emulator
|
|
|
8529cf |
License: GPL-2.0-or-later
|
|
|
f05bca |
Group: System/Emulators/Other
|
|
|
8529cf |
URL: https://citra-emu.org/
|
|
|
8529cf |
Source: %{name}-%{version}.tar.xz
|
|
|
8529cf |
# PATCH-FIX-UPSTREAM https://github.com/neobrain/nihstro/pull/62
|
|
|
8529cf |
Patch0: gcc-enablement.patch
|
|
|
524e73 |
# PATCH-FIX-OPENSUSE - fix_gcc12_errors.patch - keep gcc12 happy
|
|
|
524e73 |
# to discard once upstream makes the source gcc12 compatible
|
|
|
524e73 |
Patch1: fix_gcc12_errors.patch
|
|
|
524e73 |
# PATCH-FIX-UPSTREAM https://github.com/catchorg/Catch2/pull/2611
|
|
|
524e73 |
Patch2: fix_build_with_gcc_13.patch
|
|
|
8529cf |
BuildRequires: cmake >= 3.6
|
|
|
8529cf |
BuildRequires: hicolor-icon-theme
|
|
|
524e73 |
%if ( 0%{?sle_version} == 150400 || 0%{?sle_version} == 150500 ) && 0%{?is_opensuse}
|
|
|
524e73 |
BuildRequires: gcc11
|
|
|
524e73 |
BuildRequires: gcc11-c++
|
|
|
d00b81 |
BuildRequires: libboost_date_time1_75_0-devel
|
|
|
d00b81 |
BuildRequires: libboost_regex1_75_0-devel
|
|
|
d00b81 |
BuildRequires: libboost_serialization1_75_0-devel
|
|
|
d00b81 |
BuildRequires: libboost_system1_75_0-devel
|
|
|
d00b81 |
%else
|
|
|
8529cf |
BuildRequires: libboost_date_time-devel >= 1.70.0
|
|
|
8529cf |
BuildRequires: libboost_regex-devel
|
|
|
8529cf |
BuildRequires: libboost_serialization-devel
|
|
|
8529cf |
BuildRequires: libboost_system-devel
|
|
|
d00b81 |
%endif
|
|
|
8529cf |
BuildRequires: libqt5-linguist-devel
|
|
|
8529cf |
BuildRequires: pkgconfig
|
|
|
8529cf |
BuildRequires: pkgconfig(Qt5Concurrent)
|
|
|
8529cf |
BuildRequires: pkgconfig(Qt5Core)
|
|
|
8529cf |
BuildRequires: pkgconfig(Qt5Multimedia)
|
|
|
8529cf |
BuildRequires: pkgconfig(Qt5OpenGL)
|
|
|
8529cf |
BuildRequires: pkgconfig(Qt5Widgets)
|
|
|
8529cf |
BuildRequires: pkgconfig(libavdevice)
|
|
|
8529cf |
BuildRequires: pkgconfig(libavfilter)
|
|
|
8529cf |
BuildRequires: pkgconfig(libavformat)
|
|
|
8529cf |
BuildRequires: pkgconfig(libavutil)
|
|
|
8529cf |
BuildRequires: pkgconfig(libcurl)
|
|
|
8529cf |
BuildRequires: pkgconfig(liblz4)
|
|
|
8529cf |
BuildRequires: pkgconfig(liblzma)
|
|
|
8529cf |
BuildRequires: pkgconfig(libpng)
|
|
|
8529cf |
BuildRequires: pkgconfig(libpostproc)
|
|
|
8529cf |
BuildRequires: pkgconfig(libswresample)
|
|
|
8529cf |
BuildRequires: pkgconfig(libswscale)
|
|
|
8529cf |
BuildRequires: pkgconfig(libzstd)
|
|
|
8529cf |
BuildRequires: pkgconfig(sdl2)
|
|
|
8529cf |
ExclusiveArch: x86_64
|
|
|
8529cf |
|
|
|
8529cf |
%description
|
|
|
8529cf |
Citra is an open-source Nintendo 3DS emulator and debugger, written with portability in mind.
|
|
|
8529cf |
|
|
|
8529cf |
%prep
|
|
|
8529cf |
%setup -q
|
|
|
8529cf |
%autopatch -p1
|
|
|
8529cf |
|
|
|
8529cf |
# Enforce package versioning in GUI
|
|
|
8529cf |
sed -i '$!N;s|#define GIT_REV.*"@GIT_REV@"\n#define GIT_BRANCH.*"@GIT_BRANCH@"|#define GIT_REV\t"%{release}"\n#define GIT_BRANCH\t"nightly"|g;P;D' src/common/scm_rev.cpp.in
|
|
|
8529cf |
sed -i 's|@GIT_DESC@|%{version}|g' src/common/scm_rev.cpp.in
|
|
|
8529cf |
sed -i 's|@BUILD_NAME@|%{name}|g' src/common/scm_rev.cpp.in
|
|
|
8529cf |
|
|
|
8529cf |
# Avoid submodule checks as OBS ensures source consistency
|
|
|
8529cf |
sed -i 's|check_submodules_present()||g' CMakeLists.txt
|
|
|
8529cf |
|
|
|
8529cf |
# Don't test during build phase
|
|
|
8529cf |
sed -i 's|enable_testing()||g' CMakeLists.txt
|
|
|
8529cf |
|
|
|
8529cf |
# do not use bundled libs
|
|
|
8529cf |
#sed -i -e 's|add_subdirectory(externals)||g' CMakeLists.txt
|
|
|
8529cf |
|
|
|
8529cf |
%build
|
|
|
8529cf |
# DYNARMIC_ENABLE_CPU_FEATURE_DETECTION - we can't rely on cpu detection
|
|
|
8529cf |
# CRYPTOPP_DISABLE_CXXFLAGS_OPTIMIZATIONS - use only system set optflags
|
|
|
8529cf |
# WEB_SERVICE/CUBEB/DISCORD_PRESENCE OFF because uses bundled libs and libressl, no-go for openSUSE integration
|
|
|
8529cf |
# SHARED/STATIC_LIBS - we don't do libs it is just bundled helpers we need to link into binaries
|
|
|
8529cf |
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
524e73 |
%if ( 0%{?sle_version} == 150400 || 0%{?sle_version} == 150500 ) && 0%{?is_opensuse}
|
|
|
524e73 |
export CC=gcc-11
|
|
|
524e73 |
export CXX=g++-11
|
|
|
524e73 |
%endif
|
|
|
8529cf |
%cmake \
|
|
|
8529cf |
-DBUILD_SHARED_LIBS=OFF \
|
|
|
8529cf |
-DBUILD_STATIC_LIBS=ON \
|
|
|
8529cf |
-DENABLE_WEB_SERVICE=OFF \
|
|
|
8529cf |
-DENABLE_CUBEB=OFF \
|
|
|
8529cf |
-DUSE_DISCORD_PRESENCE=OFF \
|
|
|
8529cf |
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=OFF \
|
|
|
8529cf |
-DCRYPTOPP_DISABLE_CXXFLAGS_OPTIMIZATIONS=OFF \
|
|
|
8529cf |
-DENABLE_FFMPEG_AUDIO_DECODER=ON \
|
|
|
8529cf |
-DENABLE_FFMPEG_VIDEO_DUMPER=ON \
|
|
|
8529cf |
-DENABLE_FFMPEG_VIDEO_DUMPER=ON \
|
|
|
8529cf |
-DCITRA_USE_BUNDLED_FFMPEG=OFF \
|
|
|
8529cf |
-DENABLE_QT_TRANSLATION=ON \
|
|
|
8529cf |
-DUSE_SYSTEM_BOOST=ON \
|
|
|
8529cf |
-DZSTD_LZ4_SUPPORT=ON \
|
|
|
8529cf |
-DZSTD_LZMA_SUPPORT=ON \
|
|
|
8529cf |
-DZSTD_PROGRAMS_LINK_SHARED=ON \
|
|
|
8529cf |
-DZSTD_ZLIB_SUPPORT=ON
|
|
|
8529cf |
%cmake_build
|
|
|
8529cf |
|
|
|
8529cf |
%install
|
|
|
8529cf |
%cmake_install
|
|
|
524e73 |
rm -r %buildroot%{_includedir}/tsl
|
|
|
524e73 |
rm -r %buildroot%{_datadir}/cmake/tsl-robin-map
|
|
|
8529cf |
|
|
|
8529cf |
%check
|
|
|
8529cf |
%ctest
|
|
|
8529cf |
|
|
|
8529cf |
%files
|
|
|
8529cf |
%doc README.md CONTRIBUTING.md
|
|
|
8529cf |
%license license.txt
|
|
|
8529cf |
%{_bindir}/%{name}
|
|
|
8529cf |
%{_bindir}/%{name}-qt
|
|
|
8529cf |
%{_bindir}/%{name}-room
|
|
|
8529cf |
%{_datadir}/applications/%{name}.desktop
|
|
|
8529cf |
%{_mandir}/man6/%{name}*
|
|
|
8529cf |
%{_datadir}/mime/packages/%{name}.xml
|
|
|
8529cf |
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
|
|
8529cf |
|
|
|
8529cf |
%changelog
|