diff options
author | 2025-02-08 16:59:05 +0000 | |
---|---|---|
committer | 2025-02-09 01:38:47 +0000 | |
commit | 848fe1501679d74e65ef2085d1c131343828b68f (patch) | |
tree | 9db4ac93cd14d1bcea4dcfdcde409d0d4222fd15 /games-sports/foobillard | |
parent | dev-libs/bglibs: disable the one failing network test (diff) | |
download | gentoo-848fe1501679d74e65ef2085d1c131343828b68f.tar.gz gentoo-848fe1501679d74e65ef2085d1c131343828b68f.tar.bz2 gentoo-848fe1501679d74e65ef2085d1c131343828b68f.zip |
games-sports/foobillard: update EAPI 7 -> 8
Fix build with gcc 15
Closes: https://bugs.gentoo.org/946901
Closes: https://bugs.gentoo.org/884917
Closes: https://bugs.gentoo.org/875497
Closes: https://bugs.gentoo.org/831494
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-sports/foobillard')
5 files changed, 149 insertions, 0 deletions
diff --git a/games-sports/foobillard/files/foobillard-3.0a-c99.patch b/games-sports/foobillard/files/foobillard-3.0a-c99.patch new file mode 100644 index 000000000000..bc21563c9405 --- /dev/null +++ b/games-sports/foobillard/files/foobillard-3.0a-c99.patch @@ -0,0 +1,14 @@ +Avoid an implicit int to improve compatibility with future compilers. +Borrowed from https://src.fedoraproject.org/rpms/foobillard/blob/f41/f/foobillard-c99.patch + +--- a/src/billmove.c ++++ b/src/billmove.c +@@ -409,7 +409,7 @@ void record_move_log_event( enum event_type event, + } + + +-int my_rand(nr) ++int my_rand(int nr) + { + return rand()%nr; + } diff --git a/games-sports/foobillard/files/foobillard-3.0a-musl.patch b/games-sports/foobillard/files/foobillard-3.0a-musl.patch new file mode 100644 index 000000000000..adc425722ef4 --- /dev/null +++ b/games-sports/foobillard/files/foobillard-3.0a-musl.patch @@ -0,0 +1,14 @@ +Fix build with musl +https://bugs.gentoo.org/831494 + +--- a/src/sound_stuff.c ++++ b/src/sound_stuff.c +@@ -33,7 +33,7 @@ + #include <stdlib.h> + + #ifndef USE_SDL +-#include <sys/unistd.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> diff --git a/games-sports/foobillard/files/foobillard-3.0a-pointer-types.patch b/games-sports/foobillard/files/foobillard-3.0a-pointer-types.patch new file mode 100644 index 000000000000..5289c8a5ca10 --- /dev/null +++ b/games-sports/foobillard/files/foobillard-3.0a-pointer-types.patch @@ -0,0 +1,36 @@ +https://src.fedoraproject.org/rpms/foobillard/blob/f41/f/pointer-types.patch + +--- a/src/billard3d.c 2004-04-23 20:20:49.000000000 -0500 ++++ b/src/billard3d.c 2024-02-05 15:51:12.482203297 -0600 +@@ -5100,7 +5100,7 @@ + + #if __BYTE_ORDER == __BIG_ENDIAN + { +- char *snd=ball_ball_snd.data; ++ char *snd=(char *)ball_ball_snd.data; + for(i=0;i<ball_ball_snd.len;i+=2) + { + char t=snd[i]; +--- a/src/font.c 2003-08-01 17:16:02.000000000 -0500 ++++ b/src/font.c 2024-02-05 16:01:02.310962392 -0600 +@@ -436,14 +436,14 @@ + struct TessData * tessdata = new_tessdata(); + + gluTessNormal(tessdata->tobj, 0.0, 0.0, -1.0 ); +- gluTessCallback(tessdata->tobj, GLU_TESS_BEGIN, glBegin); +- gluTessCallback(tessdata->tobj, GLU_TESS_VERTEX, my_Vertex_cb); ++ gluTessCallback(tessdata->tobj, GLU_TESS_BEGIN, (_GLUfuncptr)glBegin); ++ gluTessCallback(tessdata->tobj, GLU_TESS_VERTEX, (_GLUfuncptr)my_Vertex_cb); + gluTessCallback(tessdata->tobj, GLU_TESS_END, glEnd); + +- funcs.move_to = cb_tess_move_to; +- funcs.line_to = cb_tess_line_to; +- funcs.conic_to = cb_tess_conic_to; +- funcs.cubic_to = cb_tess_cubic_to; ++ funcs.move_to = (FT_Outline_MoveToFunc)cb_tess_move_to; ++ funcs.line_to = (FT_Outline_LineToFunc)cb_tess_line_to; ++ funcs.conic_to = (FT_Outline_ConicToFunc)cb_tess_conic_to; ++ funcs.cubic_to = (FT_Outline_CubicToFunc)cb_tess_cubic_to; + funcs.shift = 0; + funcs.delta = 0; + gluTessBeginPolygon(tessdata->tobj, NULL); diff --git a/games-sports/foobillard/files/foobillard-3.0a-queue.patch b/games-sports/foobillard/files/foobillard-3.0a-queue.patch new file mode 100644 index 000000000000..abc35900b4a9 --- /dev/null +++ b/games-sports/foobillard/files/foobillard-3.0a-queue.patch @@ -0,0 +1,13 @@ +Fix build with gcc 15 + +--- a/src/queue.h ++++ b/src/queue.h +@@ -24,7 +24,7 @@ + + void delete_queue_texbind( void ); + void create_queue_texbind( void ); +-int create_queue(); ++int create_queue(double (*rfunc)(double)); + void draw_queue( VMvect pos, GLfloat Xrot, GLfloat Zrot, GLfloat zoffs, + GLfloat xoffs, GLfloat yoffs, int spheretexbind, VMvect * lightpos, int lightnr ); + diff --git a/games-sports/foobillard/foobillard-3.0a-r2.ebuild b/games-sports/foobillard/foobillard-3.0a-r2.ebuild new file mode 100644 index 000000000000..ba632f45c345 --- /dev/null +++ b/games-sports/foobillard/foobillard-3.0a-r2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop flag-o-matic toolchain-funcs + +DESCRIPTION="8ball, 9ball, snooker and carambol game" +HOMEPAGE="https://foobillard.sourceforge.net/" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sdl video_cards_nvidia" + +RDEPEND="x11-libs/libXaw + x11-libs/libXi + virtual/opengl + virtual/glu + >=media-libs/freetype-2.0.9:2 + media-libs/libpng:0= + sdl? ( media-libs/libsdl[video] ) + !sdl? ( media-libs/freeglut ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-no_nvidia.patch + "${FILESDIR}"/${P}-freetype_pkgconfig.patch + "${FILESDIR}"/${P}-fbsd.patch + "${FILESDIR}"/${P}-as-needed.patch + "${FILESDIR}"/${P}-gl-clamp.patch + "${FILESDIR}"/${P}-c99.patch + "${FILESDIR}"/${P}-queue.patch + "${FILESDIR}"/${P}-pointer-types.patch + "${FILESDIR}"/${P}-musl.patch +) + +src_prepare() { + default + + mv configure.{in,ac} || die + rm aclocal.m4 + + tc-export PKG_CONFIG + + eautoreconf +} + +src_configure() { + # -Werror=lto-type-mismatch + # https://bugs.gentoo.org/859235 + # + # Upstream is sourceforge, and dead since 2010. Not reported upstream. + filter-lto + + use video_cards_nvidia && append-ldflags -L/usr/$(get_libdir)/opengl/nvidia/lib + econf \ + --enable-sound \ + $(use_enable sdl SDL) \ + $(use_enable !sdl glut) \ + $(use_enable video_cards_nvidia nvidia) +} + +src_install() { + default + doman foobillard.6 + newicon data/full_symbol.png foobillard.png + make_desktop_entry foobillard Foobillard +} |