From bcac8e149bfa551ff3a6115931ba2f40e2bc42f2 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Mon, 2 Oct 2023 18:03:33 +0000 Subject: [PATCH] games-puzzle/toppler: Fix C++17 does not allow register storage class Closes: https://bugs.gentoo.org/896006 Signed-off-by: Brahmajit Das Signed-off-by: Brahmajit Das Part-of: https://github.com/gentoo/gentoo/pull/33161 Closes: https://github.com/gentoo/gentoo/pull/33161 Signed-off-by: James Le Cuirot --- .../toppler-1.1.6-drop-register-keyword.patch | 31 +++++++++++++++++++ games-puzzle/toppler/toppler-1.1.6-r2.ebuild | 5 +-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 games-puzzle/toppler/files/toppler-1.1.6-drop-register-keyword.patch diff --git a/games-puzzle/toppler/files/toppler-1.1.6-drop-register-keyword.patch b/games-puzzle/toppler/files/toppler-1.1.6-drop-register-keyword.patch new file mode 100644 index 0000000000000..1f4beb5b002a4 --- /dev/null +++ b/games-puzzle/toppler/files/toppler-1.1.6-drop-register-keyword.patch @@ -0,0 +1,31 @@ +Bug: https://bugs.gentoo.org/896006 +--- a/main.cc ++++ b/main.cc +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #endif + + static void printhelp(void) { +--- a/keyb.cc ++++ b/keyb.cc +@@ -215,7 +215,7 @@ void key_keydatas(SDLKey &sdlkey, ttkey &tkey, char &ch) { + + + SDLKey key_conv2sdlkey(ttkey k, bool game) { +- register int i; ++ int i; + + if (game) { + for (i = SIZE(ttkeyconv) - 1; i >= 0; i--) +@@ -231,7 +231,7 @@ SDLKey key_conv2sdlkey(ttkey k, bool game) { + } + + ttkey key_sdlkey2conv(SDLKey k, bool game) { +- register int i; ++ int i; + + if (k != SDLK_UNKNOWN) { + if (game) { diff --git a/games-puzzle/toppler/toppler-1.1.6-r2.ebuild b/games-puzzle/toppler/toppler-1.1.6-r2.ebuild index 71fe0f039ab11..3d577a333ac00 100644 --- a/games-puzzle/toppler/toppler-1.1.6-r2.ebuild +++ b/games-puzzle/toppler/toppler-1.1.6-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,7 +7,7 @@ inherit autotools DESCRIPTION="Reimplementation of Nebulous using SDL" HOMEPAGE="https://gitlab.com/roever/toppler/" -SRC_URI="https://downloads.sourceforge.net/toppler/${P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" @@ -26,6 +26,7 @@ PATCHES=( "${FILESDIR}"/${P}-gentoo.patch "${FILESDIR}"/${P}-fix-docdir.patch "${FILESDIR}"/${P}-use-gamestat-group.patch + "${FILESDIR}"/${P}-drop-register-keyword.patch ) src_prepare() {