summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-09 04:19:00 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-09 04:19:00 +0000
commit7ba09ed8ab0e2d1421b16f2557aae9019b8fbda6 (patch)
treeba94d3888e0f73e7dbe257800d03a43ae1295fc4 /games-arcade
parentstable on ia64 (diff)
downloadgentoo-2-7ba09ed8ab0e2d1421b16f2557aae9019b8fbda6.tar.gz
gentoo-2-7ba09ed8ab0e2d1421b16f2557aae9019b8fbda6.tar.bz2
gentoo-2-7ba09ed8ab0e2d1421b16f2557aae9019b8fbda6.zip
Update patch to work with both sdl-perl-1.x and sdl-perl-2.x and fix up the editor. Fixes #74844 and #87502, patches by Jakub Sadowski, Jason Bucata, and Robert Paskowitz.
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/frozen-bubble/ChangeLog14
-rw-r--r--games-arcade/frozen-bubble/files/digest-frozen-bubble-1.0.0-r53
-rw-r--r--games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-makefile.patch22
-rw-r--r--games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch87
-rw-r--r--games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild107
5 files changed, 224 insertions, 9 deletions
diff --git a/games-arcade/frozen-bubble/ChangeLog b/games-arcade/frozen-bubble/ChangeLog
index 82be9e083143..e1db732459b7 100644
--- a/games-arcade/frozen-bubble/ChangeLog
+++ b/games-arcade/frozen-bubble/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for games-arcade/frozen-bubble
-# 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 $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/frozen-bubble/ChangeLog,v 1.15 2005/05/09 04:19:00 vapier Exp $
+
+*frozen-bubble-1.0.0-r5 (09 May 2005)
+
+ 09 May 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/frozen-bubble-1.0.0-makefile.patch,
+ files/frozen-bubble-1.0.0-sdl-perl-2.patch,
+ +frozen-bubble-1.0.0-r5.ebuild:
+ Update patch to work with both sdl-perl-1.x and sdl-perl-2.x and fix up the
+ editor. Fixes #74844 and #87502, patches by Jakub Sadowski, Jason Bucata,
+ and Robert Paskowitz.
19 Mar 2005; Mike Frysinger <vapier@gentoo.org>
+files/frozen-bubble-1.0.0-sdl-perl-2.patch,
diff --git a/games-arcade/frozen-bubble/files/digest-frozen-bubble-1.0.0-r5 b/games-arcade/frozen-bubble/files/digest-frozen-bubble-1.0.0-r5
new file mode 100644
index 000000000000..1abf1f03e569
--- /dev/null
+++ b/games-arcade/frozen-bubble/files/digest-frozen-bubble-1.0.0-r5
@@ -0,0 +1,3 @@
+MD5 2be5ead2aee72adc3fb643630a774b59 frozen-bubble-1.0.0.tar.bz2 7321135
+MD5 08e6f290c41e135c88235b15566020cf frozen-bubble-client-0.0.3.tar.bz2 59680
+MD5 3b843f2ce1b6424e144b645ccc985997 frozen-bubble-server-0.0.3.tar.bz2 5772
diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-makefile.patch b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-makefile.patch
new file mode 100644
index 000000000000..29cf7fc97418
--- /dev/null
+++ b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-makefile.patch
@@ -0,0 +1,22 @@
+Update the perl-SDL check to accept 2.x versions.
+
+Make sure we update the DATADIR stuff before building in
+subdirs otherwise the lib file gets copied to blib first
+and the final binary isn't fixed up properly.
+
+--- Makefile
++++ Makefile
+@@ -11,6 +11,3 @@
+ @if ! perl -e 'use SDL'; then echo -e "\n *** I need perl-SDL installed"; false; fi
+- @if ! perl -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 1 if $$mj<1 || $$mn<19'; then echo -e "\n *** I need perl-SDL version 1.19.0 or upper"; false; fi
++ @if ! perl -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 1 if $$mj<1 || ($$mj==1 && $$mn<19)'; then echo -e "\n *** I need perl-SDL version 1.19.0 or upper"; false; fi
+- @for n in . $(DIRS); do \
+- [ "$$n" = "." ] || $(MAKE) -C $$n ;\
+- done
+ @if [ ! -d save_virgin ]; then mkdir save_virgin; cp c_stuff/lib/fb_stuff.pm save_virgin; fi
+@@ -18,2 +15,5 @@
+ perl -pi -e 's|\@DATADIR\@|$(DATADIR)|' c_stuff/lib/fb_stuff.pm
++ @for n in . $(DIRS); do \
++ [ "$$n" = "." ] || $(MAKE) -C $$n ;\
++ done
+
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 4355edb3b74e..d2960b6b331f 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
@@ -1,19 +1,31 @@
-Taken from upstream:
+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
--- frozen-bubble
+++ frozen-bubble
-@@ -161,6 +161,15 @@
+@@ -90,3 +90,4 @@
+
+ $version = '1.0.0';
++$SDL_VER = substr($SDL::VERSION, 0, 1); # Extract sdl-perl's major num
+
+@@ -161,6 +161,19 @@
#- ----------- sound related stuff ----------------------------------------
+sub get_sound {
+ my ($sound) = @_;
-+ if (ref($sound) eq 'HASH') {
-+ return $sound{$_}{-data};
++ if ($SDL_VER eq 1) {
++ if (ref($sound) eq 'SDL::Sound') {
++ return $sound{$_}{-data};
++ } else {
++ return $sound->{-data};
++ }
+ } else {
+ return $$sound;
+ }
@@ -52,13 +64,16 @@ http://bugs.gentoo.org/show_bug.cgi?id=74844
$sound{$_}->volume(80);
} else {
print STDERR "Warning, could not create new sound from `$sound_path'.\n";
-@@ -233,6 +233,11 @@
+@@ -233,6 +233,14 @@
#- ----------- graphics related stuff --------------------------------------
-+# Perhaps this should be exported by SDL::SFont
+sub SDL_TEXTWIDTH {
-+ SDL::SFont::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
++ }
+}
+
sub add_default_rect($) {
@@ -112,3 +127,61 @@ http://bugs.gentoo.org/show_bug.cgi?id=74844
}
$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
new file mode 100644
index 000000000000..4cf44d3b4b34
--- /dev/null
+++ b/games-arcade/frozen-bubble/frozen-bubble-1.0.0-r5.ebuild
@@ -0,0 +1,107 @@
+# 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 $
+
+inherit eutils perl-module games
+
+NET_CLIENT_P=frozen-bubble-client-0.0.3
+NET_SERVER_P=frozen-bubble-server-0.0.3
+DESCRIPTION="A Puzzle Bubble clone written in perl (now with network support)"
+HOMEPAGE="http://www.frozen-bubble.org/ http://chl.tuxfamily.org/frozen-bubble/"
+SRC_URI="http://guillaume.cottenceau.free.fr/fb/${P}.tar.bz2
+ http://chl.tuxfamily.org/frozen-bubble/${NET_CLIENT_P}.tar.bz2
+ http://chl.tuxfamily.org/frozen-bubble/${NET_SERVER_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ >=media-libs/sdl-mixer-1.2.3
+ dev-perl/sdl-perl"
+DEPEND="${RDEPEND}
+ sys-devel/autoconf"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # main package
+ epatch "${FILESDIR}"/${P}-makefile.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 \
+ || die "sed configure.in failed"
+ libtoolize -c -f || die "libtoolize failed"
+ env \
+ WANT_AUTOMAKE=1.4 \
+ 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}"/${P}-sdl-perl-2.patch
+ rm frozen-bubble
+}
+
+src_compile() {
+ emake \
+ OPTIMIZE="${CFLAGS}" \
+ PREFIX=/usr \
+ BINDIR="${GAMES_BINDIR}" \
+ DATADIR="${GAMES_DATADIR}" \
+ MANDIR=/usr/share/man \
+ || die "emake game failed"
+
+ # server addon
+ cd "${WORKDIR}"/${NET_SERVER_P}
+ egamesconf || die
+ emake || die "emake server failed"
+}
+
+src_install() {
+ make \
+ PREFIX="${D}/usr" \
+ BINDIR="${D}/${GAMES_BINDIR}" \
+ DATADIR="${D}/${GAMES_DATADIR}" \
+ MANDIR="${D}/usr/share/man" \
+ install \
+ || die "make install failed"
+ dosed /usr/games/bin/frozen-bubble
+ dodoc AUTHORS CHANGES README
+ newicon icons/frozen-bubble-icon-48x48.png ${PN}.png
+ make_desktop_entry ${PN} ${PN} ${PN}.png
+
+ # client addon
+ cd "${WORKDIR}/${NET_CLIENT_P}"
+ make \
+ PREFIX="${D}/usr" \
+ BINDIR="${D}/${GAMES_BINDIR}" \
+ DATADIR="${D}/${GAMES_DATADIR}" \
+ MANDIR="${D}/usr/share/man" \
+ install \
+ || die "make install client failed"
+
+ # server addon
+ cd "${WORKDIR}/${NET_SERVER_P}"
+ make \
+ DESTDIR="${D}" \
+ sbindir="${GAMES_BINDIR}" \
+ install \
+ || die "make install server failed"
+ dodoc TODO
+ newdoc README README.server
+
+ prepgamesdirs
+}