%define debug_package %{nil} %define _build_id_links none %undefine _hardened_build %undefine _cmake_shared_libs %define _gcc_lto_cflags -fno-lto %global implot_version 0.17 %global tinygltf_version 2.9.7 %global sfml_version 3.0.2 %global cpp_ipc_commit ce0773b %global cpp_optparse_commit 2265d64 %global imgui_version 1.92.9b %global watcher_version 0.14.5 Name: dolphin-emu Version: 2609 Release: 1%{?dist} Summary: GameCube and Wii emulator License: GPL-2.0-or-later AND MIT AND BSD-3-Clause AND BSD-2-Clause AND Apache-2.0 AND GPL-3.0-or-later AND Zlib URL: https://dolphin-emu.org/ Source0: https://github.com/dolphin-emu/dolphin/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://github.com/epezent/implot/archive/refs/tags/v%{implot_version}.tar.gz#/implot-%{implot_version}.tar.gz Source2: https://github.com/syoyo/tinygltf/archive/refs/tags/v%{tinygltf_version}.tar.gz#/tinygltf-%{tinygltf_version}.tar.gz Source3: https://github.com/SFML/SFML/archive/refs/tags/%{sfml_version}.tar.gz#/SFML-%{sfml_version}.tar.gz Source4: https://github.com/mutouyun/cpp-ipc/archive/%{cpp_ipc_commit}/cpp-ipc-%{cpp_ipc_commit}.tar.gz Source5: https://github.com/weisslj/cpp-optparse/archive/%{cpp_optparse_commit}/cpp-optparse-%{cpp_optparse_commit}.tar.gz Source6: https://github.com/ocornut/imgui/archive/refs/tags/v%{imgui_version}.tar.gz Source7: https://github.com/e-dant/watcher/archive/refs/tags/%{watcher_version}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: bluez-libs-devel BuildRequires: bzip2-devel BuildRequires: cubeb-devel BuildRequires: fmt-devel >= 10.1 BuildRequires: glslang-devel BuildRequires: hidapi-devel BuildRequires: libcurl-devel BuildRequires: libevdev-devel BuildRequires: libpng-devel BuildRequires: libspng-devel BuildRequires: libusb1-devel BuildRequires: libxkbcommon-devel BuildRequires: libzstd-devel >= 1.4 BuildRequires: lz4-devel >= 1.8 BuildRequires: lzo-devel BuildRequires: minizip-ng-devel BuildRequires: picojson-static BuildRequires: pugixml-devel BuildRequires: SDL3-devel BuildRequires: spirv-headers-devel BuildRequires: spirv-tools BuildRequires: spirv-tools-devel BuildRequires: systemd-devel BuildRequires: vulkan-headers BuildRequires: VulkanMemoryAllocator-devel BuildRequires: xxhash-devel >= 0.8.2 BuildRequires: xz-devel BuildRequires: zlib-ng-devel BuildRequires: enet-devel BuildRequires: /usr/bin/env BuildRequires: gettext %description Dolphin is an emulator for Nintendo GameCube and Wii. This build is optimized for use with an external frontend such as ES-DE: the Qt frontend and X11 support are disabled, while the lightweight NoGUI frontend, Vulkan rendering, Cubeb audio, SDL3 and evdev input are enabled. %prep %autosetup -n dolphin-%{version} # ImPlot rm -rf Externals/implot/implot mkdir -p Externals/implot/implot tar -xf %{SOURCE1} \ -C Externals/implot/implot \ --strip-components=1 # tinygltf rm -rf Externals/tinygltf/tinygltf mkdir -p Externals/tinygltf/tinygltf tar -xf %{SOURCE2} \ -C Externals/tinygltf/tinygltf \ --strip-components=1 # Dolphin 2606 requires SFML >= 3.0. Fedora 44 still ships SFML 2.x, # so keep Dolphin's wrapper and populate only its nested source directory. rm -rf Externals/SFML/SFML mkdir -p Externals/SFML/SFML tar -xf %{SOURCE3} \ -C Externals/SFML/SFML \ --strip-components=1 rm -rf Externals/cpp-ipc/cpp-ipc mkdir -p Externals/cpp-ipc/cpp-ipc tar -xf %{SOURCE4} \ -C Externals/cpp-ipc/cpp-ipc \ --strip-components=1 rm -rf Externals/cpp-optparse/cpp-optparse mkdir -p Externals/cpp-optparse/cpp-optparse tar -xf %{SOURCE5} \ -C Externals/cpp-optparse/cpp-optparse \ --strip-components=1 rm -rf Externals/imgui/imgui mkdir -p Externals/imgui/imgui tar -xf %{SOURCE6} \ -C Externals/imgui/imgui \ --strip-components=1 rm -rf Externals/watcher/watcher mkdir -p Externals/watcher/watcher tar -xf %{SOURCE7} \ -C Externals/watcher/watcher \ --strip-components=1 # Use the system picojson header. rm -rf Externals/picojson mkdir -p Externals/picojson sed 's/throw std::.*;/std::abort();/g' \ /usr/include/picojson.h > Externals/picojson/picojson.h %build %cmake \ -DUSE_SYSTEM_LIBS=ON \ -DXXHASH_FOUND=ON \ \ -DUSE_SYSTEM_MBEDTLS=OFF \ -DUSE_SYSTEM_SFML=OFF \ \ -DUSE_MGBA=OFF \ -DUSE_UPNP=OFF \ -DUSE_DISCORD_PRESENCE=OFF \ -DUSE_RETRO_ACHIEVEMENTS=OFF \ \ -DENABLE_ANALYTICS=OFF \ -DENABLE_AUTOUPDATE=OFF \ -DENABLE_TESTS=OFF \ -DENABLE_CLI_TOOL=OFF \ \ -DENABLE_QT=OFF \ -DENABLE_NOGUI=ON \ -DENABLE_HEADLESS=OFF \ \ -DENABLE_X11=OFF \ -DENABLE_EGL=ON \ -DENABLE_VULKAN=ON \ \ -DENABLE_EVDEV=ON \ -DENABLE_HWDB=ON \ -DENABLE_SDL=ON \ \ -DENABLE_ALSA=OFF \ -DENABLE_PULSEAUDIO=OFF \ -DENABLE_CUBEB=ON \ \ -DENABLE_LLVM=OFF \ -DENABLE_LTO=OFF \ -DENCODE_FRAMEDUMPS=OFF %cmake_build %install %cmake_install install -Dpm0644 \ Data/51-usb-device.rules \ %{buildroot}%{_udevrulesdir}/51-dolphin-usb-device.rules # ES-DE provides the desktop frontend. rm -rf \ %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/icons \ %{buildroot}%{_datadir}/metainfo \ %{buildroot}%{_datadir}/pixmaps \ %{buildroot}%{_datadir}/dolphin-emu/sys/Theme # Keep only the NoGUI launcher. rm -f \ %{buildroot}%{_bindir}/dolphin-emu \ %{buildroot}%{_bindir}/dolphin-tool \ %{buildroot}%{_mandir}/man6/dolphin-emu.6* %files %{_bindir}/dolphin-emu-nogui %{_datadir}/%{name}/ %{_mandir}/man6/dolphin-emu-nogui.6* %{_udevrulesdir}/51-dolphin-usb-device.rules %changelog %autochangelog