summaryrefslogtreecommitdiff
path: root/games-fps/gzdoom
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /games-fps/gzdoom
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'games-fps/gzdoom')
-rw-r--r--games-fps/gzdoom/Manifest3
-rw-r--r--games-fps/gzdoom/files/0001-Revert-load-the-hex-font-as-early-as-possible.patch129
-rw-r--r--games-fps/gzdoom/gzdoom-4.8.2.ebuild85
3 files changed, 217 insertions, 0 deletions
diff --git a/games-fps/gzdoom/Manifest b/games-fps/gzdoom/Manifest
index c422b3c04478..b734e64cf4a2 100644
--- a/games-fps/gzdoom/Manifest
+++ b/games-fps/gzdoom/Manifest
@@ -1,4 +1,7 @@
+AUX 0001-Revert-load-the-hex-font-as-early-as-possible.patch 4117 BLAKE2B bb3e4175dcd072c1045923f0f068757359919a03f9373b678761ef88ad082a303611637e729941fe5dcf0072d23d372f5c45e0223fdfedf1e637712991e77bf3 SHA512 53a2d88496a441c7e534e55c650266ed4fb8fd0cbe131b33121ecc139a273a4420685029b9ce72bd937c387f63b15bf1c70208d53a1fda9363424a561b934753
AUX gzdoom-4.7.1-Introduce-the-BUILD_NONFREE-option.patch 1209 BLAKE2B b3cf80ab4d6328dbcb14ceb9514883ed58b8086dab02182f4cf8964140095dd8d6ac0503c68a4c7442c0f9cc92b4bb6b3e084eee026be52842413e15118a13be SHA512 a08c29fe6b867dbbe60035c99c31d1bce73c1ff37ca2c15f659e060b77366f6fcdc11d2319dee3331d9874115e92566b9c0a6364604869f3815fbb0ee7179ef6
DIST gzdoom-4.7.1.tar.gz 19562412 BLAKE2B 48b089c9d0ca0f26820ea90ea1a1a6ce3fa325f6f7bd36ded66ba43eeaab610ca99eacb1ca0aec75b0888a65108573e2c85d2ce0e88663031583267f1143386e SHA512 040a51d2783616cca9f3d7e70bf83adf0d6afa8d7378a9f743cbf152811c07c4f03eecdbbdb617d9fda625049a6f13313dce6e5017698bf36fae74e107c012f0
+DIST gzdoom-4.8.2.tar.gz 24247668 BLAKE2B b9a505c29d14486bec96f53f614968c67ec0d8db0b784071d171038dec3a88c800483211e4ba59e8408ce5680f4800cbc455b4a53becd53e89bde17c7b7a69a5 SHA512 5f94aca016e87c8284b41d5c3beaeb752a4201e4562a528375addc976c7d7163d23a4885a223e4377856a2b75b71179efa80e99baf3edfe87fa19cf1e8bbfa42
EBUILD gzdoom-4.7.1.ebuild 2095 BLAKE2B ce16912a2083f9d86ab60ede55658df4bb26f0c6c858509473ba066e0dd6fc54a12bce8dc6b56b88ea703c1b0658a48b993a45e42cfe8690408a41e66ae5b749 SHA512 bd69a87286bd7e0c0f00d4cf78cfd48a1b959c6c4a06bb9c21b1b095a41fc9de5044bb159038868858a01c02758f681dab979f199707a9a7937fc7bf5e221857
+EBUILD gzdoom-4.8.2.ebuild 2224 BLAKE2B 97b628573b6ebb21c7a22d607907adc254c850fe5228e2d886f430aa70800dc74d7f58c87af80b6f17735237d8f57ee687f9a60676c2efaadf77f82c8d02c824 SHA512 16f846b269d309f9fbe1fc16bf2cf97296f97c8776f9252892f9528996388727c575ea0adb2abf0961886b87d742f4d23d5dcce12eff3c731294ff9c9df979e3
MISC metadata.xml 880 BLAKE2B 9e2c6bea13a2821469d6f6ac4d21c4b2313f42594257a78a574bf893ec70f94bf0c0208e53401e24cdd06aa0bdb2fedb18374d2785abea393688d62ea4427951 SHA512 2bbe5df923e586acb967be69648fc5ccd604254fc2c9eebfc1cee2ca5448fe16b68b639ca21c9225af1ca7e0ca745dfde7b427166c1482145105dcc2f52a1751
diff --git a/games-fps/gzdoom/files/0001-Revert-load-the-hex-font-as-early-as-possible.patch b/games-fps/gzdoom/files/0001-Revert-load-the-hex-font-as-early-as-possible.patch
new file mode 100644
index 000000000000..58a2f7a2b2f4
--- /dev/null
+++ b/games-fps/gzdoom/files/0001-Revert-load-the-hex-font-as-early-as-possible.patch
@@ -0,0 +1,129 @@
+From 2d00bc6b9f25ae045eecba6e198eaceee9046647 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Wed, 6 Jul 2022 23:37:30 +0100
+Subject: [PATCH] Revert "- load the hex font as early as possible."
+
+This reverts commit 010f41a3aad3719b1e5d4d8ce157a5d9b0077b44.
+
+Bug: https://github.com/coelckers/gzdoom/issues/1615
+---
+ src/common/fonts/hexfont.cpp | 24 +++++++-----------------
+ src/d_main.cpp | 17 +++++++----------
+ 2 files changed, 14 insertions(+), 27 deletions(-)
+
+diff --git a/src/common/fonts/hexfont.cpp b/src/common/fonts/hexfont.cpp
+index 8b50427f4..e2bdbff7a 100644
+--- a/src/common/fonts/hexfont.cpp
++++ b/src/common/fonts/hexfont.cpp
+@@ -58,12 +58,11 @@ struct HexDataSource
+ //
+ //==========================================================================
+
+- void ParseDefinition(FResourceLump* font)
++ void ParseDefinition(int lumpnum)
+ {
+ FScanner sc;
+
+- auto data = font->Lock();
+- sc.OpenMem("newconsolefont.hex", (const char*)data, font->Size());
++ sc.OpenLumpNum(lumpnum);
+ sc.SetCMode(true);
+ glyphdata.Push(0); // ensure that index 0 can be used as 'not present'.
+ while (sc.GetString())
+@@ -97,7 +96,6 @@ struct HexDataSource
+ lumb = i * 255 / 17;
+ SmallPal[i] = PalEntry(255, lumb, lumb, lumb);
+ }
+- font->Unlock();
+ }
+ };
+
+@@ -402,7 +400,7 @@ public:
+
+ FFont *CreateHexLumpFont (const char *fontname, int lump)
+ {
+- assert(hexdata.FirstChar != INT_MAX);
++ if (hexdata.FirstChar == INT_MAX) hexdata.ParseDefinition(lump);
+ return new FHexFont(fontname, lump);
+ }
+
+@@ -414,7 +412,7 @@ FFont *CreateHexLumpFont (const char *fontname, int lump)
+
+ FFont *CreateHexLumpFont2(const char *fontname, int lump)
+ {
+- assert(hexdata.FirstChar != INT_MAX);
++ if (hexdata.FirstChar == INT_MAX) hexdata.ParseDefinition(lump);
+ return new FHexFont2(fontname, lump);
+ }
+
+@@ -426,7 +424,8 @@ FFont *CreateHexLumpFont2(const char *fontname, int lump)
+
+ uint8_t* GetHexChar(int codepoint)
+ {
+- assert(hexdata.FirstChar != INT_MAX);
++ auto lump = fileSystem.CheckNumForFullName("newconsolefont.hex", 0); // This is always loaded from gzdoom.pk3 to prevent overriding it with incomplete replacements.
++ if (hexdata.FirstChar == INT_MAX) hexdata.ParseDefinition(lump);
+
+ if (hexdata.glyphmap[codepoint] > 0)
+ {
+@@ -434,13 +433,4 @@ uint8_t* GetHexChar(int codepoint)
+ return &hexdata.glyphdata[offset];
+ }
+ return nullptr;
+-}
+-
+-void LoadHexFont(const char* filename)
+-{
+- auto resf = FResourceFile::OpenResourceFile(filename);
+- if (resf == nullptr) I_FatalError("Unable to open %s", filename);
+- auto hexfont = resf->FindLump("newconsolefont.hex");
+- if (hexfont == nullptr) I_FatalError("Unable to find newconsolefont.hex in %s", filename);
+- hexdata.ParseDefinition(hexfont);
+-}
++}
+\ No newline at end of file
+diff --git a/src/d_main.cpp b/src/d_main.cpp
+index b64142c07..d61807012 100644
+--- a/src/d_main.cpp
++++ b/src/d_main.cpp
+@@ -175,7 +175,6 @@ void FreeSBarInfoScript();
+ void I_UpdateWindowTitle();
+ void S_ParseMusInfo();
+ void D_GrabCVarDefaults();
+-void LoadHexFont(const char* filename);
+
+ // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
+
+@@ -3535,15 +3534,6 @@ static int D_DoomMain_Internal (void)
+ std::set_new_handler(NewFailure);
+ const char *batchout = Args->CheckValue("-errorlog");
+
+- // [RH] Make sure zdoom.pk3 is always loaded,
+- // as it contains magic stuff we need.
+- wad = BaseFileSearch(BASEWAD, NULL, true, GameConfig);
+- if (wad == NULL)
+- {
+- I_FatalError("Cannot find " BASEWAD);
+- }
+- LoadHexFont(wad); // load hex font early so we have it during startup.
+-
+ C_InitConsole(80*8, 25*8, false);
+ I_DetectOS();
+
+@@ -3573,6 +3563,13 @@ static int D_DoomMain_Internal (void)
+ extern void D_ConfirmSendStats();
+ D_ConfirmSendStats();
+
++ // [RH] Make sure zdoom.pk3 is always loaded,
++ // as it contains magic stuff we need.
++ wad = BaseFileSearch (BASEWAD, NULL, true, GameConfig);
++ if (wad == NULL)
++ {
++ I_FatalError ("Cannot find " BASEWAD);
++ }
+ FString basewad = wad;
+
+ FString optionalwad = BaseFileSearch(OPTIONALWAD, NULL, true, GameConfig);
+--
+2.35.1
+
diff --git a/games-fps/gzdoom/gzdoom-4.8.2.ebuild b/games-fps/gzdoom/gzdoom-4.8.2.ebuild
new file mode 100644
index 000000000000..f697ad1bc5eb
--- /dev/null
+++ b/games-fps/gzdoom/gzdoom-4.8.2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop xdg flag-o-matic
+
+DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
+HOMEPAGE="https://zdoom.org"
+SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BZIP2 GPL-3 LGPL-2.1+ LGPL-3 MIT
+ non-free? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist WidePix )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug gles2 gtk +non-free openmp telemetry vulkan"
+
+DEPEND="
+ app-arch/bzip2
+ media-libs/libjpeg-turbo:0=
+ media-libs/libsdl2[gles2?,opengl,vulkan?]
+ media-libs/libvpx:=
+ media-libs/openal
+ media-libs/zmusic
+ sys-libs/zlib
+ gtk? ( x11-libs/gtk+:3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-g${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.7.1-Introduce-the-BUILD_NONFREE-option.patch
+ "${FILESDIR}"/0001-Revert-load-the-hex-font-as-early-as-possible.patch
+)
+
+src_prepare() {
+ rm -rf docs/licenses || die
+ rm -rf libraries/{bzip2,jpeg,zlib} || die
+ if ! use non-free ; then
+ rm -rf wadsrc_bm wadsrc_extra wadsrc_widepix || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=OFF
+ -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
+ -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
+ -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
+ -DDYN_OPENAL=OFF
+ -DNO_GTK="$(usex !gtk)"
+ -DNO_OPENAL=OFF
+ -DHAVE_VULKAN="$(usex vulkan)"
+ -DHAVE_GLES2="$(usex gles2)"
+ -DNO_OPENMP="$(usex !openmp)"
+ -DBUILD_NONFREE="$(usex non-free)"
+ )
+
+ use debug || append-cppflags -DNDEBUG
+ use telemetry || append-cppflags -DNO_SEND_STATS
+
+ cmake_src_configure
+}
+
+src_install() {
+ newicon src/posix/zdoom.xpm "${PN}.xpm"
+ make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
+ cmake_src_install
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ if ! use non-free ; then
+ ewarn
+ ewarn "GZDoom installed without non-free components."
+ ewarn "Note: The non-free game_support.pk3 file is needed to play"
+ ewarn " games natively supported by GZDoom."
+ ewarn "A list of games natively supported by GZDoom is available"
+ ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"
+ ewarn
+ fi
+}