1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +00:00

Ports/dosbox-staging: Update to version 0.80.1

This commit updates `dosbox-staging` to the latest stable version and
removes patches that are no longer needed for successful
compilation/usage.
This commit is contained in:
Beckett Normington 2023-08-27 21:54:22 -04:00 committed by Tim Schumacher
parent ece122353b
commit f56b772b29
9 changed files with 29 additions and 156 deletions

View file

@ -54,7 +54,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`dmidecode`](dmidecode/) | dmidecode | 3.5 | https://github.com/mirror/dmidecode |
| [`doom`](doom/) | DOOM | | https://github.com/ozkl/doomgeneric |
| [`dos2unix`](dos2unix/) | dos2unix | 7.5.0 | https://waterlan.home.xs4all.nl/dos2unix.html |
| [`dosbox-staging`](dosbox-staging/) | DOSBox Staging | 0.77.1 | https://dosbox-staging.github.io/ |
| [`dosbox-staging`](dosbox-staging/) | DOSBox Staging | 0.80.1 | https://dosbox-staging.github.io/ |
| [`dosfstools`](dosfstools/) | dosfstools utility suite | 4.2 | https://github.com/dosfstools/dosfstools/ |
| [`double-conversion`](double-conversion/) | double-conversion | 3.2.1 | https://github.com/google/double-conversion |
| [`doxygen`](doxygen/) | Doxygen | 1.9.7 | https://github.com/doxygen/doxygen |

View file

