mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-30 03:58:51 +02:00
Merged in puckipedia/haikuports/fceux (pull request #417)
Add fceux recipe
This commit is contained in:
62
games-emulation/fceux/fceux-2.2.2.recipe
Normal file
62
games-emulation/fceux/fceux-2.2.2.recipe
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
SUMMARY="NES/Famicom emulator"
|
||||||
|
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"
|
||||||
|
SRC_URI="http://sourceforge.net/projects/fceultra/files/Source%20Code/2.2.2%20src/fceux-2.2.2.src.tar.gz"
|
||||||
|
CHECKSUM_SHA256="804d11bdb4a195f3a580ce5d2d01be877582763378637e16186a22459f5fe5e1"
|
||||||
|
REVISION="1"
|
||||||
|
LICENSE="GNU GPL v2"
|
||||||
|
|
||||||
|
ARCHITECTURES="x86 ?x86_64"
|
||||||
|
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||||
|
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||||
|
# for a different secondary architecture.
|
||||||
|
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||||
|
else
|
||||||
|
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
|
||||||
|
fi
|
||||||
|
SECONDARY_ARCHITECTURES="x86"
|
||||||
|
|
||||||
|
PATCHES="fceux-$portVersion.patch"
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
fceux$secondaryArchSuffix = $portVersion
|
||||||
|
cmd:fceux$secondaryArchSuffix = $portVersion
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix
|
||||||
|
lib:libsdl$secondaryArchSuffix
|
||||||
|
lib:libgl$secondaryArchSuffix
|
||||||
|
glu$secondaryArchSuffix
|
||||||
|
lib:libz$secondaryArchSuffix
|
||||||
|
lib:libstdc++$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel
|
||||||
|
devel:libsdl$secondaryArchSuffix
|
||||||
|
devel:libgl${secondaryArchSuffix}
|
||||||
|
glu${secondaryArchSuffix}_devel
|
||||||
|
devel:libz$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
cmd:scons
|
||||||
|
cmd:g++$secondaryArchSuffix
|
||||||
|
cmd:ld$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
143
games-emulation/fceux/patches/fceux-2.2.2.patch
Normal file
143
games-emulation/fceux/patches/fceux-2.2.2.patch
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
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
|
||||||
|
|
||||||
Reference in New Issue
Block a user