/usr/lib/libgphoto2/2.4.11/ax203.so /usr/lib/libgphoto2/2.4.11/sipix_blink2.so /usr/lib/libgphoto2/2.4.11/jl2005c.so those files from media-libs/libgphoto2 link to the jpeg library (provided by virtual/jpeg) *if* it is available. If not, they compile anyway. The corresponding .la files contain (or not) "-ljpeg" in dependency_libs, accordingly. The simplest solution is to depend on virtual/jpeg for some use flags - see attached patch (I assume the USE flag "matches" library name). A note: configure script checks for if "jpeg" is available, but I think a patch on configure.ac is not needed since the compilation goes on anyway. Reproducible: Always
Created attachment 279347 [details, diff] patch on ibgphoto2-2.4.11.ebuild (PS similar issue exist for media-libs/libgphoto2-2.4.10, too.)
Do that libs really need jpeg if you remove their buggy .la files?
Those .la files aren't buggy, IMO, they reflect the dependency on libjpeg correctly: :) > Do that libs really need jpeg if you remove their buggy .la files? yes, they do. The needed library, according to readelf and similar tools is "libjpeg.so.8". I've scanned the directory /usr/lib/libgphoto2/2.4.11 and only those three .so files (and the 3 .la files) want libjpeg (I think I've checked with all possible cameras_* USE flags).
Created attachment 279993 [details, diff] libgphoto2-2.4.11-jpeg-automagic.patch I tried to solve the automagic problem with this but it fails :S, need to think on this in the future then
Created attachment 280007 [details] ebuild (patch) I have used with your patch I hope it helps: I've tested your patch (ebuild diff attached, x.patch is your patch) and there was no failure, and the jpeg support is correctly enabled (USE="jpeg") and disabled (USE="-jpeg"). One remark: if jpeg is in USE but no libjpeg available on system (installation forced with --nodeps), there is no error and compilation without jpeg support goes on - maybe not a issue though.
Was jpeg support disabled when building with USE="-jpeg" but jpeg was still present on your system? When I tried it, it was still linking to jpeg :-S
Sorry for the delay. I can see upstream bug report but let me reply. > Was jpeg support disabled when building with USE="-jpeg" but jpeg was still > present on your system? Yes, I used USE="-jpeg …" and I have media-libs/libjpeg-turbo installed. Those three libs (ax203.so, sipix_blink2.so, jl2005c.so) don't link to libjpeg and the .la files don't contain -ljpeg anymore. Only ax203.so link to libjpeg, but indirectly (as seen using lddtree), via libgd.so.2. I think it's fine. Also, if I compile media-libs/gd with USE="-jpeg", there is no such (indirect) dependency.
+*libgphoto2-2.4.11-r1 (18 Jul 2011) + + 18 Jul 2011; Pacho Ramos <pacho@gentoo.org> +libgphoto2-2.4.11-r1.ebuild, + +files/libgphoto2-2.4.11-fix-automagic.patch: + Fix automagic dependencies on jpeg and gd, bug #374371 by Enlik. Thanks also + to marcusmeissner. +