# Basic spec file for RPM. Currently requires `MAKEFLAGS=-ik checkinstall --spec=retroarch.spec --nodoc -y` in the root directory. %define pname RetroArch Summary: libretro is an API that exposes generic audio/video/input callbacks. Name: retroarch Version: 1.19.1 Release: 1.2%{?dist} License: GPLv3+ Group: Emulators URL: https://www.libretro.org/ Source0: https://github.com/libretro/RetroArch/archive/v%{version}/%{pname}-%{version}.tar.gz Patch0: retroarch-mbedtlsv3-support.diff Provides: %{name} = %{version}-v%{version} # Build requirements # Support for reading zipped ROMs BuildRequires: pkgconfig(zlib) # Input support BuildRequires: pkgconfig(libudev) # Truetype font support BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) # Audio support BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(jack) >= 0.120.1 BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(libpulse) # SDL support # We could use SDL1 instead of SDL2, but these days, distros use sdl12-compat for SDL1 (that is, # still use SDL2 behind-the-scenes). BuildRequires: pkgconfig(sdl2) >= 2.0.0 # USB support BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 # Camera support BuildRequires: pkgconfig(libv4l2) # Recording support BuildRequires: pkgconfig(libavcodec) >= 57 BuildRequires: pkgconfig(libavformat) >= 57 BuildRequires: pkgconfig(libavdevice) >= 57 BuildRequires: pkgconfig(libswresample) >= 2 BuildRequires: pkgconfig(libavutil) >= 55 BuildRequires: pkgconfig(libswscale) >= 4 # FLAC support BuildRequires: pkgconfig(flac) # X support BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(xproto) # Wayland support BuildRequires: pkgconfig(xkbcommon) >= 0.3.2 BuildRequires: pkgconfig(wayland-egl) >= 10.1.0 BuildRequires: pkgconfig(wayland-cursor) >= 1.12 BuildRequires: pkgconfig(wayland-protocols) >= 1.31 BuildRequires: pkgconfig(wayland-scanner) >= 1.15 BuildRequires: pkgconfig(libdecor-0) # DRM/KMS support BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(gbm) >= 9.0 BuildRequires: pkgconfig(egl) # SSL support BuildRequires: pkgconfig(mbedtls) >= 2.5.1 BuildRequires: pkgconfig(mbedx509) >= 2.5.1 BuildRequires: pkgconfig(mbedcrypto) > 2.5.1 # glslang support # Use RedHat's unofficial glslang.pc if the distro has it; use the official cmake build files otherwise. BuildRequires: ((pkgconfig(glslang)) or (cmake(glslang))) BuildRequires: pkgconfig(SPIRV-Tools) # OpenGL support BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) # Vulkan support BuildRequires: pkgconfig(vulkan) # Qt support BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2 BuildRequires: pkgconfig(Qt5Core) >= 5.2 BuildRequires: pkgconfig(Qt5Gui) >= 5.2 BuildRequires: pkgconfig(Qt5Network) >= 5.2 BuildRequires: pkgconfig(Qt5Widgets) >= 5.2 Recommends: espeak Recommends: gamemode Recommends: libdecor %description libretro is an API that exposes generic audio/video/input callbacks. A frontend for libretro (such as RetroArch) handles video output, audio output, input and application lifecycle. A libretro core written in portable C or C++ can run seamlessly on many platforms with very little to no porting effort. While RetroArch is the reference frontend for libretro, several other projects have used the libretro interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use. This package includes only the frontend. Assets, shaders, emulator cores, content (e.g.public-domain games), etc. can be downloaded (and updated) from the frontend. %package -n %{name}-cg2glsl Summary: Tool to covert Cg shaders to the glsl format License: Public Domain Requires: /usr/bin/env Requires: python3 >= 3.0.0 # Sorry, the Cg package can't be provided, since it's non-free. Requires: Cg %description -n %{name}-cg2glsl %{summary}. You probably don't need this, considering that there are few shaders written in Cg (NVIDIA's outdated shading language) that haven't been converted to glsl (the shading language used by OpenGL 2.x/OpenGLES 3+) and that most have moved on to glslang (the shading language used by OpenGL 3+ and by Vulkan). %prep %autosetup -p1 -n %{pname}-%{version} %build export CFLAGS=-g # Enable necessary features, disable builtin libraries (use newer, more secure system libraries when possible). # ./configure has to be used directly since RetroArch's homegrown configure scripts chokes on unknown options sent to it. ./configure --build=%{_target_vendor}-%{_target_cpu}-%{_target_os} --prefix=%{_prefix} --bindir=%{_bindir} --datarootdir=%{_datarootdir} --docdir=%{_docdir} --mandir=%{_mandir} --sysconfdir=%{_sysconfdir} \ --enable-egl --enable-wayland --enable-kms \ --enable-hid \ --enable-opengl_core --enable-vulkan \ --enable-freetype --disable-stb_font \ --disable-builtinflac \ --enable-glslang --disable-builtinglslang \ --enable-systemmbedtls --disable-builtinmbedtls --disable-builtinbearssl \ --disable-builtinzlib %make_build %install %make_install %files %doc README*.md CONTRIBUTING.md CHANGES.md %license COPYING %config /etc/retroarch.cfg %{_bindir}/retroarch %{_mandir}/man6/%{name}.6* %if "%{version}" >= "1.09.0" %{_datarootdir}/metainfo/com.libretro.RetroArch.appdata.xml %else %endif %if "%{version}" >= "1.19.1" %{_datarootdir}/applications/org.libretro.RetroArch.desktop %else %{_datarootdir}/applications/retroarch.desktop %endif %{_datarootdir}/pixmaps/retroarch.svg %exclude %{_docdir} %files -n %{name}-cg2glsl %{_bindir}/retroarch-cg2glsl %{_mandir}/man6/%{name}-cg2glsl.6*