/[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.8 Revision 1.10
229# 229#
230# java-pkg_regjar ${D}/opt/my-java/lib/*.jar 230# java-pkg_regjar ${D}/opt/my-java/lib/*.jar
231# 231#
232# @param $@ - jars to record 232# @param $@ - jars to record
233# ------------------------------------------------------------------------------ 233# ------------------------------------------------------------------------------
234# TODO fix me! 234# TODO should we be making sure the jar is present on ${D} or wherever?
235java-pkg_regjar() { 235java-pkg_regjar() {
236 debug-print-function ${FUNCNAME} $* 236 debug-print-function ${FUNCNAME} $*
237 237
238 java-pkg_check-phase install 238 java-pkg_check-phase install
239 239
1163 1163
1164# TODO document 1164# TODO document
1165java-pkg_get-jni-cflags() { 1165java-pkg_get-jni-cflags() {
1166 local flags="-I${JAVA_HOME}/include" 1166 local flags="-I${JAVA_HOME}/include"
1167 1167
1168 # TODO do a check that the directories are valid
1168 # TODO figure out how to cope with other things than linux... 1169 # TODO figure out how to cope with other things than linux...
1169 flags="${flags} -I${JAVA_HOME}/include/linux" 1170 flags="${flags} -I${JAVA_HOME}/include/linux"
1170 1171
1171 echo ${flags} 1172 echo ${flags}
1173}
1174
1175java-pkg_ensure-gcj() {
1176 if ! built_with_use sys-devel/gcc gcj ; then
1177 ewarn
1178 ewarn "You must build gcc with the gcj support to build with gcj"
1179 ewarn
1180 ebeep 5
1181 die "No GCJ support found!"
1182 fi
1172} 1183}
1173 1184
1174# ------------------------------------------------------------------------------ 1185# ------------------------------------------------------------------------------
1175# @section-end helper 1186# @section-end helper
1176# ------------------------------------------------------------------------------ 1187# ------------------------------------------------------------------------------
1212 # java-config -p 1223 # java-config -p
1213 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})" 1224 local build_compiler_deps="$(source ${JAVA_PKG_COMPILER_DIR}/${compiler} 1>/dev/null 2>&1; echo ${ANT_BUILD_COMPILER_DEPS})"
1214 if [[ -n ${build_compiler_deps} ]]; then 1225 if [[ -n ${build_compiler_deps} ]]; then
1215 antflags="${antflags} -lib $(java-config -p ${build_compiler_deps})" 1226 antflags="${antflags} -lib $(java-config -p ${build_compiler_deps})"
1216 fi 1227 fi
1228 fi
1229
1230 if is-java-strict; then
1231 einfo "Disabling system classpath for ant"
1232 antflags="${antflags} -Dbuild.sysclasspath=ignore"
1217 fi 1233 fi
1218 1234
1219 if [[ -n ${JAVA_PKG_DEBUG} ]]; then 1235 if [[ -n ${JAVA_PKG_DEBUG} ]]; then
1220 antflags="${antflags} -debug" 1236 antflags="${antflags} -debug"
1221 fi 1237 fi
1783# ------------------------------------------------------------------------------ 1799# ------------------------------------------------------------------------------
1784 1800
1785java-pkg_check-phase() { 1801java-pkg_check-phase() {
1786 local phase=${1} 1802 local phase=${1}
1787 local funcname=${2} 1803 local funcname=${2}
1788 # TODO add check for java-stricter
1789 if [[ ${EBUILD_PHASE} != ${phase} ]]; then 1804 if is-java-strict && [[ ${EBUILD_PHASE} != ${phase} ]]; then
1790 java-pkg_announce-qa-violation \ 1805 java-pkg_announce-qa-violation \
1791 "${funcname} used outside of src_${phase}" 1806 "${funcname} used outside of src_${phase}"
1792 fi 1807 fi
1793} 1808}
1794 1809
1805 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE" 1820 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE"
1806 fi 1821 fi
1807} 1822}
1808 1823
1809java-pkg_announce-qa-violation() { 1824java-pkg_announce-qa-violation() {
1810 if hasq java-strict ${FEATURES}; then 1825 if is-java-strict; then
1811 echo "Java QA Notice: $@" >&2 1826 echo "Java QA Notice: $@" >&2
1812 increment-qa-violations 1827 increment-qa-violations
1813 fi 1828 fi
1814} 1829}
1815 1830
1816increment-qa-violations() { 1831increment-qa-violations() {
1817 let "JAVA_PKG_QA_VIOLATIONS+=1" 1832 let "JAVA_PKG_QA_VIOLATIONS+=1"
1818 export JAVA_PKG_QA_VIOLATIONS 1833 export JAVA_PKG_QA_VIOLATIONS
1819} 1834}
1820 1835
1836is-java-strict() {
1837 hasq java-strict ${FEATURES};
1838 return $?
1839}
1840
1821# ------------------------------------------------------------------------------ 1841# ------------------------------------------------------------------------------
1822# @eclass-end 1842# @eclass-end
1823# ------------------------------------------------------------------------------ 1843# ------------------------------------------------------------------------------

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20