[packages/yabause] - updated to 0.9.15, build both gtk and qt ports

qboosh qboosh at pld-linux.org
Sat Nov 30 20:04:56 CET 2024


commit 9af0b19ac917dbe9c864d602bee1701d6903eb45
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 30 19:48:29 2024 +0100

    - updated to 0.9.15, build both gtk and qt ports

 yabause-cmake.patch   |  11 ++++
 yabause-desktop.patch |  26 ++++++---
 yabause-lodepng.patch |  40 +++++++++++++
 yabause-musashi.patch |  15 +++++
 yabause-qt5.patch     |  51 +++++++++++++++++
 yabause.spec          | 151 ++++++++++++++++++++++++++++++++++++++++++++------
 6 files changed, 268 insertions(+), 26 deletions(-)
---
diff --git a/yabause.spec b/yabause.spec
index 23cddb7..a29992f 100644
--- a/yabause.spec
+++ b/yabause.spec
@@ -1,22 +1,56 @@
+#
+# Conditional build:
+%bcond_with	ffmpeg	# MPEG support via FFmpeg (< 5)
+%bcond_without	gtk	# GTK+ (2.x) port
+%bcond_without	qt	# Qt (5.x) port
+
 Summary:	A Sega Saturn emulator
 Summary(pl.UTF-8):	Emulator Segi Saturn
 Name:		yabause
-Version:	0.9.10
+Version:	0.9.15
 Release:	1
 License:	GPL v2+
 Group:		X11/Applications/Games
-Source0:	http://dl.sourceforge.net/yabause/%{name}-%{version}.tar.gz
-# Source0-md5:	7e39dd1eb37539d8f24e644fd52a72a7
+#Source0Download: https://yabause.org/download/
+Source0:	https://download.tuxfamily.org/yabause/releases/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	efcf00e038ec24c8310285f87e61d579
 Patch0:		%{name}-desktop.patch
+Patch1:		%{name}-cmake.patch
+Patch2:		%{name}-lodepng.patch
+Patch3:		%{name}-qt5.patch
+Patch4:		%{name}-musashi.patch
 URL:		http://yabause.org/
+BuildRequires:	OpenAL-devel
 BuildRequires:	OpenGL-devel
+BuildRequires:	OpenGL-GLX-devel
 BuildRequires:	OpenGL-glut-devel
-BuildRequires:	SDL-devel
-BuildRequires:	autoconf
-BuildRequires:	automake
-BuildRequires:	gtk+2-devel >= 1:2.0
-BuildRequires:	gtkglext-devel >= 1.0
+%if %{with qt}
+BuildRequires:	Qt5Core-devel >= 5
+BuildRequires:	Qt5Multimedia-devel >= 5
+BuildRequires:	Qt5OpenGL-devel >= 5
+BuildRequires:	Qt5Widgets-devel >= 5
+%endif
+BuildRequires:	SDL2-devel >= 2.0
+BuildRequires:	cmake >= 2.8
+%{?with_ffmpeg:BuildRequires:	ffmpeg-devel < 5}
+%{?with_gtk:BuildRequires:	gdk-pixbuf2-devel >= 2.0}
+BuildRequires:	glew-devel
+%{?with_gtk:BuildRequires:	gtk+2-devel >= 2:2.10}
+%{?with_gtk:BuildRequires:	gtkglext-devel >= 1.0}
+BuildRequires:	libstdc++-devel
+BuildRequires:	lodepng-devel
+BuildRequires:	mini18n-devel
 BuildRequires:	pkgconfig
+BuildRequires:	rpm-build >= 4.6
+BuildRequires:	rpmbuild(macros) >= 1.605
+%if %{with qt}
+BuildRequires:	qt5-build >= 5
+%endif
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXrandr-devel
+BuildRequires:	zlib-devel
+Requires:	%{name}-data = %{version}-%{release}
+Provides:	%{name}-engine = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -24,36 +58,117 @@ Yabause is a Sega Saturn emulator under GNU GPL. It currently runs on
 FreeBSD, GNU/Linux, Mac OS X and Windows. Yabause support booting
 games using Saturn cds or iso files.
 
