diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 0e6c9e9410..52a7711569 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -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 | diff --git a/Ports/dosbox-staging/package.sh b/Ports/dosbox-staging/package.sh index b08e8fbe47..f7b66da3fe 100755 --- a/Ports/dosbox-staging/package.sh +++ b/Ports/dosbox-staging/package.sh @@ -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' diff --git a/Ports/dosbox-staging/patches/0001-Skip-use-of-glob-in-serenity.patch b/Ports/dosbox-staging/patches/0001-Skip-use-of-glob-in-serenity.patch index b1eddef131..1941282abb 100644 --- a/Ports/dosbox-staging/patches/0001-Skip-use-of-glob-in-serenity.patch +++ b/Ports/dosbox-staging/patches/0001-Skip-use-of-glob-in-serenity.patch @@ -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 @@ diff --git a/Ports/dosbox-staging/patches/0002-Disable-SDL-s-accelerated-rendering.patch b/Ports/dosbox-staging/patches/0002-Disable-SDL-s-accelerated-rendering.patch deleted file mode 100644 index 77bf8dc7ce..0000000000 --- a/Ports/dosbox-staging/patches/0002-Disable-SDL-s-accelerated-rendering.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Gunnar Beutner -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()); diff --git a/Ports/dosbox-staging/patches/0002-libs-whereami-Add-support-for-Serenity.patch b/Ports/dosbox-staging/patches/0002-libs-whereami-Add-support-for-Serenity.patch new file mode 100644 index 0000000000..f78e8b3d05 --- /dev/null +++ b/Ports/dosbox-staging/patches/0002-libs-whereami-Add-support-for-Serenity.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Beckett Normington +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 + #include diff --git a/Ports/dosbox-staging/patches/0003-bios.cpp-Serenity-has-time.h.patch b/Ports/dosbox-staging/patches/0003-bios.cpp-Serenity-has-time.h.patch deleted file mode 100644 index 3df95c2a24..0000000000 --- a/Ports/dosbox-staging/patches/0003-bios.cpp-Serenity-has-time.h.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kenneth Myhra -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 - --#if defined(HAVE_CLOCK_GETTIME) && !defined(WIN32) -+#if defined(HAVE_CLOCK_GETTIME) || defined(__serenity__) && !defined(WIN32) - //time.h is already included - #else - #include -@@ -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); - diff --git a/Ports/dosbox-staging/patches/0004-meson.build-Add-serenity-to-list-of-os-families.patch b/Ports/dosbox-staging/patches/0004-meson.build-Add-serenity-to-list-of-os-families.patch deleted file mode 100644 index b8a0ccfb4b..0000000000 --- a/Ports/dosbox-staging/patches/0004-meson.build-Add-serenity-to-list-of-os-families.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kenneth Myhra -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) - diff --git a/Ports/dosbox-staging/patches/0005-libserial.cpp-Patch-out-ioctl-flags-we-currently-do-.patch b/Ports/dosbox-staging/patches/0005-libserial.cpp-Patch-out-ioctl-flags-we-currently-do-.patch deleted file mode 100644 index 1df9350c5a..0000000000 --- a/Ports/dosbox-staging/patches/0005-libserial.cpp-Patch-out-ioctl-flags-we-currently-do-.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kenneth Myhra -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 diff --git a/Ports/dosbox-staging/patches/ReadMe.md b/Ports/dosbox-staging/patches/ReadMe.md index 722486ab9c..21b634c297 100644 --- a/Ports/dosbox-staging/patches/ReadMe.md +++ b/Ports/dosbox-staging/patches/ReadMe.md @@ -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