diff --git a/frozen-bubble-2.1.0-bigendianaudio.patch b/frozen-bubble-2.1.0-bigendianaudio.patch new file mode 100644 index 0000000..5745b08 --- /dev/null +++ b/frozen-bubble-2.1.0-bigendianaudio.patch @@ -0,0 +1,26 @@ +--- frozen-bubble.orig 2008-03-03 20:49:40.000000000 +0000 ++++ frozen-bubble 2008-07-04 19:00:13.000000000 +0100 +@@ -66,6 +66,8 @@ + use fbsyms; + use FBLE; + ++use Config; ++ + $| = 1; + + $TARGET_ANIM_SPEED = 20; # number of milliseconds that should last between two animation frames +@@ -281,7 +283,13 @@ + } + + sub init_sound() { +- $mixer = eval { SDL::Mixer->new(-frequency => 44100, -channels => 2, -size => 1024); }; ++ # Endian Test ++ if ($Config{byteorder} == 4321 || $Config{byteorder} == 87654321) { ++ $mixer = eval { SDL::Mixer->new(-frequency => 44100, -format => &AUDIO_S16MSB, -channels => 2, -size => 1024); }; ++ } ++ else { ++ $mixer = eval { SDL::Mixer->new(-frequency => 44100, -channels => 2, -size => 1024); }; ++ } + if ($@) { + $@ =~ s| at \S+ line.*\n||; + print STDERR "\nWarning: can't initialize sound (reason: $@).\n"; diff --git a/frozen-bubble.spec b/frozen-bubble.spec index 007096c..9e853a3 100644 --- a/frozen-bubble.spec +++ b/frozen-bubble.spec @@ -1,13 +1,14 @@ Summary: Frozen Bubble arcade game Name: frozen-bubble Version: 2.1.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: Amusements/Games URL: http://www.frozen-bubble.org/ Source0: http://www.frozen-bubble.org/data/frozen-bubble-%{version}.tar.bz2 Source1: frozen-bubble.desktop Source2: fb-server.init +Patch0: frozen-bubble-2.1.0-bigendianaudio.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl-SDL >= 2.1.3, SDL_mixer-devel, SDL_Pango-devel @@ -35,6 +36,7 @@ Frozen Bubble network game server. %prep %setup -q +%patch0 -p0 # Add a directory to the module path for the app's private perl modules %{__sed} -ie "s#use fb_stuff;#use lib qw(%{_libdir}/%{name}/perl);\n&#" \ frozen-bubble frozen-bubble-editor @@ -159,6 +161,9 @@ fi %changelog +* Sun Jul 6 2008 Hans de Goede 2.1.0-9 +- Fix audio on bigendian archs (bz 454109), patch by Ian Chapman + * Mon Mar 3 2008 Tom "spot" Callaway - 2.1.0-8 - rebuild for new perl (again)