+This package contains GTK+ port of emulator.
+
 %description -l pl.UTF-8
 Yabause jest emulatorem Segi Saturn udostępnionym na licencji GPL.
 Obecnie działa na systemach FreeBSD, GNU/Linux, Mac OS X i Windows.
 Yabause wspiera gry bootowalne używając plików cds oraz iso.
 
+Ten pakiet zawiera wersję GTK+ emulatora.
+
+%package qt
+Summary:	A Sega Saturn emulator
+Summary(pl.UTF-8):	Emulator Segi Saturn
+Group:		X11/Applications/Games
+Requires:	%{name}-data = %{version}-%{release}
+Provides:	%{name}-engine = %{version}-%{release}
+
+%description qt
+Yabause is a Sega Saturn emulator under GNU GPL. It currently runs on
+FreeBSD, GNU/Linux, Mac OS X and Windows. Yabause support booting
+games using Saturn cds or iso files.
+
+This package contains GTK+ port of emulator.
+
+%description qt -l pl.UTF-8
+Yabause jest emulatorem Segi Saturn udostępnionym na licencji GPL.
+Obecnie działa na systemach FreeBSD, GNU/Linux, Mac OS X i Windows.
+Yabause wspiera gry bootowalne używając plików cds oraz iso.
+
+Ten pakiet zawiera wersję GTK+ emulatora.
+
+%package data
+Summary:	Data for Yabause Sega Saturn emulator
+Summary(pl.UTF-8):	Dane dla Yabause - emulatora Segi Saturn
+Group:		X11/Applications/Games
+Requires:	%{name}-engine = %{version}-%{release}
+BuildArch:	noarch
+
+%description data
+Data for Yabause - Sega Saturn emulator.
+
+%description data -l pl
+Dane dla Yabause - emulatora Segi Saturn.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure
+install -d build
+cd build
+%cmake .. \
+	-DCMAKE_ASM-ATT_COMPILER=as \
+	-DYAB_MULTIBUILD=ON \
+	-DYAB_NETWORK=ON \
+	-DYAB_OPTIMIZATION="" \
+	-DYAB_PORTS="%{?with_gtk:gtk;}%{?with_qt:qt;}runner" \
+	-DYAB_USE_SCSPMIDI=ON \
+	%{?with_ffmpeg:-DYAB_WANT_MPEG=ON}
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# unify to short code
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/yabause/yts/{pl_PL,pl}.yts
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog GOALS README README.LIN
-%attr(755,root,root) %{_bindir}/*
-%{_datadir}/yabause
-%{_desktopdir}/yabause.desktop
-%{_mandir}/man1/yabause.1*
+%doc AUTHORS ChangeLog README
+%attr(755,root,root) %{_bindir}/yabause-gtk
+%{_desktopdir}/yabause-gtk.desktop
+%{_mandir}/man1/yabause-gtk.1*
+
+%files qt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/yabause-qt
+%{_desktopdir}/yabause-qt.desktop
+%{_mandir}/man1/yabause-qt.1*
+
+%files data
+%defattr(644,root,root,755)
+%dir %{_datadir}/yabause
+%dir %{_datadir}/yabause/yts
+%lang(ar) %{_datadir}/yabause/yts/ar.yts
+%lang(da) %{_datadir}/yabause/yts/da.yts
+%lang(de) %{_datadir}/yabause/yts/de.yts
+%lang(el) %{_datadir}/yabause/yts/el.yts
+%lang(es) %{_datadir}/yabause/yts/es.yts
+%lang(fr) %{_datadir}/yabause/yts/fr.yts
+%lang(it) %{_datadir}/yabause/yts/it.yts
+%lang(ja) %{_datadir}/yabause/yts/ja.yts
+%lang(ko) %{_datadir}/yabause/yts/ko.yts
+%lang(lt) %{_datadir}/yabause/yts/lt.yts
+%lang(nl) %{_datadir}/yabause/yts/nl.yts
+%lang(pl) %{_datadir}/yabause/yts/pl.yts
+%lang(pt) %{_datadir}/yabause/yts/pt.yts
+%lang(pt_BR) %{_datadir}/yabause/yts/pt_BR.yts
+%lang(ru) %{_datadir}/yabause/yts/ru.yts
+%lang(sv) %{_datadir}/yabause/yts/sv.yts
+%lang(tr) %{_datadir}/yabause/yts/tr.yts
+%lang(zh_CN) %{_datadir}/yabause/yts/zh_CN.yts
+%lang(zh_TW) %{_datadir}/yabause/yts/zh_TW.yts
 %{_pixmapsdir}/yabause.png
diff --git a/yabause-cmake.patch b/yabause-cmake.patch
new file mode 100644
index 0000000..f01d885
--- /dev/null
+++ b/yabause-cmake.patch
@@ -0,0 +1,11 @@
+--- yabause-0.9.15/src/CMakeLists.txt.orig	2016-08-24 21:37:03.000000000 +0200
++++ yabause-0.9.15/src/CMakeLists.txt	2024-11-29 21:35:15.787838947 +0100
+@@ -662,7 +662,7 @@ endif ()
+ set(YAB_OPTIMIZATION "-O3" CACHE STRING "Override optimization level")
+ 
+ if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
+-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${YAB_OPTIMIZATION} -march=i686 -msse")
++	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${YAB_OPTIMIZATION}")
+ endif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
+ if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
+ 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${YAB_OPTIMIZATION}")
diff --git a/yabause-desktop.patch b/yabause-desktop.patch
index 85b46d5..629a90c 100644
--- a/yabause-desktop.patch
+++ b/yabause-desktop.patch
@@ -1,13 +1,23 @@
---- yabause-0.9.7/src/gtk/yabause.desktop~	2008-11-27 11:49:59.000000000 +0100
-+++ yabause-0.9.7/src/gtk/yabause.desktop	2008-11-27 11:51:08.000000000 +0100
-@@ -2,7 +2,9 @@
+--- yabause-0.9.15/src/gtk/yabause.desktop.in.orig	2016-08-19 17:31:13.000000000 +0200
++++ yabause-0.9.15/src/gtk/yabause.desktop.in	2024-11-29 20:42:16.388396566 +0100
+@@ -2,6 +2,7 @@
  Type=Application
- Name=Yabause (Gtk port)
+-Name=Yabause (Gtk port)
++Name[pl]=Yabause (port Gtk)
  Comment=Sega Saturn emulator
 +Comment[pl]=Emulator Segi Saturn
  TryExec=yabause
- Exec=yabause
+ Exec=@YAB_PORT_NAME@
+ Icon=yabause
+--- yabause-0.9.15/src/qt/yabause.desktop.in.orig	2016-08-19 17:31:13.000000000 +0200
++++ yabause-0.9.15/src/qt/yabause.desktop.in	2024-11-30 19:25:30.311947512 +0100
+@@ -1,7 +1,9 @@
+ [Desktop Entry]
+ Type=Application
+ Name=Yabause (Qt port)
++Name[pl]=Yabause (port Qt)
+ Comment=Sega Saturn emulator
++Comment[pl]=Emulator Segi Saturn
+ TryExec=yabause
+ Exec=@YAB_PORT_NAME@
  Icon=yabause
--Categories=GNOME;GTK;Game;
-+Categories=Application;Game;
-+# vi: encoding=utf-8
diff --git a/yabause-lodepng.patch b/yabause-lodepng.patch
new file mode 100644
index 0000000..92a1dd5
--- /dev/null
+++ b/yabause-lodepng.patch
@@ -0,0 +1,40 @@
+--- yabause-0.9.15/src/runner/CMakeLists.txt.orig	2016-08-19 17:31:13.000000000 +0200
++++ yabause-0.9.15/src/runner/CMakeLists.txt	2024-11-29 21:43:48.901725838 +0100
+@@ -4,15 +4,11 @@ cmake_minimum_required(VERSION 2.8)
+ 
+ yab_port_start()
+ 
+-if ((NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lodepng/lodepng.h") OR (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lodepng/lodepng.cpp"))
+-	return()
+-endif()
+-
+ include_directories(${PORT_INCLUDE_DIRS})
+ 
+ find_package(Threads)
+ 
+ add_executable(yabause-runner yui.cpp)
+-target_link_libraries(yabause-runner yabause ${YABAUSE_LIBRARIES} ${PORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
++target_link_libraries(yabause-runner yabause ${YABAUSE_LIBRARIES} ${PORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} lodepng)
+ 
+-yab_port_success(yabause-runner)
+\ No newline at end of file
++yab_port_success(yabause-runner)
+--- yabause-0.9.15/src/runner/yui.cpp.orig	2016-08-24 21:37:03.000000000 +0200
++++ yabause-0.9.15/src/runner/yui.cpp	2024-11-29 21:44:04.908305789 +0100
+@@ -36,8 +36,7 @@ extern "C"
+ extern u8 *vdp1backframebuffer;
+ }
+ 
+-#include "lodepng/lodepng.h"
+-#include "lodepng/lodepng.cpp"
++#include <lodepng.h>
+ 
+ #include <string>
+ #include <iostream>
+@@ -1109,4 +1108,4 @@ int main(int argc, char *argv[])
+       std::cout << "Unknown mode argument." << std::endl;
+       return false;
+    }
+-}
+\ Brak znaku nowej linii na ko�cu pliku
++}
diff --git a/yabause-musashi.patch b/yabause-musashi.patch
new file mode 100644
index 0000000..5b6a95d
--- /dev/null
+++ b/yabause-musashi.patch
@@ -0,0 +1,15 @@
+--- yabause-0.9.15/src/musashi/m68kdasm.c.orig	2016-08-19 17:31:13.000000000 +0200
++++ yabause-0.9.15/src/musashi/m68kdasm.c	2024-11-30 16:23:36.757737976 +0100
+@@ -231,6 +231,12 @@ static char* g_cpcc[64] =
+ /* =========================== UTILITY FUNCTIONS ========================== */
+ /* ======================================================================== */
+ 
++#if !M68K_SEPARATE_READS
++#define m68k_read_disassembler_8(A) m68k_read_memory_8(A)
++#define m68k_read_disassembler_16(A) m68k_read_memory_16(A)
++#define m68k_read_disassembler_32(A) m68k_read_memory_32(A)
++#endif /* M68K_SEPARATE_READS */
++
+ #define LIMIT_CPU_TYPES(ALLOWED_CPU_TYPES)	\
+ 	if(!(g_cpu_type & ALLOWED_CPU_TYPES))	\
+ 	{										\
diff --git a/yabause-qt5.patch b/yabause-qt5.patch
new file mode 100644
index 0000000..a011bfc
--- /dev/null
+++ b/yabause-qt5.patch
@@ -0,0 +1,51 @@
+From: Guillaume Duhamel <guillaume.duhamel at gmail.com>
+Origin: upstream, https://github.com/Yabause/yabause/commit/06a816c
+Bug-Debian: https://bugs.debian.org/875242
+Subject: [PATCH] Fix qt 5.11 (#422)
+
+Header fixes for Qt 5.11
+
+--- a/src/qt/ui/UICheatRaw.cpp
++++ b/src/qt/ui/UICheatRaw.cpp
+@@ -20,8 +20,6 @@
+ #include "UIHexInput.h"
+ #include "../QtYabause.h"
+ 
+-#include <QButtonGroup>
+-
+ UICheatRaw::UICheatRaw( QWidget* p )
+ 	: QDialog( p )
+ {
+--- a/src/qt/ui/UICheatRaw.h
++++ b/src/qt/ui/UICheatRaw.h
+@@ -21,7 +21,7 @@
+ 
+ #include "ui_UICheatRaw.h"
+ 
+-class QButtonGroup;
++#include <QButtonGroup>
+ 
+ class UICheatRaw : public QDialog, public Ui::UICheatRaw
+ {
+--- a/src/qt/ui/UICheats.cpp
++++ b/src/qt/ui/UICheats.cpp
+@@ -21,6 +21,8 @@
+ #include "UICheatRaw.h"
+ #include "../CommonDialogs.h"
+ 
++#include <QButtonGroup>
++
+ UICheats::UICheats( QWidget* p )
+ 	: QDialog( p )
+ {
+--- a/src/qt/ui/UIHexInput.h
++++ b/src/qt/ui/UIHexInput.h
+@@ -22,6 +22,8 @@
+ #include "ui_UIHexInput.h"
+ #include "../QtYabause.h"
+ 
++#include <QValidator>
++
+ class HexValidator : public QValidator
+ {
+    Q_OBJECT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/yabause.git/commitdiff/9af0b19ac917dbe9c864d602bee1701d6903eb45



More information about the pld-cvs-commit mailing list