summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2007-11-28 01:54:13 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2007-11-28 01:54:13 +0000
commit1842af9fb232ff6e2035f667db5b3ffad924e2cd (patch)
tree25fb3f2915f6cae16f878948430a040e47811432 /eclass/java-utils-2.eclass
parentNew release: 2007.11.21 (diff)
downloadgentoo-2-1842af9fb232ff6e2035f667db5b3ffad924e2cd.tar.gz
gentoo-2-1842af9fb232ff6e2035f667db5b3ffad924e2cd.tar.bz2
gentoo-2-1842af9fb232ff6e2035f667db5b3ffad924e2cd.zip
Improvements to dojavadoc.
Diffstat (limited to 'eclass/java-utils-2.eclass')
-rw-r--r--eclass/java-utils-2.eclass30
1 files changed, 27 insertions, 3 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index c3e687a74251..cee00bd8ba07 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.98 2007/11/26 21:00:59 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.99 2007/11/28 01:54:13 betelgeuse Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -559,15 +559,27 @@ java-pkg_dohtml() {
#
# Installs javadoc documentation. This should be controlled by the doc use flag.
#
-# @param $1: - The javadoc root directory.
+# @param $1: optional --symlink creates to symlink like this for html
+# documentation bundles.
+# @param $2: - The javadoc root directory.
#
# @example:
# java-pkg_dojavadoc docs/api
+# java-pkg_dojavadoc --symlink apidocs docs/api
#
# ------------------------------------------------------------------------------
java-pkg_dojavadoc() {
debug-print-function ${FUNCNAME} $*
+
+ # For html documentation bundles that link to Javadoc
+ local symlink
+ if [[ ${1} = --symlink ]]; then
+ symlink=${2}
+ shift 2
+ fi
+
local dir="$1"
+ local dest=/usr/share/doc/${PF}/html
# QA checks
@@ -581,6 +593,11 @@ java-pkg_dojavadoc() {
is-java-strict && die "${msg}"
fi
+ if [[ -e ${D}/${dest}/api ]]; then
+ eerror "${dest} already exists. Will not overwrite."
+ die "${dest}"
+ fi
+
# Renaming to match our directory layout
local dir_to_install="${dir}"
@@ -592,7 +609,14 @@ java-pkg_dojavadoc() {
# Actual installation
- java-pkg_dohtml -r ${dir_to_install}
+ java-pkg_dohtml -r "${dir_to_install}"
+
+ # Let's make a symlink to the directory we have everything else under
+ dosym ${dest} "${JAVA_PKG_SHAREPATH}/api" || die
+
+ if [[ ${symlink} ]]; then
+ dosym ${dest}/{api,${symlink}} || die
+ fi
}
# ------------------------------------------------------------------------------