NetBSD Problem Report #54597

From www@netbsd.org  Thu Oct  3 18:20:16 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 75CBF7A24C
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Oct 2019 18:20:16 +0000 (UTC)
Message-Id: <20191003182015.32CA47A24E@mollari.NetBSD.org>
Date: Thu,  3 Oct 2019 18:20:15 +0000 (UTC)
From: jdbaker@consolidated.net
Reply-To: jdbaker@consolidated.net
To: gnats-bugs@NetBSD.org
Subject: games/enigma distfile contains broken PNG images
X-Send-Pr-Version: www-1.0

>Number:         54597
>Category:       pkg
>Synopsis:       games/enigma distfile contains broken PNG images
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 03 18:25:00 +0000 2019
>Closed-Date:    Tue Nov 12 06:02:30 +0000 2019
>Last-Modified:  Tue Nov 12 06:02:30 +0000 2019
>Originator:     John D. Baker
>Release:        NetBSD/amd64-9.0_BETA, pkgsrc-2019Q3
>Organization:
>Environment:
NetBSD skuld.technoskunk.fur 9.0_BETA NetBSD 9.0_BETA (SKULD) #16: Wed Sep 18 08:17:55 CDT 2019  sysop@yggdrasil.technoskunk.fur:/r0/build/netbsd-9/obj/amd64/sys/arch/amd64/compile/SKULD amd64

>Description:
As described in the message thread starting here:

  http://mail-index.netbsd.org/pkgsrc-users/2019/09/22/msg029412.html

"games/enigma" fails to run properly due to a number of PNG images which
are considered corrupt by the current libpng implementation (perhaps they
were acceptable to older versions?).

The images are corrupt as supplied in the distfile.
>How-To-Repeat:
Build and install "games/enigma".  Upon running it, the following
appears in a terminal window and on a message screen prior to the
game's main menu:

  libpng error: IDAT: invalid distance too far back
  Error loading '/usr/pkg/share/enigma/models-48.lua'
  Error: '/usr/pkg/share/enigma/models.lua:112: Could not define fl-ice-heating1: error loading fl-ice-heating'

Attempt to play any level.  Some graphical elements are replaced by the
"DUMMY" element and the level is effectively unplayable.
>Fix:
The following patch fixes the faulty PNG images and allows the game to
operate normally:

