This doesn't quite seem to fit into the other bugs, so i filed a new one. I am attaching a patch that (afaict) works to use tkimg against an unbundled libpng-1.5. It passes tests, and should allow tkimg to stay in the tree without being masked for the security issues in the bundled libs. Reproducible: Always
Created attachment 289215 [details] code patch This patches the code. In order to get this to work i had to make pngtclDecls.h use png.h's own declarations instead of wrapping/redeclaring them the way it used to. So this patch wraps declarations in the stub-generator with an ifndef, and adjusts the header of pngtclDecls.h so that they are excluded. Since genstubs needs to be run again, the makefile was adjusted to do this. Note, however, that the way i did it only works when using MAKEOPTS="-j1", so there is probably a better way. the declarations stub file itself, pngtcl.decls , also has a change in it to fix a code incompatibility. There are additional incompatibilities in there but as far as I can tell they relate to a change from regular arguments to 'const' versions and so should still work (ie: png_bytep should now be png_const_bytep) To duplicate what i did, here's the change I made to the ebuild itself: --- tkimg-1.5_pre324-r1.old 2011-10-07 15:10:59.000000000 -0400 +++ tkimg-1.5_pre324-r1.ebuild 2011-10-08 00:04:44.000000000 -0400 @@ -39,6 +39,8 @@ # fi #} +MAKEOPTS="-j1" + src_prepare() { local i @@ -50,6 +52,8 @@ rm -rf compat/{libtiff,libjpeg,libpng,zlib}/*.c* + epatch "${FILESDIR}"/${P}-libpng15.patch + for i in zlib libpng libjpeg libtiff; do pushd ${i} > /dev/null einfo "Reconfiguring in ${i} ..."
I commited 1.4-r2 which also compiles against png15. I will take a look into your patch now.
Thisis gone.