pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54597: games/enigma distfile contains broken PNG images

>Number:         54597
>Category:       pkg
>Synopsis:       games/enigma distfile contains broken PNG images
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 03 18:25:00 +0000 2019
>Originator:     John D. Baker
>Release:        NetBSD/amd64-9.0_BETA, pkgsrc-2019Q3
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@localhost:/r0/build/netbsd-9/obj/amd64/sys/arch/amd64/compile/SKULD amd64

As described in the message thread starting here:

"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.
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.
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
++	@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/"
+ .include "../../devel/SDL/"
+ .include "../../devel/SDL_ttf/"

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?

Home | Main Index | Thread Index | Old Index