Proposed ejavadoc addition to java-utils-2.eclass. This is due to 1.8 having strict rules for javadoc. Could be used for other default javadoc flags and other. # @FUNCTION: ejavadoc # @USAGE: <javadoc_arguments> # @DESCRIPTION: # javadoc wrapper function. Will use the set some flags based on # the version of the jdk due to strict javadoc rules in 1.8 ejavadoc() { debug-print-function ${FUNCNAME} $* local javadoc_args=""; if java-pkg_is-vm-version-ge "1.8" ; then javadoc_args="-Xdoclint:none "; fi javadoc ${javadoc_args} "${@}" || die "ejavadoc failed" }
Looks good to me but please attach an actual patch that also includes a change to java-pkg-simple. I believe this is the only eclass that calls javadoc directly. What about javadocs built via Ant? Does Ant know how to deal with this? Is our Ant version recent enough?
I didn't make it a patch because I was not sure where it would go in the eclass. Not that its location or otherwise matters. But I can make a patch, which will just suggest a location really. As for a patch for java-pkg-simple, I can make that. But its only in one place and literally a change from javadoc to ejavadoc. I can provide a patch for that, but is a very trivial change. The ant aspect is another story. None of the eclasses handle the rewrite stuff, that is done by the python xml re-writer. I suppose that could be modified to set the flag by default just the same. Then again upstream might address this, and/or could be done via sed to build.xml or otherwise. Hard to say how to handle that, but out of consistency. Some sort of changes to the xml rewriter would likely make the most sense. Set the flag always by default, just as ejavadoc will. I know the ant stuff does not call ejava stuff, so it would not be changing it to use ejavadoc. It would be a matter of adding the flag/argument build.xml via the xml rewriter.
Created attachment 399560 [details, diff] java-utils-2 eclass ejavac patch
Created attachment 399562 [details, diff] java-pkg-simple eclass ejavac patch
Unfortunately I don't think Ant handles this (Ant's own build.xml adds -Xdoclint:none manually!) but that can be dealt with separately. 04 Apr 2015; James Le Cuirot <chewi@gentoo.org> java-utils-2.eclass, java-pkg-simple.eclass: Add ejavadoc function. Thanks to wltjr. Fixes bug #544076.