commit: 51229e361acfee1e689f0072ae445d12b7b6dd4f Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Apr 13 02:55:12 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Apr 13 02:55:55 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51229e36
games-action/astromenace: add 1.4.2 Signed-off-by: Sam James <sam <AT> gentoo.org> games-action/astromenace/Manifest | 1 + games-action/astromenace/astromenace-1.4.2.ebuild | 60 ++++++++++++++++++++++ .../files/astromenace-1.4.2-gcc13.patch | 49 ++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/games-action/astromenace/Manifest b/games-action/astromenace/Manifest index f36cdef8d3ff..a564d17b8278 100644 --- a/games-action/astromenace/Manifest +++ b/games-action/astromenace/Manifest @@ -1 +1,2 @@ DIST astromenace-1.4.1.tar.gz 68041500 BLAKE2B a6e0c98feae200440bc3e3bd0e3338325ce7953f4e4241d69e1d3b6cc3aaef54c1966f62b08a27aef2a6f6b1ee028e8c7c78788aabc2622bcc1eeab10186c428 SHA512 408fd8a9fcc51d0cdfd31d77bc1c05b079b3248622a252e73e1145db9715b3a331eef5fde295c3390143fb7bb2f88460d374eddea719b6452577bf5e83bd14c1 +DIST astromenace-1.4.2.tar.gz 68061933 BLAKE2B 79511ee920eb182a428688a22b5adaa7719d574ffbd9807ebea46a036ea7de85f87aee8f927cfb8458178ed8b9c4ad61dad281196469cf6f648aa6580303fff6 SHA512 6a41c987295ff7201b2a9fa748b2b246c5d61bf4ae39668e614fbec377abfe08387a66182059c0e87d1c8395aa224ae396535b0f41a0be720fc57d319249e8b0 diff --git a/games-action/astromenace/astromenace-1.4.2.ebuild b/games-action/astromenace/astromenace-1.4.2.ebuild new file mode 100644 index 000000000000..a08affa86133 --- /dev/null +++ b/games-action/astromenace/astromenace-1.4.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake desktop xdg + +DESCRIPTION="Hardcore 3D space scroll-shooter with spaceship upgrade possibilities" +HOMEPAGE="https://viewizard.com" +SRC_URI="https://github.com/viewizard/astromenace/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3 GPL-3+ CC-BY-SA-4.0 OFL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + media-libs/freealut + media-libs/freetype:2 + media-libs/libogg + media-libs/libsdl2[joystick,video] + media-libs/libvorbis + media-libs/openal + virtual/glu + virtual/opengl + x11-libs/libXinerama +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.2-gcc13.patch +) + +src_prepare() { + cmake_src_prepare + + # no messing with CXXFLAGS please. + sed -i -e '/-Os/d' CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( -DDATADIR="${EPREFIX}/usr/share/${PN}" ) + + cmake_src_configure +} + +src_install() { + # As of 1.4.2, the CMake install target is better, but still needs porting + # to GNUInstallDirs. + dobin "${BUILD_DIR}"/astromenace + + insinto /usr/share/${PN} + doins "${BUILD_DIR}"/gamedata.vfs + + newicon -s 128 share/astromenace_128.png ${PN}.png + newicon -s 64 share/astromenace_64.png ${PN}.png + + einstalldocs + + make_desktop_entry "${PN}" AstroMenace +} diff --git a/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch b/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch new file mode 100644 index 000000000000..e9615431ca5d --- /dev/null +++ b/games-action/astromenace/files/astromenace-1.4.2-gcc13.patch @@ -0,0 +1,49 @@ +https://github.com/viewizard/astromenace/pull/35 + +From e5ec662f520621cc5cf685de974a265fc78b3c8e Mon Sep 17 00:00:00 2001 +From: Sam James <s...@gentoo.org> +Date: Thu, 13 Apr 2023 03:33:27 +0100 +Subject: [PATCH] Fix build with GCC 13 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so etc is no longer transitively included: +``` +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::LoadVW3D(const std::string&)’: +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:602:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’? + 602 | std::uint32_t ChunkArraySize; + | ^~~~~~~~ + | wint_t +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:603:18: error: ‘ChunkArraySize’ was not declared in this scope + 603 | File->fread(&ChunkArraySize, sizeof(ChunkArraySize), 1); + | ^~~~~~~~~~~~~~ +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::SaveVW3D(const std::string&)’: +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:681:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’? + 681 | std::uint32_t ChunkArraySize = static_cast<std::uint32_t>(Chunks.size()); + | ^~~~~~~~ + | wint_t +/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:682:45: error: ‘ChunkArraySize’ was not declared in this scope + 682 | FileVW3D.write(reinterpret_cast<char*>(&ChunkArraySize), sizeof(ChunkArraySize)); + | ^~~~~~~~~~~~~~ +``` + +See https://gnu.org/software/gcc/gcc-13/porting_to.html. + +Bug: https://bugs.gentoo.org/895760 +--- + src/core/model3d/model3d.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/core/model3d/model3d.cpp b/src/core/model3d/model3d.cpp +index 29b302d5..6f81cab2 100644 +--- a/src/core/model3d/model3d.cpp ++++ b/src/core/model3d/model3d.cpp +@@ -29,6 +29,7 @@ + #include "../vfs/vfs.h" + #include "model3d.h" + #include <cmath> ++#include <cstdint> + #include <cstring> + #include <fstream> +