/[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.157 Revision 1.168
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-2011, Gentoo Foundation 5# Copyright (c) 2004-2015, 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.157 2015/04/04 21:04:49 chewi Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.168 2015/07/31 07:56:17 monsieurp Exp $
10 10
11# @ECLASS: java-utils-2.eclass 11# @ECLASS: java-utils-2.eclass
12# @MAINTAINER: 12# @MAINTAINER:
13# java@gentoo.org 13# java@gentoo.org
14# @AUTHOR: 14# @AUTHOR:
41# @INTERNAL 41# @INTERNAL
42# @DESCRIPTION: 42# @DESCRIPTION:
43# This is a convience variable to be used from the other java eclasses. This is 43# This is a convience variable to be used from the other java eclasses. This is
44# the version of java-config we want to use. Usually the latest stable version 44# the version of java-config we want to use. Usually the latest stable version
45# so that ebuilds can use new features without depending on specific versions. 45# so that ebuilds can use new features without depending on specific versions.
46JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.1.9-r1 ${JAVA_PKG_PORTAGE_DEP}" 46JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.2.0 ${JAVA_PKG_PORTAGE_DEP}"
47has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )" 47has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )"
48 48
49# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH 49# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH
50# @DEFAULT_UNSET 50# @DEFAULT_UNSET
51# @DESCRIPTION: 51# @DESCRIPTION:
122# Should generallyonly be used for testing and debugging. 122# Should generallyonly be used for testing and debugging.
123# 123#
124# emerge bar to be compatible with 1.3 124# emerge bar to be compatible with 1.3
125# @CODE 125# @CODE
126# JAVA_PKG_WANT_TARGET=1.3 emerge bar 126# JAVA_PKG_WANT_TARGET=1.3 emerge bar
127# @CODE
128
129# @ECLASS-VARIABLE: JAVA_RM_FILES
130# @DEFAULT_UNSET
131# @DESCRIPTION:
132# An array containing a list of files to remove. If defined, this array will be
133# automatically handed over to java-pkg_rm_files for processing during the
134# src_prepare phase.
135#
136# @CODE
137# JAVA_RM_FILES=(
138# path/to/File1.java
139# DELETEME.txt
140# )
127# @CODE 141# @CODE
128 142
129# @VARIABLE: JAVA_PKG_COMPILER_DIR 143# @VARIABLE: JAVA_PKG_COMPILER_DIR
130# @INTERNAL 144# @INTERNAL
131# @DESCRIPTION: 145# @DESCRIPTION:
213 ) || die "Installing examples failed" 227 ) || die "Installing examples failed"
214 fi 228 fi
215 229
216 # Let's make a symlink to the directory we have everything else under 230 # Let's make a symlink to the directory we have everything else under
217 dosym "${dest}" "${JAVA_PKG_SHAREPATH}/examples" || die 231 dosym "${dest}" "${JAVA_PKG_SHAREPATH}/examples" || die
232}
233
234# @FUNCTION: java-pkg_addres
235# @USAGE: <jar> <dir> [<find arguments> ...]
236# @DESCRIPTION:
237# Adds resource files to an existing jar.
238# It is important that the directory given is actually the root of the
239# corresponding resource tree. The target directory as well as
240# sources.lst, MANIFEST.MF, *.class, *.jar, and *.java files are
241# automatically excluded. Symlinks are always followed. Additional
242# arguments are passed through to find.
243#
244# @CODE
245# java-pkg_addres ${PN}.jar resources ! -name "*.html"
246# @CODE
247#
248# @param $1 - jar file
249# @param $2 - resource tree directory
250# @param $* - arguments to pass to find
251java-pkg_addres() {
252 debug-print-function ${FUNCNAME} $*
253
254 [[ ${#} -lt 2 ]] && die "at least two arguments needed"
255
256 local jar=$(realpath "$1" || die "realpath $1 failed")
257 local dir="$2"
258 shift 2
259
260 pushd "${dir}" > /dev/null || die "pushd ${dir} failed"
261 find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -0 jar uf "${jar}" || die "jar failed"
262 popd > /dev/null || die "popd failed"
263}
264
265# @FUNCTION: java-pkg_rm_files
266# @USAGE: java-pkg_rm_files File1.java File2.java ...
267# @DESCRIPTION:
268# Remove unneeded files in ${S}.
269#
270# Every now and then, you'll run into situations whereby a file needs removing,
271# be it a unit test or a regular java class.
272#
273# You can use this function by either:
274# - calling it yourself in java_prepare() and feeding java-pkg_rm_files with
275# the list of files you wish to remove.
276# - defining an array in the ebuild named JAVA_RM_FILES with the list of files
277# you wish to remove.
278#
279# Both way work and it is left to the developer's preferences. If the
280# JAVA_RM_FILES array is defined, it will be automatically handed over to
281# java-pkg_rm_files during the src_prepare phase.
282#
283# See java-utils-2_src_prepare.
284#
285# @CODE
286# java-pkg_rm_files File1.java File2.java
287# @CODE
288#
289# @param $* - list of files to remove.
290java-pkg_rm_files() {
291 debug-print-function ${FUNCNAME} $*
292 local IFS="\n"
293 for filename in "$@"; do
294 [[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
295 einfo "Removing unneeded file ${filename}"
296 rm -f "${S}/${filename}" || die "cannot remove ${filename}"
297 eend $?
298 done
218} 299}
219 300
220# @FUNCTION: java-pkg_dojar 301# @FUNCTION: java-pkg_dojar
221# @USAGE: <jar1> [<jar2> ...] 302# @USAGE: <jar1> [<jar2> ...]
222# @DESCRIPTION: 303# @DESCRIPTION:
278 die "${jar} does not exist" 359 die "${jar} does not exist"
279 fi 360 fi
280 done 361 done
281 362
282 java-pkg_do_write_ 363 java-pkg_do_write_
283}
284
285# @FUNCTION: depend-java-query
286# @INTERNAL
287# @DESCRIPTION:
288# Wrapper for the depend-java-query binary to enable passing USE in env.
289# Using env variables keeps this eclass working with java-config versions that
290# do not handle use flags.
291depend-java-query() {
292 # Used to have a which call here but it caused endless loops for some people
293 # that had some weird bashrc voodoo for which.
294 USE="${USE}" /usr/bin/depend-java-query "${@}"
295} 364}
296 365
297# @FUNCTION: java-pkg_regjar 366# @FUNCTION: java-pkg_regjar
298# @USAGE: </path/to/installed/jar> 367# @USAGE: </path/to/installed/jar>
299# @DESCRIPTION: 368# @DESCRIPTION:
410 # if the lib exists... 479 # if the lib exists...
411 if [[ -e "${lib}" ]] ; then 480 if [[ -e "${lib}" ]] ; then
412 # install if it isn't a symlink 481 # install if it isn't a symlink
413 if [[ ! -L "${lib}" ]] ; then 482 if [[ ! -L "${lib}" ]] ; then
414 INSDESTTREE="${JAVA_PKG_LIBDEST}" \ 483 INSDESTTREE="${JAVA_PKG_LIBDEST}" \
415 INSOPTIONS="${LIBOPTIONS}" \ 484 INSOPTIONS="-m0755" \
416 doins "${lib}" || die "failed to install ${lib}" 485 doins "${lib}" || die "failed to install ${lib}"
417 java-pkg_append_ JAVA_PKG_LIBRARY "${JAVA_PKG_LIBDEST}" 486 java-pkg_append_ JAVA_PKG_LIBRARY "${JAVA_PKG_LIBDEST}"
418 debug-print "Installing ${lib} to ${JAVA_PKG_LIBDEST}" 487 debug-print "Installing ${lib} to ${JAVA_PKG_LIBDEST}"
419 # otherwise make a symlink to the symlink's origin 488 # otherwise make a symlink to the symlink's origin
420 else 489 else
918 java-pkg_record-jar_ "${target_pkg}" "${jar}" 987 java-pkg_record-jar_ "${target_pkg}" "${jar}"
919 else 988 else
920 java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}" 989 java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
921 fi 990 fi
922 fi 991 fi
923 # otherwise, if the current jar is the target jar, link it 992 # otherwise, if the current jar is the target jar, link it
924 elif [[ "${jar_name}" == "${target_jar}" ]] ; then 993 elif [[ "${jar_name}" == "${target_jar}" ]] ; then
925 [[ -f "${destjar}" ]] && rm "${destjar}" 994 [[ -f "${destjar}" ]] && rm "${destjar}"
926 ln -snf "${jar}" "${destjar}" \ 995 ln -snf "${jar}" "${destjar}" \
927 || die "Failed to make symlink from ${jar} to ${destjar}" 996 || die "Failed to make symlink from ${jar} to ${destjar}"
928 if [[ -z "${record_jar}" ]]; then 997 if [[ -z "${record_jar}" ]]; then
929 if [[ -z "${build_only}" ]]; then 998 if [[ -z "${build_only}" ]]; then
930 java-pkg_record-jar_ "${target_pkg}" "${jar}" 999 java-pkg_record-jar_ "${target_pkg}" "${jar}"
931 else 1000 else
932 java-pkg_record-jar_ --build-only "${target_jar}" "${jar}" 1001 java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
933 fi 1002 fi
934 fi 1003 fi
935 popd > /dev/null 1004 popd > /dev/null
936 return 0 1005 return 0
937 fi 1006 fi
1571 if [[ -z "${want_source}" || -z "${want_target}" ]]; then 1640 if [[ -z "${want_source}" || -z "${want_target}" ]]; then
1572 debug-print "could not find valid -source/-target values for javac" 1641 debug-print "could not find valid -source/-target values for javac"
1573 echo "Could not find valid -source/-target values for javac" 1642 echo "Could not find valid -source/-target values for javac"
1574 return 1 1643 return 1
1575 else 1644 else
1576 if java-pkg_is-vm-version-ge "1.4"; then
1577 echo "${source_str} ${target_str}" 1645 echo "${source_str} ${target_str}"
1578 else
1579 echo "${target_str}"
1580 fi
1581 fi 1646 fi
1582} 1647}
1583 1648
1584# @FUNCTION: java-pkg_get-jni-cflags 1649# @FUNCTION: java-pkg_get-jni-cflags
1585# @DESCRIPTION: 1650# @DESCRIPTION:
1762# @FUNCTION: java-utils-2_src_prepare 1827# @FUNCTION: java-utils-2_src_prepare
1763# @DESCRIPTION: 1828# @DESCRIPTION:
1764# src_prepare Searches for bundled jars 1829# src_prepare Searches for bundled jars
1765# Don't call directly, but via java-pkg-2_src_prepare! 1830# Don't call directly, but via java-pkg-2_src_prepare!
1766java-utils-2_src_prepare() { 1831java-utils-2_src_prepare() {
1767 [[ ${EBUILD_PHASE} == prepare ]] &&
1768 java-pkg_func-exists java_prepare && java_prepare 1832 java-pkg_func-exists java_prepare && java_prepare
1769 1833
1770 # Remember that eant will call this unless called via Portage 1834 # Check for files in JAVA_RM_FILES array.
1771 if [[ ! -e "${T}/java-utils-2_src_prepare-run" ]] && is-java-strict; then 1835 if [[ ${JAVA_RM_FILES[@]} ]]; then
1836 debug-print "$FUNCNAME: removing unneeded files"
1837 java-pkg_rm_files "${JAVA_RM_FILES[@]}"
1838 fi
1839
1840 if is-java-strict; then
1772 echo "Searching for bundled jars:" 1841 echo "Searching for bundled jars:"
1773 java-pkg_find-normal-jars || echo "None found." 1842 java-pkg_find-normal-jars || echo "None found."
1774 echo "Searching for bundled classes (no output if none found):" 1843 echo "Searching for bundled classes (no output if none found):"
1775 find "${WORKDIR}" -name "*.class" 1844 find "${WORKDIR}" -name "*.class"
1776 echo "Search done." 1845 echo "Search done."
1777 fi 1846 fi
1778 touch "${T}/java-utils-2_src_prepare-run"
1779} 1847}
1780 1848
1781# @FUNCTION: java-utils-2_pkg_preinst 1849# @FUNCTION: java-utils-2_pkg_preinst
1782# @DESCRIPTION: 1850# @DESCRIPTION:
1783# pkg_preinst Searches for missing and unneeded dependencies 1851# pkg_preinst Searches for missing and unneeded dependencies
1784# Don't call directly, but via java-pkg-2_pkg_preinst! 1852# Don't call directly, but via java-pkg-2_pkg_preinst!
1785java-utils-2_pkg_preinst() { 1853java-utils-2_pkg_preinst() {
1786 if is-java-strict; then 1854 if is-java-strict; then
1855 if [[ ! -e "${JAVA_PKG_ENV}" ]] || has ant-tasks ${INHERITED}; then
1856 return
1857 fi
1858
1787 if has_version dev-java/java-dep-check; then 1859 if has_version dev-java/java-dep-check; then
1788 [[ -e "${JAVA_PKG_ENV}" ]] || return
1789 local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}") 1860 local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}")
1790 if [[ ${output} && has_version <=dev-java/java-dep-check-0.2 ]]; then 1861 [[ ${output} ]] && ewarn "${output}"
1791 ewarn "Possibly unneeded dependencies found in package.env:"
1792 for dep in ${output}; do
1793 ewarn "\t${dep}"
1794 done
1795 fi
1796 if [[ ${output} && has_version >dev-java/java-dep-check-0.2 ]]; then
1797 ewarn "${output}"
1798 fi
1799 else 1862 else
1800 eerror "Install dev-java/java-dep-check for dependency checking" 1863 eerror "Install dev-java/java-dep-check for dependency checking"
1801 fi 1864 fi
1802 fi 1865 fi
1803} 1866}
1821eant() { 1884eant() {
1822 debug-print-function ${FUNCNAME} $* 1885 debug-print-function ${FUNCNAME} $*
1823 1886
1824 if [[ ${EBUILD_PHASE} = compile ]]; then 1887 if [[ ${EBUILD_PHASE} = compile ]]; then
1825 java-ant-2_src_configure 1888 java-ant-2_src_configure
1826 java-utils-2_src_prepare
1827 fi 1889 fi
1828 1890
1829 if ! has java-ant-2 ${INHERITED}; then 1891 if ! has java-ant-2 ${INHERITED}; then
1830 local msg="You should inherit java-ant-2 when using eant" 1892 local msg="You should inherit java-ant-2 when using eant"
1831 java-pkg_announce-qa-violation "${msg}" 1893 java-pkg_announce-qa-violation "${msg}"
1907 local gcp="${EANT_GENTOO_CLASSPATH}" 1969 local gcp="${EANT_GENTOO_CLASSPATH}"
1908 local getjarsarg="" 1970 local getjarsarg=""
1909 1971
1910 if [[ ${EBUILD_PHASE} = "test" ]]; then 1972 if [[ ${EBUILD_PHASE} = "test" ]]; then
1911 antflags="${antflags} -DJunit.present=true" 1973 antflags="${antflags} -DJunit.present=true"
1912 [[ ${ANT_TASKS} = *ant-junit* ]] && gcp="${gcp} junit"
1913 getjarsarg="--with-dependencies" 1974 getjarsarg="--with-dependencies"
1975
1976 local re="\bant-junit4?([-:]\S+)?\b"
1977 [[ ${ANT_TASKS} =~ ${re} ]] && gcp+=" ${BASH_REMATCH[0]}"
1914 else 1978 else
1915 antflags="${antflags} -Dmaven.test.skip=true" 1979 antflags="${antflags} -Dmaven.test.skip=true"
1916 fi 1980 fi
1917 1981
1918 local cp 1982 local cp
1919 1983
1920 for atom in ${gcp}; do 1984 for atom in ${gcp}; do
1921 cp="${cp}:$(java-pkg_getjars ${getjarsarg} ${atom})" 1985 cp+=":$(java-pkg_getjars ${getjarsarg} ${atom})"
1922 done 1986 done
1923 1987
1924 [[ -n "${EANT_NEEDS_TOOLS}" ]] && cp="${cp}:$(java-config --tools)" 1988 [[ ${EANT_NEEDS_TOOLS} ]] && cp+=":$(java-config --tools)"
1989 [[ ${EANT_GENTOO_CLASSPATH_EXTRA} ]] && cp+=":${EANT_GENTOO_CLASSPATH_EXTRA}"
1925 1990
1926 if [[ ${cp} ]]; then 1991 if [[ ${cp#:} ]]; then
1927 # It seems ant does not like single quotes around ${cp} 1992 # It seems ant does not like single quotes around ${cp}
1928 cp=${cp#:}
1929 [[ ${EANT_GENTOO_CLASSPATH_EXTRA} ]] && \
1930 cp="${cp}:${EANT_GENTOO_CLASSPATH_EXTRA}"
1931 antflags="${antflags} -Dgentoo.classpath=\"${cp}\"" 1993 antflags="${antflags} -Dgentoo.classpath=\"${cp#:}\""
1932 fi 1994 fi
1933 1995
1934 [[ -n ${JAVA_PKG_DEBUG} ]] && echo ant ${antflags} "${@}" 1996 [[ -n ${JAVA_PKG_DEBUG} ]] && echo ant ${antflags} "${@}"
1935 debug-print "Calling ant (GENTOO_VM: ${GENTOO_VM}): ${antflags} ${@}" 1997 debug-print "Calling ant (GENTOO_VM: ${GENTOO_VM}): ${antflags} ${@}"
1936 ant ${antflags} "${@}" || die "eant failed" 1998 ant ${antflags} "${@}" || die "eant failed"
2174 if ! has ${desired_target} ${supported_target}; then 2236 if ! has ${desired_target} ${supported_target}; then
2175 ewarn "${compiler} does not support -target ${desired_target}, skipping" 2237 ewarn "${compiler} does not support -target ${desired_target}, skipping"
2176 continue 2238 continue
2177 fi 2239 fi
2178 2240
2179 # -source was introduced in 1.3, so only check 1.3 and on
2180 if version_is_at_least "${desired_soure}" "1.3"; then
2181 # Verify that the compiler supports source 2241 # Verify that the compiler supports source
2182 local supported_source=$(source ${compiler_env} 1>/dev/null 2>&1; echo ${SUPPORTED_SOURCE}) 2242 local supported_source=$(source ${compiler_env} 1>/dev/null 2>&1; echo ${SUPPORTED_SOURCE})
2183 if ! has ${desired_source} ${supported_source}; then 2243 if ! has ${desired_source} ${supported_source}; then
2184 ewarn "${compiler} does not support -source ${desired_source}, skipping" 2244 ewarn "${compiler} does not support -source ${desired_source}, skipping"
2185 continue 2245 continue
2186 fi
2187 fi 2246 fi
2188 2247
2189 # if you get here, then the compiler should be good to go 2248 # if you get here, then the compiler should be good to go
2190 export GENTOO_COMPILER="${compiler}" 2249 export GENTOO_COMPILER="${compiler}"
2191 break 2250 break
2671 2730
2672# @FUNCTION: java-pkg_ensure-dep 2731# @FUNCTION: java-pkg_ensure-dep
2673# @INTERNAL 2732# @INTERNAL
2674# @DESCRIPTION: 2733# @DESCRIPTION:
2675# Check that a package being used in jarfrom, getjars and getjar is contained 2734# Check that a package being used in jarfrom, getjars and getjar is contained
2676# within DEPEND or RDEPEND. 2735# within DEPEND or RDEPEND with the correct SLOT. See this mail for details:
2736# https://archives.gentoo.org/gentoo-dev/message/dcb644f89520f4bbb61cc7bbe45fdf6e
2677# @CODE 2737# @CODE
2678# Parameters: 2738# Parameters:
2679# $1 - empty - check both vars; "runtime" or "build" - check only 2739# $1 - empty - check both vars; "runtime" or "build" - check only
2680# RDEPEND, resp. DEPEND 2740# RDEPEND, resp. DEPEND
2681# $2 - Package name and slot. 2741# $2 - Package name and slot.
2685 2745
2686 local limit_to="${1}" 2746 local limit_to="${1}"
2687 local target_pkg="${2}" 2747 local target_pkg="${2}"
2688 local dev_error="" 2748 local dev_error=""
2689 2749
2690 # remove the version specification, which may include globbing (* and [123]) 2750 # Transform into a regular expression to look for a matching package
2691 local stripped_pkg=$(echo "${target_pkg}" | sed \ 2751 # and SLOT. SLOTs don't have to be numeric so foo-bar could either
2692 's/-\([0-9*]*\(\[[0-9]*\]\)*\)*\(\.\([0-9*]*\(\[[0-9]*\]\)*\)*\)*$//') 2752 # mean foo-bar:0 or foo:bar. So you want to get your head around the
2753 # line below?
2754 #
2755 # * The target package first has any dots escaped, e.g. foo-1.2
2756 # becomes foo-1\.2.
2757 #
2758 # * sed then looks at the component following the last - or :
2759 # character, or the whole string if there is no - or :
2760 # character. It uses this to build a new regexp with two
2761 # significant branches.
2762 #
2763 # * The first checks for the whole target package string, optionally
2764 # followed by a version number, and then :0.
2765 #
2766 # * The second checks for the first part of the target package
2767 # string, optionally followed by a version number, followed by the
2768 # aforementioned component, treating that as a SLOT.
2769 #
2770 local stripped_pkg=/$(sed -r 's/[-:]?([^-:]+)$/(\0(-[^:]+)?:0|(-[^:]+)?:\1)/' <<< "${target_pkg//./\\.}")\\b
2693 2771
2694 debug-print "Matching against: ${stripped_pkg}" 2772 debug-print "Matching against: ${stripped_pkg}"
2695 2773
2774 # Uncomment the lines below once we've dealt with more of these
2775 # otherwise we'll be tempted to turn JAVA_PKG_STRICT off while
2776 # getting hit with a wave of bug reports. :(
2777
2696 if [[ ${limit_to} != runtime && ! ( "${DEPEND}" =~ "$stripped_pkg" ) ]]; then 2778 if [[ ${limit_to} != runtime && ! ( "${DEPEND}" =~ $stripped_pkg ) ]]; then
2697 dev_error="The ebuild is attempting to use ${target_pkg} that is not" 2779 dev_error="The ebuild is attempting to use ${target_pkg}, which is not "
2698 dev_error="${dev_error} declared in DEPEND." 2780 dev_error+="declared with a SLOT in DEPEND."
2699 if is-java-strict; then 2781# if is-java-strict; then
2700 eerror "${dev_error}"
2701 die "${dev_error}" 2782# die "${dev_error}"
2702 elif [[ ${BASH_SUBSHELL} = 0 ]]; then 2783# else
2703 eerror "${dev_error}" 2784 eqawarn "java-pkg_ensure-dep: ${dev_error}"
2704 elog "Because you have this package installed the package will" 2785# eerror "Because you have ${target_pkg} installed,"
2705 elog "build without problems, but please report this to" 2786# eerror "the package will build without problems, but please"
2706 elog "http://bugs.gentoo.org" 2787# eerror "report this to http://bugs.gentoo.org."
2707 fi 2788# fi
2708 fi 2789 elif [[ ${limit_to} != build && ! ( "${RDEPEND}${PDEPEND}" =~ ${stripped_pkg} ) ]]; then
2709
2710 if [[ ${limit_to} != build ]]; then
2711 if [[ ! ( ${RDEPEND} =~ "${stripped_pkg}" ) ]]; then
2712 if [[ ! ( ${PDEPEND} =~ "${stripped_pkg}" ) ]]; then
2713 dev_error="The ebuild is attempting to use ${target_pkg}," 2790 dev_error="The ebuild is attempting to use ${target_pkg}, which is not "
2714 dev_error="${dev_error} without specifying --build-only, that is not declared in RDEPEND" 2791 dev_error+="declared with a SLOT in [RP]DEPEND and --build-only wasn't given."
2715 dev_error="${dev_error} or PDEPEND."
2716 if is-java-strict; then 2792# if is-java-strict; then
2717 eerror "${dev_error}"
2718 die "${dev_error}" 2793# die "${dev_error}"
2719 elif [[ ${BASH_SUBSHELL} = 0 ]]; then 2794# else
2720 eerror "${dev_error}" 2795 eqawarn "java-pkg_ensure-dep: ${dev_error}"
2721 elog "The package will build without problems, but may fail to run" 2796# eerror "The package will build without problems, but may fail to run"
2722 elog "if you don't have ${target_pkg} installed, so please report" 2797# eerror "if you don't have ${target_pkg} installed,"
2723 elog "this to http://bugs.gentoo.org" 2798# eerror "so please report this to http://bugs.gentoo.org."
2724 fi
2725 fi
2726 fi 2799# fi
2727 fi 2800 fi
2728} 2801}
2729 2802
2730java-pkg_check-phase() { 2803java-pkg_check-phase() {
2731 local phase=${1} 2804 local phase=${1}

Legend:
Removed from v.1.157  
changed lines
  Added in v.1.168

  ViewVC Help
Powered by ViewVC 1.1.20