From c14642805fa567bb922101b2ee4a6e57c3219615 Mon Sep 17 00:00:00 2001 From: Peppersawce <157759066+Peppersawce@users.noreply.github.com> Date: Sun, 4 May 2025 15:08:59 +0000 Subject: [PATCH] DuneLegacy: Update to 0.98.2, online fixed?, move patch to git (#12313) --- .../additional-files/dunelegacy.rdef.in | 2 +- ....4~git.recipe => dunelegacy-0.98.2.recipe} | 40 ++++++++-------- .../patches/dunelegacy-0.96.4~git.patchset | 48 ------------------- 3 files changed, 21 insertions(+), 69 deletions(-) rename games-strategy/dunelegacy/{dunelegacy-0.96.4~git.recipe => dunelegacy-0.98.2.recipe} (66%) delete mode 100644 games-strategy/dunelegacy/patches/dunelegacy-0.96.4~git.patchset diff --git a/games-strategy/dunelegacy/additional-files/dunelegacy.rdef.in b/games-strategy/dunelegacy/additional-files/dunelegacy.rdef.in index b513f6365..c104d02cc 100644 --- a/games-strategy/dunelegacy/additional-files/dunelegacy.rdef.in +++ b/games-strategy/dunelegacy/additional-files/dunelegacy.rdef.in @@ -9,7 +9,7 @@ resource app_version { internal = 0, short_info = "Dune Legacy", - long_info = "A Dune II game engine (@VERSION@ build)" + long_info = "A Dune II game engine" }; resource app_signature "application/x-vnd.dunelegacy"; diff --git a/games-strategy/dunelegacy/dunelegacy-0.96.4~git.recipe b/games-strategy/dunelegacy/dunelegacy-0.98.2.recipe similarity index 66% rename from games-strategy/dunelegacy/dunelegacy-0.96.4~git.recipe rename to games-strategy/dunelegacy/dunelegacy-0.98.2.recipe index 6da64dd11..2e84572e1 100644 --- a/games-strategy/dunelegacy/dunelegacy-0.96.4~git.recipe +++ b/games-strategy/dunelegacy/dunelegacy-0.98.2.recipe @@ -3,16 +3,18 @@ DESCRIPTION="Dune Legacy is an effort by a handful of developers to revitalize \ the first-ever real-time strategy game. \ It tries to be as similar as possible to the original gameplay but to integrate \ user interface features most modern realtime-strategy games have like selecting \ -multiple units" +multiple units. + +In order to be used, Dune Legacy expects the Dune II data to be in: \ +'/boot/home/config/settings/dunelegacy/data'" HOMEPAGE="https://dunelegacy.sourceforge.net/website/" -COPYRIGHT="2016-2022 Dune Legacy" +COPYRIGHT="2016-2025 Dune Legacy" LICENSE="GNU GPL v2" REVISION="1" -srcGitRev=d25a654c429050fed96d79dd512f7d4cff7ed89c +srcGitRev=3728de2e0c312816759082c1f685e885c757879a SOURCE_URI="https://github.com/Peppersawce/dunelegacyfork-2022/archive/$srcGitRev.zip" -CHECKSUM_SHA256="c314ca55e6973d01491beb73a845b379146966f5a9b89c38e42e9ac8837074ce" +CHECKSUM_SHA256="276269b0ca947767d278d2a8ba9c85b926b6c30cda5c407524c48c530782d5cc" SOURCE_DIR="dunelegacyfork-2022-$srcGitRev/" -PATCHES="dunelegacy-$portVersion.patchset" ADDITIONAL_FILES="dunelegacy.rdef.in" ARCHITECTURES="all !x86_gcc2" @@ -20,7 +22,7 @@ SECONDARY_ARCHITECTURES="x86" PROVIDES=" dunelegacy$secondaryArchSuffix = $portVersion - app:dunelegacy = $portVersion + cmd:dunelegacy = $portVersion " REQUIRES=" haiku$secondaryArchSuffix @@ -36,41 +38,39 @@ BUILD_REQUIRES=" devel:libSDL2_ttf_2.0$secondaryArchSuffix " BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf + cmd:cmake cmd:gcc$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix " -defineDebugInfoPackage dunelegacy$secondaryArchSuffix \ - $appsDir/dunelegacy - BUILD() { - autoreconf --install + cmake -Bbuild -S. $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_EXE_LINKER_FLAGS="-lbsd -lnetwork" - runConfigure --omit-dirs "bindir" configure --bindir=$appsDir - - make $jobArgs + make -C build $jobArgs } INSTALL() { - make install + make -C build install + + # Pack man file + mkdir -p $manDir/man6 && cp dunelegacy.6 $manDir/man6/ # Generate the rdef local MAJOR="`echo "$portVersion" | cut -b1`" local MIDDLE="`echo "$portVersion" | cut -b3,4`" local MINOR="`echo "$portVersion" | cut -b6`" - local VERSION="Development" sed \ -e "s|@MAJOR@|$MAJOR|" \ -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@MINOR@|$MINOR|" \ - -e "s|@VERSION@|$VERSION|" \ $portDir/additional-files/dunelegacy.rdef.in > dunelegacy.rdef - addResourcesToBinaries dunelegacy.rdef $appsDir/dunelegacy - addAppDeskbarSymlink $appsDir/dunelegacy "Dune Legacy" + addResourcesToBinaries dunelegacy.rdef $prefix/bin/dunelegacy + mkdir -p $appsDir && ln -s $prefix/bin/dunelegacy $appsDir/DuneLegacy + addAppDeskbarSymlink $prefix/bin/dunelegacy "Dune Legacy" } diff --git a/games-strategy/dunelegacy/patches/dunelegacy-0.96.4~git.patchset b/games-strategy/dunelegacy/patches/dunelegacy-0.96.4~git.patchset deleted file mode 100644 index 4a23d818e..000000000 --- a/games-strategy/dunelegacy/patches/dunelegacy-0.96.4~git.patchset +++ /dev/null @@ -1,48 +0,0 @@ -From 18f16b1ee55e5cbc89058f86098d5e7a323eaf09 Mon Sep 17 00:00:00 2001 -From: Yourself -Date: Mon, 23 Sep 2024 23:26:20 +0200 -Subject: Fix to autoconf, missing array, screen flicker issue - - -diff --git a/configure.ac b/configure.ac -index bc8c862..5290841 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -18,6 +18,8 @@ fi - - AC_SUBST(dunelegacydatadir) - -+AC_SEARCH_LIBS(gethostbyname, [socket, network]) -+ - dnl Some flags for gcc - CXXFLAGS="-std=c++14 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -Wno-unknown-pragmas -D__STDC_FORMAT_MACROS -DNDEBUG" - CFLAGS="-std=c99 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -Wno-unknown-pragmas -D__STDC_FORMAT_MACROS -DNDEBUG" -diff --git a/include/misc/format.h b/include/misc/format.h -index 49c4598..7fe13f5 100644 ---- a/include/misc/format.h -+++ b/include/misc/format.h -@@ -40,6 +40,8 @@ - #include - #include // for std::pair - -+#include -+ - // The fmt library version in the form major * 10000 + minor * 100 + patch. - #define FMT_VERSION 30002 - -diff --git a/src/Game.cpp b/src/Game.cpp -index eda05fe..f8c4380 100644 ---- a/src/Game.cpp -+++ b/src/Game.cpp -@@ -1094,7 +1094,7 @@ void Game::runMainLoop() { - - drawScreen(); - -- SDL_RenderPresent(renderer); -+ //SDL_RenderPresent(renderer); - - SDL_SetRenderTarget(renderer, nullptr); - SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); --- -2.45.2 -