Hi,

To start with, the game is not maintained upstream, and as the server
has glib2 deprecation warnings, it may not be built in a close future.
It does not run on x86 due to a BROKEN p5-SDL on these 2 archs, and
updating p5-SDL does not solve this specific issue.

I tried playing it on macppc, but:

- it's broken with Perl 5.30: it still uses the removed [0] 'if 0'
  instead of state() for lexically scoped variables that won't be
  reinitialised. The below diff fix that, and allows the game to
  be started.
- there are graphic issues: the title screen is black. The directional
  arrow that helps throwing bubbles is invisible. Also libpng complains
  about some interlaced PNGs, the below diff deinterlace them.

The game is barely playable because of these graphic issues on macppc,
i wonder if people on other !x86 archs manage to have something that
really works.

Feedback is welcome :)

Charlène.


[0] https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133543


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/frozen-bubble/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- Makefile    17 Jul 2019 14:49:22 -0000      1.28
+++ Makefile    26 Jan 2020 23:01:14 -0000
@@ -6,7 +6,7 @@ COMMENT-server =        server for the frozen-b
 VER =                  2.2.0
 DISTNAME =             frozen-bubble-${VER}
 PKGNAME-main =         ${DISTNAME}
-REVISION-main =                14
+REVISION-main =                15
 PKGNAME-server =       frozen-bubble-server-${VER}
 REVISION-server =      10
 CATEGORIES =           games
@@ -29,6 +29,9 @@ BUILD_DEPENDS =               devel/p5-SDL \
                        devel/p5-Locale-gettext \
                        devel/gettext,-tools
 
+# Needed for post-patch deinterlacing
+BUILD_DEPENDS +=       graphics/ImageMagick
+
 RUN_DEPENDS-main =     devel/p5-SDL \
                        devel/p5-Locale-gettext \
                        ${BASE_PKGPATH},-server
@@ -46,5 +49,14 @@ WANTLIB-main =               SDL SDL_Pango SDL_mixer 
 WANTLIB-server =       c glib-2.0 intl pthread
 
 MULTI_PACKAGES =       -main -server
+
+# fix "Interlace handling should be turned on when using png_read_image"
+post-patch:
+       @cd ${WRKSRC} && for interlaced in      gfx/flags/flag-de.png \
+                                               gfx/flags/flag-fi.png \
+                                               gfx/flags/flag-no.png; \
+       do \
+               ${LOCALBASE}/bin/mogrify -interlace none $${interlaced} ;\
+       done
 
 .include <bsd.port.mk>
Index: patches/patch-c_stuff_lib_FBLE_pm
===================================================================
RCS file: patches/patch-c_stuff_lib_FBLE_pm
diff -N patches/patch-c_stuff_lib_FBLE_pm
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-c_stuff_lib_FBLE_pm   26 Jan 2020 23:01:14 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+Perl 5.30+ prohibits using my() in false conditionals
+
+Index: c_stuff/lib/FBLE.pm
+--- c_stuff/lib/FBLE.pm.orig
++++ c_stuff/lib/FBLE.pm
+@@ -31,6 +31,8 @@
+ 
+ package FBLE;
+ 
++use feature qw(state);
++
+ use POSIX(qw(floor ceil));
+ use SDL;
+ use SDL::App;
+@@ -1405,7 +1407,7 @@ sub display_levelset_screenshot {
+                    $rect{middle}->y + $rect{middle}->height/2 - 
$rect{screenshot}->height/8 - 3 + $widgetMove);
+ 
+ 
+-    my %shrinks if 0;
++    state %shrinks;
+     my $current_nb = $start_level || 1;
+     if (!exists $shrinks{$name}{$current_nb}) {
+         my $surf = SDL::Surface->new(-name => 
"$FPATH/gfx/menu/please_wait.png");
+@@ -1417,7 +1419,7 @@ sub display_levelset_screenshot {
+         $app->update($rect{middle});
+ 
+         #- sorta "read ahead": will compute next 10 levels screenshots as well
+-        my $s_save if 0;
++        state $s_save;
+         if (!$s_save) {
+             $s_save = SDL::Surface->new(-name => 
"$FPATH/gfx/level_editor.png");
+         }
Index: patches/patch-frozen-bubble
===================================================================
RCS file: patches/patch-frozen-bubble
diff -N patches/patch-frozen-bubble
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-frozen-bubble 26 Jan 2020 23:01:14 -0000
@@ -0,0 +1,52 @@
+$OpenBSD$
+
+Perl 5.30+ prohibits using my() in false conditionals
+
+Index: frozen-bubble
+--- frozen-bubble.orig
++++ frozen-bubble
+@@ -47,6 +47,8 @@ use vars qw($TARGET_ANIM_SPEED $BUBBLE_SIZE $ROW_SIZE 
+             $lev_number $playermalus $mptrainingdiff $loaded_levelset 
$direct_levelset $chainreaction %chains %img_mini $frame $sock $gameserver 
$mynick
+             $continuegamewhenplayersleave $singleplayertargetting $mylatitude 
$mylongitude %autokick $replayparam $autorecord $comment $saveframes 
$saveframesbase $saveframescounter);
+ 
++use feature qw(state);
++
+ use Getopt::Long;
+ use Data::Dumper;
+ use Locale::gettext;
+@@ -269,7 +271,7 @@ sub play_music($) {
+     $app->delay(400);
+     $app->delay(10) while $mixer->playing_music;  #- mikmod will segfault if 
we try to load a music while old one is still fading out
+     my %musics = (intro => '/snd/introzik.ogg', main1p => 
'/snd/frozen-mainzik-1p.ogg', main2p => '/snd/frozen-mainzik-2p.xm');
+-    my $mus if 0;                                 #- I need to keep a 
reference on the music or it will be collected at the end of this function, 
thus I manually collect previous music
++    state $mus;                                 #- I need to keep a reference 
on the music or it will be collected at the end of this function, thus I 
manually collect previous music
+     if (@playlist) {
+       my $tryanother = sub {
+           my $elem = chomp_(shift @playlist);
+@@ -3488,7 +3490,7 @@ sub choose_1p_game_mode() {
+         };
+ 
+         my $img = $imgbin{'1p_panel'};
+-        my $save if 0;
++        state $save;
+         my $drect = SDL::Rect->new(-width => $img->width, -height => 
$img->height,
+                                    -x => $MENUPOS{xpos_panel}, '-y' => 
$MENUPOS{ypos_panel});
+         if ($save) {
+@@ -5573,7 +5575,7 @@ sub menu {
+                        'highscores' => { pos => 8, type => 'run',
+                                          run => sub { 
$menu_display_highscores->() } },
+                      );
+-    my $current_pos if 0; $current_pos ||= 1;
++    state $current_pos; $current_pos ||= 1;
+     my @menu_invalids;
+     $invalidate_all = sub { push @menu_invalids, $menu_entries{$_}->{pos} 
foreach keys %menu_entries };
+ 
+@@ -5724,7 +5726,7 @@ sub menu {
+       }
+ 
+       if ($graphics_level > 1) {
+-          my $banner_pos if 0;
++          state $banner_pos;
+           $banner_pos ||= 670;
+           foreach my $b (keys %banners) {
+               my $xpos = $banners{$b} - $banner_pos;

Reply via email to