summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-03-19 21:12:11 +0000
committerMike Frysinger <vapier@gentoo.org>2005-03-19 21:12:11 +0000
commit978e18f4f09a6a96794a8958d017db5f34c6bb75 (patch)
tree7cb0ac893d09e23418da5e3a7e1c0867cc9d8867 /games-arcade/frozen-bubble
parentStable keyword disappeared due to deletion of alsa-1.0.6. See bug #85571. (diff)
downloadgentoo-2-978e18f4f09a6a96794a8958d017db5f34c6bb75.tar.gz
gentoo-2-978e18f4f09a6a96794a8958d017db5f34c6bb75.tar.bz2
gentoo-2-978e18f4f09a6a96794a8958d017db5f34c6bb75.zip
Update sdl-perl-2 patch.
(Portage version: 2.0.51.19)
Diffstat (limited to 'games-arcade/frozen-bubble')
-rw-r--r--games-arcade/frozen-bubble/ChangeLog9
-rw-r--r--games-arcade/frozen-bubble/files/1.0.0-fb-sdlperl-deb.patch40
-rw-r--r--games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch102
-rw-r--r--games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild24
4 files changed, 123 insertions, 52 deletions
diff --git a/games-arcade/frozen-bubble/ChangeLog b/games-arcade/frozen-bubble/ChangeLog
index c622d6746351..82be9e083143 100644
--- a/games-arcade/frozen-bubble/ChangeLog
+++ b/games-arcade/frozen-bubble/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-arcade/frozen-bubble
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/ChangeLog,v 1.13 2004/12/16 18:12:22 vapier Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/ChangeLog,v 1.14 2005/03/19 21:12:11 vapier Exp $
+
+ 19 Mar 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/frozen-bubble-1.0.0-sdl-perl-2.patch,
+ -files/1.0.0-fb-sdlperl-deb.patch, frozen-bubble-1.0.0-r4.ebuild:
+ Update sdl-perl-2 patch.
*frozen-bubble-1.0.0-r4 (16 Dec 2004)
diff --git a/games-arcade/frozen-bubble/files/1.0.0-fb-sdlperl-deb.patch b/games-arcade/frozen-bubble/files/1.0.0-fb-sdlperl-deb.patch
deleted file mode 100644
index 17afc8822ebc..000000000000
--- a/games-arcade/frozen-bubble/files/1.0.0-fb-sdlperl-deb.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- frozen-bubble 2003-06-13 09:46:09.000000000 -0300
-+++ frozen-bubble 2004-05-31 00:46:31.000000000 -0300
-@@ -308,7 +308,11 @@
- sub add_image($) {
- my $file = "$FPATH/gfx/$_[0]";
- my $img = SDL::Surface->new(-name => $file);
-- $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
-+ if (UNIVERSAL::isa($img, "HASH")) {
-+ $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
-+ } else {
-+ $img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
-+ }
- add_default_rect($img);
- return $img;
- }
-@@ -1476,7 +1480,11 @@
- }
-
- put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
-- fb_c_stuff::shrink($app->{-surface}, $background->display_format->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
-+ if (UNIVERSAL::isa($app, "HASH")) {
-+ fb_c_stuff::shrink($app->{-surface}, $background->display_format->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
-+ } else {
-+ fb_c_stuff::shrink($$app, ${$background->display_format}, $high_posx, $high_posy, $$high_rect, 4);
-+ }
- $centered_print->($high_posx, $high_posy, $high->{name});
- $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? "WON!" : "LVL-".$high->{level});
- my $min = int($high->{time}/60);
-@@ -1644,8 +1652,10 @@
- if ($graphics_level == 1) {
- $background->blit($apprects{main}, $app, $apprects{main});
- $app->flip;
-- } else {
-+ } elsif (UNIVERSAL::isa($app, "HASH")) {
- fb_c_stuff::effect($app->{-surface}, $background->display_format->{-surface});
-+ } else {
-+ fb_c_stuff::effect($$app, ${$background->display_format});
- }
-
- $display_on_app_disabled = 0;
diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch
new file mode 100644
index 000000000000..0c2d8c0b252f
--- /dev/null
+++ b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch
@@ -0,0 +1,102 @@
+Taken from upstream:
+http://www.frozen-bubble.org/perl-SDL.patch
+
+To fix:
+http://bugs.gentoo.org/show_bug.cgi?id=74844
+
+--- frozen-bubble
++++ frozen-bubble
+@@ -161,6 +161,15 @@
+
+ #- ----------- sound related stuff ----------------------------------------
+
++sub get_sound {
++ my ($sound) = @_;
++ if (ref($sound) eq 'HASH') {
++ return $sound{$_}{-data};
++ } else {
++ return $$sound;
++ }
++}
++
+ sub play_sound($) {
+ $mixer_enabled && $mixer && !$sfx_disabled && $sound{$_[0]} and $mixer->play_channel(-1, $sound{$_[0]}, 0);
+ }
+@@ -179,7 +188,7 @@
+ $elem or return -1;
+ -f $elem or return 0;
+ $mus = SDL::Music->new($elem);
+- if ($mus->{-data}) {
++ if (get_sound($mus)) {
+ print STDERR "[Playlist] playing `$elem'\n";
+ $mixer->play_music($mus, 0);
+ return 1;
+@@ -191,9 +200,9 @@
+ while ($tryanother->() == 0) {};
+ } else {
+ $mus = SDL::Music->new("$FPATH$musics{$name}");
+- $mus->{-data} or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
++ get_sound($mus) or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
+ if ($pos) {
+- fb_c_stuff::fade_in_music_position($mus->{-data}, -1, 500, $pos);
++ fb_c_stuff::fade_in_music_position(get_sound($mus), -1, 500, $pos);
+ } else {
+ $mixer->play_music($mus, -1);
+ }
+@@ -212,7 +221,7 @@
+ foreach (@sounds) {
+ my $sound_path = "$FPATH/snd/$_.wav";
+ $sound{$_} = SDL::Sound->new($sound_path);
+- if ($sound{$_}{-data}) {
++ if (get_sound($sound{$_})) {
+ $sound{$_}->volume(80);
+ } else {
+ print STDERR "Warning, could not create new sound from `$sound_path'.\n";
+@@ -304,10 +304,28 @@
+ return $save;
+ }
+
++sub surf {
++ my ($surface) = @_;
++ if (ref($surface) eq 'HASH') {
++ return $surface->{-surface};
++ } else {
++ return $$surface;
++ }
++}
++
++sub rect {
++ my ($rect) = @_;
++ if (ref($rect) eq 'HASH') {
++ return $rect->{-rect};
++ } else {
++ return $$rect;
++ }
++}
++
+ sub add_image($) {
+ my $file = "$FPATH/gfx/$_[0]";
+ my $img = SDL::Surface->new(-name => $file);
+- $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
++ surf($img) or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
+ add_default_rect($img);
+ return $img;
+ }
+@@ -1473,7 +1491,7 @@
+ }
+
+ put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
+- fb_c_stuff::shrink($app->{-surface}, $background->display_format->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
++ fb_c_stuff::shrink(surf($app), surf($background->display_format), $high_posx, $high_posy, rect($high_rect), 4);
+ $centered_print->($high_posx, $high_posy, $high->{name});
+ $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? "WON!" : "LVL-".$high->{level});
+ my $min = int($high->{time}/60);
+@@ -1642,7 +1660,7 @@
+ $background->blit($apprects{main}, $app, $apprects{main});
+ $app->flip;
+ } else {
+- fb_c_stuff::effect($app->{-surface}, $background->display_format->{-surface});
++ fb_c_stuff::effect(surf($app), surf($background->display_format));
+ }
+
+ $display_on_app_disabled = 0;
diff --git a/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild b/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild
index de3ed71181aa..4a2ef6ece3c1 100644
--- a/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild
+++ b/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild,v 1.2 2004/12/30 22:42:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r4.ebuild,v 1.3 2005/03/19 21:12:11 vapier Exp $
inherit eutils perl-module games
@@ -17,24 +17,26 @@ SLOT="0"
KEYWORDS="alpha amd64 hppa ppc sparc x86"
IUSE=""
-RDEPEND="virtual/libc
- >=dev-lang/perl-5.6.1
+RDEPEND=">=dev-lang/perl-5.6.1
>=media-libs/sdl-mixer-1.2.3
- =dev-perl/sdl-perl-1*"
+ dev-perl/sdl-perl"
DEPEND="${RDEPEND}
- >=sys-apps/sed-4
sys-devel/autoconf"
src_unpack() {
unpack ${A}
- cd ${S}
- epatch "${FILESDIR}"/${PV}-fb-sdlperl-deb.patch
+ cd "${S}"
+
+ # main package
epatch "${FILESDIR}"/${PV}-sdl-perl-check.patch
epatch "${FILESDIR}"/${PV}-no-chainreaction.patch
+ epatch "${FILESDIR}"/${P}-sdl-perl-2.patch
sed -i \
-e 's:INSTALLDIRS=.*:PREFIX=${D}/usr:' \
c_stuff/Makefile \
|| die 'sed c_stuff/Makefile failed'
+
+ # server addon
cd "${WORKDIR}"/${NET_SERVER_P}
sed -i \
-e '/^dnl AM_CONFIG_HEADER/s:dnl ::' configure.in \
@@ -45,9 +47,11 @@ src_unpack() {
WANT_AUTOCONF=2.5 \
./bootstrap.sh || die "bootstrap failed"
echo '#include "config.h"' >> fb_serv.h
+
+ # client addon
cd "${WORKDIR}"/${NET_CLIENT_P}
ln -s frozen-bubble-client frozen-bubble
- epatch "${FILESDIR}"/${PV}-fb-sdlperl-deb.patch
+ epatch "${FILESDIR}"/${P}-sdl-perl-2.patch
rm frozen-bubble
}
@@ -60,7 +64,7 @@ src_compile() {
MANDIR=/usr/share/man \
|| die "emake game failed"
- cd "${WORKDIR}/${NET_SERVER_P}"
+ cd "${WORKDIR}"/${NET_SERVER_P}
egamesconf || die
emake || die "emake server failed"
}