commit: 7e9f1677fb64cf0732486d50c29a3ded472be7df Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Tue Nov 11 08:01:17 2025 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Tue Nov 18 23:20:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e9f1677
games-action/barrage: fix build with new gcc Closes: https://bugs.gentoo.org/944144 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/44588 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> games-action/barrage/barrage-1.0.7-r1.ebuild | 46 +++++++++++++++++++ .../barrage/files/1.0.7-refresh_screen.patch | 51 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/games-action/barrage/barrage-1.0.7-r1.ebuild b/games-action/barrage/barrage-1.0.7-r1.ebuild new file mode 100644 index 000000000000..90106ebf971c --- /dev/null +++ b/games-action/barrage/barrage-1.0.7-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop + +DESCRIPTION="Violent point-and-click shooting game" +HOMEPAGE="https://lgames.sourceforge.io/Barrage/" +SRC_URI="https://downloads.sourceforge.net/lgames/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + acct-group/gamestat + media-libs/libsdl[sound,video] + media-libs/sdl-mixer" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/1.0.7-refresh_screen.patch +) + +src_configure() { + econf --localstatedir="${EPREFIX}"/var/games +} + +src_compile() { + default + + # generated .desktop hardcodes icon path (and in wrong location) + sed -i "/^Icon=/s|=.*|=${PN}|" ${PN}.desktop || die +} + +src_install() { + default + + fowners :gamestat /{usr/bin/${PN},var/games/${PN}.hscr} + fperms g+s /usr/bin/${PN} + fperms 660 /var/games/${PN}.hscr + + rm "${ED}"/usr/share/icons/${PN}48.png || die + newicon ${PN}48.png ${PN}.png +} diff --git a/games-action/barrage/files/1.0.7-refresh_screen.patch b/games-action/barrage/files/1.0.7-refresh_screen.patch new file mode 100644 index 000000000000..f21f8c7c1c51 --- /dev/null +++ b/games-action/barrage/files/1.0.7-refresh_screen.patch @@ -0,0 +1,51 @@ +Description: Fix incorrect refresh_screen() calls +Author: Adrian Bunk <[email protected]> +Bug-Debian: https://bugs.debian.org/1096357 + +--- barrage-1.0.7.orig/src/main.c ++++ barrage-1.0.7/src/main.c +@@ -301,7 +301,7 @@ static void fade_screen( int type, int t + SDL_FillRect( screen, 0, 0x0 ); + SDL_SetAlpha( buffer, SDL_SRCALPHA | SDL_RLEACCEL, (int)alpha ); + SDL_BlitSurface( buffer, 0, screen, 0 ); +- refresh_screen(screen); ++ refresh_screen(); + if (delay>0) SDL_Delay(10); + } + +@@ -311,7 +311,7 @@ static void fade_screen( int type, int t + SDL_BlitSurface( buffer, 0, screen, 0 ); + else + SDL_FillRect( screen, 0, 0x0 ); +- refresh_screen(screen); ++ refresh_screen(); + SDL_FreeSurface( buffer ); + } + +@@ -529,7 +529,7 @@ static void game_finalize( int check_cha + sprintf( buf, "Topgunner #%i", rank+1 ); + SDL_WriteTextCenter( ft_chart, screen, 320, 230, buf ); + SDL_WriteTextCenter( ft_chart, screen, 320, 290, "Sign here:" ); +- refresh_screen(screen); ++ refresh_screen(); + SDL_EnterTextCenter( ft_chart, screen, 320, 320, 18, player_name ); + chart_add_entry( player_name, player_score ); + } +@@ -538,7 +538,7 @@ static void game_finalize( int check_cha + ft_chart, screen, 320, 290, "Not enough to be a topgunner!" ); + SDL_WriteTextCenter( + ft_chart, screen, 320, 320, "Go, try again! Dismissed." ); +- refresh_screen(screen); ++ refresh_screen(); + wait_for_input(); + } + chart_save(); +@@ -635,7 +635,7 @@ static void main_loop() + draw_cursor( screen, x, y ); + + /* udpate screen */ +- refresh_screen(screen); ++ refresh_screen(); + frames++; + + /* end game? */
