/[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.122 Revision 1.127
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.122 2009/02/19 05:10:37 serkan Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.127 2009/05/19 21:23:32 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
365 if [[ ${jar} = *\** ]]; then 365 if [[ ${jar} = *\** ]]; then
366 eerror "The argument ${jar} to ${FUNCNAME}" 366 eerror "The argument ${jar} to ${FUNCNAME}"
367 eerror "has * in it. If you want it to glob in" 367 eerror "has * in it. If you want it to glob in"
368 eerror '${D} add ${D} to the argument.' 368 eerror '${D} add ${D} to the argument.'
369 fi 369 fi
370 debug-print "${jar} or ${D}${jar} not found"
370 die "${jar} does not exist" 371 die "${jar} does not exist"
371 fi 372 fi
372 done 373 done
373 374
374 java-pkg_do_write_ 375 java-pkg_do_write_
429# @param $@ - JNI libraries to install 430# @param $@ - JNI libraries to install
430# ------------------------------------------------------------------------------ 431# ------------------------------------------------------------------------------
431java-pkg_doso() { 432java-pkg_doso() {
432 debug-print-function ${FUNCNAME} $* 433 debug-print-function ${FUNCNAME} $*
433 434
434 [[ ${#} -lt 1 ]] && "At least one argument required for ${FUNCNAME}"
435 java-pkg_check-phase install 435 java-pkg_check-phase install
436 436
437 [[ ${#} -lt 1 ]] && die "At least one argument required for ${FUNCNAME}" 437 [[ ${#} -lt 1 ]] && die "${FUNCNAME} requires at least one argument"
438 438
439 java-pkg_init_paths_ 439 java-pkg_init_paths_
440 440
441 local lib 441 local lib
442 # for each lib 442 # for each lib
450 doins "${lib}" || die "failed to install ${lib}" 450 doins "${lib}" || die "failed to install ${lib}"
451 java-pkg_append_ JAVA_PKG_LIBRARY "${JAVA_PKG_LIBDEST}" 451 java-pkg_append_ JAVA_PKG_LIBRARY "${JAVA_PKG_LIBDEST}"
452 debug-print "Installing ${lib} to ${JAVA_PKG_LIBDEST}" 452 debug-print "Installing ${lib} to ${JAVA_PKG_LIBDEST}"
453 # otherwise make a symlink to the symlink's origin 453 # otherwise make a symlink to the symlink's origin
454 else 454 else
455 # TODO use dosym 455 dosym "$(readlink "${lib}")" "${JAVA_PKG_LIBDEST}/${lib##*/}"
456 ln -s "$(readlink "${lib}")" \
457 "${D}${JAVA_PKG_LIBDEST}/$(basename "${lib}")"
458 debug-print "${lib} is a symlink, linking accordanly" 456 debug-print "${lib} is a symlink, linking accordantly"
459 fi 457 fi
460 # otherwise die 458 # otherwise die
461 else 459 else
462 die "${lib} does not exist" 460 die "${lib} does not exist"
463 fi 461 fi
479java-pkg_regso() { 477java-pkg_regso() {
480 debug-print-function ${FUNCNAME} $* 478 debug-print-function ${FUNCNAME} $*
481 479
482 java-pkg_check-phase install 480 java-pkg_check-phase install
483 481
484 [[ ${#} -lt 1 ]] && "at least one argument needed" 482 [[ ${#} -lt 1 ]] && die "${FUNCNAME} requires at least one argument"
485 483
486 java-pkg_init_paths_ 484 java-pkg_init_paths_
487 485
488 local lib target_dir 486 local lib target_dir
489 for lib in "$@" ; do 487 for lib in "$@" ; do
1808# src_prepare Searches for bundled jars 1806# src_prepare Searches for bundled jars
1809# Don't call directly, but via java-pkg-2_src_prepare! 1807# Don't call directly, but via java-pkg-2_src_prepare!
1810# ------------------------------------------------------------------------------ 1808# ------------------------------------------------------------------------------
1811 1809
1812java-utils-2_src_prepare() { 1810java-utils-2_src_prepare() {
1811 [[ ${EBUILD_PHASE} == prepare ]] &&
1812 java-pkg_func-exists java_prepare && java_prepare
1813
1813 # Remember that eant will call this unless called via Portage 1814 # Remember that eant will call this unless called via Portage
1814 if [[ ! -e "${T}/java-utils-2_src_prepare-run" ]] && is-java-strict; then 1815 if [[ ! -e "${T}/java-utils-2_src_prepare-run" ]] && is-java-strict; then
1815 echo "Searching for bundled jars:" 1816 echo "Searching for bundled jars:"
1816 java-pkg_find-normal-jars || echo "None found." 1817 java-pkg_find-normal-jars || echo "None found."
1817 echo "Searching for bundled classes (no output if none found):" 1818 echo "Searching for bundled classes (no output if none found):"
2444# 2445#
2445# @return 0 - function is declared 2446# @return 0 - function is declared
2446# @return 1 - function is undeclared 2447# @return 1 - function is undeclared
2447# ------------------------------------------------------------------------------ 2448# ------------------------------------------------------------------------------
2448java-pkg_func-exists() { 2449java-pkg_func-exists() {
2449 if [[ -n "$(declare -f ${1})" ]]; then 2450 declare -F ${1} > /dev/null
2450 return 0
2451 else
2452 return 1
2453 fi
2454} 2451}
2455 2452
2456# ------------------------------------------------------------------------------ 2453# ------------------------------------------------------------------------------
2457# @internal-function java-pkg_setup-vm 2454# @internal-function java-pkg_setup-vm
2458# 2455#

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

  ViewVC Help
Powered by ViewVC 1.1.20