diff --git a/games-emulation/dosbox/dosbox-0.74.recipe b/games-emulation/dosbox/dosbox-0.74.recipe index 0969927e2..302f35ea2 100644 --- a/games-emulation/dosbox/dosbox-0.74.recipe +++ b/games-emulation/dosbox/dosbox-0.74.recipe @@ -9,16 +9,16 @@ older games... You can re-live the good old days with the help of DOSBox, it can run plenty \ of the old classics that don't run on your new computer! DOSBox is totally free of charge and OpenSource." -HOMEPAGE="http://www.dosbox.com/" +HOMEPAGE="https://www.dosbox.com/" COPYRIGHT="2002-2013 The DosBox Team" LICENSE="GNU GPL v2" -REVISION="5" +REVISION="6" SOURCE_URI="http://sourceforge.net/projects/dosbox/files/dosbox/$portVersion/dosbox-$portVersion.tar.gz" CHECKSUM_SHA256="13f74916e2d4002bad1978e55727f302ff6df3d9be2f9b0e271501bd0a938e05" PATCHES="dosbox-$portVersion.patchset" ADDITIONAL_FILES="dosbox.rdef" -ARCHITECTURES="!x86_gcc2 x86 x86_64" +ARCHITECTURES="!x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" PROVIDES=" @@ -57,6 +57,7 @@ BUILD_PREREQUIRES=" BUILD() { + autoreconf -vfi # Dynamic core x86 and fpu-x86 available on on x86 cpu LDFLAGS=-lnetwork runConfigure ./configure \ --enable-core-inline \ diff --git a/games-emulation/dosbox/patches/dosbox-0.74.patchset b/games-emulation/dosbox/patches/dosbox-0.74.patchset index 733796af0..b50a83506 100644 --- a/games-emulation/dosbox/patches/dosbox-0.74.patchset +++ b/games-emulation/dosbox/patches/dosbox-0.74.patchset @@ -1,40 +1,100 @@ -From cb39e660b74da8cc799da8512b24dff0146bd1eb Mon Sep 17 00:00:00 2001 +From ebaa74537eb7c7d2f10fe213d4d96b66ec6ba07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sun, 18 Jun 2017 10:23:41 +0200 -Subject: [PATCH] Config file location +Subject: Config file location ---- - src/gui/sdlmain.cpp | 16 +++++++++------- - src/misc/cross.cpp | 3 +++ - 2 files changed, 12 insertions(+), 7 deletions(-) +diff --git a/configure.in b/configure.in +index 016ea95..9e7e399 100644 +--- a/configure.in ++++ b/configure.in +@@ -470,6 +470,10 @@ case "$host" in + AC_DEFINE(LINUX, 1, [Compiling on GNU/Linux]) + AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).]) + ;; ++ *-*-haiku*) ++ AC_DEFINE(HAIKU, 1, [Compiling on Haiku]) ++ AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).]) ++ ;; + *-*-freebsd* | *-*-dragonfly* | *-*-netbsd* | *-*-openbsd*) + dnl Disabled directserial for now. It doesn't do anything without + dnl specifying an extra ifdef in directserial_posix.* diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp -index 6bbc24c..59fd732 100644 +index 6bbc24c..17df96b 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -117,6 +117,8 @@ struct private_hwdata { #define DEFAULT_CONFIG_FILE "/dosbox.conf" #elif defined(MACOSX) #define DEFAULT_CONFIG_FILE "/Library/Preferences/DOSBox Preferences" -+#elif defined(__HAIKU__) -+#define DEFAULT_CONFIG_FILE "~/config/settings/dosbox/dosboxrc" ++#elif defined(HAIKU) ++#define DEFAULT_CONFIG_FILE "~/config/settings/dosbox/dosbox.conf" #else /*linux freebsd*/ #define DEFAULT_CONFIG_FILE "/.dosboxrc" #endif +diff --git a/src/hardware/serialport/libserial.cpp b/src/hardware/serialport/libserial.cpp +index 5d66851..90f29d2 100644 +--- a/src/hardware/serialport/libserial.cpp ++++ b/src/hardware/serialport/libserial.cpp +@@ -254,7 +254,7 @@ bool SERIAL_setCommParameters(COMPORT port, + } + #endif + +-#if defined (LINUX) || defined (MACOSX) || defined (BSD) ++#if defined (LINUX) || defined (MACOSX) || defined (BSD) || defined (HAIKU) + + #include // strlen + #include diff --git a/src/misc/cross.cpp b/src/misc/cross.cpp -index bc4557e..d5f0e65 100644 +index bc4557e..92747b6 100644 --- a/src/misc/cross.cpp +++ b/src/misc/cross.cpp @@ -62,6 +62,9 @@ void Cross::GetPlatformConfigDir(std::string& in) { #elif defined(MACOSX) in = "~/Library/Preferences"; ResolveHomedir(in); -+#elif defined(__HAIKU__) -+ in = "~/config/settings/dosbox/"; ++#elif defined(HAIKU) ++ in = "~/config/settings/dosbox"; + ResolveHomedir(in); #else in = "~/.dosbox"; ResolveHomedir(in); --- -2.12.2 +@@ -89,6 +92,10 @@ void Cross::CreatePlatformConfigDir(std::string& in) { + in = "~/Library/Preferences/"; + ResolveHomedir(in); + //Don't create it. Assume it exists ++#elif defined(HAIKU) ++ in = "~/config/settings/dosbox"; ++ ResolveHomedir(in); ++ mkdir(in.c_str(),0700); + #else + in = "~/.dosbox"; + ResolveHomedir(in); +-- +2.16.2 + + +From 623a2ef7d956508f8982e04eefc88a60945f7226 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Wed, 21 Mar 2018 16:02:17 +0300 +Subject: Disable usescancodes on Haiku + +* DOSBox uses "raw" key codes from SDL, and doesn't handle the fact +that these keycodes are different from one platform to another. + +diff --git a/src/gui/sdl_mapper.cpp b/src/gui/sdl_mapper.cpp +index c905c05..bd83cd3 100644 +--- a/src/gui/sdl_mapper.cpp ++++ b/src/gui/sdl_mapper.cpp +@@ -2403,6 +2403,8 @@ void MAPPER_StartUp(Section * sec) { + /* Note: table has to be tested/updated for various OSs */ + #if defined (MACOSX) + /* nothing */ ++#elif defined(HAIKU) ++ usescancodes = false; + #elif defined(OS2) + sdlkey_map[0x61]=SDLK_UP; + sdlkey_map[0x66]=SDLK_DOWN; +-- +2.16.2