commit 67ac07ae0b3d67c089bfeafc7436e37389a502c8
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun Oct 13 20:52:57 2024 +0200
Updated to new upstream release
.gitignore | 2 +
Frodo-4.1b-SAM.patch | 21 -------
Frodo-4.1b-alpha.patch | 11 ----
Frodo-4.1b-gcc6.patch | 12 ----
Frodo-4.1b-opt.patch | 24 --------
Frodo-4.1b-paths.patch | 54 ------------------
Frodo-4.3-wayland.patch | 84 ++++++++++++++++++++++++++++
Frodo.desktop | 10 ----
Frodo.png | Bin 4866 -> 0 bytes
Frodo.spec | 146 +++++++++++++++---------------------------------
FrodoPC.desktop | 10 ----
FrodoSC.desktop | 10 ----
sources | 2 +-
13 files changed, 132 insertions(+), 254 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 45555bb..265ef9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
FrodoV4_1b.Src.tar.gz
+/Frodo-4.2.tar.gz
+/Frodo-4.3.tar.gz
diff --git a/Frodo-4.3-wayland.patch b/Frodo-4.3-wayland.patch
new file mode 100644
index 0000000..e022216
--- /dev/null
+++ b/Frodo-4.3-wayland.patch
@@ -0,0 +1,84 @@
+From e4bda36777d67bda823911a566a2bea2e40c11dc Mon Sep 17 00:00:00 2001
+From: Christian Bauer <cb(a)cebix.net>
+Date: Sun, 13 Oct 2024 13:00:17 +0200
+Subject: [PATCH] Only run GTK idle function while prefs editor is open
+
+---
+ src/Prefs_gtk.h | 19 +++++++++++++++++++
+ src/main.cpp | 12 ------------
+ 2 files changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/src/Prefs_gtk.h b/src/Prefs_gtk.h
+index c4620b3..ee3df34 100644
+--- a/src/Prefs_gtk.h
++++ b/src/Prefs_gtk.h
+@@ -190,6 +190,17 @@ static const char * shortcuts_win_ui =
+ "</interface>";
+
+
++// Mainloop idler to keep SDL events going
++static guint idle_source_id = 0;
++
++static gboolean pump_sdl_events(gpointer user_data)
++{
++ SDL_Event event;
++ SDL_WaitEventTimeout(&event, 5);
++ return true;
++}
++
++
+ /*
+ * Show preferences editor (synchronously)
+ * prefs_path is the preferences file name
+@@ -295,6 +306,9 @@ bool Prefs::ShowEditor(bool startup, fs::path prefs_path, fs::path
snapshot_path
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder,
"save_snapshot_menu")), true);
+ gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder,
"sam_menu")), true);
+
++ // Keep SDL event loop running while preferences editor is open
++ idle_source_id = g_idle_add(pump_sdl_events, nullptr);
++
+ SAM_GetState(TheC64);
+ }
+
+@@ -305,6 +319,11 @@ bool Prefs::ShowEditor(bool startup, fs::path prefs_path, fs::path
snapshot_path
+ gtk_window_present(prefs_win);
+ gtk_main();
+
++ if (idle_source_id > 0) {
++ g_source_remove(idle_source_id);
++ idle_source_id = 0;
++ }
++
+ // Save preferences if "Start"/"Continue" clicked
+ if (result) {
+ get_values();
+diff --git a/src/main.cpp b/src/main.cpp
+index fae7d73..9d18faf 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -59,15 +59,6 @@ void Frodo::ProcessArgs(int argc, char ** argv)
+ * Arguments processed, run emulation
+ */
+
+-#ifdef HAVE_GTK
+-static gboolean pump_sdl_events(gpointer user_data)
+-{
+- SDL_Event event;
+- SDL_WaitEventTimeout(&event, 5);
+- return true;
+-}
+-#endif
+-
+ void Frodo::ReadyToRun()
+ {
+ // Load preferences
+@@ -89,9 +80,6 @@ void Frodo::ReadyToRun()
+ // Show preferences editor
+ if (!ThePrefs.ShowEditor(true, prefs_path, snapshot_path))
+ return; // "Quit" clicked
+-
+- // Keep SDL event loop running while preferences editor is open the next time
+- g_idle_add(pump_sdl_events, nullptr);
+ #endif
+
+ // Create and start C64
diff --git a/Frodo.spec b/Frodo.spec
index be7f40c..c49914c 100644
--- a/Frodo.spec
+++ b/Frodo.spec
@@ -1,128 +1,72 @@
-%define pkgversion %(echo %version|sed s/\\\\\./\\_/)
-
Summary: Commodore 64 emulator
Name: Frodo
-Version: 4.1b
-Release: 27%{?dist}
-License: Distributable
-Group: Applications/Emulators
+Version: 4.3
+Release: 1%{?dist}
+License: GPL-2.0-or-later
URL:
http://frodo.cebix.net/
-Source0:
http://frodo.cebix.net/downloads/%{name}V%{pkgversion}.Src.tar.gz
-Source1: Frodo.png
-Source2: Frodo.desktop
-Source3: FrodoPC.desktop
-Source4: FrodoSC.desktop
-Patch0: Frodo-4.1b-paths.patch
-Patch1: Frodo-4.1b-opt.patch
-Patch2: Frodo-4.1b-alpha.patch
-Patch3: Frodo-4.1b-SAM.patch
-Patch4: Frodo-4.1b-gcc6.patch
+Source0:
https://github.com/cebix/frodo4/archive/v%{version}.tar.gz#/%{name}-%{ver...
+# Fix running under wayland
+#
https://github.com/cebix/frodo4/issues/2
+Patch0: %{name}-4.3-wayland.patch
BuildRequires: gcc-c++
+BuildRequires: make
BuildRequires: autoconf
-BuildRequires: SDL-devel >= 1.2.0
-BuildRequires: libXt-devel
+BuildRequires: autoconf-archive
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: SDL2-devel
+BuildRequires: gtk3-devel
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
-%package gui
-Summary: Preferences editor for Frodo
-Group: Applications/Emulators
-Requires: %{name}
-Requires: tk
+Obsoletes: %{name}-gui <= 4.1b
%description
-Frodo V4.1 is a free, portable C64 emulator for BeOS, Unix, MacOS,
-AmigaOS, RiscOS and WinNT/95 systems.
-
-This emulator focuses on the exact reproduction of special graphical
-effects possible on the C64, and has therefore relatively high system
-requirements. It should only be run on systems with at least a
-PowerPC/Pentium/68060. Frodo is capable of running most games and
-demos correctly, even those with FLI, FLD, DYCP, open borders,
-multiplexed sprites, timing dependent decoders, fast loaders etc. 6510
-emulation: All undocumented opcodes, 100 percent correct decimal mode,
-instruction/cycle exact emulation. VIC emulation: Line-/cycle-based
-emulation, all display modes, sprites with collisions/priorities, DMA
-cycles, open borders, all $d011/$d016 effects. SID emulation:
-Real-time digital emulation (16 bit, 44.1kHz), including filters (only
-under BeOS, Linux, HP-UX, MacOS and AmigaOS). 1541 emulation: Drive
-simulation in directories, .d64/x64 or .t64/LYNX files, or
-processor-level 1541 emulation that works with about 95 percent of all
-fast loaders and even some copy protection schemes. Other peripherals:
-Keyboard and joystick (real joysticks (only under BeOS, Linux and
-AmigaOS) or keyboard emulation). The full source code in C++ is
-available. Frodo is freeware.
-
-%description gui
-An enhanced Tcl/Tk preferences GUI for Frodo written by Gerard Decatrel
+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 flavors: 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
-%patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
-%patch -P3 -p0
-%patch -P4 -p1
+%autosetup -n frodo4-%{version} -p1
+
%build
-cd Src
-autoconf
+autoreconf -fvi
%configure
-make %{?_smp_mflags} all FRODOHOME="\\\"%{_datadir}/Frodo/\\\""
+%make_build
+
%install
-install -d 755 %{buildroot}%{_bindir}
-install -d 755 %{buildroot}%{_datadir}/Frodo/{64prgs,64imgs}
-install -m 755 Src/Frodo Src/FrodoPC Src/FrodoSC %{buildroot}%{_bindir}
-install -m 755 TkGui.tcl %{buildroot}%{_datadir}/Frodo
-install -m 644 "Frodo Logo" "1541 ROM" "Basic ROM"
"Char ROM" "Kernal ROM" \
- %{buildroot}%{_datadir}/Frodo
-install -m 644 64prgs/* %{buildroot}%{_datadir}/Frodo/64prgs
-
-#install icon
-mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
-install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/
-
-#install desktop files
-mkdir -p %{buildroot}%{_datadir}/applications
-desktop-file-install --vendor dribble \
- --dir %{buildroot}%{_datadir}/applications \
- %{SOURCE2}
-desktop-file-install --vendor dribble \
- --dir %{buildroot}%{_datadir}/applications \
- %{SOURCE3}
-desktop-file-install --vendor dribble \
- --dir %{buildroot}%{_datadir}/applications \
- %{SOURCE4}
-
-%post
-/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
-%postun
-if [ $1 -eq 0 ] ; then
- /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-
-%posttrans
-/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+%make_install
+
+# Validate desktop files
+desktop-file-validate \
+ %{buildroot}%{_datadir}/applications/%{name}.desktop
+desktop-file-validate \
+ %{buildroot}%{_datadir}/applications/%{name}Lite.desktop
+
%files
%{_bindir}/Frodo
-%{_bindir}/FrodoPC
-%{_bindir}/FrodoSC
+%{_bindir}/FrodoLite
%{_datadir}/Frodo
-%{_datadir}/applications/dribble-%{name}.desktop
-%{_datadir}/applications/dribble-%{name}PC.desktop
-%{_datadir}/applications/dribble-%{name}SC.desktop
-%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
-%doc CHANGES Docs/*
-%exclude %{_datadir}/Frodo/TkGui.tcl
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/applications/%{name}Lite.desktop
+%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
+%doc %{_docdir}/%{name}
+%exclude %{_docdir}/%{name}/COPYING
+%license COPYING
-%files gui
-%{_datadir}/Frodo/TkGui.tcl
%changelog
+* Sun Oct 13 2024 Andrea Musuruane <musuruan(a)gmail.com> - 4.3-1
+- Updated to new upstream release
+
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
4.1b-27
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
diff --git a/sources b/sources
index 9d84437..e97d730 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-095b9f21c03204cc13f7f249e8866cd9 FrodoV4_1b.Src.tar.gz
+SHA512 (Frodo-4.3.tar.gz) =
5a3c9a7ab1ca49c7c3fc90e7343f389fbfa83911d5451c9b65057c0301d087609ad2df7af974c1c63faf88020e3ccf1aa3c331d5ff570205b57d792d96f4c469