Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308735 - games-emulation/dosbox-0.73 fails to detect libpng14
Summary: games-emulation/dosbox-0.73 fails to detect libpng14
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libpng-1.4
  Show dependency tree
 
Reported: 2010-03-09 21:23 UTC by Rafał Mużyło
Modified: 2010-03-10 11:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix the detection problem (too) (dosbox-0.73-libpng14.patch,2.32 KB, patch)
2010-03-09 21:27 UTC, Rafał Mużyło
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2010-03-09 21:23:28 UTC
A trivial patch to configure.in is needed.
Comment 1 Rafał Mużyło 2010-03-09 21:27:39 UTC
Created attachment 222903 [details, diff]
patch to fix the detection problem (too)

This patch is a bit more than required.
It has also a minor modification to use proper macro/var
for build type detection (as autoconf infopage (and Flameeyes)
is quite clear, it should have been build, not target)
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-03-09 21:31:33 UTC
I'd prefer png_check_sig check converted to png_sig_cmp

http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt

replace
  png_check_sig(buf, 8)
with
  png_sig_cmp(buf, 0, 8) == 0

Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-03-09 21:32:37 UTC
Like done with sed here,

http://repos.archlinux.org/wsvn/packages/dosbox/trunk/PKGBUILD
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-03-09 21:55:53 UTC
libpng-1.4.1.txt,

X. Detecting libpng

The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros.  It is the
best choice for use in configure scripts for detecting the presence of any
libpng version since 0.88.  In an autoconf "configure.in" you could use

    AC_CHECK_LIB(png, png_get_io_ptr, ...

So yes, both works.
Comment 5 Ai Locke Shinseiko (Wizzleby) 2010-03-10 10:28:46 UTC
This patch also applies and works against dosbox-9999; apparently upstream still has this bug
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-03-10 11:08:54 UTC
+  10 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> dosbox-0.73.ebuild,
+  +files/dosbox-0.73-AC_CANONICAL_BUILD_and_libpng14.patch:
+  Fix libpng14 detection and replace AC_CANONICAL_TARGET with
+  AC_CANONICAL_BUILD wrt #308735 by Rafał Mużyło.