/[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.127 Revision 1.150
1# Base eclass for Java packages 1# Base eclass for Java packages
2# 2#
3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org> 3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
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-2011, 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.127 2009/05/19 21:23:32 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.150 2012/03/13 10:05:46 sera 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
61# 61#
62# The version of portage we need to function properly. Previously it was 62# The version of portage we need to function properly. Previously it was
63# portage with phase hooks support but now we use a version with proper env 63# portage with phase hooks support but now we use a version with proper env
64# saving. For EAPI 2 we have new enough stuff so let's have cleaner deps. 64# saving. For EAPI 2 we have new enough stuff so let's have cleaner deps.
65# ----------------------------------------------------------------------------- 65# -----------------------------------------------------------------------------
66hasq "${EAPI}" 0 1 && JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1.2.7" 66has "${EAPI}" 0 1 && JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1.2.7"
67 67
68# ----------------------------------------------------------------------------- 68# -----------------------------------------------------------------------------
69# @variable-internal JAVA_PKG_E_DEPEND 69# @variable-internal JAVA_PKG_E_DEPEND
70# 70#
71# This is a convience variable to be used from the other java eclasses. This is 71# This is a convience variable to be used from the other java eclasses. This is
72# the version of java-config we want to use. Usually the latest stable version 72# the version of java-config we want to use. Usually the latest stable version
73# so that ebuilds can use new features without depending on specific versions. 73# so that ebuilds can use new features without depending on specific versions.
74# ----------------------------------------------------------------------------- 74# -----------------------------------------------------------------------------
75JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.1.6 ${JAVA_PKG_PORTAGE_DEP}" 75JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.1.9-r1 ${JAVA_PKG_PORTAGE_DEP}"
76hasq source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )" 76has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )"
77
78# -----------------------------------------------------------------------------
79# @variable-preinherit JAVA_PKG_WANT_BOOTCLASSPATH
80#
81# The version of bootclasspath the package needs to work. Translates to a proper
82# dependency. The bootclasspath has to be obtained by java-ant_rewrite-bootclasspath
83# -----------------------------------------------------------------------------
84
85if [[ -n "${JAVA_PKG_WANT_BOOTCLASSPATH}" ]]; then
86 if [[ "${JAVA_PKG_WANT_BOOTCLASSPATH}" == "1.5" ]]; then
87 JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} >=dev-java/gnu-classpath-0.98-r1:0.98"
88 else
89 eerror "Unknown value of JAVA_PKG_WANT_BOOTCLASSPATH"
90 # since die in global scope doesn't work, this will make repoman fail
91 JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} BAD_JAVA_PKG_WANT_BOOTCLASSPATH"
92 fi
93fi
77 94
78# ----------------------------------------------------------------------------- 95# -----------------------------------------------------------------------------
79# @variable-external JAVA_PKG_ALLOW_VM_CHANGE 96# @variable-external JAVA_PKG_ALLOW_VM_CHANGE
80# @variable-default yes 97# @variable-default yes
81# 98#
94# Should only be used for testing and debugging. 111# Should only be used for testing and debugging.
95# 112#
96# @example Use sun-jdk-1.5 to emerge foo 113# @example Use sun-jdk-1.5 to emerge foo
97# JAVA_PKG_FORCE_VM=sun-jdk-1.5 emerge foo 114# JAVA_PKG_FORCE_VM=sun-jdk-1.5 emerge foo
98# 115#
116# -----------------------------------------------------------------------------
117
118# -----------------------------------------------------------------------------
119# @variable-external JAVA_PKG_WANT_BUILD_VM
120#
121# A list of VM handles to choose a build VM from. If the list contains the
122# currently active VM use that one, otherwise step through the list till a
123# usable/installed VM is found.
124#
125# This allows to use an explicit list of JDKs in DEPEND instead of a virtual.
126# Users of this variable must make sure at least one of the listed handles is
127# covered by DEPEND.
128# Requires JAVA_PKG_WANT_SOURCE and JAVA_PKG_WANT_TARGET to be set as well.
99# ----------------------------------------------------------------------------- 129# -----------------------------------------------------------------------------
100 130
101# ----------------------------------------------------------------------------- 131# -----------------------------------------------------------------------------
102# @variable-external JAVA_PKG_WANT_SOURCE 132# @variable-external JAVA_PKG_WANT_SOURCE
103# 133#
224 ( # dont want to pollute calling env 254 ( # dont want to pollute calling env
225 insinto "${dest}" 255 insinto "${dest}"
226 doins -r "$@" 256 doins -r "$@"
227 ) || die "Installing examples failed" 257 ) || die "Installing examples failed"
228 fi 258 fi
259
260 # Let's make a symlink to the directory we have everything else under
261 dosym "${dest}" "${JAVA_PKG_SHAREPATH}/examples" || die
229} 262}
230 263
231# ----------------------------------------------------------------------------- 264# -----------------------------------------------------------------------------
232# @ebuild-function java-pkg_dojar 265# @ebuild-function java-pkg_dojar
233# 266#
872 905
873 local build_only="" 906 local build_only=""
874 local destdir="." 907 local destdir="."
875 local deep="" 908 local deep=""
876 local virtual="" 909 local virtual=""
910 local record_jar=""
877 911
878 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build" 912 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build"
879 913
880 while [[ "${1}" == --* ]]; do 914 while [[ "${1}" == --* ]]; do
881 if [[ "${1}" = "--build-only" ]]; then 915 if [[ "${1}" = "--build-only" ]]; then
916 for pkg in ${target_pkg//,/ }; do 950 for pkg in ${target_pkg//,/ }; do
917 java-pkg_ensure-dep "${build_only}" "${pkg}" 951 java-pkg_ensure-dep "${build_only}" "${pkg}"
918 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${pkg}" 952 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${pkg}"
919 done 953 done
920 # setting this disables further record-jar_ calls later 954 # setting this disables further record-jar_ calls later
921 build_only="build" 955 record_jar="true"
922 else 956 else
923 java-pkg_ensure-dep "${build_only}" "${target_pkg}" 957 java-pkg_ensure-dep "${build_only}" "${target_pkg}"
924 fi 958 fi
925 959
926 # Record the entire virtual as a dependency so that 960 # Record the entire virtual as a dependency so that
927 # no jars are missed. 961 # no jars are missed.
928 if [[ -z "${build_only}" && -n "${virtual}" ]]; then 962 if [[ -z "${build_only}" && -n "${virtual}" ]]; then
929 java-pkg_record-jar_ "${target_pkg}" 963 java-pkg_record-jar_ "${target_pkg}"
930 # setting this disables further record-jars_ calls later 964 # setting this disables further record-jars_ calls later
931 build_only="build" 965 record_jar="true"
932 fi 966 fi
933 967
934 pushd ${destdir} > /dev/null \ 968 pushd ${destdir} > /dev/null \
935 || die "failed to change directory to ${destdir}" 969 || die "failed to change directory to ${destdir}"
936 970
944 # If no specific target jar was indicated, link it 978 # If no specific target jar was indicated, link it
945 if [[ -z "${target_jar}" ]] ; then 979 if [[ -z "${target_jar}" ]] ; then
946 [[ -f "${target_jar}" ]] && rm "${target_jar}" 980 [[ -f "${target_jar}" ]] && rm "${target_jar}"
947 ln -snf "${jar}" \ 981 ln -snf "${jar}" \
948 || die "Failed to make symlink from ${jar} to ${jar_name}" 982 || die "Failed to make symlink from ${jar} to ${jar_name}"
983 if [[ -z "${record_jar}" ]]; then
984 if [[ -z "${build_only}" ]]; then
949 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${target_pkg}" "${jar}" 985 java-pkg_record-jar_ "${target_pkg}" "${jar}"
986 else
987 java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
988 fi
989 fi
950 # otherwise, if the current jar is the target jar, link it 990 # otherwise, if the current jar is the target jar, link it
951 elif [[ "${jar_name}" == "${target_jar}" ]] ; then 991 elif [[ "${jar_name}" == "${target_jar}" ]] ; then
952 [[ -f "${destjar}" ]] && rm "${destjar}" 992 [[ -f "${destjar}" ]] && rm "${destjar}"
953 ln -snf "${jar}" "${destjar}" \ 993 ln -snf "${jar}" "${destjar}" \
954 || die "Failed to make symlink from ${jar} to ${destjar}" 994 || die "Failed to make symlink from ${jar} to ${destjar}"
995 if [[ -z "${record_jar}" ]]; then
996 if [[ -z "${build_only}" ]]; then
955 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${target_pkg}" "${jar}" 997 java-pkg_record-jar_ "${target_pkg}" "${jar}"
998 else
999 java-pkg_record-jar_ --build-only "${target_jar}" "${jar}"
1000 fi
1001 fi
956 popd > /dev/null 1002 popd > /dev/null
957 return 0 1003 return 0
958 fi 1004 fi
959 done 1005 done
960 popd > /dev/null 1006 popd > /dev/null
1033 1079
1034 for pkg in ${pkgs//,/ }; do 1080 for pkg in ${pkgs//,/ }; do
1035 java-pkg_ensure-dep "${build_only}" "${pkg}" 1081 java-pkg_ensure-dep "${build_only}" "${pkg}"
1036 done 1082 done
1037 1083
1038 # Only record jars that aren't build-only 1084 for pkg in ${pkgs//,/ }; do
1039 if [[ -z "${build_only}" ]]; then 1085 if [[ -z "${build_only}" ]]; then
1040 for pkg in ${pkgs//,/ }; do
1041 java-pkg_record-jar_ "${pkg}" 1086 java-pkg_record-jar_ "${pkg}"
1087 else
1088 java-pkg_record-jar_ --build-only "${pkg}"
1089 fi
1042 done 1090 done
1043 fi
1044 1091
1045 echo "${jars}" 1092 echo "${jars}"
1046} 1093}
1047 1094
1048# ------------------------------------------------------------------------------ 1095# ------------------------------------------------------------------------------
1069java-pkg_getjar() { 1116java-pkg_getjar() {
1070 debug-print-function ${FUNCNAME} $* 1117 debug-print-function ${FUNCNAME} $*
1071 1118
1072 local build_only="" 1119 local build_only=""
1073 local virtual="" 1120 local virtual=""
1121 local record_jar=""
1074 1122
1075 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build" 1123 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build"
1076 1124
1077 while [[ "${1}" == --* ]]; do 1125 while [[ "${1}" == --* ]]; do
1078 if [[ "${1}" = "--build-only" ]]; then 1126 if [[ "${1}" = "--build-only" ]]; then
1104 java-pkg_ensure-dep "${build_only}" "${pkg}" 1152 java-pkg_ensure-dep "${build_only}" "${pkg}"
1105 1153
1106 # Record the package(Virtual) as a dependency and then set build_only 1154 # Record the package(Virtual) as a dependency and then set build_only
1107 # So that individual jars are not recorded. 1155 # So that individual jars are not recorded.
1108 if [[ -n "${virtual}" ]]; then 1156 if [[ -n "${virtual}" ]]; then
1157 if [[ -z "${build_only}" ]]; then
1109 java-pkg_record-jar_ "${pkg}" 1158 java-pkg_record-jar_ "${pkg}"
1110 build_only="true" 1159 else
1160 java-pkg_record-jar_ --build-only "${pkg}"
1161 fi
1162 record_jar="true"
1111 fi 1163 fi
1112 1164
1113 for jar in ${classpath//:/ }; do 1165 for jar in ${classpath//:/ }; do
1114 if [[ ! -f "${jar}" ]] ; then 1166 if [[ ! -f "${jar}" ]] ; then
1115 die "Installation problem with jar ${jar} in ${pkg} - is it installed?" 1167 die "Installation problem with jar ${jar} in ${pkg} - is it installed?"
1116 fi 1168 fi
1117 1169
1118 if [[ "$(basename ${jar})" == "${target_jar}" ]] ; then 1170 if [[ "$(basename ${jar})" == "${target_jar}" ]] ; then
1119 # Only record jars that aren't build-only 1171 # Only record jars that aren't build-only
1120 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${pkg}" "${jar}" 1172 if [[ -z "${record_jar}" ]]; then
1173 if [[ -z "${build_only}" ]]; then
1174 java-pkg_record-jar_ "${pkg}" "${jar}"
1175 else
1176 java-pkg_record-jar_ --build-only "${pkg}" "${jar}"
1177 fi
1178 fi
1121 echo "${jar}" 1179 echo "${jar}"
1122 return 0 1180 return 0
1123 fi 1181 fi
1124 done 1182 done
1125 1183
1259 echo "${1}=\"${2}\"" >> ${JAVA_PKG_EXTRA_ENV} 1317 echo "${1}=\"${2}\"" >> ${JAVA_PKG_EXTRA_ENV}
1260 JAVA_PKG_EXTRA_ENV_VARS="${JAVA_PKG_EXTRA_ENV_VARS} ${1}" 1318 JAVA_PKG_EXTRA_ENV_VARS="${JAVA_PKG_EXTRA_ENV_VARS} ${1}"
1261 1319
1262 java-pkg_do_write_ 1320 java-pkg_do_write_
1263} 1321}
1322
1323# ------------------------------------------------------------------------------
1324# @ebuild-function java-pkg_get-bootclasspath
1325#
1326# Returns classpath of a given bootclasspath-providing package version.
1327#
1328# @param $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath
1329# of the current JDK
1330# ------------------------------------------------------------------------------
1331
1332java-pkg_get-bootclasspath() {
1333 local version="${1}"
1334
1335 local bcp
1336 case "${version}" in
1337 auto)
1338 bcp="$(java-config -g BOOTCLASSPATH)"
1339 ;;
1340 1.5)
1341 bcp="$(java-pkg_getjars --build-only gnu-classpath-0.98)"
1342 ;;
1343 *)
1344 eerror "unknown parameter of java-pkg_get-bootclasspath"
1345 die "unknown parameter of java-pkg_get-bootclasspath"
1346 ;;
1347 esac
1348
1349 echo "${bcp}"
1350}
1351
1264 1352
1265# This function reads stdin, and based on that input, figures out how to 1353# This function reads stdin, and based on that input, figures out how to
1266# populate jars from the filesystem. 1354# populate jars from the filesystem.
1267# Need to figure out a good way of making use of this, ie be able to use a 1355# Need to figure out a good way of making use of this, ie be able to use a
1268# string that was built instead of stdin 1356# string that was built instead of stdin
1306# @section-begin helper 1394# @section-begin helper
1307# @section-summary Helper functions 1395# @section-summary Helper functions
1308# 1396#
1309# Various other functions to use from an ebuild 1397# Various other functions to use from an ebuild
1310# ------------------------------------------------------------------------------ 1398# ------------------------------------------------------------------------------
1311
1312# ------------------------------------------------------------------------------
1313# @ebuild-function java-pkg_need
1314#
1315# Adds virtual dependencies, which can optionally be controlled by a USE flag.
1316# Currently supported virtuals are:
1317# javamail
1318# jdbc-stdext
1319# jaf
1320# jdbc-rowset
1321# jms
1322#
1323# @param $1 - Optionally indicate that the dependencies are controlled by
1324# a use flag by specifying '--use' Requires $2.
1325# @param $2 - USE flag which will enable the dependencies.
1326# @param $@ - virtual packages to add depenedencies for
1327# ------------------------------------------------------------------------------
1328# TODO rewrite to parse a line based declaration file instead -- karltk
1329#java-pkg_need() {
1330# debug-print-function ${FUNCNAME} $*
1331# local useflag
1332# if [[ ${1} == "--use" ]]; then
1333# useflag="${2}"
1334# shift 2
1335# fi
1336#
1337# if [[ -z ${1} ]]; then
1338# die "Must specify at least one virtual package."
1339# fi
1340#
1341# local depstr newdepstr
1342#
1343# for virtual in ${@}; do
1344# if has ${virtual} ${JAVA_PKG_VNEED}; then
1345# debug-print "Already registered virtual ${virtual}"
1346# continue
1347# fi
1348# case ${virtual} in
1349# javamail)
1350# debug-print "java-pkg_need: adding javamail dependencies"
1351# newdepstr="|| ( dev-java/gnu-javamail dev-java/sun-javamail-bin )"
1352# ;;
1353# jdbc-stdext)
1354# debug-print "java-pkg_need: adding jdbc-stdext dependencies"
1355# newdepstr="|| ( >=virtual/jdk-1.4 dev-java/jdbc2-stdext )"
1356# ;;
1357# jaf)
1358# debug-print "java-pkg_need: adding jaf dependencies"
1359# newdepstr="|| ( dev-java/gnu-jaf dev-java/sun-jaf-bin )"
1360# ;;
1361# jdbc-rowset)
1362# debug-print "java-pkg_need: adding jdbc-rowset dependencies"
1363# newdepstr="|| ( >=virtual/jdk-1.5 dev-java/sun-jdbc-rowset )"
1364# ;;
1365# jms)
1366# debug-print "java-pkg_need: adding jms dependencies"
1367# newdepstr="|| ( dev-java/sun-jms dev-java/openjms )"
1368# ;;
1369# *)
1370# die "Invalid virtual: ${virtual}"
1371# esac
1372#
1373# export JAVA_PKG_VNEED="${JAVA_PKG_VNEED} ${virtual}"
1374#
1375# if [[ -n ${useflag} ]]; then
1376# depstr="${depstr} ${useflag}? ( ${newdepstr} )"
1377# else
1378# depstr="${depstr} ${newdepstr}"
1379# fi
1380# done
1381#
1382# [[ -z ${JAVA_PKG_NV_DEPEND} ]] && export JAVA_PKG_NV_DEPEND="${DEPEND}"
1383# [[ -z ${JAVA_PKG_NV_RDEPEND} ]] && export JAVA_PKG_NV_RDEPEND="${RDEPEND}"
1384#
1385# export DEPEND="${DEPEND} ${depstr}"
1386# export RDEPEND="${RDEPEND} ${depstr}"
1387#}
1388 1399
1389# ------------------------------------------------------------------------------ 1400# ------------------------------------------------------------------------------
1390# @ebuild-function java-pkg_find-normal-jars 1401# @ebuild-function java-pkg_find-normal-jars
1391# 1402#
1392# Find the files with suffix .jar file in the given directory or $WORKDIR 1403# Find the files with suffix .jar file in the given directory or $WORKDIR
1558java-pkg_get-current-vm() { 1569java-pkg_get-current-vm() {
1559 echo ${GENTOO_VM} 1570 echo ${GENTOO_VM}
1560} 1571}
1561 1572
1562java-pkg_current-vm-matches() { 1573java-pkg_current-vm-matches() {
1563 hasq $(java-pkg_get-current-vm) ${@} 1574 has $(java-pkg_get-current-vm) ${@}
1564 return $? 1575 return $?
1565} 1576}
1566 1577
1567# ------------------------------------------------------------------------------ 1578# ------------------------------------------------------------------------------
1568# @ebuild-function java-pkg_get-source 1579# @ebuild-function java-pkg_get-source
1683 die "No GCJ support found!" 1694 die "No GCJ support found!"
1684 fi 1695 fi
1685} 1696}
1686 1697
1687java-pkg_ensure-test() { 1698java-pkg_ensure-test() {
1688 if hasq test ${FEATURES} && ! hasq -test ${FEATURES} \ 1699 if has test ${FEATURES} && ! has -test ${FEATURES} \
1689 && hasq test ${IUSE} && ! use test; 1700 && has test ${IUSE} && ! use test;
1690 then 1701 then
1691 eerror "You specified FEATURES=test, but USE=test is needed" 1702 eerror "You specified FEATURES=test, but USE=test is needed"
1692 eerror "to pull in the additional dependencies for testing" 1703 eerror "to pull in the additional dependencies for testing"
1693 die "Need USE=test enabled" 1704 die "Need USE=test enabled"
1694 fi 1705 fi
1757 else 1768 else
1758 return 0 1769 return 0
1759 fi 1770 fi
1760} 1771}
1761 1772
1773
1762# ------------------------------------------------------------------------------ 1774# ------------------------------------------------------------------------------
1763# @ebuild-function ejunit 1775# @internal-function ejunit_
1764# 1776#
1765# Junit wrapper function. Makes it easier to run the tests and checks for 1777# Internal Junit wrapper function. Makes it easier to run the tests and checks for
1766# dev-java/junit in DEPEND. Launches the tests using junit.textui.TestRunner. 1778# dev-java/junit in DEPEND. Launches the tests using junit.textui.TestRunner.
1767# 1779#
1768# Examples: 1780# @param $1 - junit package (junit or junit-4)
1769# ejunit -cp build/classes org.blinkenlights.jid3.test.AllTests
1770# ejunit org.blinkenlights.jid3.test.AllTests
1771#
1772# @param $1 - -cp or -classpath 1781# @param $2 - -cp or -classpath
1773# @param $2 - classpath; junit and recorded dependencies get appended 1782# @param $3 - classpath; junit and recorded dependencies get appended
1774# @param $@ - the rest of the parameters are passed to java 1783# @param $@ - the rest of the parameters are passed to java
1775# ------------------------------------------------------------------------------
1776ejunit() { 1784ejunit_() {
1777 debug-print-function ${FUNCNAME} $* 1785 debug-print-function ${FUNCNAME} $*
1778 1786
1779 local pkgs 1787 local pkgs
1780 if [[ -f ${JAVA_PKG_DEPEND_FILE} ]]; then 1788 if [[ -f ${JAVA_PKG_DEPEND_FILE} ]]; then
1781 for atom in $(cat ${JAVA_PKG_DEPEND_FILE} | tr : ' '); do 1789 for atom in $(cat ${JAVA_PKG_DEPEND_FILE} | tr : ' '); do
1782 pkgs=${pkgs},$(echo ${atom} | sed -re "s/^.*@//") 1790 pkgs=${pkgs},$(echo ${atom} | sed -re "s/^.*@//")
1783 done 1791 done
1784 fi 1792 fi
1785 1793
1794 local junit=${1}
1795 shift 1
1796
1786 local cp=$(java-pkg_getjars --with-dependencies junit${pkgs}) 1797 local cp=$(java-pkg_getjars --with-dependencies ${junit}${pkgs})
1787 if [[ ${1} = -cp || ${1} = -classpath ]]; then 1798 if [[ ${1} = -cp || ${1} = -classpath ]]; then
1788 cp="${2}:${cp}" 1799 cp="${2}:${cp}"
1789 shift 2 1800 shift 2
1790 else 1801 else
1791 cp=".:${cp}" 1802 cp=".:${cp}"
1792 fi 1803 fi
1793 1804
1794 local runner=junit.textui.TestRunner 1805 local runner=junit.textui.TestRunner
1806 if [[ "${junit}" == "junit-4" ]] ; then
1807 runner=org.junit.runner.JUnitCore
1808 fi
1795 debug-print "Calling: java -cp \"${cp}\" -Djava.awt.headless=true ${runner} ${@}" 1809 debug-print "Calling: java -cp \"${cp}\" -Djava.awt.headless=true ${runner} ${@}"
1796 java -cp "${cp}" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed" 1810 java -cp "${cp}" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed"
1811}
1812
1813# ------------------------------------------------------------------------------
1814# @ebuild-function ejunit
1815#
1816# Junit wrapper function. Makes it easier to run the tests and checks for
1817# dev-java/junit in DEPEND. Launches the tests using org.junit.runner.JUnitCore.
1818#
1819# Examples:
1820# ejunit -cp build/classes org.blinkenlights.jid3.test.AllTests
1821# ejunit org.blinkenlights.jid3.test.AllTests
1822# ejunit org.blinkenlights.jid3.test.FirstTest \
1823# org.blinkenlights.jid3.test.SecondTest
1824#
1825# @param $1 - -cp or -classpath
1826# @param $2 - classpath; junit and recorded dependencies get appended
1827# @param $@ - the rest of the parameters are passed to java
1828# ------------------------------------------------------------------------------
1829ejunit() {
1830 debug-print-function ${FUNCNAME} $*
1831
1832 ejunit_ "junit" "${@}"
1833}
1834
1835# ------------------------------------------------------------------------------
1836# @ebuild-function ejunit4
1837#
1838# Junit4 wrapper function. Makes it easier to run the tests and checks for
1839# dev-java/junit:4 in DEPEND. Launches the tests using junit.textui.TestRunner.
1840#
1841# Examples:
1842# ejunit4 -cp build/classes org.blinkenlights.jid3.test.AllTests
1843# ejunit4 org.blinkenlights.jid3.test.AllTests
1844# ejunit4 org.blinkenlights.jid3.test.FirstTest \
1845# org.blinkenlights.jid3.test.SecondTest
1846#
1847# @param $1 - -cp or -classpath
1848# @param $2 - classpath; junit and recorded dependencies get appended
1849# @param $@ - the rest of the parameters are passed to java
1850# ------------------------------------------------------------------------------
1851ejunit4() {
1852 debug-print-function ${FUNCNAME} $*
1853
1854 ejunit_ "junit-4" "${@}"
1797} 1855}
1798 1856
1799# ------------------------------------------------------------------------------ 1857# ------------------------------------------------------------------------------
1800# @section-end helper 1858# @section-end helper
1801# ------------------------------------------------------------------------------ 1859# ------------------------------------------------------------------------------
1867# gentoo.classpath property. Be sure to call 1925# gentoo.classpath property. Be sure to call
1868# java-ant_rewrite-classpath in src_unpack. 1926# java-ant_rewrite-classpath in src_unpack.
1869# EANT_NEEDS_TOOLS - add tools.jar to the gentoo.classpath. Should only be used 1927# EANT_NEEDS_TOOLS - add tools.jar to the gentoo.classpath. Should only be used
1870# for build-time purposes, the dependency is not recorded to 1928# for build-time purposes, the dependency is not recorded to
1871# package.env! 1929# package.env!
1872# JAVA_PKG_NO_BUNDLED_SEARCH - Don't search for bundled jars or class files
1873# *ANT_TASKS - used to determine ANT_TASKS before calling Ant. 1930# *ANT_TASKS - used to determine ANT_TASKS before calling Ant.
1874# ------------------------------------------------------------------------------ 1931# ------------------------------------------------------------------------------
1875eant() { 1932eant() {
1876 debug-print-function ${FUNCNAME} $* 1933 debug-print-function ${FUNCNAME} $*
1877 1934
1878 if [[ ${EBUILD_PHASE} = compile ]]; then 1935 if [[ ${EBUILD_PHASE} = compile ]]; then
1879 java-ant-2_src_configure 1936 java-ant-2_src_configure
1880 java-utils-2_src_prepare 1937 java-utils-2_src_prepare
1881 fi 1938 fi
1882 1939
1883 if ! hasq java-ant-2 ${INHERITED}; then 1940 if ! has java-ant-2 ${INHERITED}; then
1884 local msg="You should inherit java-ant-2 when using eant" 1941 local msg="You should inherit java-ant-2 when using eant"
1885 java-pkg_announce-qa-violation "${msg}" 1942 java-pkg_announce-qa-violation "${msg}"
1886 fi 1943 fi
1887 1944
1888 local antflags="-Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore" 1945 local antflags="-Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore"
1963 2020
1964 if [[ ${EBUILD_PHASE} = "test" ]]; then 2021 if [[ ${EBUILD_PHASE} = "test" ]]; then
1965 antflags="${antflags} -DJunit.present=true" 2022 antflags="${antflags} -DJunit.present=true"
1966 [[ ${ANT_TASKS} = *ant-junit* ]] && gcp="${gcp} junit" 2023 [[ ${ANT_TASKS} = *ant-junit* ]] && gcp="${gcp} junit"
1967 getjarsarg="--with-dependencies" 2024 getjarsarg="--with-dependencies"
2025 else
2026 antflags="${antflags} -Dmaven.test.skip=true"
1968 fi 2027 fi
1969 2028
1970 local cp 2029 local cp
1971 2030
1972 for atom in ${gcp}; do 2031 for atom in ${gcp}; do
2089# call it during each of the phases of the merge process. 2148# call it during each of the phases of the merge process.
2090# 2149#
2091# ----------------------------------------------------------------------------- 2150# -----------------------------------------------------------------------------
2092java-pkg_init() { 2151java-pkg_init() {
2093 debug-print-function ${FUNCNAME} $* 2152 debug-print-function ${FUNCNAME} $*
2153
2154 # Don't set up build environment if installing from binary. #206024 #258423
2155 [[ "${MERGE_TYPE}" == "binary" ]] && return
2156 # Also try Portage's nonstandard EMERGE_FROM for old EAPIs, if it doesn't
2157 # work nothing is lost.
2158 has ${EAPI:-0} 0 1 2 3 && [[ "${EMERGE_FROM}" == "binary" ]] && return
2159
2094 unset JAVAC 2160 unset JAVAC
2095 unset JAVA_HOME 2161 unset JAVA_HOME
2096 2162
2097 java-config --help >/dev/null || { 2163 java-config --help >/dev/null || {
2098 eerror "" 2164 eerror ""
2318 # Create package.env 2384 # Create package.env
2319 ( 2385 (
2320 echo "DESCRIPTION=\"${DESCRIPTION}\"" 2386 echo "DESCRIPTION=\"${DESCRIPTION}\""
2321 echo "GENERATION=\"2\"" 2387 echo "GENERATION=\"2\""
2322 echo "SLOT=\"${SLOT}\"" 2388 echo "SLOT=\"${SLOT}\""
2389 echo "CATEGORY=\"${CATEGORY}\""
2390 echo "PVR=\"${PVR}\""
2323 2391
2324 [[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\"" 2392 [[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\""
2325 [[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\"" 2393 [[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\""
2326 [[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" 2394 [[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\""
2327 [[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \ 2395 [[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \
2328 && echo "DEPEND=\"$(cat "${JAVA_PKG_DEPEND_FILE}" | uniq | tr '\n' ':')\"" 2396 && echo "DEPEND=\"$(sort -u "${JAVA_PKG_DEPEND_FILE}" | tr '\n' ':')\""
2329 [[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \ 2397 [[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \
2330 && echo "OPTIONAL_DEPEND=\"$(cat "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | uniq | tr '\n' ':')\"" 2398 && echo "OPTIONAL_DEPEND=\"$(sort -u "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | tr '\n' ':')\""
2331 echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup ! 2399 echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup !
2400 [[ -f "${JAVA_PKG_BUILD_DEPEND_FILE}" ]] \
2401 && echo "BUILD_DEPEND=\"$(sort -u "${JAVA_PKG_BUILD_DEPEND_FILE}" | tr '\n' ':')\""
2332 ) > "${JAVA_PKG_ENV}" 2402 ) > "${JAVA_PKG_ENV}"
2333 2403
2334 # register target/source 2404 # register target/source
2335 local target="$(java-pkg_get-target)" 2405 local target="$(java-pkg_get-target)"
2336 local source="$(java-pkg_get-source)" 2406 local source="$(java-pkg_get-source)"
2369# ------------------------------------------------------------------------------ 2439# ------------------------------------------------------------------------------
2370# @internal-function java-pkg_record-jar_ 2440# @internal-function java-pkg_record-jar_
2371# 2441#
2372# Record an (optional) dependency to the package.env 2442# Record an (optional) dependency to the package.env
2373# @param --optional - record dependency as optional 2443# @param --optional - record dependency as optional
2444# @param --build - record dependency as build_only
2374# @param $1 - package to record 2445# @param $1 - package to record
2375# @param $2 - (optional) jar of package to record 2446# @param $2 - (optional) jar of package to record
2376# ------------------------------------------------------------------------------ 2447# ------------------------------------------------------------------------------
2377JAVA_PKG_DEPEND_FILE="${T}/java-pkg-depend" 2448JAVA_PKG_DEPEND_FILE="${T}/java-pkg-depend"
2378JAVA_PKG_OPTIONAL_DEPEND_FILE="${T}/java-pkg-optional-depend" 2449JAVA_PKG_OPTIONAL_DEPEND_FILE="${T}/java-pkg-optional-depend"
2450JAVA_PKG_BUILD_DEPEND_FILE="${T}/java-pkg-build-depend"
2379 2451
2380java-pkg_record-jar_() { 2452java-pkg_record-jar_() {
2381 debug-print-function ${FUNCNAME} $* 2453 debug-print-function ${FUNCNAME} $*
2382 2454
2383 local depend_file="${JAVA_PKG_DEPEND_FILE}" 2455 local depend_file="${JAVA_PKG_DEPEND_FILE}"
2384 if [[ "${1}" == "--optional" ]]; then 2456 case "${1}" in
2385 depend_file="${JAVA_PKG_OPTIONAL_DEPEND_FILE}" 2457 "--optional") depend_file="${JAVA_PKG_OPTIONAL_DEPEND_FILE}"; shift;;
2386 shift 2458 "--build-only") depend_file="${JAVA_PKG_BUILD_DEPEND_FILE}"; shift;;
2387 fi 2459 esac
2388 2460
2389 local pkg=${1} jar=${2} append 2461 local pkg=${1} jar=${2} append
2390 if [[ -z "${jar}" ]]; then 2462 if [[ -z "${jar}" ]]; then
2391 append="${pkg}" 2463 append="${pkg}"
2392 else 2464 else
2457# 2529#
2458# ------------------------------------------------------------------------------ 2530# ------------------------------------------------------------------------------
2459java-pkg_setup-vm() { 2531java-pkg_setup-vm() {
2460 debug-print-function ${FUNCNAME} $* 2532 debug-print-function ${FUNCNAME} $*
2461 2533
2462 export LANG="C" LC_ALL="C"
2463
2464 local vendor="$(java-pkg_get-vm-vendor)" 2534 local vendor="$(java-pkg_get-vm-vendor)"
2465 if [[ "${vendor}" == "sun" ]] && java-pkg_is-vm-version-ge "1.5" ; then 2535 if [[ "${vendor}" == "sun" ]] && java-pkg_is-vm-version-ge "1.5" ; then
2466 addpredict "/dev/random" 2536 addpredict "/dev/random"
2467 elif [[ "${vendor}" == "ibm" ]]; then 2537 elif [[ "${vendor}" == "ibm" ]]; then
2468 addpredict "/proc/self/maps" 2538 addpredict "/proc/self/maps"
2469 addpredict "/proc/cpuinfo" 2539 addpredict "/proc/cpuinfo"
2540 addpredict "/proc/self/coredump_filter"
2541 elif [[ "${vendor}" == "oracle" ]]; then
2542 addpredict "/dev/random"
2543 addpredict "/proc/self/coredump_filter"
2544 elif [[ "${vendor}" == icedtea* ]] && java-pkg_is-vm-version-ge "1.7" ; then
2545 addpredict "/dev/random"
2546 addpredict "/proc/self/coredump_filter"
2470 elif [[ "${vendor}" == "jrockit" ]]; then 2547 elif [[ "${vendor}" == "jrockit" ]]; then
2471 addpredict "/proc/cpuinfo" 2548 addpredict "/proc/cpuinfo"
2472 fi 2549 fi
2473} 2550}
2474 2551
2475# ------------------------------------------------------------------------------ 2552# ------------------------------------------------------------------------------
2476# @internal-function java-pkg_needs-vm 2553# @internal-function java-pkg_needs-vm
2477# 2554#
2478# Does the current package depend on virtual/jdk? 2555# Does the current package depend on virtual/jdk or does it set
2556# JAVA_PKG_WANT_BUILD_VM?
2479# 2557#
2480# @return 0 - Package depends on virtual/jdk 2558# @return 0 - Package depends on virtual/jdk
2481# @return 1 - Package does not depend on virtual/jdk 2559# @return 1 - Package does not depend on virtual/jdk
2482# ------------------------------------------------------------------------------ 2560# ------------------------------------------------------------------------------
2483java-pkg_needs-vm() { 2561java-pkg_needs-vm() {
2484 debug-print-function ${FUNCNAME} $* 2562 debug-print-function ${FUNCNAME} $*
2485 2563
2486 if [[ -n "$(echo ${DEPEND} | sed -e '\:virtual/jdk:!d')" ]]; then 2564 if [[ -n "$(echo ${JAVA_PKG_NV_DEPEND:-${DEPEND}} | sed -e '\:virtual/jdk:!d')" ]]; then
2487 return 0 2565 return 0
2488 fi 2566 fi
2567
2568 [[ -n "${JAVA_PKG_WANT_BUILD_VM}" ]] && return 0
2489 2569
2490 return 1 2570 return 1
2491} 2571}
2492 2572
2493# ------------------------------------------------------------------------------ 2573# ------------------------------------------------------------------------------
2519# ------------------------------------------------------------------------------ 2599# ------------------------------------------------------------------------------
2520java-pkg_get-vm-version() { 2600java-pkg_get-vm-version() {
2521 debug-print-function ${FUNCNAME} $* 2601 debug-print-function ${FUNCNAME} $*
2522 2602
2523 java-config -g PROVIDES_VERSION 2603 java-config -g PROVIDES_VERSION
2604}
2605
2606# ------------------------------------------------------------------------------
2607# @internal-function java-pkg_build-vm-from-handle
2608#
2609# Selects a build vm from a list of vm handles. First checks for the system-vm
2610# beeing usable, then steps through the listed handles till a suitable vm is
2611# found.
2612#
2613# @return - VM handle of an available JDK
2614# ------------------------------------------------------------------------------
2615java-pkg_build-vm-from-handle() {
2616 debug-print-function ${FUNCNAME} "$*"
2617
2618 local vm
2619 vm=$(java-pkg_get-current-vm)
2620 if [[ $? != 0 ]]; then
2621 eerror "${FUNCNAME}: Failed to get active vm"
2622 return 1
2623 fi
2624
2625 if has ${vm} ${JAVA_PKG_WANT_BUILD_VM}; then
2626 echo ${vm}
2627 return 0
2628 fi
2629
2630 for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
2631 if java-config-2 --select-vm=${vm} 2>/dev/null; then
2632 echo ${vm}
2633 return 0
2634 fi
2635 done
2636
2637 eerror "${FUNCNAME}: No vm found for handles: ${JAVA_PKG_WANT_BUILD_VM}"
2638 return 1
2524} 2639}
2525 2640
2526# ------------------------------------------------------------------------------ 2641# ------------------------------------------------------------------------------
2527# @internal-function java-pkg_switch-vm 2642# @internal-function java-pkg_switch-vm
2528# 2643#
2539 # If you're forcing the VM, I hope you know what your doing... 2654 # If you're forcing the VM, I hope you know what your doing...
2540 debug-print "JAVA_PKG_FORCE_VM used: ${JAVA_PKG_FORCE_VM}" 2655 debug-print "JAVA_PKG_FORCE_VM used: ${JAVA_PKG_FORCE_VM}"
2541 export GENTOO_VM="${JAVA_PKG_FORCE_VM}" 2656 export GENTOO_VM="${JAVA_PKG_FORCE_VM}"
2542 # if we're allowed to switch the vm... 2657 # if we're allowed to switch the vm...
2543 elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then 2658 elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then
2544 debug-print "depend-java-query: NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}} VNEED: ${JAVA_PKG_VNEED}" 2659 # if there is an explicit list of handles to choose from
2545 if [[ -n ${JAVA_PKG_VNEED} ]]; then 2660 if [[ -n "${JAVA_PKG_WANT_BUILD_VM}" ]]; then
2546 GENTOO_VM="$(depend-java-query --need-virtual "${JAVA_PKG_VNEED}" --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")" 2661 debug-print "JAVA_PKG_WANT_BUILD_VM used: ${JAVA_PKG_WANT_BUILD_VM}"
2662 GENTOO_VM=$(java-pkg_build-vm-from-handle)
2663 if [[ $? != 0 ]]; then
2664 eerror "${FUNCNAME}: No VM found for handles: ${JAVA_PKG_WANT_BUILD_VM}"
2665 die "${FUNCNAME}: Failed to determine VM for building"
2666 fi
2667 # JAVA_PKG_WANT_SOURCE and JAVA_PKG_WANT_TARGET are required as
2668 # they can't be deduced from handles.
2669 if [[ -z "${JAVA_PKG_WANT_SOURCE}" ]]; then
2670 eerror "JAVA_PKG_WANT_BUILD_VM specified but not JAVA_PKG_WANT_SOURCE"
2671 die "Specify JAVA_PKG_WANT_SOURCE"
2672 fi
2673 if [[ -z "${JAVA_PKG_WANT_TARGET}" ]]; then
2674 eerror "JAVA_PKG_WANT_BUILD_VM specified but not JAVA_PKG_WANT_TARGET"
2675 die "Specify JAVA_PKG_WANT_TARGET"
2676 fi
2677 # otherwise determine a vm from dep string
2547 else 2678 else
2679 debug-print "depend-java-query: NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}}"
2548 GENTOO_VM="$(depend-java-query --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")" 2680 GENTOO_VM="$(depend-java-query --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")"
2681 if [[ -z "${GENTOO_VM}" || "${GENTOO_VM}" == "None" ]]; then
2682 eerror "Unable to determine VM for building from dependencies:"
2683 echo "NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}}"
2684 die "Failed to determine VM for building."
2685 fi
2549 fi 2686 fi
2550 if [[ -z "${GENTOO_VM}" || "${GENTOO_VM}" == "None" ]]; then
2551 eerror "Unable to determine VM for building from dependencies:"
2552 echo "NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}}"
2553 echo "VNEED: ${JAVA_PKG_VNEED}"
2554 die "Failed to determine VM for building."
2555 else
2556 export GENTOO_VM 2687 export GENTOO_VM
2557 fi
2558 # otherwise just make sure the current VM is sufficient 2688 # otherwise just make sure the current VM is sufficient
2559 else 2689 else
2560 java-pkg_ensure-vm-version-sufficient 2690 java-pkg_ensure-vm-version-sufficient
2561 fi 2691 fi
2562 debug-print "Using: $(java-config -f)" 2692 debug-print "Using: $(java-config -f)"
2597# 2727#
2598# Enhanced die for Java packages, which displays some information that may be 2728# Enhanced die for Java packages, which displays some information that may be
2599# useful for debugging bugs on bugzilla. 2729# useful for debugging bugs on bugzilla.
2600# ------------------------------------------------------------------------------ 2730# ------------------------------------------------------------------------------
2601#register_die_hook java-pkg_die 2731#register_die_hook java-pkg_die
2602if ! hasq java-pkg_die ${EBUILD_DEATH_HOOKS}; then 2732if ! has java-pkg_die ${EBUILD_DEATH_HOOKS}; then
2603 EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} java-pkg_die" 2733 EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} java-pkg_die"
2604fi 2734fi
2605 2735
2606java-pkg_die() { 2736java-pkg_die() {
2607 echo "!!! When you file a bug report, please include the following information:" >&2 2737 echo "!!! When you file a bug report, please include the following information:" >&2
2681 2811
2682 local limit_to="${1}" 2812 local limit_to="${1}"
2683 local target_pkg="${2}" 2813 local target_pkg="${2}"
2684 local dev_error="" 2814 local dev_error=""
2685 2815
2816 # remove the version specification, which may include globbing (* and [123])
2686 local stripped_pkg=$(echo "${target_pkg}" | sed \ 2817 local stripped_pkg=$(echo "${target_pkg}" | sed \
2687 's/-[0-9]*\(\.[0-9]\)*$//') 2818 's/-\([0-9*]*\(\[[0-9]*\]\)*\)*\(\.\([0-9*]*\(\[[0-9]*\]\)*\)*\)*$//')
2688 2819
2689 debug-print "Matching against: ${stripped_pkg}" 2820 debug-print "Matching against: ${stripped_pkg}"
2690 2821
2691 if [[ ${limit_to} != runtime && ! ( "${DEPEND}" =~ "$stripped_pkg" ) ]]; then 2822 if [[ ${limit_to} != runtime && ! ( "${DEPEND}" =~ "$stripped_pkg" ) ]]; then
2692 dev_error="The ebuild is attempting to use ${target_pkg} that is not" 2823 dev_error="The ebuild is attempting to use ${target_pkg} that is not"
2742 java-pkg_announce-qa-violation "installing versioned jar '${jar}'" 2873 java-pkg_announce-qa-violation "installing versioned jar '${jar}'"
2743 fi 2874 fi
2744} 2875}
2745 2876
2746java-pkg_check-jikes() { 2877java-pkg_check-jikes() {
2747 if hasq jikes ${IUSE}; then 2878 if has jikes ${IUSE}; then
2748 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE" 2879 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE"
2749 fi 2880 fi
2750} 2881}
2751 2882
2752java-pkg_announce-qa-violation() { 2883java-pkg_announce-qa-violation() {

Legend:
Removed from v.1.127  
changed lines
  Added in v.1.150

  ViewVC Help
Powered by ViewVC 1.1.20