summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Almenar <strider@gentoo.org>2003-03-22 20:21:53 +0000
committerAdrian Almenar <strider@gentoo.org>2003-03-22 20:21:53 +0000
commit066e04cc57dcbeba43e492461e4680f6587e560b (patch)
tree017c94a75278334c32de703343a9c5c7c988c71e /dev-java/java-config/files
parentfix #16293 - tell wwwoffle in the wwwoffled-online initscript to use /etc/www... (diff)
downloadhistorical-066e04cc57dcbeba43e492461e4680f6587e560b.tar.gz
historical-066e04cc57dcbeba43e492461e4680f6587e560b.tar.bz2
historical-066e04cc57dcbeba43e492461e4680f6587e560b.zip
Many changes, please see the ChangeLog
Diffstat (limited to 'dev-java/java-config/files')
-rw-r--r--dev-java/java-config/files/0.2.6/java-config351
-rw-r--r--dev-java/java-config/files/0.2.6/java-config.188
-rw-r--r--dev-java/java-config/files/digest-java-config-0.2.60
3 files changed, 0 insertions, 439 deletions
diff --git a/dev-java/java-config/files/0.2.6/java-config b/dev-java/java-config/files/0.2.6/java-config
deleted file mode 100644
index 8141c35aca08..000000000000
--- a/dev-java/java-config/files/0.2.6/java-config
+++ /dev/null
@@ -1,351 +0,0 @@
-#! /bin/sh
-#
-# Copyright 2001-2002 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Maintainer: Tools Team <tools@gentoo.org>
-# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/0.2.6/java-config,v 1.1 2002/09/23 00:17:43 karltk Exp $
-
-version=0.2.5
-all_params="$*"
-
-SYSTEM_ARCH=`echo $ARCH |\
- sed -e s/[i]*.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
-
-if [ -z "$SYSTEM_ARCH" ] ; then
- SYSTEM_ARCH=`uname -m |\
- sed -e s/[i]*.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
-fi
-
-PFORM="i386"
-
-case $SYSTEM_ARCH in
- ppc) PFORM="ppc";;
- i386) PFORM="i386";;
- sparc64)PFORM="sparc64";;
- sparc) PFORM="arm";;
- arm) PFORM="arm";;
-esac
-
-if [ $UID != 0 ] && [ -f $HOME/.gentoo/java-env ] ; then
- . $HOME/.gentoo/java-env
-elif [ -f /etc/env.d/20java ] ; then
- oldpath=$PATH
- . /etc/env.d/20java
- PATH=$oldpath:$PATH
-fi
-
-function eerror() {
- echo "!!! $1" 1>&2
-}
-svm=`echo $1|egrep "\-\-(set-(system|user)-vm|list-available-vms)"`
-if [ -z "$JAVA_HOME" ] && [ -z "$svm" ] && [ "$1" != "--help" ]; then
- eerror "No Java installation found"
- eerror "Use --set-system-vm to select default system JVM"
- eerror "Alternatively, use --set-user-vm to select default system JVM"
- exit 1
-fi
-
-usage() {
- cat <<EOF
-Usage: java-config [OPTIONS] [LIBRARIES]
-Options:
- [--javac]
- [--java]
- [--jar]
- [--jdk-home]
- [--jre-home]
- [--java-version]
- [--classpath[=package1,package2,...]]
- [--full-classpath=package1,package2,...]
- [--exec=filename]
- [--list-available-packages]
- [--list-available-vms]
- [--set-system-vm=<vm-id>]
- [--set-user-vm=<vm-id>]
- [--set-system-classpath=package1,package2,...]
- [--set-user-classpath=package1,package2,...]
-EOF
- echo "Using ${JAVA_HOME}"
- exit $1
-}
-
-find_exec() {
- if [ -f ${JAVA_HOME}/bin/$1 ] ; then
- echo ${JAVA_HOME}/bin/$1
- elif [ -f ${JAVA_HOME}/jre/bin/$1 ] ; then
- echo ${JAVA_HOME}/jre/bin/$1
- else
- eerror "$1 not found"
- exit 1
- fi
-}
-
-classpathfor()
-{
- local pkgs=`echo $1 | sed "s/,/ /g"`
- local total=""
- for i in $pkgs ; do
- if [ -f /usr/share/${i}/classpath.env ] ; then
- total="${total}`cat /usr/share/${i}/classpath.env`"
- elif [ -f /usr/share/${i}/package.env ] ; then
- pf=/usr/share/${i}/package.env
- addcp=`grep "CLASSPATH=" $pf | sed "s/CLASSPATH=//"`
- total="${total}:${addcp}"
- else
- eerror "Package ${i} not found"
- exit 1
- fi
- done
- echo $total | sed "s/::/:/g"
-}
-
-normalise_classpath() {
- local iter=`echo $1|sed "s/::/:/g"|sed "s/^://"`
- local result
- oldifs=${IFS}
- IFS=":"
- set -f -- ${iter}
- while [ "$1" != "" ] ; do
- found=`false`
- for i in ${result} ; do
- if [ "$i" == "$1" ] ; then
- found=1
- fi
- done
- if [ ! $found ] && [ $1 != "." ] ; then
- result="${result}:$1"
- fi
- shift
- done
- IFS="${oldifs}"
- echo ${result} | sed "s/^://"
-}
-
-findpluginpath() {
-
- # This covers Sun and Blackdown
-
- rootpath=${JAVA_HOME}/jre/plugin/${PFORM}
-
- if [ $1 == "ns4" ] || [ $1 == "netscape4" ] ; then
- for i in ${rootpath}/{ns4,netscape4}/javaplugin.so ; do
- if [ -e $i ] ; then
- echo $i
- break
- fi
- done
- elif [ $1 == "ns6" ] || [ $1 == "netscape6" ] || [ $1 == "moz" ] || [ $1 == "mozilla" ] ; then
- for i in ${rootpath}/{mozilla,ns600,netscape6}/{libjavaplugin_oji,javaplugin_oji}.so ; do
- if [ -e $i ] ; then
- echo $i
- break
- fi
- done
- else
- eerror "Browser [$1] unknown"
- fi
-
- # This covers IBM
-
- rootpath=${JAVA_HOME}
- if [ $1 == "ns4" ] || [ $1 == "netscape4" ] ; then
- for i in ${rootpath}/{,jre}/bin/javaplugin.so ; do
- if [ -e $i ] ; then
- echo $i
- break
- fi
- done
- elif [ $1 == "ns6" ] || [ $1 == "netscape6" ] || [ $1 == "moz" ] || [ $1 == "mozilla" ] ; then
- for i in ${rootpath}/{,jre}/bin/libjavaplugin_oji.so ; do
- if [ -e $i ] ; then
- echo $i
- break
- fi
- done
- fi
-}
-
-function vm_shortname() {
- basename $1 | sed -e "s/20//" #-e "s/-[0-9]\..*//"
-}
-
-function vm_version() {
- ( . $1 ; echo "$VERSION ($i)" )
-}
-
-function vm_envvars() {
- local file=$1
- local system="$2"
-
- ( . $file ;
- for i in $ENV_VARS ; do
- if [ $i == "ADDPATH" ] && [ -z "$system" ]; then
- echo "PATH=\${PATH}:${!i}"
- elif [ $i == "ADDPATH" ] && [ "$system" ]; then
- echo "PATH=${!i}"
- echo "ROOTPATH=${!i}"
- elif [ $i == "ADDLDPATH" ] ; then
- if [ "$system" ]; then
- echo "LDPATH=${!i}"
- fi
- else
- echo "${i}=${!i}"
- fi
- done
- )
-}
-
-function source_java_classpath() {
- echo "if [ -f $HOME/.gentoo/java-env-classpath ] ; then"
- echo " . $HOME/.gentoo/java-env-classpath"
- echo "fi"
-}
-
-function set_vm() {
- local vm=$1
- local cfgpath=$2
- local cfgfile=$3
- local system=""
- if [ "$cfgpath" == "/etc/env.d" ] ; then
- system="yes"
- fi
- local found=""
-
- for i in /etc/env.d/java/20*-* ; do
- if [ $vm == `vm_shortname $i` ] ; then
- echo "Now using `vm_version $i`"
- mkdir -p $cfgpath
- echo "# Autogenerated by java-config $version" > ${cfgpath}/${cfgfile}
- echo "# Cmd: $0 $all_params" >> ${cfgpath}/${cfgfile}
- vm_envvars $i $system >> ${cfgpath}/${cfgfile}
- if [ -z $system ] ; then
- source_java_classpath >> $HOME/.gentoo/java-env
- fi
- found="yes"
- fi
- done
- if [ -z "$found" ] ; then
- echo "$vm not found"
- fi
-}
-
-function calc_full_classpath() {
- local foo=`classpathfor $1`
- local bar=`normalise_classpath "${CLASSPATH}:${foo}"`
- echo "${bar}:."
-}
-
-if [ $# == 0 ] ; then
- echo "Usage: java-config [OPTIONS] [LIBRARIES]"
- exit 1
-fi
-
-while test $# -gt 0; do
-
- case "$1" in
- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- case $1 in
- --debug)
- set -x
- ;;
- --browser-plugin=*)
- pluginpath=`findpluginpath $optarg`
- if [ -n "$pluginpath" ] ; then
- echo `basename $pluginpath`
- else
- eerror "Plugin not found"
- fi
- ;;
- --full-browser-plugin-path=*)
- findpluginpath $optarg
- ;;
- --classpath)
- normalise_classpath ${CLASSPATH}
- ;;
- --classpath=*)
- normalise_classpath `classpathfor $optarg`
- ;;
- --full-classpath=*)
- calc_full_classpath $optarg
- ;;
- --jdk-home)
- echo ${JDK_HOME}
- ;;
- --jre-home)
- echo ${JRE_HOME}
- ;;
- --javac)
- find_exec javac
- ;;
- --java)
- find_exec java
- ;;
- --jar)
- find_exec jar
- ;;
- --java-version)
- `find_exec java` -version
- ;;
- --exec=*)
- find_exec $optarg
- ;;
- --version)
- echo java-config $version
- ;;
- --list-available-packages)
- # Old env var file
- for i in /usr/share/*/classpath.env ; do
- if [ ! -f $i ] ; then continue ; fi
- dn=`dirname $i`
- echo "[`basename $dn`] No description ($i)"
- done
- # New env var file
- for i in /usr/share/*/package.env ; do
- if [ ! -f $i ] ; then continue ; fi
- dn=`dirname $i`
- id=`basename $dn`
- desc=`grep DESC $i | sed "s/DESCRIPTION=//"`
- echo "[${id}] ${desc} ($i)"
- done
-
- ;;
- --list-available-vms)
- if [ -d /etc/env.d/java ] ; then
- for i in `find /etc/env.d/java/ -name "20*-*"` ; do
- echo "[`vm_shortname $i`] `vm_version $i`"
- done
- fi
- ;;
- --set-system-classpath=*)
- echo "CLASSPATH=`calc_full_classpath $optarg`" > \
- /etc/env.d/21java-classpath
- ;;
- --set-user-classpath=*)
- mkdir -p $HOME/.gentoo
- echo "CLASSPATH=\${CLASSPATH}:`calc_full_classpath $optarg`" > \
- $HOME/.gentoo/java-env-classpath
- if [ ! -f $HOME/.gentoo/java-env ] ; then
- source_java_classpath > $HOME/.gentoo/java-env
- fi
- ;;
- --set-system-vm=*)
- set_vm $optarg /etc/env.d 20java
- ;;
- --set-user-vm=*)
- if [ $UID == 0 ] ; then
- eerror "ERROR: root should _always_ use the system-vm"
- eerror "NOTE : user-vm for root not set."
- else
- set_vm $optarg $HOME/.gentoo java-env
- fi
- ;;
- *)
- usage
- ;;
- esac
- shift
-done
diff --git a/dev-java/java-config/files/0.2.6/java-config.1 b/dev-java/java-config/files/0.2.6/java-config.1
deleted file mode 100644
index 264d046fdf08..000000000000
--- a/dev-java/java-config/files/0.2.6/java-config.1
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH java-config "1" "March 2002" "java-config 0.2.0"
-.SH NAME
-java-config \- manual page for java-config, the Java configuration tool for
-Gentoo
-.SH SYNOPSIS
-.B java-config
-\fI[options]\fB
-
-.SH DESCRIPTION
-.PP
-.I java-config
-is used to query/set properties of your system's Java environment. It can be
-used to list available VMs, java packages, set system default JVM and set user
-default JVM.
-.PP
-In addition, it is used by Portage as a common interface to querying
-properties about the various JVMs.
-.SH OPTIONS
-.TP
-\fB--javac\fI
-show full path to currently selected Java compiler.
-.TP
-\fB--jar\fI
-show full path to currently selected
-.I jar
-command
-.TP
-\fB--jdk-home\fI
-show path to currently selected JDK
-.TP
-\fB--jre-home\fI
-show path to currently selected JRE
-.TP
-\fB--java-version\fI
-query current JVM for version
-.TP
-\fB--classpath[=package1,package2,...]\fI
-calculate classpath for a package.
-.TP
-\fB--full-classpath[=package1,package2,...]\fI
-calculate classpath with absolute paths ready to be assigned to CLASSPATH.
-.TP
-\fB--exec=filename\fI
-figure full path to one of the JDK/JRE utilities, such as
-.I keytool
-.
-.TP
-\fB--list-available-packages\fI
-list available Java packages. Used for selection by
-.I --classpath
-and
-.I --full-classpath
-.
-.TP
-\fB--list-available-vms\fI
-lists available JVMs. Used with
-.I --set-system-vm
-and
-.I --set-user-vm
-.
-.TP
-\fB--set-system-vm=<vm-id>\fI
-sets the system-wide default JVM.
-.TP
-\fB--set-user-vm=<vm-id>\fI
-sets the user-specific JVM by putting all necessary env vars into
-.I $HOME/.gentoo/java-env
-.TP
-\fB--set-system-classpath=package1,package2,...\fI
-sets the system-wide default CLASSPATH.
-.TP
-\fB--set-user-classpath=package1,package2,...\fI
-sets the user-specific CLASSPATH by putting all necessary env vars into
-.I $HOME/.gentoo/java-env-classpath
-(sourced from $HOME/.gentoo/java-env).
-.
-
-.SH AUTHORS
-Karl Trygve Kalleberg <karltk@gentoo.org>
-
-.SH BUGS
-It cannot be used to set default browser plugin yet.
-
-.SH "SEE ALSO"
-env-update(5)
-.TP
-The \fI/usr/bin/java-config\fR script.
-.TP
diff --git a/dev-java/java-config/files/digest-java-config-0.2.6 b/dev-java/java-config/files/digest-java-config-0.2.6
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/dev-java/java-config/files/digest-java-config-0.2.6
+++ /dev/null