diff --git a/hugo-2.12-sfmt.patch b/hugo-2.12-sfmt.patch new file mode 100644 index 0000000..9c379ce --- /dev/null +++ b/hugo-2.12-sfmt.patch @@ -0,0 +1,62 @@ +diff -urN hugo-2.12/hugo.c hugo-2.12-patched/hugo.c +--- hugo-2.12/hugo.c 2014-03-03 20:28:56.485346169 +1100 ++++ hugo-2.12-patched/hugo.c 2014-03-03 20:26:29.738875248 +1100 +@@ -128,14 +128,14 @@ + if (!(*osd_gfx_driver_list[video_driver].init) ()) + { + Log ("Can't set graphic mode\n"); +- printf (MESSAGE[language][cant_set_gmode]); ++ printf ("%s", MESSAGE[language][cant_set_gmode]); + return 0; + } + + if (!osd_snd_init_sound ()) + { + Log ("Couldn't open any sound hardware on the host machine.\n"); +- printf (MESSAGE[language][audio_init_failed]); ++ printf ("%s", MESSAGE[language][audio_init_failed]); + } + else + printf (MESSAGE[language][audio_inited], 8, "SDL compatible soundcard", +diff -urN hugo-2.12/osd_linux_sdl_machine.c hugo-2.12-patched/osd_linux_sdl_machine.c +--- hugo-2.12/osd_linux_sdl_machine.c 2005-04-06 06:53:14.000000000 +1100 ++++ hugo-2.12-patched/osd_linux_sdl_machine.c 2014-03-03 20:27:02.201422041 +1100 +@@ -49,21 +49,21 @@ + + atexit(SDL_Quit); + +- printf (MESSAGE[language][init_allegro]); ++ printf ("%s", MESSAGE[language][init_allegro]); + +- printf (MESSAGE[language][translated_by]); ++ printf ("%s", MESSAGE[language][translated_by]); + + if (!(XBuf = (UChar*)malloc(XBUF_WIDTH * XBUF_HEIGHT))) + { +- printf (MESSAGE[language][failed_init]); ++ printf ("%s", MESSAGE[language][failed_init]); + return (0); + } + +- printf (MESSAGE[language][clear_buffer]); ++ printf ("%s", MESSAGE[language][clear_buffer]); + bzero (XBuf, XBUF_WIDTH * XBUF_HEIGHT); + + Log ("Initiating sound\n"); +- printf (MESSAGE[language][init_sound]); ++ printf ("%s", MESSAGE[language][init_sound]); + InitSound(); + + #ifndef SDL +diff -urN hugo-2.12/utils.c hugo-2.12-patched/utils.c +--- hugo-2.12/utils.c 2014-03-03 20:28:30.867914978 +1100 ++++ hugo-2.12-patched/utils.c 2014-03-03 20:27:43.188112260 +1100 +@@ -66,7 +66,7 @@ + if (!(log_file = fopen (log_filename, "at"))) + return; + +- fprintf (log_file, buf); ++ fprintf (log_file, "%s", buf); + fflush (log_file); + fclose (log_file); + } diff --git a/hugo.spec b/hugo.spec index 4fe62a3..cf2b0fe 100644 --- a/hugo.spec +++ b/hugo.spec @@ -1,54 +1,60 @@ -Name: hugo -Version: 2.12 -Release: %mkrel 11 - Summary: Hu-Go! - TurboGrafx 16/PC-Engine Emulator +Name: hugo +Version: 2.12 +Release: 12 License: GPLv2+ Group: Emulators -URL: http://www.zeograd.com/ +Url: http://www.zeograd.com/ Source0: http://www.zeograd.com/download/%{name}-%{version}.tar.bz2 Source1: %{name}-48.png Patch0: hugo-2.12-gcc4.patch Patch1: hugo-2.12-x86_64fix.patch Patch2: hugo-2.12-x86_64-fixes-backport.patch - -BuildRequires: gtk+2-devel -BuildRequires: SDL_net-devel -BuildRequires: SDL_mixer-devel -BuildRequires: oggvorbis-devel -BuildRequires: zlib-devel -BuildRequires: autoconf2.5 - -BuildRoot: %{_tmppath}/%{name}-%{version} +Patch3: hugo-2.12-sfmt.patch +BuildRequires: pkgconfig(gtk+-2.0) +BuildRequires: pkgconfig(SDL_mixer) +BuildRequires: pkgconfig(SDL_net) +BuildRequires: pkgconfig(vorbis) +BuildRequires: pkgconfig(zlib) %description -Hu-Go! is a TurboGrafx 16/PC-Engine Emulator. -There is some public domain roms you play with. -The other games need that you own the original card or CD. +Hu-Go! is a TurboGrafx 16/PC-Engine Emulator. There is some public domain roms +you play with. The other games need that you own the original card or CD. + +%files +%doc AUTHORS NEWS README +%attr(0755,root,games) %{_gamesbindir}/%{name} +%{_gamesbindir}/hugod +%{_datadir}/applications/%{name}.desktop +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/* +%{_iconsdir}/*.png +%{_mandir}/man6/%{name}*.6* + +#---------------------------------------------------------------------------- %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 autoconf %build -./configure --prefix=%{buildroot}/%{_prefix} --bindir=%{buildroot}/%{_gamesbindir} --libdir=%{_libdir} - +%configure2_5x %make %install -rm -rf %{buildroot} %makeinstall bindir=%{buildroot}/%{_gamesbindir} install -d -m 755 %{buildroot}%{_mandir}/man6/ install -m 644 %{name}*.6 %{buildroot}%{_mandir}/man6/ -install -D -m 644 %{_sourcedir}/%{name}-48.png %{buildroot}%{_iconsdir}/%{name}.png +install -D -m 644 %{SOURCE1} %{buildroot}%{_iconsdir}/%{name}.png mkdir -p %{buildroot}%{_datadir}/applications -cat<%{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop +cat<%{buildroot}%{_datadir}/applications/%{name}.desktop [Desktop Entry] Encoding=UTF-8 Name=Hugo @@ -61,106 +67,3 @@ StartupNotify=true Categories=Game;Emulator; EOF -%files -%defattr(-,root,root) -%doc AUTHORS INSTALL NEWS README -%attr(0755,root,games) %{_gamesbindir}/%{name} -%{_gamesbindir}/hugod -%{_datadir}/applications/mandriva-%{name}.desktop -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/* -%{_iconsdir}/*.png -%{_mandir}/man6/%{name}*.6* - - -%clean -rm -rf %{buildroot} - -%if %mdkversion < 200900 -%post -%{update_menus} - -%postun -%{clean_menus} -%endif - - - -%changelog -* Fri Jul 29 2011 Andrey Bondrov 2.12-11mdv2012.0 -+ Revision: 692192 -- imported package hugo - - -* Thu Jul 21 2011 Andrey Bondrov 2.12-11mdv2011.0 -- Import from PLF -- Remove PLF reference - -* Wed Jan 20 2010 Götz Waschk 2.12-10plf2010.1 -- update menu - -* Tue Jan 13 2009 Guillaume Bedot 2.12-9plf2009.1 -- utf8 changelog - -* Tue Jan 13 2009 Guillaume Bedot 2.12-8plf2009.1 -- fixed 64bit build (segfaulted) -- added man pages -- fixed license -- dropped old-style menu - -* Sun Dec 21 2008 Götz Waschk 2.12-7plf2009.1 -- rebuild - -* Sun Dec 16 2007 Guillaume Bedot 2.12-6plf2008.1 -- fix desktop file - -* Tue Aug 1 2006 Götz Waschk 2.12-5plf2007.0 -- xdg menu - -* Mon Dec 19 2005 Götz Waschk 2.12-4plf -- fix directory conflict -- Rebuild - -* Mon Nov 7 2005 Anssi Hannula 2.12-3plf -- fix x86_64 build (patch2) -- distsuffix - -* Mon Nov 7 2005 Götz Waschk 2.12-2plf -- fix buildrequires -- patch for gcc 4 - -* Sun Apr 10 2005 Guillaume Bedot 2.12-1plf -- New release with some bug fixes :) - -* Mon Mar 14 2005 Götz Waschk 2.11-1plf -- update file list -- fix buildrequires -- drop patches -- fix URL -- fix License -- new version - -* Thu Feb 17 2005 Götz Waschk 2.10-4plf -- fix build - -* Mon Jul 21 2003 Götz Waschk 2.10-3plf -- buildrequires fix - -* Fri Jul 18 2003 Götz Waschk 2.10-2plf -- patch to fix build with current gcc -- quiet tar - -* Thu Apr 10 2003 Olivier Thauvin 2.10-1plf -- => plf -- games path -- somes minor fix - -* Tue Mar 04 2003 Guillaume Bedot 2.10-1mdk -- Update to 2.10. - -* Tue Feb 25 2003 Guillaume Bedot 2.10-0-20030225 -- Update to latest CVS. -- Added menu entry and icons for the GUI. - -* Thu Feb 13 2003 Guillaume Bedot 2.10-0-13022003 -- First try to package Hu-Go!