I've made a java-pkg_dosrc function for the java-pkg.eclass. You can find it in https://gentooexperimental.org/svn/java/gentoo-java-experimental/dev-java/sac/sac-1.3.ebuild That ebuild can also be used to test it. grep "use sources" -r /usr/portage/dev-java/ doesn't give any any current ebuilds using this flag, but probably we need to convert some ebuilds which install the sources under the doc use flag. Reproducible: Always Steps to Reproduce:
I made an experimental eclass to test this and start using it in the experimental tree. https://gentooexperimental.org/svn/java/gentoo-java-experimental/eclass/java-pkg.eclass
the following ebuild used the source useflag in the past: /usr/portage/dev-java/jtds/jtds-1.0.2.ebuild:IUSE="doc jikes source" /usr/portage/dev-java/mx4j/mx4j-2.1.0.ebuild:IUSE="doc examples jikes source" /usr/portage/dev-java/xmlunit/xmlunit-1.0.ebuild:IUSE="doc jikes junit source" /usr/portage/dev-java/xml-xmlbeans/xml-xmlbeans-20041217.ebuild:IUSE="doc junit source" /usr/portage/dev-java/jdictrayapi/jdictrayapi-0.8.7.ebuild:IUSE="doc examples jikes source" /usr/portage/dev-java/dtdparser/dtdparser-1.21.ebuild:IUSE="doc jikes source" /usr/portage/dev-java/mockobjects/mockobjects-0.09.ebuild:IUSE="doc jikes junit source" /usr/portage/dev-java/jexcelapi/jexcelapi-2.5.1.ebuild:IUSE="doc jikes source" /usr/portage/dev-java/xml-commons-resolver/xml-commons-resolver-1.1.ebuild:IUSE="doc source" /usr/portage/dev-java/xerces/xerces-1.3.1-r1.ebuild:IUSE="doc jikes source" i've commited the eclass with dosrc in it and migrated all packages which made use of the source useflag to java-pkg_dosrc. in the future, nearly every package can make use of this function since it's now very easy to integrate it. thanks for this function, Petteri.