/[gentoo-x86]/eclass/java-utils-2.eclass
Gentoo

Diff of /eclass/java-utils-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.98 Revision 1.99
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2005, Gentoo Foundation 5# Copyright (c) 2004-2005, Gentoo Foundation
6# 6#
7# Licensed under the GNU General Public License, v2 7# Licensed under the GNU General Public License, v2
8# 8#
9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.98 2007/11/26 21:00:59 betelgeuse Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.99 2007/11/28 01:54:13 betelgeuse Exp $
10 10
11# ----------------------------------------------------------------------------- 11# -----------------------------------------------------------------------------
12# @eclass-begin 12# @eclass-begin
13# @eclass-shortdesc Java Utility eclass 13# @eclass-shortdesc Java Utility eclass
14# @eclass-maintainer java@gentoo.org 14# @eclass-maintainer java@gentoo.org
557# ------------------------------------------------------------------------------ 557# ------------------------------------------------------------------------------
558# @ebuild-function java-pkg_dojavadoc 558# @ebuild-function java-pkg_dojavadoc
559# 559#
560# Installs javadoc documentation. This should be controlled by the doc use flag. 560# Installs javadoc documentation. This should be controlled by the doc use flag.
561# 561#
562# @param $1: optional --symlink creates to symlink like this for html
563# documentation bundles.
562# @param $1: - The javadoc root directory. 564# @param $2: - The javadoc root directory.
563# 565#
564# @example: 566# @example:
565# java-pkg_dojavadoc docs/api 567# java-pkg_dojavadoc docs/api
568# java-pkg_dojavadoc --symlink apidocs docs/api
566# 569#
567# ------------------------------------------------------------------------------ 570# ------------------------------------------------------------------------------
568java-pkg_dojavadoc() { 571java-pkg_dojavadoc() {
569 debug-print-function ${FUNCNAME} $* 572 debug-print-function ${FUNCNAME} $*
573
574 # For html documentation bundles that link to Javadoc
575 local symlink
576 if [[ ${1} = --symlink ]]; then
577 symlink=${2}
578 shift 2
579 fi
580
570 local dir="$1" 581 local dir="$1"
582 local dest=/usr/share/doc/${PF}/html
571 583
572 # QA checks 584 # QA checks
573 585
574 java-pkg_check-phase install 586 java-pkg_check-phase install
575 587
579 local msg="No index.html in javadoc directory" 591 local msg="No index.html in javadoc directory"
580 ewarn "${msg}" 592 ewarn "${msg}"
581 is-java-strict && die "${msg}" 593 is-java-strict && die "${msg}"
582 fi 594 fi
583 595
596 if [[ -e ${D}/${dest}/api ]]; then
597 eerror "${dest} already exists. Will not overwrite."
598 die "${dest}"
599 fi
600
584 # Renaming to match our directory layout 601 # Renaming to match our directory layout
585 602
586 local dir_to_install="${dir}" 603 local dir_to_install="${dir}"
587 if [[ "$(basename "${dir}")" != "api" ]]; then 604 if [[ "$(basename "${dir}")" != "api" ]]; then
588 dir_to_install="${T}/api" 605 dir_to_install="${T}/api"
590 cp -r "${dir}" "${dir_to_install}" || die "cp failed" 607 cp -r "${dir}" "${dir_to_install}" || die "cp failed"
591 fi 608 fi
592 609
593 # Actual installation 610 # Actual installation
594 611
595 java-pkg_dohtml -r ${dir_to_install} 612 java-pkg_dohtml -r "${dir_to_install}"
613
614 # Let's make a symlink to the directory we have everything else under
615 dosym ${dest} "${JAVA_PKG_SHAREPATH}/api" || die
616
617 if [[ ${symlink} ]]; then
618 dosym ${dest}/{api,${symlink}} || die
619 fi
596} 620}
597 621
598# ------------------------------------------------------------------------------ 622# ------------------------------------------------------------------------------
599# @ebuild-function java-pkg_dosrc 623# @ebuild-function java-pkg_dosrc
600# 624#

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.99

  ViewVC Help
Powered by ViewVC 1.1.20