+Index: games/enigma/Makefile
+===================================================================
+RCS file: /cvsroot/pkgsrc/games/enigma/Makefile,v
+retrieving revision 1.36
+diff -u -p -r1.36 Makefile
+--- games/enigma/Makefile	12 Mar 2018 20:51:30 -0000	1.36
++++ games/enigma/Makefile	22 Sep 2019 22:32:14 -0000
+@@ -27,6 +27,10 @@ BUILDLINK_API_DEPENDS.zlib+=		zlib>=1.2.
+ BUILDLINK_API_DEPENDS.png+=		png>=1.2.7
+ BUILDLINK_API_DEPENDS.xerces-c+=	xerces-c>=2.7.0
+ 
++post-extract:
++	@echo "==> Fixing broken PNG files..."
++	@pngfix ${WRKSRC}/data/gfx*/*.png | awk '$$2 != "OK" {print $$NF}' | sh -c 'while read f ; do pngfix -q --out=$$f.fix $$f ; rm $$f ; mv $$f.fix $$f ; done'
++
+ .include "../../audio/SDL_mixer/buildlink3.mk"
+ .include "../../devel/SDL/buildlink3.mk"
+ .include "../../devel/SDL_ttf/buildlink3.mk"


Alternatively, the latest enigma is v1.21 and does not have any
faulty PNG images in its distfile.  Perhaps it's time to update
"games/enigma" to v1.21?

>Release-Note:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54597: games/enigma distfile contains broken PNG images
Date: Thu, 3 Oct 2019 23:56:39 +0000

 > Perhaps it's time to update

 Would be nice! do you have a diff for it?

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54597 CVS commit: pkgsrc/games/enigma
Date: Mon, 11 Nov 2019 22:03:01 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Nov 11 22:03:01 UTC 2019

 Modified Files:
 	pkgsrc/games/enigma: Makefile PLIST distinfo
 	pkgsrc/games/enigma/patches: patch-aq patch-src_oxyd.cc
 Added Files:
 	pkgsrc/games/enigma/patches: patch-configure patch-src_Value.cc
 	    patch-src_lev_Proxy.cc
 Removed Files:
 	pkgsrc/games/enigma/patches: patch-lib-src_enigma-core_IMG__SavePNG.c
 	    patch-lib-src_enigma-core_ecl_alist.hh
 	    patch-lib-src_enigma-core_ecl_dict.hh
 	    patch-lib-src_enigma-core_ecl_font.cc patch-src_lua.cc

 Log Message:
 enigma: update to 1.21.
 C++11 compatibility patches from amdmi3@freebsd.
 Intended to address PR pkg/54597: games/enigma distfile contains
 broken PNG images

 Changes in Version 1.21
 =======================

 User-Visible changes
 --------------------

     - New translations: Croatian, Czech, Danish, Scottish-Gaelic, and Slovak
     - updated remaining translations
     - fixed many English typos
     - Russian reference manual
     - rollover for options and rating buttons
     - 51 new Enigma levels (now a total of 984 main-pack levels, plus 21 tutorials)

 Internal changes
 ----------------

     - further rewrites of old-API levels to new API (only 212 old-API left)
     - many bug fixes

 Changes in Version 1.20
 =======================

 User-Visible changes
 --------------------

     - added ingame music by Taztunes (deactivated by default)
     - removed "over par" notification by general request
     - 78 new Enigma levels (now a total of 956 levels, plus 21 tutorials)
     - replaced old Sokoban levels by 1077 imported Sokoball levels
     - 95 new Pentomino levels

 Internal changes
 ----------------

     - many bug fixes

 Changes in Version 1.10  (Released only for level authors and testers)
 =======================

 User-Visible changes
 --------------------

     - new objects: wires, st_barrier, opal oxyds, drunken thiefs,
         st_yinyang, st_dispenser_extralife, fl_scales, framed floors,
         it_meditation_volcano, it_meditation_caldera, puzzle singletons,
         mirror sheets, bigbricks in wood and blue-sand decor, cracks
         with water beneath, black pearls, and st_rawglass_quad
     - vastly extended st_window, hollow puzzles, it_strip
     - color coding for keys and locks
     - four new oxyd colors and shuffle oxyds
     - many improved images for higher resolutions
     - new images for coins
     - extra lifes now look like batteries to not confuse them with ac_pearl
     - tutorial level for st_chess

 Internal changes
 ----------------

     - new API, involving a reengineering of many objects, a consistent
         naming scheme for all objects, and a rewrite of almost every level
     - new libraries:
         liblua, libmath, libmap to ease programming of complex levels
         libpuzzle, libtrain to ease programming of large puzzles and trains
         libimport, libpento, libsoko to generate or import complete levels
           from different formats
     - internal maze generation
     - internal flood generation
     - improved it_rubberband, st_surprise and it_surprise
     - itemfreeze stone now is an own object st_ice


 To generate a diff of this commit:
 cvs rdiff -u -r1.36 -r1.37 pkgsrc/games/enigma/Makefile
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/games/enigma/PLIST
 cvs rdiff -u -r1.12 -r1.13 pkgsrc/games/enigma/distinfo
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/games/enigma/patches/patch-aq
 cvs rdiff -u -r0 -r1.1 pkgsrc/games/enigma/patches/patch-configure \
     pkgsrc/games/enigma/patches/patch-src_Value.cc \
     pkgsrc/games/enigma/patches/patch-src_lev_Proxy.cc
 cvs rdiff -u -r1.1 -r0 \
     pkgsrc/games/enigma/patches/patch-lib-src_enigma-core_IMG__SavePNG.c \
     pkgsrc/games/enigma/patches/patch-lib-src_enigma-core_ecl_alist.hh \
     pkgsrc/games/enigma/patches/patch-lib-src_enigma-core_ecl_dict.hh \
     pkgsrc/games/enigma/patches/patch-lib-src_enigma-core_ecl_font.cc \
     pkgsrc/games/enigma/patches/patch-src_lua.cc
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/games/enigma/patches/patch-src_oxyd.cc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/54597 CVS commit: pkgsrc/games/enigma
Date: Mon, 11 Nov 2019 18:44:52 -0600 (CST)

 On Mon, 11 Nov 2019, Maya Rashish wrote:

 >  Log Message:
 >  enigma: update to 1.21.
 >  C++11 compatibility patches from amdmi3@freebsd.
 >  Intended to address PR pkg/54597: games/enigma distfile contains
 >  broken PNG images

 Thanks!  I've built it and it seems to work OK.  Nice new features, too!

 It will even run full-screen on my intel graphics chip, although if I
 select 1280x1024 (my actual screen resolution), it kicks it back down
 to 640x480.  The old maximum of 1024x768 works, though.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 12 Nov 2019 06:02:30 +0000
State-Changed-Why:
confirmed fixed, thanks for the report.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.