@ -1,6 +1,6 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='dosbox-staging'
version='0.77.1'
version='0.80.1'
useconfigure='true'
configopts=(
"--cross-file" "${SERENITY_BUILD_DIR}/meson-cross-file.txt"
@ -13,13 +13,14 @@ configopts=(
'-Duse_png=false'
)
files=(
"https://github.com/dosbox-staging/dosbox-staging/archive/refs/tags/v${version}.tar.gz 85359efb7cd5c5c0336d88bdf023b7b462a8233490e00274fef0b85cca2f5f3c"
"https://github.com/dosbox-staging/dosbox-staging/archive/refs/tags/v${version}.tar.gz 2ca69e65e6c181197b63388c60487a3bcea804232a28c44c37704e70d49a0392"
)
depends=(
'libslirp'
'libpng'
'opusfile'
'SDL2'
'SDL2_image'
'SDL2_net'
)
launcher_name='DOSBox'

View file

@ -9,7 +9,7 @@ We don't have that yet.
1 file changed, 6 insertions(+)
diff --git a/src/misc/fs_utils_posix.cpp b/src/misc/fs_utils_posix.cpp
index bd90201ba2913f72c26beb88f9bc1f06f491754c..c9a7fc59c8b87e8e4cbd14679e89f5d79a49459f 100644
index eaa24f95446652ad7860b23b9779f29c9b10c104..2f9a5300bb95d3d3db93672824a640aff0a44cd2 100644
--- a/src/misc/fs_utils_posix.cpp
+++ b/src/misc/fs_utils_posix.cpp
@@ -24,7 +24,9 @@

View file

@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gbeutner@serenityos.org>
Date: Fri, 18 Jun 2021 15:06:37 +0200
Subject: [PATCH] Disable SDL's accelerated rendering
---
src/gui/sdlmain.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp
index c85a9f53cefe09821bb73a154ef7c663b90c3bc9..d0e32221716761d459f537cef5c0e8afe4b75e72 100644
--- a/src/gui/sdlmain.cpp
+++ b/src/gui/sdlmain.cpp
@@ -1078,7 +1078,6 @@ dosurface:
if (sdl.render_driver != "auto")
SDL_SetHint(SDL_HINT_RENDER_DRIVER, sdl.render_driver.c_str());
sdl.renderer = SDL_CreateRenderer(sdl.window, -1,
- SDL_RENDERER_ACCELERATED |
(sdl.desktop.vsync ? SDL_RENDERER_PRESENTVSYNC : 0));
if (!sdl.renderer) {
LOG_MSG("%s\n", SDL_GetError());

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Beckett Normington <beckett@b0ba.dev>
Date: Sun, 27 Aug 2023 20:52:19 -0400
Subject: [PATCH] libs/whereami: Add support for Serenity
---
src/libs/whereami/whereami.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libs/whereami/whereami.c b/src/libs/whereami/whereami.c
index 390ea5fef36e512cca78b1fcea1464ae2d14a6d2..9140bfc520a758fcd3865ca811e12a9c6ce199b8 100644
--- a/src/libs/whereami/whereami.c
+++ b/src/libs/whereami/whereami.c
@@ -160,7 +160,7 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
return length;
}
-#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(WAI_USE_PROC_SELF_EXE)
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(WAI_USE_PROC_SELF_EXE) || defined(__serenity__)
#include <stdio.h>
#include <stdlib.h>

View file

@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Thu, 4 May 2023 22:35:56 +0200
Subject: [PATCH] [bios.cpp] Serenity has time.h
---
src/ints/bios.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp
index 4ccbe1609ba11d5d69f59ed15735e5a88cbb162a..257f8ce10bf5d5b8c9f145647764d8542e55fc51 100644
--- a/src/ints/bios.cpp
+++ b/src/ints/bios.cpp
@@ -33,7 +33,7 @@
#include "serialport.h"
#include <time.h>
-#if defined(HAVE_CLOCK_GETTIME) && !defined(WIN32)
+#if defined(HAVE_CLOCK_GETTIME) || defined(__serenity__) && !defined(WIN32)
//time.h is already included
#else
#include <sys/timeb.h>
@@ -496,7 +496,7 @@ static void BIOS_HostTimeSync() {
Bit32u milli = 0;
// TODO investigate if clock_gettime and ftime can be replaced
// by using C++11 chrono
-#if defined(HAVE_CLOCK_GETTIME) && !defined(WIN32)
+#if defined(HAVE_CLOCK_GETTIME) || defined(__serenity__) && !defined(WIN32)
struct timespec tp;
clock_gettime(CLOCK_REALTIME,&tp);

View file

@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Fri, 5 May 2023 07:36:53 +0200
Subject: [PATCH] [meson.build] Add 'serenity' to list of os families
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index d0794072239b7b48597cf299d9297fbc1a59d983..75b3c752c34e892e4215065d8bf32cafad9952c2 100644
--- a/meson.build
+++ b/meson.build
@@ -50,6 +50,7 @@ os_family_name = {
'netbsd' : 'BSD',
'openbsd' : 'BSD',
'dragonfly' : 'BSD',
+ 'serenity' : 'LINUX',
}.get(host_machine.system(), 'UNKNOWN_OS')
conf_data.set(os_family_name, 1)

View file

@ -1,62 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Fri, 5 May 2023 07:45:29 +0200
Subject: [PATCH] [libserial.cpp] Patch out ioctl flags we currently do not
support
---
src/hardware/serialport/libserial.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/hardware/serialport/libserial.cpp b/src/hardware/serialport/libserial.cpp
index a3dad0980308089a0869001cac31b5c7661dd5df..7899e9cf9bfed065831a23d45aaeac907eee7b97 100644
--- a/src/hardware/serialport/libserial.cpp
+++ b/src/hardware/serialport/libserial.cpp
@@ -360,6 +360,7 @@ void SERIAL_getErrorString(char* buffer, size_t length) {
}
int SERIAL_getmodemstatus(COMPORT port) {
+#ifndef __serenity__
long flags = 0;
ioctl (port->porthandle, TIOCMGET, &flags);
int retval = 0;
@@ -368,6 +369,9 @@ int SERIAL_getmodemstatus(COMPORT port) {
if (flags & TIOCM_RI) retval |= SERIAL_RI;
if (flags & TIOCM_CD) retval |= SERIAL_CD;
return retval;
+#else
+ return 0;
+#endif
}
bool SERIAL_sendchar(COMPORT port, char data) {
@@ -463,17 +467,29 @@ bool SERIAL_setCommParameters(COMPORT port,
}
void SERIAL_setBREAK(COMPORT port, bool value) {
+#ifdef __serenity__
+ // Do nothing.
+#else
ioctl(port->porthandle, value?TIOCSBRK:TIOCCBRK);
+#endif
}
void SERIAL_setDTR(COMPORT port, bool value) {
+#ifdef __serenity__
+ // Do nothing.
+#else
long flag = TIOCM_DTR;
ioctl(port->porthandle, value?TIOCMBIS:TIOCMBIC, &flag);
+#endif
}
void SERIAL_setRTS(COMPORT port, bool value) {
+#ifdef __serenity__
+ // Do nothing.
+#else
long flag = TIOCM_RTS;
ioctl(port->porthandle, value?TIOCMBIS:TIOCMBIC, &flag);
+#endif
}
#endif

View file

@ -6,23 +6,8 @@ Skip use of glob() in serenity
We don't have that yet.
## `0002-Disable-SDL-s-accelerated-rendering.patch`
## `0002-libs-whereami-Add-support-for-Serenity.patch`
Disable SDL's accelerated rendering
## `0003-bios.cpp-Serenity-has-time.h.patch`
Serenity has time.h
## `0004-meson.build-Add-serenity-to-list-of-os-families.patch`
Add 'serenity' to list of os families
## `0005-libserial.cpp-Patch-out-ioctl-flags-we-currently-do-.patch`
Patch out ioctl flags we currently do not support
libs/whereami: Add support for Serenity