Installing dev-lang/scala-2.9.1 (or earlier) with the binary use flag set pulls in ant-core and ant-nodeps. However, since the Scala sources are not compiled, neither is used, and so the dependence is unnecessary Reproducible: Always Steps to Reproduce: 1. USE="binary" emerge -pv dev-lang/scala Actual Results: Portage pulls in ant-core and ant-nodeps (if they are not installed). Expected Results: Portage should not pull in any ant packages as they are not needed. From my limited understanding of ant and portage, inheriting java-ant-2, which is needed for the eant task, automatically pulls in these dependencies. Thus as far as i can tell the solution is to make a separate package, presumably dev-lang/scala-bin, with all the "if ! use binary" sections of the ebuild removed. Note that if this is done, we can also do the following cleanups: 1) Remove the very old and out-of-date dev-java/scala-bin. 2) Have the new scala-bin ebuild drop its dependence on xz-utils, which is no longer needed. 3) Have the new scala-bin ebuild use the official Scala binary.
Another solution would be to remove WANT_ANT_TASKS, set JAVA_ANT_DISABLE_ANT_CORE_DEP=yes and add !binary? ( dev-java/ant-core:0 dev-java/ant-nodeps:0 ) to DEPEND.
Created attachment 303769 [details, diff] Patch for the scala-2.9.1 ebuild that removes the dependence on ant when USE=binary is set Thanks for the information. That works, which means there's no need to split out a separate scala-bin package. I'm attaching a patch that works for me with USE=binary (I haven't tested it with USE=-binary). I additionally changed to using the upstream binary package and made the dependence on xz-utils conditional on USE=-binary. The final few lines of the patch deal with the fact that the source and binary packages have slightly different directory structures.
Created attachment 310597 [details, diff] Patch for 2.9.2 against my 2.9.1 ebuild Scala 2.9.2 seems to change the filenames. This patch against my 2.9.1 ebuild works for me with USE=binary.
Fixed in dev-lang/scala-2.10.3. Thanks to Joel for reporting and testing, thanks to sera for the fix.