From 8a1f2e13783cb9bbfb61f6a95b27586e40dad5c4 Mon Sep 17 00:00:00 2001 From: trunc88 Date: Sat, 9 Jul 2022 14:42:05 -0400 Subject: [PATCH] gzdoom: new package at 4.8.2 --- gzdoom/build | 26 +++++++++++++++ gzdoom/checksums | 2 ++ gzdoom/patches/file-paths.patch | 73 +++++++++++++++++++++++++++++++++++++++++ gzdoom/sources | 2 ++ gzdoom/version | 1 + 5 files changed, 104 insertions(+) create mode 100755 gzdoom/build create mode 100644 gzdoom/checksums create mode 100644 gzdoom/patches/file-paths.patch create mode 100644 gzdoom/sources create mode 100644 gzdoom/version diff --git a/gzdoom/build b/gzdoom/build new file mode 100755 index 0000000..38dffc4 --- /dev/null +++ b/gzdoom/build @@ -0,0 +1,26 @@ +#!/bin/sh -e + +export DESTDIR="$1" + +patch -Np1 < file-paths.patch + +cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -DHAVE_VULKAN=OFF \ + -DNO_SDL_JOYSTICK=ON \ + -D CMAKE_CXX_FLAGS="${CXXFLAGS} -ffile-prefix-map=\"$PWD\"=. -DSHARE_DIR=\\\"/usr/share/gzdoom\\\"" \ + -D INSTALL_RPATH=/usr/share + +cmake --build build +#cmake --install build + +mkdir -p "$1/usr/bin" +mkdir -p "$1/usr/share/gzdoom" +mkdir -p "$1/usr/share/gzdoom/soundfonts" +mkdir -p "$1/usr/share/gzdoom/fm_banks" + +cp -f build/gzdoom "$1/usr/bin/" +cp -f build/*.pk3 "$1/usr/share/gzdoom/" +cp -rf build/soundfonts/* "$1/usr/share/gzdoom/soundfonts/" +cp -rf build/fm_banks/* "$1/usr/share/gzdoom/fm_banks/" diff --git a/gzdoom/checksums b/gzdoom/checksums new file mode 100644 index 0000000..8b76e78 --- /dev/null +++ b/gzdoom/checksums @@ -0,0 +1,2 @@ +4edd60f8094c9dc3dfb7400bdbc0ebb0a5e574b0a6747eee4c8d9f1f6af77127 +3624eba1a0936fc49f3f6b8e86ca3bac9343ebafd5ea8939055284594e7e46c6 diff --git a/gzdoom/patches/file-paths.patch b/gzdoom/patches/file-paths.patch new file mode 100644 index 0000000..41993d0 --- /dev/null +++ b/gzdoom/patches/file-paths.patch @@ -0,0 +1,73 @@ +From 99e82d0644fee9a21e967b7b8708ff253e7528d5 Mon Sep 17 00:00:00 2001 +From: Jan Cholasta +Date: Tue, 25 Feb 2020 12:53:07 +0100 +Subject: [PATCH] Fix file paths + +--- + src/common/platform/posix/sdl/i_main.cpp | 14 +------------- + src/gameconfigfile.cpp | 10 ++-------- + 2 files changed, 3 insertions(+), 21 deletions(-) + +diff --git a/src/common/platform/posix/sdl/i_main.cpp b/src/common/platform/posix/sdl/i_main.cpp +index a28b90f01..7299029fd 100644 +--- a/src/common/platform/posix/sdl/i_main.cpp ++++ b/src/common/platform/posix/sdl/i_main.cpp +@@ -175,19 +175,7 @@ int main (int argc, char **argv) + Args = new FArgs(argc, argv); + + // Should we even be doing anything with progdir on Unix systems? +- char program[PATH_MAX]; +- if (realpath (argv[0], program) == NULL) +- strcpy (program, argv[0]); +- char *slash = strrchr (program, '/'); +- if (slash != NULL) +- { +- *(slash + 1) = '\0'; +- progdir = program; +- } +- else +- { +- progdir = "./"; +- } ++ progdir = "/usr/share/gzdoom/"; + + I_StartupJoysticks(); + +diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp +index 17898f3ae..7bfb63205 100644 +--- a/src/gameconfigfile.cpp ++++ b/src/gameconfigfile.cpp +@@ -119,8 +119,6 @@ FGameConfigFile::FGameConfigFile () + // Arch Linux likes them in /usr/share/doom + // Debian likes them in /usr/share/games/doom + // I assume other distributions don't do anything radically different +- SetValueForKey ("Path", "/usr/local/share/doom", true); +- SetValueForKey ("Path", "/usr/local/share/games/doom", true); + SetValueForKey ("Path", "/usr/share/doom", true); + SetValueForKey ("Path", "/usr/share/games/doom", true); + #endif +@@ -141,8 +139,6 @@ FGameConfigFile::FGameConfigFile () + SetValueForKey ("Path", "$HOME/" GAME_DIR, true); + SetValueForKey ("Path", "$HOME/.local/share/games/doom", true); + SetValueForKey ("Path", SHARE_DIR, true); +- SetValueForKey ("Path", "/usr/local/share/doom", true); +- SetValueForKey ("Path", "/usr/local/share/games/doom", true); + SetValueForKey ("Path", "/usr/share/doom", true); + SetValueForKey ("Path", "/usr/share/games/doom", true); + #endif +@@ -170,10 +166,8 @@ FGameConfigFile::FGameConfigFile () + SetValueForKey("Path", "$HOME/" GAME_DIR "/fm_banks", true); + SetValueForKey("Path", "$HOME/.local/share/games/doom/soundfonts", true); + SetValueForKey("Path", "$HOME/.local/share/games/doom/fm_banks", true); +- SetValueForKey("Path", "/usr/local/share/doom/soundfonts", true); +- SetValueForKey("Path", "/usr/local/share/doom/fm_banks", true); +- SetValueForKey("Path", "/usr/local/share/games/doom/soundfonts", true); +- SetValueForKey("Path", "/usr/local/share/games/doom/fm_banks", true); ++ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/soundfonts", true); ++ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/fm_banks", true); + SetValueForKey("Path", "/usr/share/doom/soundfonts", true); + SetValueForKey("Path", "/usr/share/doom/fm_banks", true); + SetValueForKey("Path", "/usr/share/games/doom/soundfonts", true); +-- +2.34.1 + diff --git a/gzdoom/sources b/gzdoom/sources new file mode 100644 index 0000000..e209a92 --- /dev/null +++ b/gzdoom/sources @@ -0,0 +1,2 @@ +https://github.com/coelckers/gzdoom/archive/refs/tags/gVERSION.tar.gz +patches/file-paths.patch diff --git a/gzdoom/version b/gzdoom/version new file mode 100644 index 0000000..79bfc9c --- /dev/null +++ b/gzdoom/version @@ -0,0 +1 @@ +4.8.2 1 -- 2.11.4.GIT