games-puzzle/xblockout: mark as C17, lift sed to patch

Game uses recursive calls to variable lenght function walkrowcol,
it's called with 1, 2, 3, 4, and 6 argument callback to operate
on buttons. Best to leave it as it instead of possibly-buggy code
duplication and calling specialized variants on each callsite.

Closes: https://bugs.gentoo.org/946934
Closes: https://bugs.gentoo.org/943937
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/313
Merges: https://codeberg.org/gentoo/gentoo/pulls/313
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2026-03-13 16:50:33 +03:00
committed by Sam James
parent 37b10764ec
commit b79258151d
2 changed files with 96 additions and 0 deletions
@@ -0,0 +1,30 @@
Was sed in ebuild. Extracted for clarity.
--- a/Makefile.in
+++ b/Makefile.in
@@ -57,7 +57,6 @@
###########################################################################
# For compile
-CC=@CC@
# For copy
CP=cp
@CP@
@@ -83,7 +82,7 @@
# For linking (configure script will modify this line)
# xmkmf et imake informations are take into account.
-LIBS = @LIBS@ -lm
+LIBS = @LIBS@ -lm -lX11
all:demo
@@ -93,8 +92,7 @@
CFLAGS = -DSCOREDIR=\"$(SCOREDIR)\" \
-DRESOURCEDIR=\"$(RESOURCEDIR)\" \
-DXBLVERSION=\"$(XBLVERSION)\" \
- -DGROUP_GID=$(GROUP_GID) \
- $(USE_SETGID) @DEFS@ @CFLA@ -g
+ $(USE_SETGID) @DEFS@ @CFLA@ $(GENTOO_CFLAGS)
# For link edit options
LDOPTIONS=$(CFLAGS)
LDOPTIONS=@LDOPTIONS@
@@ -0,0 +1,66 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools desktop flag-o-matic toolchain-funcs
DESCRIPTION="X Window block dropping game in 3 Dimension"
HOMEPAGE="https://perso.univ-lyon1.fr/thierry.excoffier/XBL/"
SRC_URI="https://perso.univ-lyon1.fr/thierry.excoffier/XBL/xbl-${PV}.tar.gz"
S="${WORKDIR}/xbl-${PV}"
LICENSE="GPL-1+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
x11-libs/libX11
x11-libs/libXext
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-font.patch
"${FILESDIR}"/${P}-configure-clang16.patch
"${FILESDIR}"/${P}-makefile.patch
)
src_prepare() {
default
# Don't know about other archs. --slarti
use amd64 && filter-flags "-fweb"
mv configure.in configure.ac || die
eautoreconf
}
src_configure() {
append-cflags -std=gnu17 #946934
default
}
src_compile() {
emake \
USE_SETGID= \
SCOREDIR="${EPREFIX}/usr/share/${PN}" \
RESOURCEDIR="${EPREFIX}/usr/share/${PN}" \
LDOPTIONS="${LDFLAGS}" \
GENTOO_CFLAGS="${CFLAGS}" \
CC="$(tc-getCC)"
}
src_install() {
newbin bl xbl
insinto /usr/share/${PN}
newins Xbl.ad Xbl
newman xbl.man xbl.6
dodoc README xbl-README
HTML_DOCS="*.html *.gif" einstalldocs
newicon xbl-game.gif ${PN}.gif
make_desktop_entry xbl XBlockOut /usr/share/pixmaps/${PN}.gif
}