From 4107ae1dea5eb4f639df26d620d7479fe177adb5 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 9 Apr 2023 12:17:06 +0200 Subject: [PATCH] Ports: Remove abandoned port 'fheroes2' which was never playable --- Ports/AvailablePorts.md | 1 - Ports/fheroes2/package.sh | 30 --------- ...Include-endian.h-on-serenity-as-well.patch | 22 ------- ...002-Use-pkg-config-for-SDL_-and-SDL2.patch | 65 ------------------- ...-Disable-SDL-s-accelerated-rendering.patch | 26 -------- Ports/fheroes2/patches/ReadMe.md | 17 ----- 6 files changed, 161 deletions(-) delete mode 100755 Ports/fheroes2/package.sh delete mode 100644 Ports/fheroes2/patches/0001-Include-endian.h-on-serenity-as-well.patch delete mode 100644 Ports/fheroes2/patches/0002-Use-pkg-config-for-SDL_-and-SDL2.patch delete mode 100644 Ports/fheroes2/patches/0003-Disable-SDL-s-accelerated-rendering.patch delete mode 100644 Ports/fheroes2/patches/ReadMe.md diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 059e35bd406..b82f1b15e1f 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -61,7 +61,6 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`epsilon`](epsilon/) | graphical calculator simulator | 15.5.0 | https://github.com/numworks/epsilon | | [`expat`](expat/) | Expat XML parser | 2.5.0 | https://libexpat.github.io/ | | [`ffmpeg`](ffmpeg/) | ffmpeg | 5.0 | https://ffmpeg.org | -| [`fheroes2`](fheroes2/) | Free Heroes of Might and Magic II | 0.9.13 | https://github.com/ihhub/fheroes2 | | [`figlet`](figlet/) | FIGlet | 2.2.5 | http://www.figlet.org/ | | [`file`](file/) | file (determine file type) | 5.44 | https://www.darwinsys.com/file/ | | [`findutils`](findutils/) | GNU findutils | 4.9.0 | https://www.gnu.org/software/findutils/ | diff --git a/Ports/fheroes2/package.sh b/Ports/fheroes2/package.sh deleted file mode 100755 index 147b145954c..00000000000 --- a/Ports/fheroes2/package.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env -S bash ../.port_include.sh -port=fheroes2 -useconfigure=true -version=0.9.13 -depends=("SDL2" "SDL2_image" "SDL2_mixer" "libpng" "zlib") -configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "-DUSE_SDL_VERSION=SDL2" "-DENABLE_IMAGE=ON" "-DGET_HOMM2_DEMO=ON") -files="https://github.com/ihhub/fheroes2/archive/refs/tags/${version}.zip fheroes2-${version}.zip 879805bc88c3561d0eedc3dda425e8d9a3c7ae8a80b9f6909797acc72598cc17" -auth_type=sha256 -launcher_name="Free Heroes of Might and Magic II" -launcher_category=Games -launcher_command=/opt/fheroes2/fheroes2 -icon_file=src/resources/fheroes2.ico - -pre_configure() { - export CXXFLAGS="'-D_GNU_SOURCE'" -} - -configure() { - run cmake "${configopts[@]}" . -} - -post_configure() { - unset CXXFLAGS -} - -install() { - mkdir -p "${SERENITY_INSTALL_ROOT}/opt/fheroes2/files" - run cp -r data/ maps/ fheroes2 fheroes2.key "${SERENITY_INSTALL_ROOT}/opt/fheroes2" - run cp -r files/data "${SERENITY_INSTALL_ROOT}/opt/fheroes2/files" -} diff --git a/Ports/fheroes2/patches/0001-Include-endian.h-on-serenity-as-well.patch b/Ports/fheroes2/patches/0001-Include-endian.h-on-serenity-as-well.patch deleted file mode 100644 index 18326ee2016..00000000000 --- a/Ports/fheroes2/patches/0001-Include-endian.h-on-serenity-as-well.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Michael Manganiello -Date: Sun, 27 Mar 2022 12:52:11 -0300 -Subject: [PATCH] Include on serenity as well - ---- - src/engine/endian_h2.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/engine/endian_h2.h b/src/engine/endian_h2.h -index 7d1fa27..9144a91 100644 ---- a/src/engine/endian_h2.h -+++ b/src/engine/endian_h2.h -@@ -21,7 +21,7 @@ - #ifndef ENDIAN_H2_H - #define ENDIAN_H2_H - --#if defined( __linux__ ) -+#if defined( __linux__ ) || defined( __serenity__ ) - #include - - #elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) diff --git a/Ports/fheroes2/patches/0002-Use-pkg-config-for-SDL_-and-SDL2.patch b/Ports/fheroes2/patches/0002-Use-pkg-config-for-SDL_-and-SDL2.patch deleted file mode 100644 index 0915ed62212..00000000000 --- a/Ports/fheroes2/patches/0002-Use-pkg-config-for-SDL_-and-SDL2.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Michael Manganiello -Date: Sun, 27 Mar 2022 12:52:11 -0300 -Subject: [PATCH] Use pkg-config for SDL_* and SDL2 - ---- - CMakeLists.txt | 9 ++++++--- - src/engine/CMakeLists.txt | 12 +++++++----- - 2 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8728264..ebed16e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -26,13 +26,16 @@ option(FHEROES2_STRICT_COMPILATION "Enable -Werror strict compilation" OFF) - # - # Library & feature detection - # --find_package(${USE_SDL_VERSION} REQUIRED) --find_package(${USE_SDL_VERSION}_mixer REQUIRED) -+INCLUDE(FindPkgConfig) -+ -+PKG_SEARCH_MODULE(${USE_SDL_VERSION} REQUIRED sdl2) -+PKG_SEARCH_MODULE(${USE_SDL_VERSION}MIXER REQUIRED SDL2_mixer) -+ - find_package(ZLIB REQUIRED) - find_package(Threads) - - if(ENABLE_IMAGE) -- find_package(${USE_SDL_VERSION}_image REQUIRED) -+ PKG_SEARCH_MODULE(${USE_SDL_VERSION}IMAGE REQUIRED SDL2_image) - find_package(PNG REQUIRED) - endif(ENABLE_IMAGE) - -diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt -index 8a1fbeb..b9df312 100644 ---- a/src/engine/CMakeLists.txt -+++ b/src/engine/CMakeLists.txt -@@ -5,19 +5,21 @@ target_compile_definitions(engine PRIVATE - $<$:FHEROES2_IMAGE_SUPPORT> - ) - target_include_directories(engine PUBLIC -- $<$:${${USE_SDL_VERSION}_IMAGE_INCLUDE_DIR}> -- ${${USE_SDL_VERSION}_MIXER_INCLUDE_DIR} -- ${${USE_SDL_VERSION}_INCLUDE_DIR} -+ $<$:${${USE_SDL_VERSION}_IMAGE_INCLUDE_DIRS}> -+ ${${USE_SDL_VERSION}_MIXER_INCLUDE_DIRS} -+ ${${USE_SDL_VERSION}_INCLUDE_DIRS} - $ - $ - ) - target_link_libraries(engine - smacker -- ${${USE_SDL_VERSION}MAIN_LIBRARY} -- ${${USE_SDL_VERSION}_LIBRARY} -+ ${${USE_SDL_VERSION}MAIN_LIBRARIES} -+ ${${USE_SDL_VERSION}_LIBRARIES} - ${${USE_SDL_VERSION}_MIXER_LIBRARIES} - $<$:${${USE_SDL_VERSION}_IMAGE_LIBRARIES}> - $<$:PNG::PNG> -+ $<$:-lSDL2_image> -+ -lSDL2_mixer - Threads::Threads # To match the build settings of the main app - ZLIB::ZLIB - ) diff --git a/Ports/fheroes2/patches/0003-Disable-SDL-s-accelerated-rendering.patch b/Ports/fheroes2/patches/0003-Disable-SDL-s-accelerated-rendering.patch deleted file mode 100644 index 017f4334851..00000000000 --- a/Ports/fheroes2/patches/0003-Disable-SDL-s-accelerated-rendering.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Michael Manganiello -Date: Sun, 27 Mar 2022 12:52:11 -0300 -Subject: [PATCH] Disable SDL's accelerated rendering - ---- - src/engine/screen.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/engine/screen.cpp b/src/engine/screen.cpp -index 9cd9ccb..f4fe315 100644 ---- a/src/engine/screen.cpp -+++ b/src/engine/screen.cpp -@@ -1005,10 +1005,10 @@ namespace - int renderFlags() const - { - if ( _isVSyncEnabled ) { -- return ( SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ); -+ return ( SDL_RENDERER_SOFTWARE | SDL_RENDERER_PRESENTVSYNC ); - } - -- return SDL_RENDERER_ACCELERATED; -+ return SDL_RENDERER_SOFTWARE; - } - - void _createPalette() diff --git a/Ports/fheroes2/patches/ReadMe.md b/Ports/fheroes2/patches/ReadMe.md deleted file mode 100644 index f40b266b8df..00000000000 --- a/Ports/fheroes2/patches/ReadMe.md +++ /dev/null @@ -1,17 +0,0 @@ -# Patches for fheroes2 on SerenityOS - -## `0001-Include-endian.h-on-serenity-as-well.patch` - -Include on serenity as well - - -## `0002-Use-pkg-config-for-SDL_-and-SDL2.patch` - -Use pkg-config for SDL_* and SDL2 - - -## `0003-Disable-SDL-s-accelerated-rendering.patch` - -Disable SDL's accelerated rendering - -