From 66144432c2b91cf4e3f99f95c2385d0367d92e2a Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Fri, 30 Sep 2022 01:19:02 -0400 Subject: games-arcade/xboing: fix build with clang16 Signed-off-by: Ionen Wolkens --- games-arcade/xboing/files/xboing-2.4-clang16.patch | 37 ++++++++++ games-arcade/xboing/xboing-2.4-r3.ebuild | 75 -------------------- games-arcade/xboing/xboing-2.4-r4.ebuild | 79 ++++++++++++++++++++++ 3 files changed, 116 insertions(+), 75 deletions(-) create mode 100644 games-arcade/xboing/files/xboing-2.4-clang16.patch delete mode 100644 games-arcade/xboing/xboing-2.4-r3.ebuild create mode 100644 games-arcade/xboing/xboing-2.4-r4.ebuild (limited to 'games-arcade') diff --git a/games-arcade/xboing/files/xboing-2.4-clang16.patch b/games-arcade/xboing/files/xboing-2.4-clang16.patch new file mode 100644 index 000000000000..72c632850de0 --- /dev/null +++ b/games-arcade/xboing/files/xboing-2.4-clang16.patch @@ -0,0 +1,37 @@ +Ideally would want to enable -DNeedFunctionPrototypes=1 +but it leads to more issues not handled here. + +https://bugs.gentoo.org/870412 +--- a/eyedude.c ++++ b/eyedude.c +@@ -51,2 +51,3 @@ + #include ++#include + #include +--- a/include/intro.h ++++ b/include/intro.h +@@ -84,2 +84,3 @@ + void DrawIntroTitle(Display *display, Window window, int x, int y); ++void HandleBlink(Display *display, Window window); + #else +@@ -92,2 +93,3 @@ + void DoIntroTitle(); ++void HandleBlink(); + #endif +--- a/include/level.h ++++ b/include/level.h +@@ -74,2 +74,3 @@ + void DisplayLevelInfo(Display *display, Window window, u_long level); ++void DisplayLevelNumber(Display *display, Window window, u_long level); + void CheckGameRules(Display *display, Window window); +@@ -113,2 +114,3 @@ + void DisplayLevelInfo(); ++void DisplayLevelNumber(); + void CheckGameRules(); +--- a/main.c ++++ b/main.c +@@ -231,3 +231,3 @@ + { +- static oldx = 0; ++ static int oldx = 0; + int x, y; diff --git a/games-arcade/xboing/xboing-2.4-r3.ebuild b/games-arcade/xboing/xboing-2.4-r3.ebuild deleted file mode 100644 index 40988b31ee7c..000000000000 --- a/games-arcade/xboing/xboing-2.4-r3.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="Blockout type game where you bounce a ball trying to destroy blocks" -HOMEPAGE="http://www.techrescue.org/xboing/" -SRC_URI="http://www.techrescue.org/xboing/${PN}${PV}.tar.gz - mirror://gentoo/${P}-debian.patch.bz2" -S="${WORKDIR}/${PN}" - -LICENSE="xboing" -SLOT="0" -KEYWORDS="amd64 ~x86" - -RDEPEND=" - acct-group/gamestat - x11-libs/libXpm" -DEPEND="${RDEPEND}" -BDEPEND=" - app-text/rman - sys-devel/gcc - x11-misc/gccmakedep - >=x11-misc/imake-1.0.8-r1" - -PATCHES=( - "${WORKDIR}"/${P}-debian.patch - "${FILESDIR}"/${P}-buffer.patch - "${FILESDIR}"/${P}-sleep.patch -) - -src_prepare() { - default - sed -i '/^#include/s:xpm\.h:X11/xpm.h:' *.c || die - sed -i "s:GENTOO_VER:${PF/${PN}-/}:" Imakefile || die -} - -src_configure() { - append-cflags -fcommon #707214 - - CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \ - IMAKECPP="${IMAKECPP:-${CHOST}-gcc -E}" xmkmf -a || die -} - -src_compile() { - local myemakeargs=( - CC="$(tc-getCC)" - CDEBUGFLAGS="${CFLAGS}" - LOCAL_LDFLAGS="${LDFLAGS}" - HIGH_SCORE_DIR="${EPREFIX}/var/games" - XBOING_DIR="${EPREFIX}/usr/share/${PN}" - ) - emake "${myemakeargs[@]}" -} - -src_install() { - local myemakeargs=( - CC="$(tc-getCC)" - LOCAL_LDFLAGS="${LDFLAGS}" - PREFIX="${D}" - BINDIR="${ED}/usr/bin" - HIGH_SCORE_DIR="${EPREFIX}/var/games" - XBOING_DIR="${EPREFIX}/usr/share/${PN}" - ) - emake "${myemakeargs[@]}" install - - newman xboing.man xboing.6 - dodoc README docs/*.doc - - fowners root:gamestat /var/games/xboing.score /usr/bin/xboing - fperms 660 /var/games/xboing.score - fperms 2755 /usr/bin/xboing -} diff --git a/games-arcade/xboing/xboing-2.4-r4.ebuild b/games-arcade/xboing/xboing-2.4-r4.ebuild new file mode 100644 index 000000000000..c92635a96e67 --- /dev/null +++ b/games-arcade/xboing/xboing-2.4-r4.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Blockout type game where you bounce a ball trying to destroy blocks" +HOMEPAGE="http://www.techrescue.org/xboing/" +SRC_URI="http://www.techrescue.org/xboing/${PN}${PV}.tar.gz + mirror://gentoo/${P}-debian.patch.bz2" +S="${WORKDIR}/${PN}" + +LICENSE="xboing" +SLOT="0" +KEYWORDS="amd64 ~x86" + +RDEPEND=" + acct-group/gamestat + x11-libs/libX11 + x11-libs/libXpm" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto" +BDEPEND=" + app-text/rman + sys-devel/gcc + x11-misc/gccmakedep + >=x11-misc/imake-1.0.8-r1" + +PATCHES=( + "${WORKDIR}"/${P}-debian.patch + "${FILESDIR}"/${P}-buffer.patch + "${FILESDIR}"/${P}-sleep.patch + "${FILESDIR}"/${P}-clang16.patch +) + +src_prepare() { + default + sed -i '/^#include/s:xpm\.h:X11/xpm.h:' *.c || die + sed -i "s:GENTOO_VER:${PF/${PN}-/}:" Imakefile || die +} + +src_configure() { + append-cflags -fcommon #707214 + + CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \ + IMAKECPP="${IMAKECPP:-${CHOST}-gcc -E}" xmkmf -a || die +} + +src_compile() { + local myemakeargs=( + CC="$(tc-getCC)" + CDEBUGFLAGS="${CFLAGS}" + LOCAL_LDFLAGS="${LDFLAGS}" + HIGH_SCORE_DIR="${EPREFIX}/var/games" + XBOING_DIR="${EPREFIX}/usr/share/${PN}" + ) + emake "${myemakeargs[@]}" +} + +src_install() { + local myemakeargs=( + CC="$(tc-getCC)" + LOCAL_LDFLAGS="${LDFLAGS}" + PREFIX="${D}" + BINDIR="${ED}/usr/bin" + HIGH_SCORE_DIR="${EPREFIX}/var/games" + XBOING_DIR="${EPREFIX}/usr/share/${PN}" + ) + emake "${myemakeargs[@]}" install + + newman xboing.man xboing.6 + dodoc README docs/*.doc + + fowners root:gamestat /var/games/xboing.score /usr/bin/xboing + fperms 660 /var/games/xboing.score + fperms 2755 /usr/bin/xboing +} -- cgit v1.2.3-65-gdbad