Steven noticed that gdmodule-0.56-r1 is wrongly patch: http://archives.gentoo.org/gentoo-science/msg_745e77e63f260b06185bcb133df4ef5c.xml -r1 introduced a patch because of bug #346751 . The important section looks like: @@ -57,9 +57,6 @@ incdirs = dirtest([ want_libs = [ "gd", - "jpeg", "png", "gif", "z", - "X11", "Xpm", - "ttf", "freetype", ] libs = filetest(libdirs, want_libs) which removes linking to to these libraries (-l... flags) as well as preprocessor definitions (-DHAVE_LIB...). This means that support for PNG, JPEG and so on is disabled which is wrong. I tried to solve that and noticed the following: In gdmodule's c-source file, the following macros are used: - HAVE_LIBTTF, if defined this in turn defines HAVE_LIBFREETYPE - HAVE_LIBGIF - HAVE_LIBPNG - HAVE_LIBJPEG - HAVE_LIBXPM Using readelf I checked that basically only gd is linked. Since Setup.py implements some kind of automagic dependency (definitions and libraries are removed if they are not found), I suggest to patch the setup script (I will upload patch shortly).
Created attachment 256318 [details, diff] patch proposal
Thanks for the patch. But this means, support for all and depend on all. Can we go with CPPFLAGS to trigger it finer?
(In reply to comment #2) > Thanks for the patch. But this means, support for all and depend on all. Can we > go with CPPFLAGS to trigger it finer? > Yes! After applying the patch we can selectively disable features using a command like sed -i '/( "HAVE_LIBFREETYPE", None )/d' Setup.py and USE-flags matching those of media-libs/gd. Note that in media-libs/gd gif support is enabled by default (see configure.ac:18 in gd's tarball) - we have to shift down the line with HAVE_LIBGIF in order to maintain correct syntax. I am going to upload a new patch and ebuild.
Created attachment 256416 [details] new ebuild
Created attachment 256417 [details, diff] new patch
I think something like use png && append-cppflags -DHAVE_LIBPNG would be more sufficient.
Why did I forget that ? But of course, that is much more simple - what about the new ebuild ?
Created attachment 256421 [details] new ebuild
(In reply to comment #8) > Created an attachment (id=256421) [details] > new ebuild > That looks good. What about gif?
(In reply to comment #9) > (In reply to comment #8) > > Created an attachment (id=256421) [details] [details] > > new ebuild > > > > That looks good. What about gif? > Gif is enabled by default in gd (see my comment #3) - it also does not pull in any dependencies. Thus I think we should enable it by default, too.
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #8) > > > Created an attachment (id=256421) [details] [details] [details] > > > new ebuild > > > > > > > That looks good. What about gif? > > > > Gif is enabled by default in gd (see my comment #3) - it also does not pull in > any dependencies. Thus I think we should enable it by default, too. > I mean it really is enabled with the current patch!
(In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #9) > > > (In reply to comment #8) > > > > Created an attachment (id=256421) [details] [details] [details] [details] > > > > new ebuild > > > > > > > > > > That looks good. What about gif? > > > > > > > Gif is enabled by default in gd (see my comment #3) - it also does not pull in > > any dependencies. Thus I think we should enable it by default, too. > > > > I mean it really is enabled with the current patch! > Sorry - did not upload the current one. The following ebuild and patch should be final ...
Created attachment 256476 [details] new ebuild
Created attachment 256478 [details, diff] new patch
(In reply to comment #13) > Created an attachment (id=256476) [details] > new ebuild > it is still lacking IUSE="gif". I will add that and commit it. THanks for your efforts.
+*gdmodule-0.56-r2 (06 Dec 2010) + + 06 Dec 2010; Justin Lecher <jlec@gentoo.org> -gdmodule-0.56-r1.ebuild, + +gdmodule-0.56-r2.ebuild, +files/gdmodule-0.56-fix-libs.patch: + Correct handling of image type support, thanks cschwan for providing the + patches, #347722 +