commit: 3aa0fa647db17302e5d60bc4e91b9e2b9193923f Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Sun Apr 27 00:03:25 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Apr 27 22:52:28 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aa0fa64
games-arcade/asteroid: update EAPI 7 -> 8, fix build with gcc 15, cmake 4 Closes: https://bugs.gentoo.org/944250 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/41781 Closes: https://github.com/gentoo/gentoo/pull/41781 Signed-off-by: Sam James <sam <AT> gentoo.org> games-arcade/asteroid/asteroid-1.2.1-r1.ebuild | 37 ++++++++++++++++++++++ .../asteroid/files/asteroid-1.2.1-cmake4.patch | 12 +++++++ .../asteroid/files/asteroid-1.2.1-gcc15.patch | 13 ++++++++ 3 files changed, 62 insertions(+) diff --git a/games-arcade/asteroid/asteroid-1.2.1-r1.ebuild b/games-arcade/asteroid/asteroid-1.2.1-r1.ebuild new file mode 100644 index 000000000000..021d0cd502f8 --- /dev/null +++ b/games-arcade/asteroid/asteroid-1.2.1-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Modern version of the arcade classic that uses OpenGL" +HOMEPAGE="https://chazomaticus.github.io/asteroid/" +SRC_URI="https://github.com/chazomaticus/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + media-libs/freeglut + media-libs/libsdl + media-libs/sdl-mixer + virtual/glu + virtual/opengl + x11-libs/gtk+:2 +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-libm.patch + "${FILESDIR}"/${P}-cmake4.patch + "${FILESDIR}"/${P}-gcc15.patch +) + +src_configure() { + local mycmakeargs=( + -DOpenGL_GL_PREFERENCE=GLVND + ) + cmake_src_configure +} diff --git a/games-arcade/asteroid/files/asteroid-1.2.1-cmake4.patch b/games-arcade/asteroid/files/asteroid-1.2.1-cmake4.patch new file mode 100644 index 000000000000..2c126544283b --- /dev/null +++ b/games-arcade/asteroid/files/asteroid-1.2.1-cmake4.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,8 +1,8 @@ ++cmake_minimum_required(VERSION 3.31) + project(Asteroid) + set(Asteroid_BUILD_VERSION "1.2.1") + + # Dependencies +-cmake_minimum_required(VERSION 2.6) + find_package(OpenGL REQUIRED) + if(NOT OPENGL_FOUND) + message(FATAL_ERROR "Error: OpenGL not found") diff --git a/games-arcade/asteroid/files/asteroid-1.2.1-gcc15.patch b/games-arcade/asteroid/files/asteroid-1.2.1-gcc15.patch new file mode 100644 index 000000000000..1520bd5966c5 --- /dev/null +++ b/games-arcade/asteroid/files/asteroid-1.2.1-gcc15.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/944250 + +--- a/src/main.c ++++ b/src/main.c +@@ -244,7 +244,7 @@ void GameTimer(int v) + } + + #ifdef CFG_GTK +-static gboolean DisplayDialog() ++static gboolean DisplayDialog(void* a) + { + GtkWidget * dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, ASTEROIDS_ABOUT);
