# SDL2 frontend %bcond_without sdl # Qt5 frontend %bcond_without qt # terminal debugging %bcond_without editline # zlib support %bcond_without zlib # PNG support %bcond_without png # LIBZIP support %bcond_without libzip # SQlite3 support %bcond_without sqlite3 # elf loading support %bcond_without elf # ffmpeg support %bcond_without ffmpeg # minizip requires cmake support from zstd, which Fedora does not provide # https://bugzilla.redhat.com/show_bug.cgi?id=2088517 %bcond_with minizip # python bindings have trouble compiling %bcond_with python Name: mgba Version: 0.10.3 Release: 1%{?dist} Summary: Game Boy Advance Emulator License: MPL-2.0 AND LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND BSD-3-Clause URL: https://mgba.io/ Source: https://github.com/mgba-emu/mgba/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch: 0001-Prevent-Updater-from-being-build.patch BuildRequires: gcc gcc-c++ # libzip-devel requires a binary provided by libzip-tools BuildRequires: libzip-devel libzip-tools BuildRequires: make cmake BuildRequires: libglvnd-devel %if %{with sdl} BuildRequires: SDL2-devel %endif %if %{with qt} BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtmultimedia-devel BuildRequires: qt5-linguist %endif %if %{with python} BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %endif %if %{with editline} BuildRequires: libedit-devel %endif %if %{with zlib} BuildRequires: zlib-devel %endif %if %{with minizip} BuildRequires: minizip-devel %endif %if %{with png} BuildRequires: libpng-devel %endif %if %{with libzip} BuildRequires: libzip-devel %endif %if %{with sqlite3} BuildRequires: sqlite-devel >= 3 %endif %if %{with elf} BuildRequires: elfutils-libelf-devel %endif %if %{with ffmpeg} BuildRequires: (ffmpeg-free-devel or ffmpeg-devel) %endif BuildRequires: desktop-file-utils Requires: mgba-data Provides: bundled(inih) = r55 Provides: bundled(blip_buf) = 1.1.0 %description mGBA is an emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack. It also supports Game Boy and Game Boy Color games. %prep %autosetup %if %{with qt} %package qt Summary: %{name} qt package Requires: mgba-data %description qt %{name} qt package %endif %package data Summary: Icons for %{name} BuildArch: noarch %description data Icons for %{name} %package doc Summary: %{name} doc package BuildArch: noarch %description doc %{name} doc package %package -n libmgba Summary: libmgba %description -n libmgba libmgba %package -n libmgba-static Summary: libmgba-static %description -n libmgba-static libmgba-static %package -n libmgba-devel Summary: libmgba-devel Requires: libmgba %description -n libmgba-devel libmgba-devel %if %{with python} %package -n python3-mgba Summary: python3-mgba Requires: libmgba %{?python_provide:%python_provide python3-mgba} %description -n python3-mgba python3-mgba %endif %build %cmake \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DUSE_DEBUGGERS:BOOL=ON \ -DUSE_GDB_STUB:BOOL=ON \ %if %{with editline} -DUSE_EDITLINE:BOOL=ON \ %else -DUSE_EDITLINE:BOOL=OFF \ %endif %if %{with ffmpeg} -DUSE_FFMPEG:BOOL=ON \ %else -DUSE_FFMPEG:BOOL=OFF \ %endif %if %{with zlib} -DUSE_ZLIB:BOOL=ON \ %else -DUSE_ZLIB:BOOL=OFF \ %endif %if %{with minizip} -DUSE_MINIZIP:BOOL=ON \ %else -DUSE_MINIZIP:BOOL=OFF \ %endif %if %{with png} -DUSE_PNG:BOOL=ON \ %else -DUSE_PNG:BOOL=OFF \ %endif %if %{with sqlite3} -DUSE_SQLITE3:BOOL=ON \ %else -DUSE_SQLITE3:BOOL=OFF \ %endif %if %{with elf} -DUSE_ELF:BOOL=ON \ %else -DUSE_ELF:BOOL=OFF \ %endif -DUSE_LZMA:BOOL=OFF \ -DUSE_DISCORD_RPC:BOOL=OFF \ -DENABLE_SCRIPTING:BOOL=ON \ %if %{with qt} -DBUILD_QT:BOOL=ON \ %else -DBUILD_QT:BOOL=OFF \ %endif %if %{with sdl} -DBUILD_SDL:BOOL=ON \ %else -DBUILD_SDL:BOOL=OFF \ %endif -DBUILD_LIBRETRO:BOOL=OFF \ %if %{with python} -DBUILD_PYTHON:BOOL=ON \ %else -DBUILD_PYTHON:BOOL=OFF \ %endif -DBUILD_GL:BOOL=ON \ -DBUILD_GLES2:BOOL=ON \ -DBUILD_GLES3:BOOL=ON \ -DBUILD_STATIC:BOOL=ON \ -DBUILD_SHARED:BOOL=ON \ -DSKIP_LIBRARY:BOOL=OFF \ -DUSE_EPOXY:BOOL=OFF \ -DDISTBUILD:BOOL=ON \ -DBUILD_UPDATER:BOOL=OFF %cmake_build %if %{with python} # mgba expects in-tree building so we need to prepare the environment cp %{__cmake_builddir}/include/mgba/flags.h include/mgba pushd src/platform/python/ %py3_build popd %endif %install %cmake_install %if %{with python} pushd src/platform/python/ %py3_install popd %endif %if %{with qt} %endif %if %{with sdl} %files %license LICENSE %{_bindir}/mgba %{_mandir}/man6/mgba.6.* %endif %if %{with qt} %files qt %license LICENSE %{_bindir}/mgba-qt %{_datadir}/applications/io.mgba.mGBA.desktop %{_mandir}/man6/mgba-qt.6.* %{_datadir}/mgba/ %endif %files data %{_datadir}/icons/hicolor/16x16/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/24x24/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/32x32/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/48x48/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/64x64/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/96x96/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/128x128/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/256x256/apps/io.mgba.mGBA.png %{_datadir}/icons/hicolor/512x512/apps/io.mgba.mGBA.png %files doc %{_datadir}/doc/mGBA/ %files -n libmgba %{_libdir}/libmgba.so.0.10.* %files -n libmgba-static %{_libdir}/libmgba-static.a %files -n libmgba-devel %{_libdir}/libmgba.so %{_libdir}/libmgba.so.0.10 %{_includedir}/mgba %{_includedir}/mgba-util %if %{with python} %files -n python3-mgba %license LICENSE %doc README.md %{python3_sitelib}/mgba %{python3_sitelib}/mgba-%{version}-py*.*.egg-info %endif %changelog * Sun Jul 14 2024 Jan200101 - 0.10.3-1 - Update to 0.10.3 * Sun May 07 2023 Jan Drögehoff - 0.10.2-1 - Update to 0.10.2 * Wed Apr 19 2023 Jan Drögehoff - 0.10.1-2 - Remove SDL desktop file * Wed Apr 19 2023 Jan Drögehoff - 0.10.1-1 - Update to 0.10.1 * Sun Oct 16 2022 Jan Drögehoff - 0.10.0-1 - Update to 0.10.0 * Thu May 19 2022 Jan Drögehoff - 0.9.3-1 - Initial spec