fceux, bump version (#8942)

This commit is contained in:
Schrijvers Luc
2023-07-03 15:49:22 +02:00
committed by GitHub
parent 3a148026ff
commit b7b86146cc
4 changed files with 327 additions and 195 deletions

View File

@@ -1,52 +0,0 @@
SUMMARY="An emulator for the NES/Famicom"
DESCRIPTION="FCEUX is an emulator for the NES and Famicom, based on FCE Ultra \
which is based on FCE. It combines many different changes of FCE Ultra, like \
support for a lot of the different hardware of NES Cartridges, rerecording \
bult-in and a high level of portability."
HOMEPAGE="http://fceux.com/web/"
COPYRIGHT="1998-2014 tamentis & zamaz"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/fceultra/files/Source%20Code/2.2.2%20src/fceux-2.2.2.src.tar.gz"
CHECKSUM_SHA256="804d11bdb4a195f3a580ce5d2d01be877582763378637e16186a22459f5fe5e1"
PATCHES="fceux-$portVersion.patch"
ARCHITECTURES="?all !x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
fceux$secondaryArchSuffix = $portVersion
cmd:fceux$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
glu$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
glu${secondaryArchSuffix}_devel
devel:libgl${secondaryArchSuffix}
devel:libsdl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
"
BUILD()
{
scons OPENGL=1 GTK=0 LUA=0 $jobArgs
}
INSTALL()
{
mkdir -p $binDir $manDir/man6
cp bin/fceux $binDir
cp documentation/fceux.6 $manDir/man6
}

View File

@@ -0,0 +1,86 @@
SUMMARY="An emulator for the NES/Famicom"
DESCRIPTION="FCEUX is an emulator for the NES and Famicom, based on FCE Ultra \
which is based on FCE. It combines many different changes of FCE Ultra, like \
support for a lot of the different hardware of NES Cartridges, rerecording \
bult-in and a high level of portability."
HOMEPAGE="http://fceux.com/web/"
COPYRIGHT="1998-2014 tamentis & zamaz"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/TASEmulators/fceux/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="78156f3685c55849351178773940871ed607bc4fc37f233fdab58c232e3208fa"
PATCHES="fceux-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
fceux$secondaryArchSuffix = $portVersion
app:FCEUX$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:liblua$secondaryArchSuffix >= 5.1
lib:libminizip$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5OpenGL$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libx265$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL${secondaryArchSuffix}
devel:libglu$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:liblua$secondaryArchSuffix >= 5.1
devel:libminizip$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5OpenGL$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libx265$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$appsDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
mv $appsDir/fceux $appsDir/FCEUX
# we are not linux
rm -rf $dataDir/{applications,pixmaps}
addAppDeskbarSymlink $appsDir/FCEUX
}

View File

