Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ahmedmoselhi2:branches:Emulators
citra
citra.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File citra.spec of Package citra
# # spec file for package citra # # Copyright (c) 2021 SUSE LLC # Copyright (c) 2017–2019 Markus S. <kamikazow@opensuse.org> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # disable just in case it has similar problem to yuzu ? %global use_clang 0 %global use_lld 0 %ifarch %ix86 %arm %global use_lto 0 %else %global use_lto 1 %endif # duh, upstream have dropped qt5 completely %define use_qt6 1 %define __builder ninja Name: citra Version: 2100+0~git20240223.4f9fc88bb Release: 0 Summary: Nintendo 3DS emulator License: GPL-2.0-or-later Group: System/Emulators/Other URL: https://citra-emu.org/ Source: %{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM https://github.com/neobrain/nihstro/pull/62 Patch0: gcc-enablement.patch BuildRequires: cmake >= 3.6 BuildRequires: extra-cmake-modules BuildRequires: ninja BuildRequires: hicolor-icon-theme BuildRequires: libboost_container-devel BuildRequires: libboost_date_time-devel >= 1.70.0 BuildRequires: libboost_iostreams-devel BuildRequires: libboost_locale-devel BuildRequires: libboost_program_options-devel BuildRequires: libboost_regex-devel BuildRequires: libboost_serialization-devel BuildRequires: libboost_stacktrace-devel BuildRequires: libboost_system-devel BuildRequires: libbacktrace-devel BuildRequires: discord-rpc-devel %if 0%{?use_qt6} BuildRequires: qt6-gui-private-devel BuildRequires: cmake(Qt6LinguistTools) BuildRequires: pkgconfig(Qt6Concurrent) BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6DBus) BuildRequires: pkgconfig(Qt6Network) BuildRequires: pkgconfig(Qt6Multimedia) BuildRequires: pkgconfig(Qt6MultimediaWidgets) BuildRequires: pkgconfig(Qt6OpenGL) BuildRequires: pkgconfig(Qt6Qml) BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: pkgconfig(Qt6Svg) %else BuildRequires: libQt5PlatformSupport-private-headers-devel BuildRequires: libqt5-qtbase-private-headers-devel BuildRequires: cmake(Qt5LinguistTools) BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5MultimediaWidgets) BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Svg) %endif BuildRequires: pkgconfig BuildRequires: pkgconfig(nlohmann_json) BuildRequires: pkgconfig(RapidJSON) BuildRequires: pkgconfig(catch2) BuildRequires: pkgconfig(cryptopp) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(fdk-aac) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(inih) BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libenet) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpostproc) BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(soundtouch) BuildRequires: pkgconfig(vulkan) BuildRequires: glslang-devel BuildRequires: glslang-nonstd-devel BuildRequires: libzstd-devel-static BuildRequires: spirv-tools-devel %if 0%{?use_clang} BuildRequires: clang-devel BuildRequires: clang-tools >= 17.0.0 #BuildRequires: npth-devel %if 0%{?use_lld} BuildRequires: lld %else BuildRequires: binutils-gold BuildRequires: llvm-gold %endif %else BuildRequires: binutils-gold BuildRequires: gcc-c++ %endif BuildRequires: llvm-devel ExclusiveArch: x86_64 %description Citra is an open-source Nintendo 3DS emulator and debugger, written with portability in mind. %prep %setup -q %autopatch -p1 # Enforce package versioning in GUI sed -i '$!N;s|#define GIT_REV.*"@GIT_REV@"\n#define GIT_BRANCH.*"@GIT_BRANCH@"|#define GIT_REV\t"0"\n#define GIT_BRANCH\t"nightly"|g;P;D' src/common/scm_rev.cpp.in sed -i 's|@GIT_DESC@|%{version}|g' src/common/scm_rev.cpp.in sed -i 's|@BUILD_NAME@|%{name}|g' src/common/scm_rev.cpp.in # Avoid submodule checks as OBS ensures source consistency sed -i 's|check_submodules_present()||g' CMakeLists.txt # Don't test during build phase sed -i 's|VERSION_LESS \"[0-9\.]*\")|VERSION_LESS "0.0.1")|g' CMakeLists.txt # don't be picky sed -i 's|enable_testing()||g' CMakeLists.txt # do not use bundled libs #sed -i -e 's|add_subdirectory(externals)||g' CMakeLists.txt %if 0%{?use_clang} sed -i -e "/llvm_map_components_to_libnames/s:(llvm_libs .*):(llvm_libs '' TableGen):g" externals/dynarmic/CMakeLists.txt %endif %build # this macro needs 'BuildRequires: memory-constraints' #limit_build -m 3072 ulimit -Sn 4000 export UCFLAGS="%{optflags} -fPIC -O3" #export UCFLAGS="${UCFLAGS} -fno-omit-frame-pointer" %ifarch x86_64 export UCFLAGS="${UCFLAGS} -march=x86-64 -mtune=generic -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul" %endif export ULDFLAGS="-fPIC -Wl,--gc-sections -Wl,-O1 -Wl,--icf=safe" %if 0%{?use_lld} export ULDFLAGS="${ULDFLAGS} -fuse-ld=lld" %ifarch %ix86 %arm export ULDFLAGS="${ULDFLAGS} -Wl,-z,notext" %endif export LD="lld" alias ld=ld.lld %else export ULDFLAGS="${ULDFLAGS} -fuse-ld=gold -Wl,--sort-common -Wl,-O1" export LD=ld.gold alias ld=gold %endif %if 0%{?use_clang} export CC=clang export CXX=clang++ export UCFLAGS="${UCFLAGS} -v -fbracket-depth=2048 -fconstexpr-depth=2048" %ifarch x86_64 export UCFLAGS="${UCFLAGS} -fglobal-isel" %endif #export UCFLAGS="${UCFLAGS} -D_GNU_SOURCE -fexceptions -relocatable-pch -faligned-allocation" export UCXXFLAGS="${UCFLAGS} -fpermissive" #export UCXXFLAGS="${UCFLAGS} -fcxx-exceptions" export HOST="$(${CC} -print-target-triple)" %if 0%{?use_lto} %if 0%{?use_lld} %global _lto_cflags -flto=thin %global _lto_ldlags -flto=thin -Wl,--plugin-opt=O3 %{?jobs:-Wl,--threads=%{jobs}} %else %global _lto_cflags -flto=thin %global _lto_ldlags -flto=thin %endif %else %global _lto_cflags %nil %global _lto_ldlags %nil %endif %else export CC=gcc export CXX=g++ export UCFLAGS="${UCFLAGS} -ftree-parallelize-loops=4 -ftree-vectorize -fpredictive-commoning" #export UCXXFLAGS="${UCFLAGS} -fpermissive" export HOST="%{_target_platform}" %if 0%{?use_lto} %global _lto_cflags -fuse-linker-plugin %_lto_cflags -ffat-lto-objects -flto-odr-type-merging %global _lto_ldlags -fuse-linker-plugin -flto=2 %else %global _lto_cflags %nil %global _lto_ldlags %nil %endif %endif export TARGET="${HOST}" export UCFLAGS="${UCFLAGS} %_lto_cflags" export UCXXFLAGS="${UCXXFLAGS} %_lto_cflags" export ULDFLAGS="${ULDFLAGS} %_lto_cflags %_lto_ldlags" # override OBS defaults ? export CFLAGS="${UCFLAGS}" export CXXFLAGS="${UCXXFLAGS}" export LDFLAGS="${ULDFLAGS}" # DYNARMIC_ENABLE_CPU_FEATURE_DETECTION - we can't rely on cpu detection but this may also disable vector math altogether # CRYPTOPP_DISABLE_CXXFLAGS_OPTIMIZATIONS - use only system set optflags # SHARED/STATIC_LIBS - we don't do libs it is just bundled helpers we need to link into binaries # USE_SYSTEM_LIBS=ON - forces all libs to be system, even absent ones that are excluded by their respective USE_SYSTEM_<X> directive %cmake \ -DCITRA_WARNINGS_AS_ERRORS=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_STATIC_LIBS=ON \ -DUSE_PCH=OFF -DENABLE_PCH=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DSKIP_PRECOMPILE_HEADERS=ON \ -DUSE_PRECOMPILED_HEADERS=OFF \ -DCITRA_USE_PRECOMPILED_HEADERS=OFF \ -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_SKIP_RPATH=OFF \ -DCMAKE_INSTALL_RPATH="" \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DCMAKE_C_COMPILER="${CC}" \ -DCMAKE_CXX_COMPILER="${CXX}" \ -DCMAKE_LINKER="${LD}" \ -DCMAKE_C_FLAGS="${CFLAGS}" \ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DDYNARMIC_CXX_FLAGS="${CXXFLAGS}" \ -DMCL_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_EXE_LINKER_FLAGS="${CFLAGS} ${LDFLAGS}" \ -DCMAKE_MODULE_LINKER_FLAGS="${CFLAGS} ${LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS="${CFLAGS} ${LDFLAGS}" \ -DCMAKE_STATIC_LINKER_FLAGS="" \ -DDYNARMIC_ENABLE_NO_EXECUTE_SUPPORT=OFF \ -DDYNARMIC_TESTS=OFF \ %if 0%{?use_clang} -DDYNARMIC_USE_LLVM=ON \ %endif %if 0%{?use_lto} -DENABLE_LTO=ON \ -DZYAN_WHOLE_PROGRAM_OPTIMIZATION=ON \ %else -DENABLE_LTO=OFF \ %endif -DCRYPTOPP_DISABLE_CXXFLAGS_OPTIMIZATIONS=OFF \ -DENABLE_FFMPEG_AUDIO_DECODER=ON \ -DENABLE_FFMPEG_VIDEO_DUMPER=ON \ -DCITRA_USE_BUNDLED_FFMPEG=OFF \ -DCITRA_USE_BUNDLED_QT=OFF \ -DENABLE_QT_TRANSLATION=ON \ -DENABLE_FDK=ON \ -DENABLE_WEB_SERVICE=ON \ -DENABLE_CUBEB=ON \ -DUSE_DISCORD_PRESENCE=ON \ -DUSE_SYSTEM_QT=ON \ -DUSE_SYSTEM_DYNARMIC=OFF \ -DUSE_SYSTEM_XBYAK=OFF \ -DUSE_SYSTEM_CATCH2=ON \ -DUSE_SYSTEM_CRYPTOPP=ON \ -DUSE_SYSTEM_ENET=ON \ -DUSE_SYSTEM_JSON=ON \ -DUSE_SYSTEM_OPENAL=ON \ -DUSE_SYSTEM_SOUNDTOUCH=ON \ -DUSE_SYSTEM_FMT=ON \ -DUSE_SYSTEM_SDL2=ON \ -DUSE_SYSTEM_BOOST=ON \ -DUSE_SYSTEM_OPENSSL=ON \ -DUSE_SYSTEM_LIBUSB=ON \ -DUSE_SYSTEM_VULKAN_HEADERS=ON \ -DUSE_SYSTEM_GLSLANG=ON \ -DUSE_SYSTEM_ZSTD=ON \ %{?nil} %cmake_build %install %cmake_install # remove trash rm -rf %{?buildroot}%{_includedir} || echo "no header trash to delete in %{?buildroot}%{_includedir}" rm -rf %{?buildroot}%{_libdir} || echo "no library trash to delete in %{?buildroot}%{_libdir}" rm -rf %{?buildroot}%{_datadir}/cmake || echo "no cmake trash to delete in %{?buildroot}%{_datadir}" %check %ctest %files %doc README.md CONTRIBUTING.md %license license.txt %{_bindir}/%{name}* %{_datadir}/applications/*.desktop %{_mandir}/man?/%{name}* %{_datadir}/mime/packages/%{name}.xml %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor