The ebuild appears to place everything in RDEPEND in DEPEND, but bypasses the USE flags by directly referencing COMMON_DEP, CUPS_COMMON_DEP, X_COMMON_DEP and ALSA_COMMON_DEP. I am not sure what the point of the USE flags are, or why RDEPEND is even in use. I ran into this issues on ppc64-linux, but I wasn't able to try fixing this because of circular dependencies. This ebuild is not present in the prefix tree and the USE flag issue is present on Gentoo Linux, so I am filing this against the main tree. It should be a problem on all architectures.
Seems dev-java/icedtea-7.2.1 always requires all the X libraries and cups at build time. http://icedtea.classpath.org/wiki/BuildRequirements If you have the X USE flag disabled, X support will only be removed in src_install(), after icedtea is already built: --- # Ensures HeadlessGraphicsEnvironment is used. if ! use X; then rm -r jre/lib/$(get_system_arch)/xawt || die fi --- So the X USE flag only affects runtime dependencies, not build time dependencies. The cups / alsa USE flag... I don't see any references of them in the ebuild, except in RDEPEND. cups is needed for X, but I don't know what alsa is used for. Maybe it's somehow used in an eclass the ebuild inherits? --- # cups is needed for X. #390945 #390975 ---
The modified meaning of flags is explained in metadata.xml - they affect only runtime and the behavior is useful for binpkg users. We don't have the manpower to make the flags work also at buildtime and upstream doesn't see this as a priority. Patches are welcome, or suggestions how to communicate this better than metadata.xml local use descriptions.
*** Bug 419543 has been marked as a duplicate of this bug. ***