Current dev-libs/glib ebuilds already disable libelf for non native ABIs: # Only used by the gresource bin multilib_is_native_abi || myconf="${myconf} --disable-libelf" Please move it into USE flag for making libelf dep optional. P.S. Does something require /usr/bin/gresource at run time?
Is there an actual problem with these dependencies ? See this blog post describing what GResources are: https://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/ It looks to me like switching this support on/off would break applications using it until all libraries using it plus the application itself are rebuilt to use either the GCC extension or the manual registration code. Imho, the comment is wrong and does not really explain the issue. Also, libelf and elfutils got a multilib version 6 days after glib so I guess this is actually the reason of this switch thus we need to revisit why there is this condition and (imho) eliminate it.
(In reply to Gilles Dartiguelongue from comment #1) The /usr/bin/gresource tool is for viewing gresources. It is, as far as I know, only needed for developers who are debugging why their package is not loading its resources correctly. The tool for creating gresources is /usr/bin/glib-compile-resources - and it doesn't use libelf since it translates gresource xml description directly into C source which is then compiled into your package's binary by the normal C compiler. I think we could install the /usr/bin/gresource tool only if USE=utils.
> I think we could install the /usr/bin/gresource tool only if USE=utils. This would be nice.
ping ... can we make this happen please ? glib is a core library needed by a lot of packages, so it's a pain on embedded devices to require dev tools and libs that are unused.
Fixed in the overlay by https://gitweb.gentoo.org/proj/gnome.git/commit/?id=e2673ffa4a653dddadec904d6f48baa1fa4c9d0c and in the main repo by https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67b2d360e634c57fd65334688c6d42113969d8f5 commit 67b2d360e634c57fd65334688c6d42113969d8f5 Author: Alexandre Rostovtsev <tetromino@gentoo.org> Date: Sat Oct 10 20:12:01 2015 -0400 dev-libs/glib: pull in elfutils only when USE=utils It's only used by /usr/bin/gresource, which is a debugging utility. Gentoo-Bug: 542816 Reported-by: Nikoli