summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/java-pkg.eclass')
-rw-r--r--eclass/java-pkg.eclass35
1 files changed, 34 insertions, 1 deletions
diff --git a/eclass/java-pkg.eclass b/eclass/java-pkg.eclass
index 10daeb819a8f..a2add64a53d5 100644
--- a/eclass/java-pkg.eclass
+++ b/eclass/java-pkg.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.50 2007/01/03 14:14:22 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.51 2007/04/25 18:22:37 robbat2 Exp $
inherit multilib
@@ -184,6 +184,14 @@ java-pkg_do_write_()
echo "DEPEND=${pkgs}" >> "${package_env}"
fi
+ if [ -n "${JAVADOC_PATH}" ] ; then
+ echo "JAVADOC_PATH=${JAVADOC_PATH}" >> "${package_env}"
+ fi
+
+ if [ -n "${JAVA_SOURCES}" ] ; then
+ echo "JAVA_SOURCES=${JAVA_SOURCES}" >> "${package_env}"
+ fi
+
# Strip unnecessary leading and trailing colons
sed -e "s/=:/=/" -e "s/:$//" -i "${package_env}"
}
@@ -449,9 +457,14 @@ java-pkg_getjars()
}
+
java-pkg_dohtml()
{
dohtml -f package-list $@
+ # this probably shouldn't be here but it provides
+ # a reasonable way to catch # docs for all of the
+ # old ebuilds.
+ java-pkg_recordjavadoc
}
java-pkg_jarinto()
@@ -487,6 +500,26 @@ java-pkg_dosrc() {
dodir ${target}
install ${INSOPTIONS} "${T}/${PN}-src.zip" "${D}${target}" \
|| die "failed to install sources"
+ # Record the existence of the sources in the package.env
+ JAVA_SOURCES="${target}${PN}-src.zip"
+ java-pkg_do_write_
+}
+
+# Scan for JavaDocs, and record their existence in the package.env file
+java-pkg_recordjavadoc()
+{
+ java-pkg_do_init_
+ # the find statement is important
+ # as some packages include multiple trees of javadoc
+ JAVADOC_PATH="$(find ${D}/usr/share/doc/ -name allclasses-frame.html -printf '%h:')"
+ # remove $D - TODO: check this is ok with all cases of the above
+ JAVADOC_PATH="${JAVADOC_PATH//${D}}"
+ if [ -n "${JAVADOC_PATH}" ] ; then
+ debug-print "JavaDocs found in ${JAVADOC_PATH%:}"
+ java-pkg_do_write_
+ else
+ debug-print "No JavaDocs found"
+ fi
}