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

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

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

Revision 1.3 Revision 1.12
3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org> 3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
4# Copyright (c) 2004-2005, Gentoo Foundation 4# Copyright (c) 2004-2005, Gentoo Foundation
5# 5#
6# Licensed under the GNU General Public License, v2 6# Licensed under the GNU General Public License, v2
7# 7#
8# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.12 2007/01/12 16:12:15 betelgeuse Exp $
8 9
9inherit java-utils-2 10inherit java-utils-2
10 11
11# ----------------------------------------------------------------------------- 12# -----------------------------------------------------------------------------
12# @eclass-begin 13# @eclass-begin
30# 31#
31# Nothing special for RDEPEND... just the same as DEPEND. 32# Nothing special for RDEPEND... just the same as DEPEND.
32# ------------------------------------------------------------------------------ 33# ------------------------------------------------------------------------------
33RDEPEND="${DEPEND}" 34RDEPEND="${DEPEND}"
34 35
35EXPORT_FUNCTIONS pkg_setup 36EXPORT_FUNCTIONS pkg_setup src_compile
36 37
37# ------------------------------------------------------------------------------ 38# ------------------------------------------------------------------------------
38# @eclass-pkg_setup 39# @eclass-pkg_setup
39# 40#
40# pkg_setup initializes the Java environment 41# pkg_setup initializes the Java environment
41# ------------------------------------------------------------------------------ 42# ------------------------------------------------------------------------------
42java-pkg-2_pkg_setup() { 43java-pkg-2_pkg_setup() {
43 java-pkg_init 44 java-pkg_init
45 java-pkg_ensure-test
46}
47
48# ------------------------------------------------------------------------------
49# @eclass-src_compile
50#
51# Default src_compile for java packages
52# variables:
53# EANT_BUILD_XML - controls the location of the build.xml (default: ./build.xml)
54# EANT_FILTER_COMPILER - Calls java-pkg_filter-compiler with the value
55# EANT_BUILD_TARGET - the ant target/targets to execute (default: jar)
56# EANT_DOC_TARGET - the target to build extra docs under the doc use flag
57# (default: the one provided by use_doc in
58# java-utils-2.eclass)
59# EANT_GENTOO_CLASSPATH - @see eant documention in java-utils-2.eclass
60# EANT_EXTRA_ARGUMENTS - extra arguments to pass to eant
61# ------------------------------------------------------------------------------
62java-pkg-2_src_compile() {
63 if [[ -e "${EANT_BUILD_XML:=build.xml}" ]]; then
64 [[ "${EANT_FILTER_COMPILER}" ]] && \
65 java-pkg_filter-compiler ${EANT_FILTER_COMPILER}
66
67 local antflags="${EANT_BUILD_TARGET:=jar}"
68 hasq doc ${IUSE} && antflags="${antflags} $(use_doc ${EANT_DOC_TARGET})"
69 eant ${antflags} -f "${EANT_BUILD_XML}" ${EANT_EXTRA_ARGUMENTS}
70 else
71 echo "${FUNCNAME}: No build.xml found so nothing to do."
72 fi
44} 73}
45 74
46# ------------------------------------------------------------------------------ 75# ------------------------------------------------------------------------------
47# @note 76# @note
48# 77#
59pre_src_unpack() { 88pre_src_unpack() {
60 java-pkg-2_pkg_setup 89 java-pkg-2_pkg_setup
61} 90}
62 91
63pre_src_compile() { 92pre_src_compile() {
93 if is-java-strict; then
94 echo "Searching for bundled jars:"
95 java-pkg_find-normal-jars || echo "None found."
96 fi
64 java-pkg-2_pkg_setup 97 java-pkg-2_pkg_setup
65} 98}
66 99
67pre_src_install() { 100pre_src_install() {
68 java-pkg-2_pkg_setup 101 java-pkg-2_pkg_setup

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20