File ares.spec of Package ares
#
# spec file for package ares
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: ares
Version: 146
Release: 0
Summary: Multisystem Emulator
License: ISC
Group: System/Emulators/Other
URL: https://ares-emu.net/
Source0: https://github.com/ares-emulator/ares/archive/refs/tags/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE ares-fix-building-for-aarch64.patch -- disable build of n64 core, fix building for aarch64
Patch0: ares-fix-building-for-aarch64.patch
# PATCH-FIX-OPENSUSE ares-use-march-nehalem-instead-x86-64-v2.patch -- use march=nehalem for openSUSE Leap
Patch1: ares-use-march-nehalem-instead-x86-64-v2.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(ao)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: libpulse-devel
BuildRequires: pkgconfig(udev)
BuildRequires: udev
BuildRequires: pkgconfig(sdl3)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xrandr)
ExcludeArch: %{arm} ppc64le
%description
Multisystem Emulator
ares is a cross-platform, open source, multisystem emulator, focusing on accuracy and preservation.
%prep
%setup -q
# disable n64 core for aarch64 because n64 core can not be build for aarch64
%ifarch aarch64
%patch -P 0 -p1
%endif
# use march=nehalem for openSUSE Leap instead new default march=x86-64-v2, both use SSE 4.2
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
%patch -P 1 -p1
%endif
%build
%cmake -DARES_SKIP_DEPS=ON
%cmake_build
%install
%cmake_install
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_bindir}/sourcery
%{_datadir}/%{name}
%{_datadir}/icons/hicolor
%{_datadir}/applications/%{name}.desktop
%changelog