/[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.89 Revision 1.101
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.89 2007/06/07 12:17:54 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.101 2008/01/12 15:03:13 caster 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
57#WANT_ANT_TASKS 57#WANT_ANT_TASKS
58 58
59# ----------------------------------------------------------------------------- 59# -----------------------------------------------------------------------------
60# @variable-internal JAVA_PKG_PORTAGE_DEP 60# @variable-internal JAVA_PKG_PORTAGE_DEP
61# 61#
62# The version of portage we need to function properly. At this moment it's 62# The version of portage we need to function properly. Previously it was
63# portage with phase hooks support. 63# portage with phase hooks support but now we use a version with proper env
64# saving.
64# ----------------------------------------------------------------------------- 65# -----------------------------------------------------------------------------
65JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1_pre1" 66JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1.2.7"
66 67
67# ----------------------------------------------------------------------------- 68# -----------------------------------------------------------------------------
68# @variable-internal JAVA_PKG_E_DEPEND 69# @variable-internal JAVA_PKG_E_DEPEND
69# 70#
70# 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
71# the version of java-config we want to use. We also need a recent version 72# the version of java-config we want to use. Usually the latest stable version
72# portage, that includes phase hooks. 73# so that ebuilds can use new features without depending on specific versions.
73# ----------------------------------------------------------------------------- 74# -----------------------------------------------------------------------------
74JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.0.32 ${JAVA_PKG_PORTAGE_DEP}" 75JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.0.33-r1 ${JAVA_PKG_PORTAGE_DEP}"
76hasq source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )"
75 77
76# ----------------------------------------------------------------------------- 78# -----------------------------------------------------------------------------
77# @variable-external JAVA_PKG_ALLOW_VM_CHANGE 79# @variable-external JAVA_PKG_ALLOW_VM_CHANGE
78# @variable-default yes 80# @variable-default yes
79# 81#
194# 196#
195# @example 197# @example
196# java-pkg_doexamples demo 198# java-pkg_doexamples demo
197# java-pkg_doexamples demo/* examples/* 199# java-pkg_doexamples demo/* examples/*
198# 200#
201# @param --subdir - If the examples need a certain directory structure
199# @param $* - list of files to install 202# @param $* - list of files to install
200# ------------------------------------------------------------------------------ 203# ------------------------------------------------------------------------------
201java-pkg_doexamples() { 204java-pkg_doexamples() {
202 debug-print-function ${FUNCNAME} $* 205 debug-print-function ${FUNCNAME} $*
203 206
204 [[ ${#} -lt 1 ]] && die "At least one argument needed" 207 [[ ${#} -lt 1 ]] && die "At least one argument needed"
205 208
206 java-pkg_check-phase install 209 java-pkg_check-phase install
207 210
208 local dest=/usr/share/doc/${PF}/examples 211 local dest=/usr/share/doc/${PF}/examples
212 if [[ ${1} == --subdir ]]; then
213 local dest=${dest}/${2}
214 dodir ${dest}
215 shift 2
216 fi
217
209 if [[ ${#} = 1 && -d ${1} ]]; then 218 if [[ ${#} = 1 && -d ${1} ]]; then
210 ( # dont want to pollute calling env 219 ( # dont want to pollute calling env
211 insinto "${dest}" 220 insinto "${dest}"
212 doins -r ${1}/* 221 doins -r ${1}/*
213 ) || die "Installing examples failed" 222 ) || die "Installing examples failed"
548# ------------------------------------------------------------------------------ 557# ------------------------------------------------------------------------------
549# @ebuild-function java-pkg_dojavadoc 558# @ebuild-function java-pkg_dojavadoc
550# 559#
551# Installs javadoc documentation. This should be controlled by the doc use flag. 560# Installs javadoc documentation. This should be controlled by the doc use flag.
552# 561#
562# @param $1: optional --symlink creates to symlink like this for html
563# documentation bundles.
553# @param $1: - The javadoc root directory. 564# @param $2: - The javadoc root directory.
554# 565#
555# @example: 566# @example:
556# java-pkg_dojavadoc docs/api 567# java-pkg_dojavadoc docs/api
568# java-pkg_dojavadoc --symlink apidocs docs/api
557# 569#
558# ------------------------------------------------------------------------------ 570# ------------------------------------------------------------------------------
559java-pkg_dojavadoc() { 571java-pkg_dojavadoc() {
560 debug-print-function ${FUNCNAME} $* 572 debug-print-function ${FUNCNAME} $*
573
574 # For html documentation bundles that link to Javadoc
575 local symlink
576 if [[ ${1} = --symlink ]]; then
577 symlink=${2}
578 shift 2
579 fi
580
561 local dir="$1" 581 local dir="$1"
582 local dest=/usr/share/doc/${PF}/html
562 583
563 # QA checks 584 # QA checks
564 585
565 java-pkg_check-phase install 586 java-pkg_check-phase install
566 587
570 local msg="No index.html in javadoc directory" 591 local msg="No index.html in javadoc directory"
571 ewarn "${msg}" 592 ewarn "${msg}"
572 is-java-strict && die "${msg}" 593 is-java-strict && die "${msg}"
573 fi 594 fi
574 595
596 if [[ -e ${D}/${dest}/api ]]; then
597 eerror "${dest} already exists. Will not overwrite."
598 die "${dest}"
599 fi
600
575 # Renaming to match our directory layout 601 # Renaming to match our directory layout
576 602
577 local dir_to_install="${dir}" 603 local dir_to_install="${dir}"
578 if [[ "$(basename "${dir}")" != "api" ]]; then 604 if [[ "$(basename "${dir}")" != "api" ]]; then
579 dir_to_install="${T}/api" 605 dir_to_install="${T}/api"
581 cp -r "${dir}" "${dir_to_install}" || die "cp failed" 607 cp -r "${dir}" "${dir_to_install}" || die "cp failed"
582 fi 608 fi
583 609
584 # Actual installation 610 # Actual installation
585 611
586 java-pkg_dohtml -r ${dir_to_install} 612 java-pkg_dohtml -r "${dir_to_install}"
613
614 # Let's make a symlink to the directory we have everything else under
615 dosym ${dest}/api "${JAVA_PKG_SHAREPATH}/api" || die
616
617 if [[ ${symlink} ]]; then
618 dosym ${dest}/{api,${symlink}} || die
619 fi
587} 620}
588 621
589# ------------------------------------------------------------------------------ 622# ------------------------------------------------------------------------------
590# @ebuild-function java-pkg_dosrc 623# @ebuild-function java-pkg_dosrc
591# 624#
830# @param $opt 863# @param $opt
831# --build-only - makes the jar(s) not added into package.env DEPEND line. 864# --build-only - makes the jar(s) not added into package.env DEPEND line.
832# (assumed automatically when called inside src_test) 865# (assumed automatically when called inside src_test)
833# --with-dependencies - get jars also from requested package's dependencies 866# --with-dependencies - get jars also from requested package's dependencies
834# transitively. 867# transitively.
868# --virtual - Packages passed to this function are to be handled as virtuals
869# and will not have individual jar dependencies recorded.
835# --into $dir - symlink jar(s) into $dir (must exist) instead of . 870# --into $dir - symlink jar(s) into $dir (must exist) instead of .
836# @param $1 - Package to get jars from, or comma-separated list of packages in 871# @param $1 - Package to get jars from, or comma-separated list of packages in
837# case other parameters are not used. 872# case other parameters are not used.
838# @param $2 - jar from package. If not specified, all jars will be used. 873# @param $2 - jar from package. If not specified, all jars will be used.
839# @param $3 - When a single jar is specified, destination filename of the 874# @param $3 - When a single jar is specified, destination filename of the
844 debug-print-function ${FUNCNAME} $* 879 debug-print-function ${FUNCNAME} $*
845 880
846 local build_only="" 881 local build_only=""
847 local destdir="." 882 local destdir="."
848 local deep="" 883 local deep=""
884 local virtual=""
849 885
850 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build" 886 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build"
851 887
852 while [[ "${1}" == --* ]]; do 888 while [[ "${1}" == --* ]]; do
853 if [[ "${1}" = "--build-only" ]]; then 889 if [[ "${1}" = "--build-only" ]]; then
854 build_only="build" 890 build_only="build"
855 elif [[ "${1}" = "--with-dependencies" ]]; then 891 elif [[ "${1}" = "--with-dependencies" ]]; then
856 deep="--with-dependencies" 892 deep="--with-dependencies"
893 elif [[ "${1}" = "--virtual" ]]; then
894 virtual="true"
857 elif [[ "${1}" = "--into" ]]; then 895 elif [[ "${1}" = "--into" ]]; then
858 destdir="${2}" 896 destdir="${2}"
859 shift 897 shift
860 else 898 else
861 die "java-pkg_jar-from called with unknown parameter: ${1}" 899 die "java-pkg_jar-from called with unknown parameter: ${1}"
885 done 923 done
886 # setting this disables further record-jar_ calls later 924 # setting this disables further record-jar_ calls later
887 build_only="build" 925 build_only="build"
888 else 926 else
889 java-pkg_ensure-dep "${build_only}" "${target_pkg}" 927 java-pkg_ensure-dep "${build_only}" "${target_pkg}"
928 fi
929
930 # Record the entire virtual as a dependency so that
931 # no jars are missed.
932 if [[ -z "${build_only}" && -n "${virtual}" ]]; then
933 java-pkg_record-jar_ "${target_pkg}"
934 # setting this disables further record-jars_ calls later
935 build_only="build"
890 fi 936 fi
891 937
892 pushd ${destdir} > /dev/null \ 938 pushd ${destdir} > /dev/null \
893 || die "failed to change directory to ${destdir}" 939 || die "failed to change directory to ${destdir}"
894 940
1018# @example-return 1064# @example-return
1019# /usr/share/xerces-2/lib/xml-apis.jar 1065# /usr/share/xerces-2/lib/xml-apis.jar
1020# 1066#
1021# @param $opt 1067# @param $opt
1022# --build-only - makes the jar not added into package.env DEPEND line. 1068# --build-only - makes the jar not added into package.env DEPEND line.
1069# --virtual - Packages passed to this function are to be handled as virtuals
1070# and will not have individual jar dependencies recorded.
1023# @param $1 - package to use 1071# @param $1 - package to use
1024# @param $2 - jar to get 1072# @param $2 - jar to get
1025# ------------------------------------------------------------------------------ 1073# ------------------------------------------------------------------------------
1026java-pkg_getjar() { 1074java-pkg_getjar() {
1027 debug-print-function ${FUNCNAME} $* 1075 debug-print-function ${FUNCNAME} $*
1028 1076
1029 local build_only="" 1077 local build_only=""
1078 local virtual=""
1030 1079
1031 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build" 1080 [[ "${EBUILD_PHASE}" == "test" ]] && build_only="build"
1032 1081
1033 while [[ "${1}" == --* ]]; do 1082 while [[ "${1}" == --* ]]; do
1034 if [[ "${1}" = "--build-only" ]]; then 1083 if [[ "${1}" = "--build-only" ]]; then
1035 build_only="build" 1084 build_only="build"
1085 elif [[ "${1}" == "--virtual" ]]; then
1086 virtual="true"
1036 else 1087 else
1037 die "java-pkg_jar-from called with unknown parameter: ${1}" 1088 die "java-pkg_jar-from called with unknown parameter: ${1}"
1038 fi 1089 fi
1039 shift 1090 shift
1040 done 1091 done
1049 local classpath 1100 local classpath
1050 classpath=$(java-config --classpath=${pkg}) 1101 classpath=$(java-config --classpath=${pkg})
1051 [[ $? != 0 ]] && die ${error_msg} 1102 [[ $? != 0 ]] && die ${error_msg}
1052 1103
1053 java-pkg_ensure-dep "${build_only}" "${pkg}" 1104 java-pkg_ensure-dep "${build_only}" "${pkg}"
1105
1106 # Record the package(Virtual) as a dependency and then set build_only
1107 # So that individual jars are not recorded.
1108 if [[ -n "${virtual}" ]]; then
1109 java-pkg_record-jar_ "${pkg}"
1110 build_only="true"
1111 fi
1054 1112
1055 for jar in ${classpath//:/ }; do 1113 for jar in ${classpath//:/ }; do
1056 if [[ ! -f "${jar}" ]] ; then 1114 if [[ ! -f "${jar}" ]] ; then
1057 die "Installation problem with jar ${jar} in ${pkg} - is it installed?" 1115 die "Installation problem with jar ${jar} in ${pkg} - is it installed?"
1058 fi 1116 fi
1779# compiler. Will also set proper ANT_TASKS from the variable ANT_TASKS, 1837# compiler. Will also set proper ANT_TASKS from the variable ANT_TASKS,
1780# variables: 1838# variables:
1781# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the 1839# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
1782# gentoo.classpath property. Be sure to call 1840# gentoo.classpath property. Be sure to call
1783# java-ant_rewrite-classpath in src_unpack. 1841# java-ant_rewrite-classpath in src_unpack.
1842# JAVA_PKG_NO_BUNDLED_SEARCH - Don't search for bundled jars or class files
1784# *ANT_TASKS - used to determine ANT_TASKS before calling Ant. 1843# *ANT_TASKS - used to determine ANT_TASKS before calling Ant.
1785# ------------------------------------------------------------------------------ 1844# ------------------------------------------------------------------------------
1786eant() { 1845eant() {
1787 debug-print-function ${FUNCNAME} $* 1846 debug-print-function ${FUNCNAME} $*
1847
1848 if [[ ${EBUILD_PHASE} = compile ]]; then
1849 # Used to be done in hooks in java-ant-2.eclass but moved here so that we can
1850 # finally get rid of the hooks without breaking stuff
1851
1852 [[ "${JAVA_ANT_IGNORE_SYSTEM_CLASSES}" && "${JAVA_PKG_BSFIX}" ]] \
1853 && java-ant_ignore-system-classes "${S}/build.xml"
1854
1855 if hasq java-ant-2 ${INHERITED}; then
1856 java-ant_bsfix
1857 fi
1858
1859 # eant can be called multiple times
1860 JAVA_PKG_BSFIX="off"
1861
1862 if [[ -z ${JAVA_PKG_NO_BUNDLED_SEARCH} ]] && is-java-strict; then
1863 echo "Searching for bundled jars:"
1864 java-pkg_find-normal-jars || echo "None found."
1865 echo "Searching for bundled classes (no output if none found):"
1866 find "${WORKDIR}" -name "*.class"
1867 echo "Search done."
1868 JAVA_PKG_NO_BUNDLED_SEARCH=true # eant can be called many times
1869 fi
1870 fi
1788 1871
1789 if ! hasq java-ant-2 ${INHERITED}; then 1872 if ! hasq java-ant-2 ${INHERITED}; then
1790 local msg="You should inherit java-ant-2 when using eant" 1873 local msg="You should inherit java-ant-2 when using eant"
1791 java-pkg_announce-qa-violation "${msg}" 1874 java-pkg_announce-qa-violation "${msg}"
1792 fi 1875 fi
1793 1876
1794 local antflags="-Dnoget=true -Dmaven.mode.offline=true" 1877 local antflags="-Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore"
1795 1878
1796 java-pkg_init-compiler_ 1879 java-pkg_init-compiler_
1797 local compiler="${GENTOO_COMPILER}" 1880 local compiler="${GENTOO_COMPILER}"
1798 1881
1799 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}" 1882 local compiler_env="${JAVA_PKG_COMPILER_DIR}/${compiler}"
1800
1801 local build_compiler="$(source ${compiler_env} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER})" 1883 local build_compiler="$(source ${compiler_env} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER})"
1802 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then 1884 if [[ "${compiler}" != "javac" && -z "${build_compiler}" ]]; then
1803 die "ANT_BUILD_COMPILER undefined in ${compiler_env}" 1885 die "ANT_BUILD_COMPILER undefined in ${compiler_env}"
1804 fi 1886 fi
1805 1887
1811 # java-config -p 1893 # java-config -p
1812 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})" 1894 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})"
1813 if [[ -n ${build_compiler_deps} ]]; then 1895 if [[ -n ${build_compiler_deps} ]]; then
1814 antflags="${antflags} -lib $(java-config -p ${build_compiler_deps})" 1896 antflags="${antflags} -lib $(java-config -p ${build_compiler_deps})"
1815 fi 1897 fi
1816 fi
1817
1818 if is-java-strict; then
1819 einfo "Disabling system classpath for ant"
1820 antflags="${antflags} -Dbuild.sysclasspath=ignore"
1821 fi 1898 fi
1822 1899
1823 for arg in "${@}"; do 1900 for arg in "${@}"; do
1824 if [[ ${arg} = -lib ]]; then 1901 if [[ ${arg} = -lib ]]; then
1825 if is-java-strict; then 1902 if is-java-strict; then
1834 echo "more info." 1911 echo "more info."
1835 fi 1912 fi
1836 fi 1913 fi
1837 done 1914 done
1838 1915
1916 # we use this in src_* so we run ant from /
1839 if has_version ">=dev-java/ant-core-1.7.0"; then 1917 if ROOT=/ has_version ">=dev-java/ant-core-1.7.0"; then
1840 # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly 1918 # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly
1841 ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}" 1919 ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}"
1842 1920
1843 # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set 1921 # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set
1844 ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}" 1922 ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}"
1993# This shouldn't be used directly. Instead, java-pkg and java-pkg-opt will 2071# This shouldn't be used directly. Instead, java-pkg and java-pkg-opt will
1994# call it during each of the phases of the merge process. 2072# call it during each of the phases of the merge process.
1995# 2073#
1996# ----------------------------------------------------------------------------- 2074# -----------------------------------------------------------------------------
1997java-pkg_init() { 2075java-pkg_init() {
2076 debug-print-function ${FUNCNAME} $*
1998 unset JAVAC 2077 unset JAVAC
1999 unset JAVA_HOME 2078 unset JAVA_HOME
2000 2079
2001 # People do all kinds of weird things. 2080 # People do all kinds of weird things.
2002 # http://forums.gentoo.org/viewtopic-p-3943166.html 2081 # http://forums.gentoo.org/viewtopic-p-3943166.html
2010 ewarn "make.conf for example) to silence this warning or" 2089 ewarn "make.conf for example) to silence this warning or"
2011 ewarn "I_WANT_GLOBAL_JAVA_OPTIONS to not filter it." 2090 ewarn "I_WANT_GLOBAL_JAVA_OPTIONS to not filter it."
2012 fi 2091 fi
2013 2092
2014 if [[ -z ${accept} ]]; then 2093 if [[ -z ${accept} ]]; then
2094 # export _JAVA_OPTIONS= doesn't work because it will show up in java
2095 # -version output
2015 unset _JAVA_OPTIONS 2096 unset _JAVA_OPTIONS
2016 # phase hooks make this run many times without this 2097 # phase hooks make this run many times without this
2017 I_WANT_GLOBAL_JAVA_OPTIONS="true" 2098 I_WANT_GLOBAL_JAVA_OPTIONS="true"
2018 fi 2099 fi
2019 2100
2101 if java-pkg_func-exists ant_src_unpack; then
2102 java-pkg_announce-qa-violation "Using old ant_src_unpack. Should be src_unpack"
2103 fi
2104
2020 java-pkg_init_paths_ 2105 java-pkg_init_paths_
2021 java-pkg_switch-vm 2106 java-pkg_switch-vm
2022 PATH=${JAVA_HOME}/bin:${PATH} 2107 PATH=${JAVA_HOME}/bin:${PATH}
2023 2108
2024 # TODO we will probably want to set JAVAC and JAVACFLAGS 2109 # TODO we will probably want to set JAVAC and JAVACFLAGS
2025 2110
2026 # Do some QA checks 2111 # Do some QA checks
2027 java-pkg_check-jikes 2112 java-pkg_check-jikes
2113
2114 # Can't use unset here because Portage does not save the unset
2115 # see https://bugs.gentoo.org/show_bug.cgi?id=189417#c11
2028 2116
2029 # When users have crazy classpaths some packages can fail to compile. 2117 # When users have crazy classpaths some packages can fail to compile.
2030 # and everything should work with empty CLASSPATH. 2118 # and everything should work with empty CLASSPATH.
2031 # This also helps prevent unexpected dependencies on random things 2119 # This also helps prevent unexpected dependencies on random things
2032 # from the CLASSPATH. 2120 # from the CLASSPATH.
2033 unset CLASSPATH 2121 export CLASSPATH=
2034 2122
2035 # Unset external ANT_ stuff 2123 # Unset external ANT_ stuff
2036 unset ANT_TASKS 2124 export ANT_TASKS=
2037 unset ANT_OPTS 2125 export ANT_OPTS=
2038} 2126}
2039 2127
2040# ------------------------------------------------------------------------------ 2128# ------------------------------------------------------------------------------
2041# @function-internal java-pkg-init-compiler_ 2129# @function-internal java-pkg-init-compiler_
2042# 2130#
2164 fi 2252 fi
2165 2253
2166 JAVA_PKG_SHAREPATH="${DESTTREE}/share/${JAVA_PKG_NAME}" 2254 JAVA_PKG_SHAREPATH="${DESTTREE}/share/${JAVA_PKG_NAME}"
2167 JAVA_PKG_SOURCESPATH="${JAVA_PKG_SHAREPATH}/sources/" 2255 JAVA_PKG_SOURCESPATH="${JAVA_PKG_SHAREPATH}/sources/"
2168 JAVA_PKG_ENV="${D}${JAVA_PKG_SHAREPATH}/package.env" 2256 JAVA_PKG_ENV="${D}${JAVA_PKG_SHAREPATH}/package.env"
2257 JAVA_PKG_VIRTUALS_PATH="${DESTTREE}/share/java-config-2/virtuals"
2258 JAVA_PKG_VIRTUAL_PROVIDER="${D}/${JAVA_PKG_VIRTUALS_PATH}/${JAVA_PKG_NAME}"
2169 2259
2170 [[ -z "${JAVA_PKG_JARDEST}" ]] && JAVA_PKG_JARDEST="${JAVA_PKG_SHAREPATH}/lib" 2260 [[ -z "${JAVA_PKG_JARDEST}" ]] && JAVA_PKG_JARDEST="${JAVA_PKG_SHAREPATH}/lib"
2171 [[ -z "${JAVA_PKG_LIBDEST}" ]] && JAVA_PKG_LIBDEST="${DESTTREE}/$(get_libdir)/${JAVA_PKG_NAME}" 2261 [[ -z "${JAVA_PKG_LIBDEST}" ]] && JAVA_PKG_LIBDEST="${DESTTREE}/$(get_libdir)/${JAVA_PKG_NAME}"
2172 [[ -z "${JAVA_PKG_WARDEST}" ]] && JAVA_PKG_WARDEST="${JAVA_PKG_SHAREPATH}/webapps" 2262 [[ -z "${JAVA_PKG_WARDEST}" ]] && JAVA_PKG_WARDEST="${JAVA_PKG_SHAREPATH}/webapps"
2173 2263
2461 2551
2462 #TODO If you know a better solution let us know. 2552 #TODO If you know a better solution let us know.
2463 java-pkg_append_ LD_LIBRARY_PATH "$(java-config -g LDPATH)" 2553 java-pkg_append_ LD_LIBRARY_PATH "$(java-config -g LDPATH)"
2464 2554
2465 local tann="${T}/announced-vm" 2555 local tann="${T}/announced-vm"
2556 # With the hooks we should only get here once from pkg_setup but better safe than sorry
2557 # if people have for example modified eclasses some where
2466 if [[ -n "${JAVA_PKG_DEBUG}" ]] || [[ ! -f "${tann}" ]] ; then 2558 if [[ -n "${JAVA_PKG_DEBUG}" ]] || [[ ! -f "${tann}" ]] ; then
2467 # Add a check for setup/preinst phase... to avoid duplicate outputs
2468 # for when FEATURES=buildpkg
2469 if [[ ${EBUILD_PHASE} != "setup" && ${EBUILD_PHASE} != "preinst" && ${EBUILD_PHASE} != "postinst" ]];
2470 then
2471 einfo "Using: $(java-config -f)" 2559 einfo "Using: $(java-config -f)"
2472 [[ ! -f "${tann}" ]] && touch "${tann}" 2560 [[ ! -f "${tann}" ]] && touch "${tann}"
2473 fi
2474 fi 2561 fi
2475 2562
2476 else 2563 else
2477 [[ -n "${JAVA_PKG_DEBUG}" ]] && ewarn "!!! This package inherits java-pkg but doesn't depend on a JDK. -bin or broken dependency!!!" 2564 [[ -n "${JAVA_PKG_DEBUG}" ]] && ewarn "!!! This package inherits java-pkg but doesn't depend on a JDK. -bin or broken dependency!!!"
2478 fi 2565 fi

Legend:
Removed from v.1.89  
changed lines
  Added in v.1.101

  ViewVC Help
Powered by ViewVC 1.1.20