Add ejavadoc function. Thanks to wltjr. Fixes bug #544076.
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 4 Apr 2015 21:04:49 +0000 (21:04 +0000)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 4 Apr 2015 21:04:49 +0000 (21:04 +0000)
eclass/ChangeLog
eclass/java-pkg-simple.eclass
eclass/java-utils-2.eclass

index d7696cd981c8d2d12ff62251729457357bfee77c..62a89904b3ed6dc85766091158f6afceecd82905 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1583 2015/04/04 20:33:05 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1584 2015/04/04 21:04:49 chewi Exp $
+
+  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.
 
   04 Apr 2015; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass:
   Disable building dynamic libraris by default before-ghc-7.10 (was
index 5cad139e7b08198300f690b44a9bd5e032783cbc..c18531ea069d76de4c9f9a570088da89c7b58cf7 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Licensed under the GNU General Public License, v2
 #
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-simple.eclass,v 1.4 2015/03/19 09:57:43 chewi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-simple.eclass,v 1.5 2015/04/04 21:04:49 chewi Exp $
 
 inherit java-utils-2
 
@@ -139,7 +139,7 @@ java-pkg-simple_src_compile() {
        if has doc ${JAVA_PKG_IUSE} && use doc; then
                mkdir -p ${apidoc}
                java-pkg-simple_verbose-cmd \
-                       javadoc -d ${apidoc} \
+                       ejavadoc -d ${apidoc} \
                        -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \
                        ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \
                        @${sources} || die "javadoc failed"
index 43e3c3317429ba3cbfee43e9a38c647bfc0eda47..52a62ecad530a9998b83eb2e192b638452334e5f 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Licensed under the GNU General Public License, v2
 #
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.156 2014/04/09 21:55:12 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.157 2015/04/04 21:04:49 chewi Exp $
 
 # @ECLASS: java-utils-2.eclass
 # @MAINTAINER:
@@ -21,7 +21,7 @@
 # This eclass should not be inherited this directly from an ebuild. Instead,
 # you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for packages
 # that have optional Java support. In addition you can inherit java-ant-2 for
-# Ant-based packages. 
+# Ant-based packages.
 inherit eutils versionator multilib
 
 IUSE="elibc_FreeBSD"
@@ -1808,7 +1808,7 @@ java-utils-2_pkg_preinst() {
 # Ant wrapper function. Will use the appropriate compiler, based on user-defined
 # compiler. Will also set proper ANT_TASKS from the variable ANT_TASKS,
 # variables:
-# 
+#
 # @CODE
 # Variables:
 # EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
@@ -1964,6 +1964,23 @@ ejavac() {
        ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
 }
 
+# @FUNCTION: ejavadoc
+# @USAGE: <javadoc_arguments>
+# @DESCRIPTION:
+# javadoc wrapper function. Will set some flags based on the VM version
+# 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"
+}
+
 # @FUNCTION: java-pkg_filter-compiler
 # @USAGE: <compiler(s)_to_filter>
 # @DESCRIPTION: