summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-09 04:21:47 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-09 04:21:47 +0000
commitd2be20421a2f9a37a67019f2aed5cd8b47c4ed38 (patch)
tree52c8d258627069400d4bc36bcfc658ff4fc08ea2 /games-arcade
parentUpdate patch to work with both sdl-perl-1.x and sdl-perl-2.x and fix up the e... (diff)
downloadgentoo-2-d2be20421a2f9a37a67019f2aed5cd8b47c4ed38.tar.gz
gentoo-2-d2be20421a2f9a37a67019f2aed5cd8b47c4ed38.tar.bz2
gentoo-2-d2be20421a2f9a37a67019f2aed5cd8b47c4ed38.zip
split the sdl-perl-2 patch so it can be reused with the client addon
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-editor-sdl-perl-2.patch67
-rw-r--r--games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch59
-rw-r--r--games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild4
3 files changed, 69 insertions, 61 deletions
diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-editor-sdl-perl-2.patch b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-editor-sdl-perl-2.patch
new file mode 100644
index 000000000000..e67043cf3f8a
--- /dev/null
+++ b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-editor-sdl-perl-2.patch
@@ -0,0 +1,67 @@
+Based on upstream patch:
+http://www.frozen-bubble.org/perl-SDL.patch
+
+To fix:
+http://bugs.gentoo.org/show_bug.cgi?id=74844
+http://bugs.gentoo.org/show_bug.cgi?id=87502
+
+This version of the patch works with both sdl-perl-1.x and sdl-perl-2.x
+
+--- c_stuff/lib/FBLE.pm
++++ c_stuff/lib/FBLE.pm
+@@ -86,6 +86,25 @@
+
+ #- ----------- bubbles processing/drawing -----------------------------------------
+
++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;
++ }
++}
++
++
+ # subroutine to calculate the left corner x of the given bubble option column (based on 0 start)
+ sub bubble_optionx {
+ my ($col) = @_;
+@@ -1094,11 +1113,11 @@
+ $rect{screenshot} = SDL::Rect->new(-x => $POS_1P{p1}{left_limit} - 40, '-y' => 0,
+ -width => $POS_1P{p1}{right_limit} - $POS_1P{p1}{left_limit} + 80,
+ -height => $POS_1P{bottom_limit} - $POS_1P{init_top_limit} + 190);
+- fb_c_stuff::shrink($app->{-surface},
+- $file_browser_screenshots[$list_browser_highlight_offset]->display_format()->{-surface},
++ fb_c_stuff::shrink(surf($app),
++ surf($file_browser_screenshots[$list_browser_highlight_offset]->display_format()),
+ $rect{middle}->x + $rect{middle}->width - $rect{screenshot}->width/4 - 12,
+ $rect{middle}->y + $rect{middle}->height/2 - $rect{screenshot}->height/8 - 3,
+- $rect{screenshot}{-rect}, 4);
++ rect($rect{screenshot}), 4);
+ }
+
+
+@@ -1366,6 +1366,14 @@
+ print_dialog_list_arrow($do_highlight, 'up');
+ }
+
++sub SDL_TEXTWIDTH {
++ if (defined(&SDL::App::SDL_TEXTWIDTH)) {
++ SDL::App::SDL_TEXTWIDTH(@_); # perl-sdl-1.x
++ } else {
++ SDL::SFont::SDL_TEXTWIDTH(@_); # perl-sdl-2.x
++ }
++}
++
+ # subroutine to print out the levelset name at the top of the screen
+ sub print_levelset_name {
+ $rect{ls_name_erase} = SDL::Rect->new(-x => 195, '-y' => 0, -width => 445-195, -height => 35);
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
index d2960b6b331f..be8dfb058f85 100644
--- 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
@@ -3,7 +3,6 @@ http://www.frozen-bubble.org/perl-SDL.patch
To fix:
http://bugs.gentoo.org/show_bug.cgi?id=74844
-http://bugs.gentoo.org/show_bug.cgi?id=87502
This version of the patch works with both sdl-perl-1.x and sdl-perl-2.x
@@ -127,61 +126,3 @@ This version of the patch works with both sdl-perl-1.x and sdl-perl-2.x
}
$display_on_app_disabled = 0;
---- c_stuff/lib/FBLE.pm
-+++ c_stuff/lib/FBLE.pm
-@@ -86,6 +86,25 @@
-
- #- ----------- bubbles processing/drawing -----------------------------------------
-
-+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;
-+ }
-+}
-+
-+
- # subroutine to calculate the left corner x of the given bubble option column (based on 0 start)
- sub bubble_optionx {
- my ($col) = @_;
-@@ -1094,11 +1113,11 @@
- $rect{screenshot} = SDL::Rect->new(-x => $POS_1P{p1}{left_limit} - 40, '-y' => 0,
- -width => $POS_1P{p1}{right_limit} - $POS_1P{p1}{left_limit} + 80,
- -height => $POS_1P{bottom_limit} - $POS_1P{init_top_limit} + 190);
-- fb_c_stuff::shrink($app->{-surface},
-- $file_browser_screenshots[$list_browser_highlight_offset]->display_format()->{-surface},
-+ fb_c_stuff::shrink(surf($app),
-+ surf($file_browser_screenshots[$list_browser_highlight_offset]->display_format()),
- $rect{middle}->x + $rect{middle}->width - $rect{screenshot}->width/4 - 12,
- $rect{middle}->y + $rect{middle}->height/2 - $rect{screenshot}->height/8 - 3,
-- $rect{screenshot}{-rect}, 4);
-+ rect($rect{screenshot}), 4);
- }
-
-
-@@ -1366,6 +1366,14 @@
- print_dialog_list_arrow($do_highlight, 'up');
- }
-
-+sub SDL_TEXTWIDTH {
-+ if (defined(&SDL::App::SDL_TEXTWIDTH)) {
-+ SDL::App::SDL_TEXTWIDTH(@_); # perl-sdl-1.x
-+ } else {
-+ SDL::SFont::SDL_TEXTWIDTH(@_); # perl-sdl-2.x
-+ }
-+}
-+
- # subroutine to print out the levelset name at the top of the screen
- sub print_levelset_name {
- $rect{ls_name_erase} = SDL::Rect->new(-x => 195, '-y' => 0, -width => 445-195, -height => 35);
diff --git a/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild b/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild
index 4cf44d3b4b34..ed28f27f534e 100644
--- a/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild
+++ b/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild
@@ -1,6 +1,6 @@
# 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-r5.ebuild,v 1.1 2005/05/09 04:19:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild,v 1.2 2005/05/09 04:21:47 vapier Exp $
inherit eutils perl-module games
@@ -30,7 +30,7 @@ src_unpack() {
# main package
epatch "${FILESDIR}"/${P}-makefile.patch
epatch "${FILESDIR}"/${PV}-no-chainreaction.patch
- epatch "${FILESDIR}"/${P}-sdl-perl-2.patch
+ epatch "${FILESDIR}"/${P}-{editor-,}sdl-perl-2.patch
sed -i \
-e 's:INSTALLDIRS=.*:PREFIX=${D}/usr:' \
c_stuff/Makefile \