FCEUX: add missing changes

This commit is contained in:
Gerasim Troeglazov
2023-07-30 20:53:03 +10:00
parent 7f63442bbf
commit 58d8573421
2 changed files with 103 additions and 12 deletions

View File

@@ -6,10 +6,11 @@ bult-in and a high level of portability."
HOMEPAGE="http://fceux.com/web/"
COPYRIGHT="1998-2014 tamentis & zamaz"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/TASEmulators/fceux/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="78156f3685c55849351178773940871ed607bc4fc37f233fdab58c232e3208fa"
PATCHES="fceux-$portVersion.patchset"
ADDITIONAL_FILES="fceux.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
@@ -42,9 +43,8 @@ BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL${secondaryArchSuffix}
devel:libglu$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix >= 58
devel:libavformat$secondaryArchSuffix >= 58
devel:liblua$secondaryArchSuffix >= 5.1
devel:libminizip$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
@@ -52,8 +52,6 @@ BUILD_REQUIRES="
devel:libQt5OpenGL$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libx265$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
@@ -78,9 +76,21 @@ INSTALL()
make -C build install
mv $appsDir/fceux $appsDir/FCEUX
# we are not linux
rm -rf $dataDir/{applications,pixmaps}
local APP_SIGNATURE="application/x-vnd.fceux"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/fceux.rdef.in > fceux.rdef
addResourcesToBinaries fceux.rdef $appsDir/FCEUX
addAppDeskbarSymlink $appsDir/FCEUX
}

View File

@@ -1,4 +1,4 @@
From e3841629dbf058aa5fc00c111be431bb714d909d Mon Sep 17 00:00:00 2001
From 6eccfb2b44d73dd00acef730fc0637a6cb997aa3 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 3 Jul 2023 12:46:14 +0000
Subject: Fix detection for system lua (5.1)
@@ -21,7 +21,7 @@ index c14a045..764fb07 100644
2.37.3
From 160d393618675c6ac53eaea7af58281d559cb49c Mon Sep 17 00:00:00 2001
From b37ae5888146982c38fcf9211de3141d7bdf65ba Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 3 Jul 2023 12:47:56 +0000
Subject: Fix build
@@ -174,7 +174,7 @@ index f82d89d..10731af 100644
2.37.3
From 00de662d512fc290dcef0695ff1a0103a87cdd4b Mon Sep 17 00:00:00 2001
From 4bb442a40022d9504855d49a0be30a3b11c7767d Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 3 Jul 2023 13:47:07 +0000
Subject: Fix linking errors
@@ -208,7 +208,7 @@ index 764fb07..d15bfff 100644
2.37.3
From bfaf720989dd1a498abe2dc5f1d35bd62b98197a Mon Sep 17 00:00:00 2001
From 0c12e8caf253a7d538cd8abf2521a7164fadcc68 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 3 Jul 2023 14:52:09 +0000
Subject: Fix installation paths
@@ -239,3 +239,84 @@ index d15bfff..e44a0bd 100644
--
2.37.3
From 1efaf99c7bddb05d538eb3bfdec10c022a4c416d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 30 Jul 2023 11:48:28 +1000
Subject: Disable SDL video driver
diff --git a/src/drivers/Qt/ConsoleVideoConf.cpp b/src/drivers/Qt/ConsoleVideoConf.cpp
index 0c45f2f..0707267 100644
--- a/src/drivers/Qt/ConsoleVideoConf.cpp
+++ b/src/drivers/Qt/ConsoleVideoConf.cpp
@@ -86,7 +86,10 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
driverSelect = new QComboBox();
driverSelect->addItem( tr("OpenGL"), 0 );
+ // Remove SDL video driver for Haiku
+#ifndef __HAIKU__
driverSelect->addItem( tr("SDL"), 1 );
+#endif
hbox1 = new QHBoxLayout();
diff --git a/src/drivers/Qt/ConsoleWindow.cpp b/src/drivers/Qt/ConsoleWindow.cpp
index e79abca..4f808b2 100644
--- a/src/drivers/Qt/ConsoleWindow.cpp
+++ b/src/drivers/Qt/ConsoleWindow.cpp
@@ -147,7 +147,10 @@ consoleWin_t::consoleWin_t(QWidget *parent)
g_config->getOption( "SDL.AutoHideMenuFullsreen", &autoHideMenuFullscreen );
g_config->getOption( "SDL.ContextMenuEnable", &contextMenuEnable );
g_config->getOption( "SDL.Sound.UseGlobalFocus", &soundUseGlobalFocus );
+ // Disable SDL video driver for Haiku
+#ifndef __HAIKU__
g_config->getOption ("SDL.VideoDriver", &use_SDL_video);
+#endif
if ( use_SDL_video )
{
--
2.37.3
From e8026ff6c9be2eb4b1076d05af24b7d2f8158a49 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 30 Jul 2023 11:49:33 +1000
Subject: Enable native file dialogs by default
diff --git a/src/drivers/Qt/GuiConf.cpp b/src/drivers/Qt/GuiConf.cpp
index 2147658..6082b03 100644
--- a/src/drivers/Qt/GuiConf.cpp
+++ b/src/drivers/Qt/GuiConf.cpp
@@ -625,6 +625,8 @@ QStyle *fceuStyle::styleBase(QStyle *style) const
QString defaultStyle("fusion");
#elif __APPLE__
QString defaultStyle("fusion");
+#elif __HAIKU__
+ QString defaultStyle("haiku");
#else
QString defaultStyle("fusion");
#endif
diff --git a/src/drivers/Qt/config.cpp b/src/drivers/Qt/config.cpp
index cffe8c2..d56a090 100644
--- a/src/drivers/Qt/config.cpp
+++ b/src/drivers/Qt/config.cpp
@@ -834,8 +834,13 @@ InitConfig()
config->addOption("SDL.TasSaveCompact_GreenzoneSavingMode" , tasCfg.saveCompact_GreenzoneSavingMode );
config->addOption("SDL.TasLastAuthorName" , "");
+#ifdef __HAIKU__
+ config->addOption("_useNativeFileDialog", "SDL.UseNativeFileDialog", true);
+ config->addOption("_useNativeMenuBar" , "SDL.UseNativeMenuBar", true);
+#else
config->addOption("_useNativeFileDialog", "SDL.UseNativeFileDialog", false);
config->addOption("_useNativeMenuBar" , "SDL.UseNativeMenuBar", false);
+#endif
config->addOption("SDL.PauseOnMainMenuAccess", false);
config->addOption("SDL.AutoHideMenuFullsreen", false);
config->addOption("SDL.ContextMenuEnable", true);
--
2.37.3