summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2015-04-04 21:04:49 +0000
committerJames Le Cuirot <chewi@gentoo.org>2015-04-04 21:04:49 +0000
commit07447c8dcbb010c4679096cd10d866639c74cd8e (patch)
treeb162d2e2d5c691800b69a66c7b7330001a90a163 /eclass
parentRemove old. (diff)
downloadgentoo-2-07447c8dcbb010c4679096cd10d866639c74cd8e.tar.gz
gentoo-2-07447c8dcbb010c4679096cd10d866639c74cd8e.tar.bz2
gentoo-2-07447c8dcbb010c4679096cd10d866639c74cd8e.zip
Add ejavadoc function. Thanks to wltjr. Fixes bug #544076.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/java-pkg-simple.eclass4
-rw-r--r--eclass/java-utils-2.eclass23
3 files changed, 27 insertions, 6 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index d7696cd981c8..62a89904b3ed 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -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
diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass
index 5cad139e7b08..c18531ea069d 100644
--- a/eclass/java-pkg-simple.eclass
+++ b/eclass/java-pkg-simple.eclass
@@ -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"
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 43e3c3317429..52a62ecad530 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -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: