Gentoo Archives: gentoo-commits

From: "Petteri Raty (betelgeuse)" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: java-utils-2.eclass
Date: Wed, 28 Nov 2007 01:54:19
Message-Id: E1IxC7y-000236-F4@stork.gentoo.org
1 betelgeuse 07/11/28 01:54:14
2
3 Modified: java-utils-2.eclass
4 Log:
5 Improvements to dojavadoc.
6
7 Revision Changes Path
8 1.99 eclass/java-utils-2.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.99&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.99&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?r1=1.98&r2=1.99
13
14 Index: java-utils-2.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
17 retrieving revision 1.98
18 retrieving revision 1.99
19 diff -u -r1.98 -r1.99
20 --- java-utils-2.eclass 26 Nov 2007 21:00:59 -0000 1.98
21 +++ java-utils-2.eclass 28 Nov 2007 01:54:13 -0000 1.99
22 @@ -6,7 +6,7 @@
23 #
24 # Licensed under the GNU General Public License, v2
25 #
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.98 2007/11/26 21:00:59 betelgeuse Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.99 2007/11/28 01:54:13 betelgeuse Exp $
28
29 # -----------------------------------------------------------------------------
30 # @eclass-begin
31 @@ -559,15 +559,27 @@
32 #
33 # Installs javadoc documentation. This should be controlled by the doc use flag.
34 #
35 -# @param $1: - The javadoc root directory.
36 +# @param $1: optional --symlink creates to symlink like this for html
37 +# documentation bundles.
38 +# @param $2: - The javadoc root directory.
39 #
40 # @example:
41 # java-pkg_dojavadoc docs/api
42 +# java-pkg_dojavadoc --symlink apidocs docs/api
43 #
44 # ------------------------------------------------------------------------------
45 java-pkg_dojavadoc() {
46 debug-print-function ${FUNCNAME} $*
47 +
48 + # For html documentation bundles that link to Javadoc
49 + local symlink
50 + if [[ ${1} = --symlink ]]; then
51 + symlink=${2}
52 + shift 2
53 + fi
54 +
55 local dir="$1"
56 + local dest=/usr/share/doc/${PF}/html
57
58 # QA checks
59
60 @@ -581,6 +593,11 @@
61 is-java-strict && die "${msg}"
62 fi
63
64 + if [[ -e ${D}/${dest}/api ]]; then
65 + eerror "${dest} already exists. Will not overwrite."
66 + die "${dest}"
67 + fi
68 +
69 # Renaming to match our directory layout
70
71 local dir_to_install="${dir}"
72 @@ -592,7 +609,14 @@
73
74 # Actual installation
75
76 - java-pkg_dohtml -r ${dir_to_install}
77 + java-pkg_dohtml -r "${dir_to_install}"
78 +
79 + # Let's make a symlink to the directory we have everything else under
80 + dosym ${dest} "${JAVA_PKG_SHAREPATH}/api" || die
81 +
82 + if [[ ${symlink} ]]; then
83 + dosym ${dest}/{api,${symlink}} || die
84 + fi
85 }
86
87 # ------------------------------------------------------------------------------
88
89
90
91 --
92 gentoo-commits@g.o mailing list