/[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.6 Revision 1.7
33# ----------------------------------------------------------------------------- 33# -----------------------------------------------------------------------------
34 34
35# Make sure we use java-config-2 35# Make sure we use java-config-2
36export WANT_JAVA_CONFIG="2" 36export WANT_JAVA_CONFIG="2"
37 37
38# TODO document
39JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1_pre1"
40
38# ----------------------------------------------------------------------------- 41# -----------------------------------------------------------------------------
39# @variable-internal JAVA_PKG_E_DEPEND 42# @variable-internal JAVA_PKG_E_DEPEND
40# 43#
41# This is a convience variable to be used from the other java eclasses. This is 44# This is a convience variable to be used from the other java eclasses. This is
42# the version of java-config we want to use. We also need a recent version 45# the version of java-config we want to use. We also need a recent version
43# portage, that includes phase hooks. 46# portage, that includes phase hooks.
44# ----------------------------------------------------------------------------- 47# -----------------------------------------------------------------------------
45JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.0.19-r1 >=sys-apps/portage-2.1_pre1" 48JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.0.19-r1 ${JAVA_PKG_PORTAGE_DEP}"
46 49
47# ----------------------------------------------------------------------------- 50# -----------------------------------------------------------------------------
48# @variable-external JAVA_PKG_ALLOW_VM_CHANGE 51# @variable-external JAVA_PKG_ALLOW_VM_CHANGE
49# @variable-default yes 52# @variable-default yes
50# 53#
1729 echo "GENTOO_VM=${GENTOO_VM} CLASSPATH=\"${CLASSPATH}\" JAVA_HOME=\"${JAVA_HOME}\"" >&2 1732 echo "GENTOO_VM=${GENTOO_VM} CLASSPATH=\"${CLASSPATH}\" JAVA_HOME=\"${JAVA_HOME}\"" >&2
1730 echo "JAVACFLAGS=\"${JAVACFLAGS}\" COMPILER=\"${GENTOO_COMPILER}\"" >&2 1733 echo "JAVACFLAGS=\"${JAVACFLAGS}\" COMPILER=\"${GENTOO_COMPILER}\"" >&2
1731 echo "and of course, the output of emerge --info" >&2 1734 echo "and of course, the output of emerge --info" >&2
1732} 1735}
1733 1736
1737
1738# TODO document
1739# List jars in the source directory, ${S}
1740java-pkg_jar-list() {
1741 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
1742 einfo "Linked Jars"
1743 find "${S}" -type l -name '*.jar' -print0 | xargs -0 -r -n 500 ls -ald | sed -e "s,${WORKDIR},\${WORKDIR},"
1744 einfo "Jars"
1745 find "${S}" -type f -name '*.jar' -print0 | xargs -0 -r -n 500 ls -ald | sed -e "s,${WORKDIR},\${WORKDIR},"
1746 einfo "Classes"
1747 find "${S}" -type f -name '*.class' -print0 | xargs -0 -r -n 500 ls -ald | sed -e "s,${WORKDIR},\${WORKDIR},"
1748 fi
1749}
1750
1751# TODO document
1752# Verify that the classes were compiled for the right source / target
1753java-pkg_verify-classes() {
1754 ebegin "Verifying java class versions"
1755 #$(find ${D} -type f -name '*.jar' -o -name '*.class')
1756 class-version-verify.py -t $(java-pkg_get-target) -r ${D}
1757 result=$?
1758 eend ${result}
1759 if [[ ${result} == 0 ]]; then
1760 einfo "All good"
1761 else
1762 ewarn "Possible problem"
1763 die "Bad class files found"
1764 fi
1765}
1766
1767
1734# ------------------------------------------------------------------------------ 1768# ------------------------------------------------------------------------------
1735# @section-end internal 1769# @section-end internal
1736# ------------------------------------------------------------------------------ 1770# ------------------------------------------------------------------------------
1737 1771
1738java-pkg_check-phase() { 1772java-pkg_check-phase() {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20