File Frodo.spec of Package Frodo

#
# spec file for package Frodo
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define archive_name frodo4

Name:           Frodo
Version:        4.3
Release:        0
Summary:        Commodore 64 Emulator
License:        SUSE-NonFree
Group:          System/Emulators/Other
Url:            https://github.com/cebix/frodo4
Source:         %{archive_name}-%{version}.tar.gz
BuildRequires:  autoconf >= 2.69
BuildRequires:  automake
BuildRequires:  desktop-file-utils
BuildRequires:  gtk3-devel
BuildRequires:  SDL2-devel >= 2.28.0
Requires:       desktop-file-utils

%if 0%{?suse_version} <= 1599
# Frodo needs C++20 std capable Compiler:
BuildRequires:  cpp13
BuildRequires:  gcc13
BuildRequires:  gcc13-c++
BuildRequires:  glibc-devel
Patch0:         autoconf.patch
##### %define autogen_opts CC=gcc-13 CXX=gcc13-c++ CPP=cpp-13
%define autogen_opts CXX=g++-13
%else
BuildRequires:  gcc-c++ >= 13.0
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Frodo is a free, portable Commodore 64 emulator that runs on a variety
of platforms, with a focus on the exact reproduction of special graphical
effects possible on the C64.

Frodo comes in two flavours: The regular "Frodo" which uses a cycle-exact
emulation, and the simplified "Frodo Lite" which is less compatible but runs
better on slower machines.

%prep
%setup -q -n %{archive_name}-%{version}
%if 0%{?suse_version} <= 1599
%patch -P 0 -p1
%endif

%build
./autogen.sh %{autogen_opts}
make %{?_smp_mflags} 2>&1|grep -v CPU_emulline.*operation.*undefined

%install
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 644 src/Frodo_Logo.png src/Frodo.ui %{buildroot}%{_datadir}/%{name}
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 src/Frodo src/FrodoLite %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 *.desktop %{buildroot}%{_datadir}/applications
rm docs/Makefile*
install -d -m 755 %{buildroot}%{_docdir}/%{name}
install -m 755 docs/* %{buildroot}%{_docdir}/%{name}

%files
%defattr(-,root,root)
%doc CHANGES docs/*
%{_bindir}/Frodo
%{_bindir}/FrodoLite
%{_datadir}/%{name}
%{_datadir}/applications

%post
/usr/bin/update-desktop-database


%changelog
openSUSE Build Service is sponsored by