Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386263 - =dev-tcltk/tkimg-1.5_pre324-r1 - fix for unbundled libpng-1.5
Summary: =dev-tcltk/tkimg-1.5_pre324-r1 - fix for unbundled libpng-1.5
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-08 12:30 UTC by Ian Stakenvicius (RETIRED)
Modified: 2012-02-03 12:21 UTC (History)
1 user (show)

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


Attachments
code patch (tkimg-1.5_pre324-libpng15.patch,2.69 KB, text/plain)
2011-10-08 12:38 UTC, Ian Stakenvicius (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Stakenvicius (RETIRED) gentoo-dev 2011-10-08 12:30:59 UTC
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
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2011-10-08 12:38:05 UTC
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} ..."
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2011-10-08 13:22:20 UTC
I commited 1.4-r2 which also compiles against png15. I will take a look into your patch now.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2012-02-03 12:21:35 UTC
Thisis gone.