diff --git a/.gitignore b/.gitignore index d40d3eb..de904c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -foobillard-3.0a.tar.gz +foobillard-3.0a-hobbled.tar.bz2 diff --git a/foobillard-3.0a-clothtex.patch b/foobillard-3.0a-clothtex.patch new file mode 100644 index 0000000..9ba236d --- /dev/null +++ b/foobillard-3.0a-clothtex.patch @@ -0,0 +1,13 @@ +--- src/table.c~ 2004-01-11 15:53:02.000000000 -0600 ++++ src/table.c 2012-03-07 20:29:01.551145717 -0600 +@@ -1214,8 +1214,8 @@ + GL_UNSIGNED_BYTE, tabletexdata); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, options_tex_min_filter); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, options_tex_mag_filter); +- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); +- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); ++ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); ++ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + free( tabletexdata ); + } else { + tabletexbind=0; diff --git a/foobillard-3.0a-no-fonts.patch b/foobillard-3.0a-no-fonts.patch new file mode 100644 index 0000000..0233b52 --- /dev/null +++ b/foobillard-3.0a-no-fonts.patch @@ -0,0 +1,50 @@ +diff -urN foobillard/data/Makefile.in foobillard-3.0a/data/Makefile.in +--- foobillard/data/Makefile.in 2004-04-24 03:30:26.000000000 +0200 ++++ foobillard-3.0a/data/Makefile.in 2008-07-19 22:27:11.000000000 +0200 +@@ -121,14 +121,12 @@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + pkgdata_DATA = blende.png \ +- bluebold.ttf \ + cue_shadow.png \ + foobillard.gif \ + foobillard.png \ + full_symbol.png \ + fullhalf_symbol.png \ + half_symbol.png \ +- iomanoid.ttf \ + lightflare.png \ + place_cue_ball.png \ + queue.png \ +@@ -142,7 +140,6 @@ + table-frame.png \ + tabletex_fB_128x128.png \ + tabletex_fB_256x256.png \ +- youregon.ttf \ + ball_ball.raw \ + posx.png \ + posy.png \ +diff -urN foobillard/src/options.h foobillard-3.0a/src/options.h +--- foobillard/src/options.h 2003-11-27 04:32:54.000000000 +0100 ++++ foobillard-3.0a/src/options.h 2008-07-19 22:20:14.000000000 +0200 +@@ -96,13 +96,13 @@ + //#define options_player_fontname "/usr/X11/lib/X11/fonts/win-ttf/tahomabd.ttf" + #define options_shared_data_path "/usr/local/shared/foobillard" + +-#define options_player_fontname "iomanoid.ttf" +-#define options_help_fontname "youregon.ttf" +-#define options_menu_fontname "youregon.ttf" +-#define options_winner_fontname "youregon.ttf" +-#define options_ball_fontname "bluebold.ttf" +-#define options_score_fontname "bluebold.ttf" +-#define options_roster_fontname "bluebold.ttf" ++#define options_player_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf" ++#define options_help_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" ++#define options_menu_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" ++#define options_winner_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" ++#define options_ball_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" ++#define options_score_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" ++#define options_roster_fontname "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf" + + #define options_snd_volume 1.0 + diff --git a/foobillard-c99.patch b/foobillard-c99.patch new file mode 100644 index 0000000..f393fe3 --- /dev/null +++ b/foobillard-c99.patch @@ -0,0 +1,15 @@ +Avoid an implicit int to improve compatibility with future compilers. + +diff --git a/src/billmove.c b/src/billmove.c +index 447e31a6736fddf7..0182dc2bcad87998 100644 +--- 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/foobillard-configure-c99.patch b/foobillard-configure-c99.patch new file mode 100644 index 0000000..267547a --- /dev/null +++ b/foobillard-configure-c99.patch @@ -0,0 +1,18 @@ +Fix generic C99 compatibility issue in autoconf output. Newer autoconf +versions no longer generate this C fragment. + +diff --git a/configure b/configure +index 3caa19b115998588..fa9ee347ab4d20b9 100755 +--- a/configure ++++ b/configure +@@ -3555,8 +3555,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext diff --git a/foobillard.desktop b/foobillard.desktop index af9ff86..d3a97a2 100644 --- a/foobillard.desktop +++ b/foobillard.desktop @@ -1,10 +1,9 @@ [Desktop Entry] -Encoding=UTF-8 Name=FooBillard GenericName=Billard Comment=OpenGL billard game Exec=foobillard -Icon=foobillard.xpm +Icon=foobillard Terminal=false Type=Application -Categories=Application;Game;3DGame;X-Fedora; +Categories=Game;SportsGame;X-Fedora; diff --git a/foobillard.spec b/foobillard.spec index 76f0b5b..db34bf9 100644 --- a/foobillard.spec +++ b/foobillard.spec @@ -1,19 +1,27 @@ Name: foobillard Version: 3.0a -Release: 5 +Release: 52%{?dist} Summary: OpenGL billard game -Group: Amusements/Games -License: GPL +License: GPL-2.0-only URL: http://foobillard.sunsite.dk/ -Source0: http://foobillard.sunsite.dk/dnl/foobillard-3.0a.tar.gz +# Based on http://foobillard.sunsite.dk/dnl/foobillard-3.0a.tar.gz +Source0: foobillard-3.0a-hobbled.tar.bz2 Source1: foobillard.desktop +Source2: hobble-foobillard.sh Patch0: foobillard-3.0a-nonv.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Patch1: foobillard-3.0a-no-fonts.patch +Patch2: foobillard-3.0a-clothtex.patch +Patch3: foobillard-configure-c99.patch +Patch4: foobillard-c99.patch +Patch5: pointer-types.patch +Requires: dejavu-sans-fonts +BuildRequires: gcc BuildRequires: SDL-devel ImageMagick alsa-lib-devel -BuildRequires: freetype-devel libpng-devel perl zlib-devel +BuildRequires: freetype-devel libpng-devel perl-interpreter zlib-devel freeglut-devel BuildRequires: libGL-devel libGLU-devel libX11-devel libXaw-devel libXi-devel +BuildRequires: make %description FooBillard is an attempt to create a free OpenGL-billard for Linux. @@ -22,42 +30,205 @@ FooBillard is still under development but the main physics is implemented. %prep %setup -q -n foobillard-3.0a -%patch0 -p1 +%patch -P 0 -p1 +%patch -P 1 -p1 -b .no-fonts +%patch -P 2 -p0 -b .clothtex +%patch -P 3 -p1 +%patch -P 4 -p1 +%patch -P 5 -p0 %build -%configure --disable-nvidia CFLAGS="${RPM_OPT_FLAGS}" +iconv -f iso-8859-1 -t utf-8 < ChangeLog > _ +mv _ ChangeLog +./configure --prefix=%{_prefix} --disable-nvidia --enable-SDL CFLAGS="${RPM_OPT_FLAGS} -DUSE_SOUND -std=gnu17" LDFLAGS="${RPM_LD_FLAGS}" make %{?_smp_mflags} -convert -resize 48 data/foobillard.png foobillard.png +convert -resize 48x48 -background transparent -gravity center -extent 48x48 data/foobillard.png foobillard.png +convert -resize 256x256 -background transparent -gravity center -extent 256x256 data/foobillard.png foobillard-256x256.png %install rm -rf $RPM_BUILD_ROOT %makeinstall mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications -install -pm 644 %{_sourcedir}/foobillard.desktop \ - $RPM_BUILD_ROOT%{_datadir}/applications/fedora-foobillard.desktop +install -pm 644 %{SOURCE1} \ + $RPM_BUILD_ROOT%{_datadir}/applications/foobillard.desktop mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6 install -pm 644 foobillard.6 $RPM_BUILD_ROOT%{_mandir}/man6 install -D -p -m 644 foobillard.png \ $RPM_BUILD_ROOT%{_datadir}/pixmaps/foobillard.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps +install -p -m 644 foobillard.png \ + %{buildroot}%{_datadir}/icons/hicolor/48x48/apps +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps +install -p -m 644 foobillard-256x256.png \ + %{buildroot}%{_datadir}/icons/hicolor/256x256/apps -%clean -rm -rf $RPM_BUILD_ROOT - %files -%defattr(-,root,root,-) -%doc AUTHORS COPYING ChangeLog NEWS README TODO README.FONTS +%doc AUTHORS COPYING ChangeLog README TODO %doc foobillardrc.example %{_bindir}/foobillard -%{_datadir}/applications/fedora-foobillard.desktop +%{_datadir}/applications/foobillard.desktop %{_datadir}/foobillard %{_datadir}/pixmaps/foobillard.png +%{_datadir}/icons/hicolor/48x48/apps/* +%{_datadir}/icons/hicolor/256x256/apps/* %{_mandir}/man6/* %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 3.0a-52 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 16 2025 Fedora Release Engineering - 3.0a-51 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 3.0a-50 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Feb 05 2024 Gwyn Ciesla - 3.0a-49 +- Patch for stricter flags + +* Wed Jan 24 2024 Fedora Release Engineering - 3.0a-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 3.0a-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 3.0a-46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Mar 08 2023 Gwyn Ciesla - 3.0a-45 +- migrated to SPDX license + +* Thu Jan 19 2023 Fedora Release Engineering - 3.0a-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Dec 20 2022 Florian Weimer - 3.0a-43 +- Port to C99 (#2155183) + +* Fri Dec 09 2022 Kalev Lember - 3.0a-42 +- Make sure the installed icon is square +- Install an additional 256x256 px sized icon + +* Thu Jul 21 2022 Fedora Release Engineering - 3.0a-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 3.0a-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 3.0a-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Apr 02 2021 Kalev Lember - 3.0a-38 +- Honor LDFLAGS from the build system + +* Tue Jan 26 2021 Fedora Release Engineering - 3.0a-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.0a-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon May 18 2020 Gwyn Ciesla - 3.0a-35 +- Update dejavu font paths. + +* Thu Apr 23 2020 Gwyn Ciesla - 3.0a-34 +- Configure macro results in freeze in f32+ + +* Tue Jan 28 2020 Fedora Release Engineering - 3.0a-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 3.0a-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 3.0a-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.0a-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 3.0a-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 3.0a-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.0a-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.0a-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 3.0a-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.0a-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Aug 16 2014 Fedora Release Engineering - 3.0a-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.0a-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0a-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Feb 11 2013 Jon Ciesla - 3.0a-20 +- Drop desktop vendor tag. + +* Thu Jul 19 2012 Fedora Release Engineering - 3.0a-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Mar 12 2012 Jon Ciesla - 3.0a-18 +- Build with SDL to fix sound, BZ 801588. + +* Wed Mar 07 2012 Jon Ciesla - 3.0a-17 +- Patch to fix cloth texture, BZ 709202. +- Build with glut. + +* Fri Jan 13 2012 Fedora Release Engineering - 3.0a-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 7 2011 Miloslav Trmač - 3.0a-15 +- Add dist tag +- Rebuild with newer libpng + +* Tue Feb 08 2011 Fedora Release Engineering - 3.0a-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 3.0a-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Mar 06 2009 Jesse Keating - 3.0a-12 +- Correct the fonts requires due to package name change + +* Tue Feb 24 2009 Fedora Release Engineering - 3.0a-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Dec 6 2008 Miloslav Trmač - 3.0a-10 +- Add SportsGame category to foobillard.spec + Resolves: #465700 + +* Thu Dec 4 2008 Miloslav Trmač - 3.0a-9 +- Use a more specific dejavu-fonts requirement + Resolves: #473554 + +* Mon Sep 15 2008 Miloslav Trmač - 3.0a-8 +- Add missing Requires: dejavu-fonts + Resolves: #462168 + +* Sat Jul 19 2008 Miloslav Trmač - 3.0a-7 +- Don't ship the non-free fonts +- Update License: +- Fix foobillard.desktop +- Convert ChangeLog to UTF-8 +- Don't ship empty NEWS + +* Tue Feb 19 2008 Fedora Release Engineering - 3.0a-6 +- Autorebuild for GCC 4.3 + * Wed Sep 13 2006 Miloslav Trmac - 3.0a-5 - Rebuild for Fedora Extras 6 diff --git a/hobble-foobillard.sh b/hobble-foobillard.sh new file mode 100755 index 0000000..fbb2eed --- /dev/null +++ b/hobble-foobillard.sh @@ -0,0 +1,10 @@ +#! /bin/sh +set -e +d=$(mktemp -d) +o=$(pwd) +cd "$d" +tar xzf "$o"/foobillard-3*.tar.gz +find \( -name '*.ttf' -o -name README.FONTS \) -print0 | xargs -0 rm +tar cjf "$o/foobillard-hobbled.tar.bz2" * +cd "$o" +rm -rf "$d" diff --git a/pointer-types.patch b/pointer-types.patch new file mode 100644 index 0000000..e35ae24 --- /dev/null +++ b/pointer-types.patch @@ -0,0 +1,34 @@ +--- src/billard3d.c~ 2004-04-23 20:20:49.000000000 -0500 ++++ 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;itobj, 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/sources b/sources index 0ddde7f..138b7e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c2d92edeaaf8bfb18aa26f1c79931b7d foobillard-3.0a.tar.gz +965d0dc0a4f864f2f25682bd9881e9b1 foobillard-3.0a-hobbled.tar.bz2