Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 207945 Details for
Bug 145750
Adding javadoc search function to a java eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to java-ant-2.eclass that handles local Javadoc linking
java-ant-2.patch (text/plain), 2.45 KB, created by
Quetzaly Solano Gómez
on 2009-10-22 22:49:11 UTC
(
hide
)
Description:
Patch to java-ant-2.eclass that handles local Javadoc linking
Filename:
MIME Type:
Creator:
Quetzaly Solano Gómez
Created:
2009-10-22 22:49:11 UTC
Size:
2.45 KB
patch
obsolete
>--- /usr/portage/eclass/java-ant-2.eclass 2009-02-14 19:35:52.000000000 -0600 >+++ java-ant-2.eclass 2009-10-22 14:57:03.000000000 -0500 >@@ -145,6 +145,10 @@ > > [[ "${JAVA_ANT_IGNORE_SYSTEM_CLASSES}" ]] \ > && java-ant_ignore-system-classes "${S}/build.xml" >+ >+ if use doc; then >+ java-ant_link-javadoc >+ fi > > java-ant_bsfix > touch "${T}/java-ant-2_src_configure-run" >@@ -451,3 +455,58 @@ > die "xml-rewrite not found" > fi > } >+ >+ >+# ------------------------------------------------------------------------------ >+# @public java-ant_link-javadoc >+# >+# Modifies a build.xml document to link to the local Javadoc documentation for >+# installed packages. The following variables determine its behaviour: >+# >+# JAVA_ANT_DOCPATH - Links to the local packages specified in this variable. >+# If not specified, defaults to EANT_GENTOO_CLASSPATH >+# >+# @param $@ - the files to rewrite (defaults to build.xml) >+# ------------------------------------------------------------------------------ >+java-ant_link-javadoc() { >+ debug-print-function ${FUNCNAME} $* >+ >+ local files=${@:-build.xml} >+ local helper_args="" >+ >+ # First, get link to local SDK docs, if available >+ if has_version dev-java/java-sdk-docs ; then >+ local jdk_package=`best_version dev-java/java-sdk-docs` >+ local doc_loc=`portageq contents ${ROOT} ${jdk_package} \ >+ | grep "/html/api$"` >+ helper_args="${helper_args} --link ${doc_loc}" >+ debug-print "${FUNCNAME}: Linking to local SDK documentation at ${doc_loc}" >+ fi >+ >+ # get the list of packages to which to link >+ [[ -z "${JAVA_ANT_DOCPATH}" ]] && JAVA_ANT_DOCPATH="${EANT_GENTOO_CLASSPATH}" >+ JAVA_ANT_DOCPATH="${JAVA_ANT_DOCPATH//,/ }" >+ [[ -n "${JAVA_PKG_DEBUG}" ]] && echo "JAVA_ANT_DOCPATH is ${JAVA_ANT_DOCPATH}" >+ >+ # find documentation for each package >+ for pkg in ${JAVA_ANT_DOCPATH}; do >+ # check for hamcrest-core documentation >+ local doc_loc=`java-config-2 --query=JAVADOC_PATH --package=${pkg} 2>/dev/null` >+ if [[ -n "${doc_loc}" ]]; then >+ helper_args="${helper_args} --link ${doc_loc}" >+ debug-print "${FUNCNAME}: Linking to local ${pkg} documentation at ${doc_loc}" >+ fi >+ done >+ >+ [[ -n "${JAVA_PKG_DEBUG}" ]] && helper_args="${helper_args} --backup" >+ >+ local jdoc_helper="/usr/$(get_libdir)/javatoolkit/bin/javadoc-helper" >+ >+ eval ${jdoc_helper} ${helper_args} ${files} || die "javadoc-helper failed" >+ >+ if [[ -n "${JAVA_PKG_DEBUG}" ]]; then >+ for file in "${files}"; do >+ diff -NurbB "${file}.jhbk" "${file}" >+ done >+ fi >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145750
:
95572
|
207944
| 207945