/[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.107 Revision 1.108
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.107 2008/05/03 21:28:45 betelgeuse Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.108 2008/06/18 10:27:22 ali_bush 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
2576# not. 2576# not.
2577# @param $1 (optional) - the file to check, otherwise checks whole ${D} 2577# @param $1 (optional) - the file to check, otherwise checks whole ${D}
2578# ------------------------------------------------------------------------------ 2578# ------------------------------------------------------------------------------
2579java-pkg_verify-classes() { 2579java-pkg_verify-classes() {
2580 #$(find ${D} -type f -name '*.jar' -o -name '*.class') 2580 #$(find ${D} -type f -name '*.jar' -o -name '*.class')
2581
2582 local version_verify="/usr/bin/class-version-verify.py"
2583
2584 if [[ ! -x "${version_verify}" ]]; then
2585 version_verify="/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py"
2586 fi
2587
2588 if [[ ! -x "${version_verify}" ]]; then
2589 ewarn "Unable to perform class version checks as"
2590 ewarn "class-version-verify.py is unavailable"
2591 ewarn "Please install dev-java/javatoolkit."
2592 return
2593 fi
2594
2581 local target=$(java-pkg_get-target) 2595 local target=$(java-pkg_get-target)
2582 local result 2596 local result
2583 local log="${T}/class-version-verify.log" 2597 local log="${T}/class-version-verify.log"
2584 if [[ -n "${1}" ]]; then 2598 if [[ -n "${1}" ]]; then
2585 class-version-verify.py -v -t ${target} "${1}" > "${log}" 2599 ${version_verify} -v -t ${target} "${1}" > "${log}"
2586 result=$? 2600 result=$?
2587 else 2601 else
2588 ebegin "Verifying java class versions (target: ${target})" 2602 ebegin "Verifying java class versions (target: ${target})"
2589 class-version-verify.py -v -t ${target} -r "${D}" > "${log}" 2603 ${version_verify} -v -t ${target} -r "${D}" > "${log}"
2590 result=$? 2604 result=$?
2591 eend ${result} 2605 eend ${result}
2592 fi 2606 fi
2593 [[ -n ${JAVA_PKG_DEBUG} ]] && cat "${log}" 2607 [[ -n ${JAVA_PKG_DEBUG} ]] && cat "${log}"
2594 if [[ ${result} != 0 ]]; then 2608 if [[ ${result} != 0 ]]; then

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108

  ViewVC Help
Powered by ViewVC 1.1.20