diff options
author | Patrice Clement <monsieurp@gentoo.org> | 2015-10-21 06:54:56 +0000 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2015-10-21 06:54:56 +0000 |
commit | c71c13211712ff97b311fbef83f8ddd408aae060 (patch) | |
tree | c38ae7a699d46c8d279a1cc36a12d56250122b64 /eclass | |
parent | Merge remote-tracking branch 'remotes/github/pr/270'. (diff) | |
parent | java-utils-2.eclass: Remove eend calls. Remove javadoc_executable variable. (diff) | |
download | gentoo-c71c13211712ff97b311fbef83f8ddd408aae060.tar.gz gentoo-c71c13211712ff97b311fbef83f8ddd408aae060.tar.bz2 gentoo-c71c13211712ff97b311fbef83f8ddd408aae060.zip |
Merge remote-tracking branch 'remotes/github/pr/269'.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-pkg-simple.eclass | 30 | ||||
-rw-r--r-- | eclass/java-utils-2.eclass | 59 |
2 files changed, 63 insertions, 26 deletions
diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index c06bb11504a0..db1ea662add1 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -102,16 +102,14 @@ java-pkg-simple_src_compile() { classpath=${classpath%:} classpath=${classpath#:} debug-print "CLASSPATH=${classpath}" - java-pkg-simple_verbose-cmd \ - ejavac -d ${classes} -encoding ${JAVA_ENCODING} \ + ejavac -d ${classes} -encoding ${JAVA_ENCODING} \ ${classpath:+-classpath ${classpath}} ${JAVAC_ARGS} \ @${sources} # javadoc if has doc ${JAVA_PKG_IUSE} && use doc; then mkdir -p ${apidoc} - java-pkg-simple_verbose-cmd \ - ejavadoc -d ${apidoc} \ + ejavadoc -d ${apidoc} \ -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \ ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \ @${sources} || die "javadoc failed" @@ -122,8 +120,7 @@ java-pkg-simple_src_compile() { if [[ -e ${classes}/META-INF/MANIFEST.MF ]]; then jar_args="cfm ${JAVA_JAR_FILENAME} ${classes}/META-INF/MANIFEST.MF" fi - java-pkg-simple_verbose-cmd \ - jar ${jar_args} -C ${classes} . || die "jar failed" + jar ${jar_args} -C ${classes} . || die "jar failed" } # @FUNCTION: java-pkg-simple_src_install @@ -136,13 +133,11 @@ java-pkg-simple_src_install() { local sources=sources.lst classes=target/classes apidoc=target/api # main jar - java-pkg-simple_verbose-cmd \ - java-pkg_dojar ${JAVA_JAR_FILENAME} + java-pkg_dojar ${JAVA_JAR_FILENAME} # javadoc if has doc ${JAVA_PKG_IUSE} && use doc; then - java-pkg-simple_verbose-cmd \ - java-pkg_dojavadoc ${apidoc} + java-pkg_dojavadoc ${apidoc} fi # dosrc @@ -159,19 +154,6 @@ java-pkg-simple_src_install() { # take all directories actually containing any sources srcdirs="$(cut -d/ -f1 ${sources} | sort -u)" fi - java-pkg-simple_verbose-cmd \ - java-pkg_dosrc ${srcdirs} + java-pkg_dosrc ${srcdirs} fi } - -# @FUNCTION: java-pkg-simple_src_install -# @DESCRIPTION: -# Print a command before executing it. To give user some feedback -# about what is going on, where the time is being spent, and also to -# help debugging ebuilds. -# -# @param $@ - command to be called and its arguments -java-pkg-simple_verbose-cmd() { - echo "$*" - "$@" -} diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 302a82ab86de..deab51da4a8c 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -120,6 +120,16 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"} # JAVA_PKG_WANT_TARGET=1.3 emerge bar # @CODE +# @ECLASS-VARIABLE: JAVA_PKG_DEBUG +# @DEFAULT_UNSET +# @DESCRIPTION: +# A variable to be set with "yes" or "y", or ANY string of length non equal to +# zero. When set, verbosity across java eclasses is increased and extra +# logging is displayed. +# @CODE +# JAVA_PKG_DEBUG="yes" +# @CODE + # @ECLASS-VARIABLE: JAVA_RM_FILES # @DEFAULT_UNSET # @DESCRIPTION: @@ -354,6 +364,15 @@ java-pkg_dojar() { fi done + # Extra logging if enabled. + if [[ -n ${JAVA_PKG_DEBUG} ]]; then + einfo "Verbose logging for \"${FUNCNAME}\" function" + einfo "Jar file(s) destination: ${JAVA_PKG_JARDEST}" + einfo "Jar file(s) created: ${@}" + einfo "Complete command:" + einfo "${FUNCNAME} ${@}" + fi + java-pkg_do_write_ } @@ -632,7 +651,6 @@ java-pkg_dojavadoc() { fi # Actual installation - java-pkg_dohtml -r "${dir_to_install}" # Let's make a symlink to the directory we have everything else under @@ -642,6 +660,15 @@ java-pkg_dojavadoc() { debug-print "symlinking ${dest}/{api,${symlink}}" dosym ${dest}/{api,${symlink}} || die fi + + # Extra logging if enabled. + if [[ -n ${JAVA_PKG_DEBUG} ]]; then + einfo "Verbose logging for \"${FUNCNAME}\" function" + einfo "Documentation destination: ${dest}" + einfo "Directory to install: ${dir_to_install}" + einfo "Complete command:" + einfo "${FUNCNAME} ${@}" + fi } # @FUNCTION: java-pkg_dosrc @@ -701,6 +728,17 @@ java-pkg_dosrc() { doins ${zip_path} || die "Failed to install source" JAVA_SOURCES="${JAVA_PKG_SOURCESPATH}/${zip_name}" + + # Extra logging if enabled. + if [[ -n ${JAVA_PKG_DEBUG} ]]; then + einfo "Verbose logging for \"${FUNCNAME}\" function" + einfo "Zip filename created: ${zip_name}" + einfo "Zip file destination: ${JAVA_PKG_SOURCESPATH}" + einfo "Directories zipped: ${@}" + einfo "Complete command:" + einfo "${FUNCNAME} ${@}" + fi + java-pkg_do_write_ } @@ -2001,7 +2039,15 @@ ejavac() { local javac_args javac_args="$(java-pkg_javac-args)" - [[ -n ${JAVA_PKG_DEBUG} ]] && echo ${compiler_executable} ${javac_args} "${@}" + if [[ -n ${JAVA_PKG_DEBUG} ]]; then + einfo "Verbose logging for \"${FUNCNAME}\" function" + einfo "Compiler executable: ${compiler_executable}" + einfo "Extra arguments: ${javac_args}" + einfo "Complete command:" + einfo "${compiler_executable} ${javac_args} ${@}" + fi + + ebegin "Compiling" ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed" } @@ -2019,6 +2065,15 @@ ejavadoc() { javadoc_args="-Xdoclint:none" fi + if [[ -n ${JAVA_PKG_DEBUG} ]]; then + einfo "Verbose logging for \"${FUNCNAME}\" function" + einfo "Javadoc executable: javadoc" + einfo "Extra arguments: ${javadoc_args}" + einfo "Complete command:" + einfo "javadoc ${javadoc_args} ${@}" + fi + + ebegin "Generating JavaDoc" javadoc ${javadoc_args} "${@}" || die "ejavadoc failed" } |