Patch to remove JAVA_PKG_VNEED support from java-utils-2.eclass

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Patch to remove JAVA_PKG_VNEED support from java-utils-2.eclass

Alistair Bush-2
This patch removes the functionality within java-utils-2.eclass to
record and pass to java-config old style virtuals.
This functionality is not utilized within any repo that I know about and
is _most probably_ horribly broken anyway.

_ALL_ ebuilds that are using this functionality (aka 0) should instead
be using java-virtuals.

Java Team any issue with this patch?  The point of removing this
functionality is so I can cleanup java-config a little.


Thanks

Alistair.

--- java-utils-2.eclass 2009-05-26 19:27:34.381359549 +1200
+++ java-utils-2.eclass 2009-05-31 16:52:09.823087313 +1200
@@ -1310,83 +1310,6 @@
 # ------------------------------------------------------------------------------
 
 # ------------------------------------------------------------------------------
-# @ebuild-function java-pkg_need
-#
-# Adds virtual dependencies, which can optionally be controlled by a USE flag.
-# Currently supported virtuals are:
-# javamail
-# jdbc-stdext
-# jaf
-# jdbc-rowset
-# jms
-#
-# @param $1 - Optionally indicate that the dependencies are controlled by
-# a use flag by specifying '--use' Requires $2.
-# @param $2 - USE flag which will enable the dependencies.
-# @param $@ - virtual packages to add depenedencies for
-# ------------------------------------------------------------------------------
-# TODO rewrite to parse a line based declaration file instead -- karltk
-#java-pkg_need() {
-# debug-print-function ${FUNCNAME} $*
-# local useflag
-# if [[ ${1} == "--use" ]]; then
-# useflag="${2}"
-# shift 2
-# fi
-#
-# if [[ -z ${1} ]]; then
-# die "Must specify at least one virtual package."
-# fi
-#
-# local depstr newdepstr
-#
-# for virtual in ${@}; do
-# if has ${virtual} ${JAVA_PKG_VNEED}; then
-# debug-print "Already registered virtual ${virtual}"
-# continue
-# fi
-# case ${virtual} in
-# javamail)
-# debug-print "java-pkg_need: adding javamail dependencies"
-# newdepstr="|| ( dev-java/gnu-javamail dev-java/sun-javamail-bin )"
-# ;;
-# jdbc-stdext)
-# debug-print "java-pkg_need: adding jdbc-stdext dependencies"
-# newdepstr="|| ( >=virtual/jdk-1.4 dev-java/jdbc2-stdext )"
-# ;;
-# jaf)
-# debug-print "java-pkg_need: adding jaf dependencies"
-# newdepstr="|| ( dev-java/gnu-jaf dev-java/sun-jaf-bin )"
-# ;;
-# jdbc-rowset)
-# debug-print "java-pkg_need: adding jdbc-rowset dependencies"
-# newdepstr="|| ( >=virtual/jdk-1.5 dev-java/sun-jdbc-rowset )"
-# ;;
-# jms)
-# debug-print "java-pkg_need: adding jms dependencies"
-# newdepstr="|| ( dev-java/sun-jms dev-java/openjms )"
-# ;;
-# *)
-# die "Invalid virtual: ${virtual}"
-# esac
-#
-# export JAVA_PKG_VNEED="${JAVA_PKG_VNEED} ${virtual}"
-#
-# if [[ -n ${useflag} ]]; then
-# depstr="${depstr} ${useflag}? ( ${newdepstr} )"
-# else
-# depstr="${depstr} ${newdepstr}"
-# fi
-# done
-#
-# [[ -z ${JAVA_PKG_NV_DEPEND} ]] && export JAVA_PKG_NV_DEPEND="${DEPEND}"
-# [[ -z ${JAVA_PKG_NV_RDEPEND} ]] && export JAVA_PKG_NV_RDEPEND="${RDEPEND}"
-#
-# export DEPEND="${DEPEND} ${depstr}"
-# export RDEPEND="${RDEPEND} ${depstr}"
-#}
-
-# ------------------------------------------------------------------------------
 # @ebuild-function java-pkg_find-normal-jars
 #
 # Find the files with suffix .jar file in the given directory or $WORKDIR
@@ -2541,16 +2464,11 @@
  export GENTOO_VM="${JAVA_PKG_FORCE_VM}"
  # if we're allowed to switch the vm...
  elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then
- debug-print "depend-java-query:  NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}} VNEED: ${JAVA_PKG_VNEED}"
- if [[ -n ${JAVA_PKG_VNEED} ]]; then
- GENTOO_VM="$(depend-java-query --need-virtual "${JAVA_PKG_VNEED}" --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")"
- else
- GENTOO_VM="$(depend-java-query --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")"
- fi
+ debug-print "depend-java-query:  NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}}"
+ GENTOO_VM="$(depend-java-query --get-vm "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")"
  if [[ -z "${GENTOO_VM}" || "${GENTOO_VM}" == "None" ]]; then
  eerror "Unable to determine VM for building from dependencies:"
  echo "NV_DEPEND: ${JAVA_PKG_NV_DEPEND:-${DEPEND}}"
- echo "VNEED: ${JAVA_PKG_VNEED}"
  die "Failed to determine VM for building."
  else
  export GENTOO_VM