@@ -1,143 +0,0 @@
From d960b6ab8ec3d9e25916d6c09c22febe55a716e9 Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.nl>
Date: Sun, 4 Jan 2015 19:33:38 +0100
Subject: Fix Haiku build
diff --git a/SConstruct b/SConstruct
index 4d5b446..a6fb618 100644
--- a/SConstruct
+++ b/SConstruct
@@ -33,7 +33,7 @@ opts.AddVariables(
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
prefix = GetOption('prefix')
-env = Environment(options = opts)
+env = Environment(options = opts, ENV=os.environ)
if env['RELEASE']:
env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
@@ -46,23 +46,6 @@ if platform.system == "ppc":
# Default compiler flags:
env.Append(CCFLAGS = ['-Wall', '-Wno-write-strings', '-Wno-sign-compare'])
-if os.environ.has_key('PLATFORM'):
- env.Replace(PLATFORM = os.environ['PLATFORM'])
-if os.environ.has_key('CC'):
- env.Replace(CC = os.environ['CC'])
-if os.environ.has_key('CXX'):
- env.Replace(CXX = os.environ['CXX'])
-if os.environ.has_key('WINDRES'):
- env.Replace(WINDRES = os.environ['WINDRES'])
-if os.environ.has_key('CFLAGS'):
- env.Append(CCFLAGS = os.environ['CFLAGS'].split())
-if os.environ.has_key('CXXFLAGS'):
- env.Append(CXXFLAGS = os.environ['CXXFLAGS'].split())
-if os.environ.has_key('CPPFLAGS'):
- env.Append(CPPFLAGS = os.environ['CPPFLAGS'].split())
-if os.environ.has_key('LDFLAGS'):
- env.Append(LINKFLAGS = os.environ['LDFLAGS'].split())
-
print "platform: ", env['PLATFORM']
# compile with clang
@@ -187,7 +170,6 @@ else:
Export('env')
fceux = SConscript('src/SConscript')
-env.Program(target="fceux-net-server", source=["fceux-server/server.cpp", "fceux-server/md5.cpp", "fceux-server/throttle.cpp"])
# Installation rules
if prefix == None:
@@ -200,9 +182,6 @@ if env['PLATFORM'] == 'win32':
fceux_src = 'src/fceux' + exe_suffix
fceux_dst = 'bin/fceux' + exe_suffix
-fceux_net_server_src = 'fceux-net-server' + exe_suffix
-fceux_net_server_dst = 'bin/fceux-net-server' + exe_suffix
-
auxlib_src = 'src/auxlib.lua'
auxlib_dst = 'bin/auxlib.lua'
auxlib_inst_dst = prefix + '/share/fceux/auxlib.lua'
@@ -212,13 +191,10 @@ fceux_h_dst = 'bin/fceux.chm'
env.Command(fceux_h_dst, fceux_h_src, [Copy(fceux_h_dst, fceux_h_src)])
env.Command(fceux_dst, fceux_src, [Copy(fceux_dst, fceux_src)])
-env.Command(fceux_net_server_dst, fceux_net_server_src, [Copy(fceux_net_server_dst, fceux_net_server_src)])
env.Command(auxlib_dst, auxlib_src, [Copy(auxlib_dst, auxlib_src)])
man_src = 'documentation/fceux.6'
-man_net_src = 'documentation/fceux-net-server.6'
man_dst = prefix + '/share/man/man6/fceux.6'
-man_net_dst = prefix + '/share/man/man6/fceux-net-server.6'
share_src = 'output/'
share_dst = prefix + '/share/fceux/'
@@ -230,12 +206,24 @@ desktop_src = 'fceux.desktop'
desktop_dst = prefix + '/share/applications/'
env.Install(prefix + "/bin/", fceux)
-env.Install(prefix + "/bin/", "fceux-net-server")
# TODO: Where to put auxlib on "scons install?"
env.Alias('install', env.Command(auxlib_inst_dst, auxlib_src, [Copy(auxlib_inst_dst, auxlib_src)]))
env.Alias('install', env.Command(share_dst, share_src, [Copy(share_dst, share_src)]))
env.Alias('install', env.Command(man_dst, man_src, [Copy(man_dst, man_src)]))
-env.Alias('install', env.Command(man_net_dst, man_net_src, [Copy(man_net_dst, man_net_src)]))
env.Alias('install', env.Command(image_dst, image_src, [Copy(image_dst, image_src)]))
env.Alias('install', env.Command(desktop_dst, desktop_src, [Copy(desktop_dst, desktop_src)]))
env.Alias('install', (prefix + "/bin/"))
+
+
+if env['PLATFORM'] != 'haiku':
+ env.Program(target="fceux-net-server", source=["fceux-server/server.cpp", "fceux-server/md5.cpp", "fceux-server/throttle.cpp"])
+
+ fceux_net_server_src = 'fceux-net-server' + exe_suffix
+ fceux_net_server_dst = 'bin/fceux-net-server' + exe_suffix
+ env.Command(fceux_net_server_dst, fceux_net_server_src, [Copy(fceux_net_server_dst, fceux_net_server_src)])
+
+ env.Install(prefix + "/bin/", "fceux-net-server")
+
+ man_net_src = 'documentation/fceux-net-server.6'
+ man_net_dst = prefix + '/share/man/man6/fceux-net-server.6'
+ env.Alias('install', env.Command(man_net_dst, man_net_src, [Copy(man_net_dst, man_net_src)]))
diff --git a/src/drivers/sdl/SConscript b/src/drivers/sdl/SConscript
index 7a53b07..8f62c40 100644
--- a/src/drivers/sdl/SConscript
+++ b/src/drivers/sdl/SConscript
@@ -4,7 +4,10 @@ Import('env')
config_string = 'pkg-config --cflags --libs x11'
if env['PLATFORM'] == 'darwin':
config_string = 'PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ ' + config_string
-env.ParseConfig(config_string)
+
+if env['PLATFORM'] != 'haiku':
+ env.ParseConfig(config_string)
+
Export('env')
source_list = Split(
@@ -26,5 +29,8 @@ if 'GL' in env['LIBS']:
if env['GTK'] or env['GTK3']:
source_list.append('gui.cpp')
+if env['PLATFORM'] == 'haiku':
+ env.Append(LIBS = ['network'])
+
source_list = ['drivers/sdl/' + source for source in source_list]
Return('source_list')
diff --git a/src/utils/ioapi.cpp b/src/utils/ioapi.cpp
index c2b536f..0363efd 100644
--- a/src/utils/ioapi.cpp
+++ b/src/utils/ioapi.cpp
@@ -14,7 +14,7 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
+#if defined(__APPLE__) || defined(__HAIKU__) || defined(IOAPI_NO_64)
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream)
--
1.8.3.4

View File

@@ -0,0 +1,241 @@
From e3841629dbf058aa5fc00c111be431bb714d909d 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)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c14a045..764fb07 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -162,7 +162,7 @@ else(WIN32)
endif()
# Check for LUA
- pkg_search_module( LUA lua5.1 lua-5.1 )
+ pkg_search_module( LUA lua lua5.1 lua-5.1 )
add_definitions( -DHAVE_ASPRINTF ) # What system wouldn't have this?
add_definitions( -DLUA_USE_LINUX ) # This needs to be set when link LUA internally for linux and macosx
--
2.37.3
From 160d393618675c6ac53eaea7af58281d559cb49c Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 3 Jul 2023 12:47:56 +0000
Subject: Fix build
diff --git a/src/drivers/Qt/ConsoleWindow.cpp b/src/drivers/Qt/ConsoleWindow.cpp
index 54c647b..e79abca 100644
--- a/src/drivers/Qt/ConsoleWindow.cpp
+++ b/src/drivers/Qt/ConsoleWindow.cpp
@@ -19,12 +19,14 @@
*/
// ConsoleWindow.cpp
//
-#if defined(__linux__) || defined(__unix__)
+#if defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
+#ifndef __HAIKU__
#include <sys/syscall.h>
+#endif
#include <pthread.h>
#endif
@@ -4245,11 +4247,11 @@ void consoleWin_t::openOfflineDocs(void)
return;
}
-#if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
int consoleWin_t::setNicePriority( int value )
{
int ret = 0;
-#if defined(__linux__) || defined(__unix__)
+#if defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
if ( value < -20 )
{
@@ -4552,7 +4554,7 @@ void consoleWin_t::updatePeriodic(void)
emulatorThread_t::emulatorThread_t( QObject *parent )
: QThread(parent)
{
- #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
pself = 0;
#endif
@@ -4571,7 +4573,7 @@ void emulatorThread_t::init(void)
{
int opt;
- #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
if ( pthread_self() == (pthread_t)QThread::currentThreadId() )
{
pself = pthread_self();
@@ -4581,7 +4583,7 @@ void emulatorThread_t::init(void)
#if defined(__linux__)
pid = gettid();
- #elif defined(__APPLE__) || defined(__unix__)
+ #elif defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
pid = getpid();
#endif
@@ -4613,11 +4615,11 @@ void emulatorThread_t::setPriority( QThread::Priority priority_req )
//printf("Set Priority: %i \n", priority() );
}
-#if defined(__linux__) || defined(__unix__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)
int emulatorThread_t::setNicePriority( int value )
{
int ret = 0;
-#if defined(__linux__) || defined(__unix__)
+#if defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
if ( value < -20 )
{
@@ -4697,7 +4699,7 @@ int emulatorThread_t::getSchedParam( int &policy, int &priority )
int emulatorThread_t::setSchedParam( int policy, int priority )
{
int ret = 0;
-#if defined(__linux__) || defined(__unix__)
+#if defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
struct sched_param p;
int minPrio, maxPrio;
diff --git a/src/drivers/Qt/ConsoleWindow.h b/src/drivers/Qt/ConsoleWindow.h
index eda9fd3..ad32d2e 100644
--- a/src/drivers/Qt/ConsoleWindow.h
+++ b/src/drivers/Qt/ConsoleWindow.h
@@ -45,7 +45,7 @@ class emulatorThread_t : public QThread
void setPriority( QThread::Priority priority );
- #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
int setSchedParam( int policy, int priority );
int getSchedParam( int &policy, int &priority );
int setNicePriority( int value );
@@ -58,7 +58,7 @@ class emulatorThread_t : public QThread
private:
void init(void);
- #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
pthread_t pself;
int pid;
#endif
@@ -145,7 +145,7 @@ class consoleWin_t : public QMainWindow
int showListSelectDialog( const char *title, std::vector <std::string> &l );
- #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
int setSchedParam( int policy, int priority );
int getSchedParam( int &policy, int &priority );
int setNicePriority( int value );
diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp
index 6aa16a5..fbb54d7 100644
--- a/src/lua-engine.cpp
+++ b/src/lua-engine.cpp
@@ -1,4 +1,4 @@
-#if defined(__linux__) || defined(__unix__)
+#if defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
#include <stdlib.h>
#include <unistd.h>
#define SetCurrentDir chdir
diff --git a/src/types.h b/src/types.h
index f82d89d..10731af 100644
--- a/src/types.h
+++ b/src/types.h
@@ -80,9 +80,13 @@ typedef uint32_t uint32;
#endif
#ifdef __GNUC__
+ #ifdef __HAIKU__
+ #include <SupportDefs.h>
+ #else
typedef unsigned long long uint64;
typedef uint64 u64;
typedef long long int64;
+ #endif
#define INLINE inline
#define GINLINE inline
#elif MSVC
--
2.37.3
From 00de662d512fc290dcef0695ff1a0103a87cdd4b 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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 764fb07..d15bfff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -176,7 +176,7 @@ else(WIN32)
if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set( SYS_LIBS -lpthread)
else()
- set( SYS_LIBS -lrt -lpthread -ldl)
+ set( SYS_LIBS -lpthread)
endif()
endif()
@@ -652,6 +652,10 @@ if (WIN32)
set_target_properties(${APP_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
endif()
+if (HAIKU)
+ target_link_libraries( ${APP_NAME} network )
+endif()
+
if (APPLE)
install( TARGETS ${APP_NAME}
--
2.37.3
From bfaf720989dd1a498abe2dc5f1d35bd62b98197a 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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d15bfff..e44a0bd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -694,12 +694,12 @@ install( CODE "
else(APPLE)
install( TARGETS ${APP_NAME}
- RUNTIME DESTINATION bin )
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
-install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/auxlib.lua DESTINATION share/fceux/luaScripts )
-install( DIRECTORY ${CMAKE_SOURCE_DIR}/output/. DESTINATION share/fceux )
-install( FILES ${CMAKE_SOURCE_DIR}/fceux1.png DESTINATION share/pixmaps )
-install( FILES ${CMAKE_SOURCE_DIR}/fceux.desktop DESTINATION share/applications )
+install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/auxlib.lua DESTINATION ${CMAKE_INSTALL_DATADIR}/fceux/luaScripts )
+install( DIRECTORY ${CMAKE_SOURCE_DIR}/output/. DESTINATION ${CMAKE_INSTALL_DATADIR}/fceux )
+install( FILES ${CMAKE_SOURCE_DIR}/fceux1.png DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps )
+install( FILES ${CMAKE_SOURCE_DIR}/fceux.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications )
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6 )
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux-net-server.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6 )
--
2.37.3