aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <donnie@supernova.(none)>2006-10-09 22:25:24 -0700
committerDonnie Berkholz <dberkholz@gentoo.org>2006-10-09 22:25:24 -0700
commitf6c68b8c485361df8297c20d58f640e518578964 (patch)
tree0b1d3e9922719d6a63689038e7f4f6667f6c7b7c
parentAdd non-working ebuild for dsv: discovery studio visualizer (diff)
downloaddberkholz-f6c68b8c485361df8297c20d58f640e518578964.tar.gz
dberkholz-f6c68b8c485361df8297c20d58f640e518578964.tar.bz2
dberkholz-f6c68b8c485361df8297c20d58f640e518578964.zip
dsv: cleanup
-rw-r--r--sci-chemistry/dsv/Manifest8
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/30java-finalclasspath1
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/ChangeLog85
-rwxr-xr-xsci-chemistry/dsv/java-config-1.2.11/java-config125
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java-config.1122
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/.#jc_options.py.1.37894
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/__init__.py11
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/cfg_parse.py106
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_envgen.py289
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_exceptions.py27
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_iface.py44
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_options.py934
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_output.py100
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/java_config/jc_util.py237
-rw-r--r--sci-chemistry/dsv/java-config-1.2.11/setup.py28
-rw-r--r--sci-chemistry/dsv/license.txt127
16 files changed, 4 insertions, 3134 deletions
diff --git a/sci-chemistry/dsv/Manifest b/sci-chemistry/dsv/Manifest
index 33df4a9..0bf6f1a 100644
--- a/sci-chemistry/dsv/Manifest
+++ b/sci-chemistry/dsv/Manifest
@@ -1,8 +1,8 @@
DIST setupdsv15.tar.gz 55012436 RMD160 780d472f13cf3139a74c7fdbf8f096759ea2d931 SHA1 7262492619bd0c94700182677ee05fcc1357bd3d SHA256 792b959b2b1cec69bdb585cb6d2b602776b50ba4c51d27694126de4b6e2f1a87
-EBUILD dsv-1.5.ebuild 1024 RMD160 6e7a0d157c8081029ff922503fcb9656d4a84108 SHA1 a4103ba29ee204af5952f81bf7fa5c60b612f552 SHA256 3340f557b0d31b8654a0db0f9ab0cbdb5ae9d91aef781a2785c38a5360f68064
-MD5 2e3657d58caa55809c2b0a69c71f105e dsv-1.5.ebuild 1024
-RMD160 6e7a0d157c8081029ff922503fcb9656d4a84108 dsv-1.5.ebuild 1024
-SHA256 3340f557b0d31b8654a0db0f9ab0cbdb5ae9d91aef781a2785c38a5360f68064 dsv-1.5.ebuild 1024
+EBUILD dsv-1.5.ebuild 1437 RMD160 dca5e1ae52323f65942fbbe0201bc87585b00585 SHA1 b526629f413d4fff43ec933d9bee1cbfdf091ddc SHA256 90d5d5c8e845721293f325b45791c9af3a5bbd077b2373c5cc269fc41b83525c
+MD5 44c62057daab8a7d599709eadb67f012 dsv-1.5.ebuild 1437
+RMD160 dca5e1ae52323f65942fbbe0201bc87585b00585 dsv-1.5.ebuild 1437
+SHA256 90d5d5c8e845721293f325b45791c9af3a5bbd077b2373c5cc269fc41b83525c dsv-1.5.ebuild 1437
MD5 09469806545c07f8cb9ac6264f5bf6aa files/digest-dsv-1.5 238
RMD160 5a6892e241bd0a72a6379356d621dca98fcd559d files/digest-dsv-1.5 238
SHA256 fca520eb435a89f56647a3158fe444f70681ba5be73b8a3d907a1de19cfd607c files/digest-dsv-1.5 238
diff --git a/sci-chemistry/dsv/java-config-1.2.11/30java-finalclasspath b/sci-chemistry/dsv/java-config-1.2.11/30java-finalclasspath
deleted file mode 100644
index a354704..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/30java-finalclasspath
+++ /dev/null
@@ -1 +0,0 @@
-CLASSPATH=.
diff --git a/sci-chemistry/dsv/java-config-1.2.11/ChangeLog b/sci-chemistry/dsv/java-config-1.2.11/ChangeLog
deleted file mode 100644
index 5f9d7e9..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/ChangeLog
+++ /dev/null
@@ -1,85 +0,0 @@
-# ChangeLog for dev-java/java-config
-# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-src/java-config/python/ChangeLog,v 1.24 2004/10/10 21:28:44 karltk Exp $
-
- 10 Oct 2004; Karl Trygve Kalleberg <karltk@gentoo.org>
- jc_envgen.py: Improved handling of multiple versions of the same VM,
- selecting the best match automatically, fixes #66969.
- jc_options.py: Added consistent reporting of changes to user's env files,
- fixes #62483.
- jc_options.py, jc_utils.py: Remove duplicates from classpath, fixes
- #43759.
- jc_otions.py: Reworked -B and -A, fixes #60130.
-
- 06 Nov 2003; Jason Mobarak <aether@gentoo.org> ./tests/test_jc_util.py
- ./tests/test_jc_options.py ./java_config/cfg_parse.py
- ./java_config/jc_exceptions.py ./java_config/jc_options.py
- ./java_config/jc_iface.py ./java_config/jc_util.py ./java_config/jc_envgen.py:
- How the environment files are generated is completely changed and in the new
- module jc_envgen, provide a solution for bug #33329, and a more extensible and
- elegant solution to bug #36046
-
- 06 Nov 2003; Jason Mobarak <aether@gentoo.org> ./tests/test_jc_util.py
- ./tests/test_jc_options.py ./java_config/cfg_parse.py
- ./java_config/jc_exceptions.py ./java_config/jc_options.py
- ./java_config/jc_iface.py ./java_config/jc_util.py: solutions for bugs
- #36852 and #28869 are provided according the suggest by karltk
- <karltk@gentoo.org>, fixes for bugs: #35910, #36046 (patch from Boris
- Gruschke <boris@gruschke.de>, and #36489.
-
- 08 Nov 2003; Bryan Østergaard <kloeri@gentoo.org> java_config/jc_options.py:
- Fixes bugs #19032, #20559 and #26457.
-
- 08 Nov 2003; Adrian Almenar <strider@gentoo.org> java-config,
- java_config/jc_options.py:
- Fixes bug #32992, #31747.
- Thanks <kloeri@gentoo.org> for helping me on those bugs.
-
- 06 Nov 2003; Jason Mobarak <aether@gentoo.org> java_config/cfg_parse.py,
- java_config/jc_options.py:
- Fixed bugs #31924, #32347, and #32611.
-
- 19 Oct 2003; Adrian Almenar <strider@gentoo.org> java_config/jc_options.py:
- Some changes on the java-config breaked backward compatibility and some banners
- that didnt appeared before were breaking some software that was using
- `java-config (--jdk-home|--jre-home|--classpath).
-
- 17 Oct 2003; Jason A Mobarak <aether@gentoo.org> java-config-1.1.0.ebuild,
- java-config-1.1.0.tar.bz2, java-config.1, tarball.sh:
- Added a tarball script.
-
- 20 Jul 2003; Jason Mobarak <aether@gentoo.org> java-config-1.1.0.ebuild:
- It works now!
-
- 20 Jul 2003; Jason Mobarak <aether@gentoo.org> java_config/cfg_parse.py,
- java_config/jc_iface.py, java_config/jc_options.py, java-config, setup.py,
- java-config-1.1.0.ebuild:
- java-config no longer steals function from portage, uses it's own config
- file parsing, little less robust, add a setup.py as well as ebuild that doesn't
- work yet. Also moved all supporting files into a packages.
-
- 20 Jul 2003; Todd Berman <tberman@gentoo.org> env_parse.py, java-config,
- jc_iface.py, jc_options.py:
- Initial import of brand spankin new java-config by Aether.
-
- 14 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- TABS! not spaces!
-
- 08 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- --list-available-packages, --jdk-home and --jre-home are in, but
- --list-available-packages is a bit shellish for right now.
-
- 08 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- hopefully i will slow down and only commit big things soon, but i added red
- **s to unimplemented features
-
- 08 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- implemented --list-available-vms and some internal seconday functions. also
- importing portage for right now
-
- 08 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- Added haveRoot() and made the --clean-system-classpath fail prettier like :)
-
- 08 Jun 2003; Todd Berman <tberman@gentoo.org> java-config:
- Added --java-version, --version and --clean-system-classpath
-
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java-config b/sci-chemistry/dsv/java-config-1.2.11/java-config
deleted file mode 100755
index a965ae2..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java-config
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Copyright 2001-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# Maintainer: Java Team <java@gentoo.org>
-# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
-# Ported to python by : Adrian Almenar <strider@gentoo.org> and Todd Berman <tberman@gentoo.org>
-# Author of Python version 1.1+ : Jason Mobarak <aether@gentoo.org>
-
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java-config,v 1.35 2004/10/10 21:30:17 karltk Exp $
-
-import sys, getopt, os
-from java_config import jc_options
-from java_config.jc_output import *
-
-__version__ = "$Revision: 1.35 $" [11:-2]
-__portage_version__ = "1.2.11"
-
-def run(todo):
-
- for option_class in todo:
- func, args = option_class[0].lstrip('-'), option_class[1]
- if len(func) == 1:
- if args != '' or not options.has_key(func):
- func += ':'
- name = options[func]
- func = name()
- else:
- if args != '' or not option_to_class.has_key(func):
- func += '='
- name = option_to_class[func]
- func = name()
- try:
- cn = str(name).split('.')[1]
- if func.require_root:
- if os.getuid() != 0:
- raise jc_options.OptionRuntimeError(
- 'root access required'
- )
- func(args)
- except jc_options.OptionRuntimeError, why:
- sys.stderr.write(red('%s: ' % cn) + bold(str(why)) + '\n')
- sys.exit(1)
- except NotImplementedError:
- sys.stderr.write(
- red('Error: ') + bold('option %s, has not been implemented.' % cn) + '\n'
- )
- sys.exit(1)
-
-usage = jc_options.Help()
-
-def check_no_color (args):
-
- if True in [nc in args for nc in ('-n', '--nocolor')]:
- jc_options.NoColors()(None)
-
-if __name__ == '__main__':
-
- args=sys.argv[1:]
-
- if len(args) == 0:
- raise SystemExit, usage('help')
-
- options, option_to_class = jc_options.collect()
- todo_queue = []
- options_allowed_no_args = ('h', 'help', 'p', 'classpath','f','show-active-vm')
-
- while True:
- try:
- todo = getopt.getopt(
- args,
- ''.join(options.iterkeys()),
- option_to_class.iterkeys()
- )
-
- if todo[1] != []:
- check_no_color(args)
- sys.stderr.write(red('\nError: extraneous stuff on the command line\n\n'))
- raise SystemExit(usage('help'))
-
- except getopt.GetoptError, error:
-
- option = error.opt
- check = len(option) == 1 and '-' + option or '--' + option
-
- check_no_color(args)
-
- if option in options_allowed_no_args:
- todo_queue.append((option, ''))
- args = [A for A in args if not check.startswith(A)]
-
- elif option in ('version', 'V'):
- raise SystemExit (
- bold('Gentoo ') + green('java-config') + bold(' version ' + __portage_version__)
- )
- else:
- sys.stderr.write(red('\nError: %s\n' % str(error)) + '\n')
- raise SystemExit(usage('help'))
-
- else:
- for I in todo_queue: todo[0].append(I)
- break
-
- def tweak(arg):
-
- if (arg, '') in todo[0]:
- jc_options.NoColors()(None)
- todo[0].remove((arg, ''))
-
- tweak('-n')
- tweak('--nocolor')
-
- if len(todo[0]) == 0:
- raise SystemExit, usage('help')
-
- # multiplicity
- option_list = []
- for option in todo[0]:
- if option not in option_list:
- option_list.append(option)
-
- run(option_list)
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java-config.1 b/sci-chemistry/dsv/java-config-1.2.11/java-config.1
deleted file mode 100644
index 7236449..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java-config.1
+++ /dev/null
@@ -1,122 +0,0 @@
-.TH JAVA-CONFIG "1" "November 2003" "java-config 1.1.8" "User Commands"
-.SH NAME
-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-c --javac\fI
-Show full path to currently selected Java compiler.
-.TP
-\fB-j --jar\fI
-Show full path to currently selected
-.I jar
-command.
-.TP
-\fB-O --jdk-home\fI
-Show path to currently selected JDK.
-.TP
-\fB-o --jre-home\fI
-Show path to currently selected JRE.
-.TP
-\fB-v --java-version\fI
-Query current JVM for version.
-.TP
-\fB-p [pkg1,pkg2,...] --classpath[=package1,package2,...]\fI
-Calculate classpath for a package.
-.TP
-\fB-e filename --exec=filename\fI
-Figure full path to one of the JDK/JRE utilities, such as
-.I keytool
-,
-.I rmic
-and others.
-.
-.TP
-\fB-l --list-available-packages\fI
-List available Java packages. Used for selection by
-.I --classpath
-,
-.I --set-system-classpath
-and
-.I --set-user-classpath
-.
-.TP
-\fB-L --list-available-vms\fI
-Lists available JVMs. Used with
-.I --set-system-vm
-and
-.I --set-user-vm
-.
-.TP
-\fB-S <vm-id> --set-system-vm=<vm-id>\fI
-Sets the system-wide default JVM.
-.TP
-\fB-s <vm-id> --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-f --show-active-vm\fI
-Show the JVM that's currently active, as set via --set-system-vm or --set-user-vm.
-.TP
-\fB-A <pkg1>,<pkg2>,... --set-system-classpath=<package1>,<package2>,...\fI
-Sets the system-wide default CLASSPATH.
-.TP
-\fB-a <pkg1>,<pkg2>,... --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).
-.TP
-\fB-X --clean-system-classpath\fI
-Cleans the system-wide default classpath, leaving only vm needed jars
-on it.
-.TP
-\fB-x --clean-user-classpath\fI
-Cleans the user specific classpath that was specified by
-.I --set-user-classpath
-by deleting
-.I $HOME/.gentoo/java-env-classpath .
-.
-.TP
-\fB-n --nocolor\fI
-Turn off all colors.
-.TP
-\fB-P <vm-id> --print=<vm-id>\fI
-Print the environment information for the specified virtual machine.
-.
-
-.SH NOTES
-You can get the <vm-id> that is used with
-.I --set-system-vm=<vm-id>
-and
-.I --set-user-vm=<vm-id>
-in the output of
-.I java-config --list-available-vms
-inside the brackets. Ex. [blackdown-jdk-1.4.1] and you can use this to
-set your default Java Virtual Machine.
-
-.SH AUTHORS
-Karl Trygve Kalleberg <karltk@gentoo.org>
-.br
-Adrian Almenar <strider@gentoo.org>
-.br
-Jason Mobarak <aether@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/sci-chemistry/dsv/java-config-1.2.11/java_config/.#jc_options.py.1.37 b/sci-chemistry/dsv/java-config-1.2.11/java_config/.#jc_options.py.1.37
deleted file mode 100644
index 7215b8e..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/.#jc_options.py.1.37
+++ /dev/null
@@ -1,894 +0,0 @@
-#!/usr/sbin/env python2
-# -*- coding: UTF-8 -*-
-
-# Author: Jason Mobarak
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_options.py,v 1.37 2004/07/18 21:21:30 aether Exp $
-
-__version__ = "$Revision: 1.37 $" [11:-2]
-
-import os
-import re
-from glob import glob
-
-import jc_iface
-
-from jc_exceptions import OptionRuntimeError
-from jc_exceptions import OptionNamesAlreadyDefinedException
-
-from jc_util import get_line_from_env_file
-from jc_util import find_exec
-from jc_util import may_want_to_source
-from jc_util import get_java_home
-from jc_util import get_jvm_env_var
-from jc_util import norm_cp
-from jc_util import collect_packages
-from jc_util import collect_vms
-from jc_util import die_no_jh
-from jc_util import warn
-
-from jc_envgen import GenerateEnvEntry
-from jc_envgen import EnvFileOutput
-from jc_envgen import EnvStdoutOutput
-from jc_envgen import BashEnvEntry
-from jc_envgen import TcshEnvEntry
-from jc_envgen import StdOutBashEnvEntry
-from jc_envgen import StdOutTcshEnvEntry
-
-from jc_output import *
-
-env = os.environ
-JAVA_HOME = get_java_home()
-
-# I'm assuming it's safe to assume that keys like 'HOME' are
-# always defined in os.environ
-
-def collect():
-
- """
- The bread and butter of how java-config works -- searches the __dict__
- of the jc_options(this) module and looks for classes that subclass the
- jc_iface.OptInterface class. Hopefully, these class will correctly
- subclass OptInterface and define everything that's required. The classes
- that are found are collected into a working program and iterations of
- the main program dispatch command line options to the class that says it
- implements that option. See jc_iface.OptInterface for more detailed info
- on these classes.
- """
-
- options = {}
- option_to_class = {}
- import jc_options
- jco_dict = jc_options.__dict__
-
- for name in jco_dict.iterkeys():
- obj = jco_dict[name]
- try:
- if issubclass(obj, jc_iface.OptInterface):
- short_name, long_name, usage = \
- obj.names[0], obj.names[1], obj.usage
-
- if not options.has_key(short_name) and \
- not option_to_class.has_key(long_name):
-
- option_to_class[long_name] = obj
- options[short_name] = obj
- else:
- raise \
- OptionNamesAlreadyDefinedException, \
- 'Class %s, defines already defined ' \
- 'option names.' % name
-
- except TypeError: pass # skip non-classes
-
- return options, option_to_class
-
-class Help (jc_iface.OptInterface):
-
- usage = (
- 'List all command line options with --help , for '
- 'command specific long help messages use --help=command (ex. --help=javac)',
- )
-
- usage += (usage[0] + ' or all long help messages with --help=*',)
-
- names = ('h:', 'help=')
-
- # Order that options are printed
- order = [
- 'J', 'c', 'j', 'O', 'o','f', 'v', 'p:', 'g:', 'e:', 'l', 'L', 'P:',
- 'S:', 's:', 'A:', 'a:', 'B:', 'b:', 'X', 'x', 'n',
- ]
-
- def _justify(self, S):
- 'Appends some spaces to make the printing of help prettier'
-
- check = Help._justify.LINE_LEN - 5
- space = ' ' * Help._justify.SPACE
-
- L = S.split()
- new_S, fin_S = '', ''
- for word in L:
- if len(new_S+word) <= check:
- new_S += '%s ' % word
- else:
- fin_S += '%s%s\n' % (space, new_S)
- new_S = word + ' '
- fin_S += '%s%s' % (space, new_S)
- return fin_S
-
- # Function constants for customizing how stuff is spaced
- _justify.LINE_LEN = 80
- _justify.SPACE = 4
-
- head = lambda s: \
- bold('Usage:')+' '+turquoise('java-config')+' [ '+ \
- green('OPTIONS')+' ]\n' + bold('Options:')
-
-
- def _print_help(self, klass):
-
- short_name, long_name = self._sub_args(klass)
- long_help = self._justify(klass.usage[1])
- return ' << %s >>\n%s' % \
- (bold('-%s --%s' % (short_name, long_name)), long_help)
-
-
- def _sub_args (self, klass):
- '''
- Change the : and = at the of the "names" to arg1[,arg2] or just
- arg if the function defines "single_arg" as true
- '''
-
- if klass.single_arg:
- short_name = klass.names[0].replace(':', ' argument')
- long_name = klass.names[1].replace('=', '=argument')
- else:
- short_name = klass.names[0].replace(':', ' arg1[,arg2,...]')
- long_name = klass.names[1].replace('=', '=arg1[,arg2,...]')
-
- return short_name, long_name
-
-
- def __call__(self, args):
-
- output_str = ''
- short_list, long_list = collect()
- klass = None
- if args == '*': args = ','.join(Help.order)
- if args == '':
- output_str += self.head() + '\n'
- for option in ['h:'] + Help.order:
- klass = short_list[option]
- short_name, long_name = self._sub_args(klass)
- output_str += ' << %s >> \n%s\n' % \
- (bold('-%s --%s' % (short_name, long_name)), \
- self._justify(klass.usage[0]))
- else:
- args = map(lambda S: S.lstrip('-'), args.split(','))
- if args == ['']: args = Help.order
- output_str += self.head() + '\n'
- for arg in args:
- if short_list.has_key(arg):
- klass = short_list[arg]
- elif short_list.has_key(arg + ':'):
- klass = short_list[arg + ':']
- elif long_list.has_key(arg):
- klass = long_list[arg]
- elif long_list.has_key(arg + '='):
- klass = long_list[arg + '=']
- else:
- raise OptionRuntimeError('command %s not found' % arg)
- if klass:
- output_str += self._print_help(klass) + '\n'
-
- print output_str
-
-class Java (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the java executable',
-
- 'Prints the location of the java virtual machine in the bin '
- 'directory of the java enviroment as specified by the JAVA_HOME '
- 'enviroment variable.'
- )
-
- names= ('J', 'java')
-
- def __call__(self, args):
- print find_exec('java')
-
-class Javac (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the java byte compiler',
-
- 'Prints the location of the java byte compiler (javac) in bin '
- 'directory of the java enviroment as specified by the JAVA_HOME '
- 'enviroment variable.'
- )
-
- names = ('c', 'javac')
-
- def __call__(self, args):
- print find_exec('javac')
-
-
-class Jar (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the jar executable',
-
- 'Prints the location of the jar program in bin directory of the '
- 'java enviroment as specified by the JAVA_HOME enviroment '
- 'variable.'
- )
-
- names = ('j', 'jar')
-
- def __call__(self, args):
- print find_exec('jar')
-
-
-class JDKHome (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the current jdk home',
-
- 'Prints the location of the current java developement kit home, '
- 'as specified by the JDK_HOME enviroment variable.'
- )
-
- names = ('O', 'jdk-home')
-
- def __call__(self, args):
-
- jdkh = get_jvm_env_var('JDK_HOME')
-
- if jdkh is None:
- print
- else:
- print jdkh
-
-
-class JREHome (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the current jre home',
-
- 'Prints the location of the current java runtime enviroment '
- 'home, as specified by the JRE_HOME enviroment variable.'
- )
-
- names = ('o', 'jre-home')
-
- def __call__(self, args):
-
- jreh = get_jvm_env_var('JRE_HOME')
-
- if jreh is None:
- print
- else:
- print jreh
-
-class ShowActiveVM(jc_iface.OptInterface):
- usage = (
- 'Show the active virtual machine',
- 'Show the active virtual machine'
- )
-
- names = ('f', 'show-active-vm')
-
- def __init__(self):
- self.vmlist = collect_vms()
-
- def __call__(self,args):
- for vm in self.vmlist.iterkeys():
- if (self.vmlist[vm]['JAVA_HOME'] == JAVA_HOME):
- print vm[2:]
-
-class JavaVersion (jc_iface.OptInterface):
-
- usage = (
- 'Print the version information for the in-use jvm',
-
- 'Outputs all version information given by the in-use java '
- 'virtual machine'
- )
-
- names = ('v', 'java-version')
-
- def __call__(self, args):
-
- from commands import getoutput
- print getoutput('%s -version' % find_exec('java'))
-
-
-class Classpath (jc_iface.OptInterface):
-
- usage = (
- 'Print entries in the enviroment or package classpath.',
-
- 'Print the enviroment class with just --classpath. Print the '
- 'classpath for a package with --classpath=pkg1,pkg2 .'
- )
-
- names = ('p:', 'classpath=')
-
- def __call__(self, args):
- cp = []
- if args != '':
- for arg in args.split(','):
- #print bold('Classpath entries in package %s:' % arg)
- try:
- cp.append(collect_packages(arg))
- except OptionRuntimeError, err_msg:
- warn(str(err_msg))
- print ':'.join(cp)
- else:
- #print bold('Entries in the classpath: \n')
- print env['CLASSPATH']
-
-class Exec (jc_iface.OptInterface):
-
- usage = (
- 'Execute something that should be somewhere in the JAVA_HOME',
-
- 'Searchs the bin directories of the Java Virtual Machine '
- 'specified by the JAVA_HOME enviroment variable and try to '
- 'execute it.'
- )
-
- names = ('e:', 'exec=')
-
- def __call__(self, args):
-
- #print args
- os.system(find_exec(args))
-
-class ListAvailablePackages (jc_iface.OptInterface):
-
- usage = (
- 'List all available packages',
-
- 'List all java packages, package names can be used when using '
- 'the --set-{system, user}-classpath commands'
- )
-
- names = ('l', 'list-available-packages')
-
- def __init__ (self):
-
- self.glob_pkg = os.path.join(
- '/', 'usr', 'share', '*', 'package.env'
- )
-
- self.glob_cp = os.path.join(
- '/', 'usr', 'share', '*', 'classpath.env'
- )
-
- self.glob_pkg_dir = os.path.join(
- '/', 'usr', 'share', 'java', 'packages', '*'
- )
-
- def __call__(self, args):
-
- def scour (pack):
-
- desc = get_line_from_env_file('DESC', pack)
- if desc == None:
- desc = '*Error getting description*'
-
- return desc
-
- for pack in glob(self.glob_pkg):
-
- desc = scour(pack)
-
- pkg_name = os.path.basename(os.path.dirname(pack))
- self.output('[%s] %s (%s)' % (pkg_name, desc, pack))
-
- for pack in glob(self.glob_cp):
-
- pkg_name = os.path.basename(os.path.dirname(pack))
- self.output('[%s] No description (%s)' % (pkg_name, pack))
-
- for pack in glob(self.glob_pkg_dir):
-
- desc = scour(pack)
-
- pkg_name = pack.split(os.sep)[-1]
- self.output('[%s] %s (%s)' % (pkg_name, desc, pack))
-
- def output (self, L):
-
- print L
-
-
-class ListAvailableVMs (jc_iface.OptInterface):
-
- usage = (
- 'List all available virtual machines',
-
- 'Lists all virtuals machines in the /etc/env.d/java '
- 'directory, displays wether a VM is active'
- )
-
- names = ('L', 'list-available-vms')
-
- def __init__(self):
-
- self.vm_list = collect_vms()
-
- def _active_vm (self, java_home):
- # Should fix bug #32611, no need to die if JVM isn't set when
- # listing JVMs
- #die_no_jh()
-
- if java_home == JAVA_HOME: return True
- else: return False
-
- def _disp_vm (self, file_name, cfg):
-
- short_name = file_name[2:]
- vmstr = '[%s] %s (/etc/env.d/java/%s)' \
- % (short_name, cfg['VERSION'], file_name)
- if self._active_vm(cfg['JAVA_HOME']):
- return green(vmstr + ' *')
- else: return vmstr
-
- def __call__(self, args):
-
- for vm in self.vm_list.iterkeys():
- print self._disp_vm(vm, self.vm_list[vm])
-
-source_java_classpath = \
-'''
-if [ -f $HOME/.gentoo/java ] ; then
- . $HOME/.gentoo/java
-fi
-'''
-
-source_java_classpath_csh = \
-'''
-if ( -f $HOME/.gentoo/java.csh ) then
- source $HOME/.gentoo/java.csh
-endif
-'''
-
-executables_a_system_vm_should_have = [
- 'javac',
- 'javadoc',
- 'jar',
-]
-
-def vm_ok_for_system (vm_name, env_gen_obj):
- '''
- Check that a VM has all the binaries it needs to be a
- proper system VM
- '''
-
- suk = False
- java_home = env_gen_obj.vm['JAVA_HOME']
-
- for exe in executables_a_system_vm_should_have:
- try:
- find_exec(exe, java_home=java_home)
- except OptionRuntimeError, e:
- suk = True
- warn(str(e))
-
- try:
- find_exec('rmic', java_home=java_home)
- except OptionRuntimeError, e:
- warn(str(e))
-
- if suk:
- warn(
- 'THIS SYSTEM VM IS NOT SUFFICIENT, '
- 'REQUIRED BINARIES WERE NOT FOUND'
- )
-
-def set_vm(vm_name, system=False):
-
- systemVM = system
- genv = GenerateEnvEntry(vm_name)
-
- if systemVM:
- vm_ok_for_system(vm_name, genv)
- sh_out = EnvFileOutput()
- sh_mkr = BashEnvEntry(system=True)
- else:
- sh_out = EnvFileOutput(
- config_file='java',
- config_path=os.path.join(env['HOME'], '.gentoo')
- )
- sh_mkr = BashEnvEntry(system=False)
-
- csh_out = EnvFileOutput(
- config_file='java.csh',
- config_path=os.path.join(env['HOME'], '.gentoo')
- )
-
- csh_mkr = TcshEnvEntry(system=False)
- csh_mkr.installOutputHandler(csh_out)
- genv.installMaker(csh_mkr)
-
- sh_mkr.installOutputHandler(sh_out)
- genv.installMaker(sh_mkr)
-
- genv.makeEnvEntry()
-
- if systemVM:
- print 'System Virtual Machine set'
- may_want_to_source()
- else:
- print 'Config options added to %s/.gentoo directory' % (env['HOME'],)
-
-
-class PrintVMEnvVar (jc_iface.OptInterface):
- usage = (
- 'Print an environment variable from the currently selected VM',
-
- 'Outputs a specific environment variable for the specified VM'
- )
-
- names = ('g:', 'get-env')
-
- single_arg = True
-
- def __call__(self, args):
- vars = args[0].split(",")
-
- for x in vars:
- env = get_jvm_env_var(x)
- if env is None:
- print
- else:
- print env
-
-class PrintVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Print the environment information for a specified VM',
-
- 'Outputs all the environment information for a specified VM so that '
- 'the output can be evaluated or viewed, takes two arguments, first argument '
- 'is a JVM name (see --list-available-vms), second argument is a shell type '
- 'currently supported is "sh" or "csh", if only one argument is specified "sh" '
- 'is assumed'
- )
-
- names = ('P:', 'print=')
-
- #single_arg = True
-
- def __call__(self, args):
-
- args = args.split(',')
-
- if len(args) == 1:
- shellType = 'sh'
- else:
- shellType = args[1]
-
- try:
- genv = GenerateEnvEntry(args[0])
- except OptionRuntimeError:
- # die silently
- print ''
- return
-
- if shellType == 'sh':
- _ = StdOutBashEnvEntry(False)
- _.installOutputHandler(EnvStdoutOutput())
- genv.installMaker(_)
- elif shellType == 'csh':
- _ = StdOutTcshEnvEntry(False)
- _.installOutputHandler(EnvStdoutOutput())
- genv.installMaker(_)
- else:
- raise OptionRuntimeError('Unsupported shell type specified')
-
- genv.makeEnvEntry()
-
-
-class SetSystemVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Set the VM for the entire system',
-
- 'Set the virtual machine that the entire system will use by '
- 'default'
- )
-
- names = ('S:', 'set-system-vm=')
-
- require_root = True
- single_arg = True
-
- def __call__(self, args):
- set_vm(args, system=True)
-
-
-class SetUserVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Set the VM for a user',
-
- 'Set the virtual machine that the current user will use by '
- 'default'
- )
-
- names = ('s:', 'set-user-vm=')
- single_arg = True
-
- def __call__(self, args):
-
- jc_dir = env['HOME'] + '/.gentoo'
-
- if os.getuid() == 0:
- raise OptionRuntimeError, 'root should always use the system vm'
-
- can_write = os.access(os.path.split(jc_dir)[0], os.R_OK|os.W_OK|os.X_OK)
- if not can_write:
- raise OptionRuntimeError('Cannot write to ${HOME}')
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
- elif not os.path.exists(jc_dir):
- raise OptionRuntimeError('${HOME}/.gentoo exists but is not a directory')
-
- set_vm(args)
-
- if not os.path.isfile(jc_dir + '/java-env'):
- file(os.path.join(jc_dir, 'java-env'), 'w').write(
- source_java_classpath
- )
-
- if not os.path.isfile(jc_dir + '/java-env.csh'):
- file(os.path.join(jc_dir, 'java-env.csh'), 'w').write(
- source_java_classpath_csh
- )
-
-
-class SetSystemClasspath (jc_iface.OptInterface):
-
- # /etc/env.d/21java-classpath
-
- usage = (
- 'Set the system classpath',
-
- 'Set the system classpath based on the package names specified, '
- 'available packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('A:', 'set-system-classpath=')
- require_root = True
-
- def __call__(self, args):
-
- #if os.getuid() != 0: raise OptionRuntimeError, 'root access required'
- if args == '':
- raise OptionRuntimeError, \
- 'if you want to clean the classpath use --clean-system-classpath'
-
- else:
- try:
- fn = os.path.join('/', 'etc', 'env.d', '21java-classpath')
- fp = file(fn, 'w')
- except (OSError, IOError), e:
- raise OptionRuntimeError(
- 'Error opening configuration file, ' + str(e)
- )
-
- try:
- fp.write('CLASSPATH=%s\n' % (collect_packages(args),))
- except (OSError, IOError), e:
- raise OptionRuntimeError(
- 'Error writing configuration file, ' + str(e)
- )
-
- print 'System classpath set'
- may_want_to_source()
-
-
-class AddSystemClasspath (jc_iface.OptInterface):
-
- # /etc/env.d/21java-classpath
-
- usage = (
- 'Append to the system classpath',
-
- 'Append the package names specified to the system '
- 'classpath. Packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('B:', 'add-system-classpath=')
- require_root = True
-
- conf_file = os.path.join('/', 'etc', 'env.d', '21java-classpath')
-
- def __call__(self, args):
-
- if args == '':
- raise OptionRuntimeError(
- 'if you want to clean the classpath use --clean-system-classpath')
-
- else:
- old_classpath = None
-
- try:
- old_classpath = file(self.conf_file, 'r').read().strip()
-
- except (OSError, IOError), e:
- warn ("Error reading classpath file " + str(e))
- return
-
- try:
- old_classpath = old_classpath.split('=', 1)[1]
- #old_classpath = re.sub('CLASSPATH=', '', old_classpath)
-
- except IndexError:
- warn ("Malformed CLASSPATH")
- return
-
- try:
- file(self.conf_file, 'w').write(
- 'CLASSPATH=%s%s\n' % (
- old_classpath is not None and (old_classpath + ':') or '',
- collect_packages(args),))
-
- except (OSError, IOError), e:
- warn ("Error writing classpath file " + str(e))
- return
-
-
- print 'System classpath set'
- may_want_to_source()
-
-class SetUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Set the user classpath',
-
- 'Set the user classpath based on the package names '
- 'specified, available packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('a:', 'set-user-classpath=')
-
- def __call__(self, args):
-
- jc_dir = os.path.join(env['HOME'], '.gentoo')
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
-
- file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write(
- 'CLASSPATH=${CLASSPATH}:' + collect_packages(args)
- )
-
- if not os.path.isfile(os.path.join(jc_dir, 'java-env')):
-
- file(os.path.join(jc_dir, 'java-env'), 'w').write(
- source_java_classpath
- )
-
-class AppendUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Append to the user classpath',
-
- 'Append the package names specified to the user '
- 'classpath, available packages can be found with '
- 'the --list-available-packages option.'
- )
-
- names = ('b:', 'add-user-classpath=')
-
- def __call__(self, args):
-
- jc_dir = os.path.join(env['HOME'], '.gentoo')
- old_classpath = ''
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
-
- elif os.path.isfile(os.path.join(jc_dir, 'java-env-classpath')):
- old_classpath = file(os.path.join(jc_dir, 'java-env-classpath'), 'r').read()
- old_classpath = re.sub('CLASSPATH=\${CLASSPATH}:', '', old_classpath)[:-1]
-
- file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write(
- 'CLASSPATH=${CLASSPATH}:' + old_classpath + ':' + collect_packages(args)
- )
-
- if not os.path.isfile(os.path.join(jc_dir, 'java-env')):
- file(os.path.join(jc_dir, 'java-env'), 'w').write(source_java_classpath)
-
-class CleanSystemClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Clean the classpath of all packages',
-
- 'Whipes the classpath of all packages, this is done by '
- 'removing the /etc/env.d/21java-classpath file.'
- )
-
- names = ('X', 'clean-system-classpath')
-
- require_root = True
- env_file = '/etc/env.d/21java-classpath'
-
- def __call__(self, args):
-
- #if os.getuid() != 0: raise OptionRuntimeError, 'root access required'
- if os.path.isfile(self.env_file):
- print 'Cleaning system classpath...'
- os.remove(self.env_file)
- #if os.system('/usr/sbin/env-update') != 0:
- # raise OptionRuntimeError, 'env-update command not found!'
- print 'System classpath cleaned'
- may_want_to_source()
-
-class CleanUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Clean the user classpath of all packages',
-
- 'Whipes the user classpath of all packages, '
- 'this is done by removing the '
- '~/.gentoo/java-env-classpath file.'
- )
-
- names = ('x', 'clean-user-classpath')
- require_root = False
-
- def __init__ (self):
-
- self.env_file = os.path.join(env['HOME'], '.gentoo', 'java-env-classpath')
-
- def __call__(self, args):
-
- if os.path.isfile(self.env_file):
- print 'Cleaning user classpath...'
- os.remove(self.env_file)
- print 'User classpath cleaned'
- else:
- print 'No user classpath file found'
-
-class NoColors (jc_iface.OptInterface):
-
- usage = (
- 'Turn off all colors.',
-
- 'Turn off all instances of color or bold escape '
- 'codes that java-config might use.'
- )
-
- names = ('n', 'nocolor')
- require_root = False
-
- def __call__ (self, args):
- nocolor()
-
-if __name__ == '__main__':
-
- import __main__
- name, thing = None, None
- for (name, thing) in __main__.__dict__.iteritems():
- try:
- if issubclass(thing, __main__.jc_iface.OptInterface):
- print blue('jc_iface.OptInterface: ') + bold(name)
- else:
- print 'Not a subclass: ' + name
- except TypeError:
- print 'This was not a class: ' + name
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/__init__.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/__init__.py
deleted file mode 100644
index 9a34584..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/__init__.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/__init__.py,v 1.3 2004/07/03 06:33:44 aether Exp $
-
-__version__ = '$Revision: 1.3 $' [11:-2]
-
-'''
-java-config support files
-'''
-
-version = '1.1.0'
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/cfg_parse.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/cfg_parse.py
deleted file mode 100644
index 7baca58..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/cfg_parse.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/cfg_parse.py,v 1.3 2004/07/03 06:33:44 aether Exp $
-
-__version__ = '$Revision: 1.3 $' [11:-2]
-
-class NotTolerantException (Exception):
- "Raise me when someone screws up a config file."
-
-def cfgverify (cfg_dict):
- """ XXX - verify a config dict has everything we're looking for! """
- # Currently the only key java-config expects to be there is JAVA_HOME...
-
-def getconfig (cfg_file, env):
-
- var_dict = {}
- bracketed = False
- l_count = 0
-
- cfg = filter(
- lambda S: \
- not S.isspace() and S != '', open(cfg_file, 'r').read().split('\n')
- )
-
- for line in cfg:
-
- line.replace
- twice = line.split('=')
- #print twice
-
- if not line.startswith('#') and len(twice) == 2:
-
- var_name, var_value = twice
-
- if var_value == '':
- raise NotTolerantException, 'Error at line ' + str(l_count)
-
- vars = line.split('$')
-
- if len(vars) == 1:
- vars = []
- else:
- vars = vars[1:]
-
- #print twice
-
- for item in iter(vars):
- item = item.strip("\'\"").strip('\\')
- item = item.split('}')[0]
- #print item
- if item.startswith('{'):
- bracketed = True
- item = item[1:]
-
- # This should fix bug #31924
- # expand stuff
- if var_dict.has_key(item):
- value = var_dict[item]
- elif env.has_key(item):
- value = env[item]
- else:
- value = ''
-
- if bracketed:
- rep = '${%s}' % var_name
- var_value = var_value.replace('${%s}' % item, value)
- bracketed = False
-
- else:
- var_value = var_value.replace('$%s' % item, value)
-
- var_dict[var_name] = var_value
- # tweedle dee...
- env[var_name] = var_value
-
- l_count += 1
-
- return var_dict
-
-
-#if err_msg != '':
-# raise SystemExit, 'Config file produced errors!\n\n' + err_msg
-
-#print bash_out.read()
-if __name__ == '__main__':
-
- import sys
-
- if len(sys.argv) != 2:
- raise SystemExit, 'Usage: %s <config-file>' % __file__
-
- try:
- var_dict = varexpand(sys.argv[1])
- var_dict2 = get_cfg(sys.argv[1])
- except NotTolerantException, reason:
- raise SystemExit, 'Not tolerant! ' + str(reason)
-
- #cfg = cfg.split('\n')
-
- print 'varexpand :::'
- for var, value in var_dict.iteritems():
- print '%s --> %s' % (var, value)
-
- print 'get_cfg :::'
- for var, value in var_dict2.iteritems():
- print '%s --> %s' % (var, value)
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_envgen.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_envgen.py
deleted file mode 100644
index 2503d90..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_envgen.py
+++ /dev/null
@@ -1,289 +0,0 @@
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_envgen.py,v 1.5 2004/10/10 19:15:21 karltk Exp $
-
-import os
-import errno
-
-from jc_util import collect_vms
-from jc_exceptions import OptionRuntimeError
-
-__version__ = "$Revision: 1.5 $" [11:-2]
-
-
-def find_vm (name):
- '''
- Find a VM, match prefixes, raise an error if the VM couldn't be
- found or there was more than one match.
- '''
-
- vms = collect_vms()
- matches = [
- S for S in vms.keys()
- if S.lstrip('20').startswith(name)
- ]
-
- if not matches:
- raise OptionRuntimeError('VM not found, use --list-available-vms')
-
- selected = matches[0]
-
- if len(matches) > 1:
-
- print 'Multiple alternatives matching:'
-
- for n in matches:
-
- if n.lstrip('20') == name:
- selected = n
-
- print '\t%s' % (n[2:],)
-
- print 'Selected ' + selected
-
- return vms[selected]
-
-
-class GenerateEnvEntry:
-
- def __init__ (self, vmName):
-
- self.vm = find_vm(vmName)
- self.vmName = vmName
- self.makers = []
-
- def installMaker (self, envMkr):
-
- self.makers.append(envMkr)
-
- def makeEnvEntry (self):
-
- self._doHeaders()
-
- for (command, value,) in self.vm.iteritems():
-
- handler = 'handle_' + command
- self._mux(handler, command, value)
-
- self._cleanUp()
-
- def _doHeaders (self):
-
- for (maker) in self.makers:
- O = maker.getHeader(self.vmName)
- if O is not None:
- maker.doOutput(O)
-
- def _mux (self, handler, cmd, cmdval):
-
- for (maker) in self.makers:
- if hasattr(maker, handler):
- hdl = getattr(maker, handler)
- else:
- # if this fails then something is wrong
- hdl = maker.handle_special
-
- O = hdl(cmd, cmdval)
-
- #if O == 'export ':
- # print hdl
-
- if O is not None:
- maker.doOutput(O)
-
- def _cleanUp (self):
-
- for maker in self.makers:
- maker.cleanUp()
-
-class EnvMaker:
-
- def __init__ (self, system=False):
-
- self.system = system
- self.outputHandlers = []
-
- def installOutputHandler (self, handler):
-
- self.outputHandlers.append(handler)
-
- def doOutput (self, L):
-
- for handler in self.outputHandlers:
- handler.line(L)
-
- def cleanUp (self):
-
- for output in self.outputHandlers:
- output.cleanUp()
-
- def getHeader (self, vm_name):
-
- if self.system:
- cmd = 'set-system-vm'
- else:
- cmd = 'set-user-vm'
-
- auto = '# Autogenerated by java-config\n# Command: --%s=%s' % (cmd, vm_name,)
-
- return auto
-
-class BashEnvEntry (EnvMaker):
-
- def handle_ADDPATH (self, cmd, value):
-
- conf_str = None
-
- if self.system:
- conf_str = 'PATH=%s\nROOTPATH=%s' % (value, value,)
- else:
- conf_str = 'PATH=%s:${PATH}' % (value.strip('"'),)
-
- assert conf_str is not None
-
- return conf_str
-
- def handle_MANPATH (self, cmd, value):
-
- return 'MANPATH=${MANPATH}:%s' % (value.strip('"'),)
-
- def handle_ADDLDPATH (self, cmd, value):
-
- conf_str = None
-
- if self.system:
- conf_str = 'LDPATH=%s' % (value,)
-
- return conf_str
-
- def handle_CLASSPATH (self, cmd, value):
-
- return 'CLASSPATH=%s' % (value,)
-
- def handle_VERSION (self, cmd, value):
-
- return '# VERSION=%s' % (value,)
-
- def handle_ENV_VARS (self, cmd, val):
-
- return None
-
- def handle_special (self, cmd, value):
-
- ret = None
-
- if cmd == 'ROOTPATH' and not self.system:
- ret = None
- else:
- ret = '%s=%s' % (cmd, value,)
-
- return ret
-
-class TcshEnvEntry (EnvMaker):
-
- def handle_ADDPATH (self, cmd, value):
-
- if self.system:
- return ''
- else:
- return 'setenv PATH %s:${PATH}' % value.strip('"')
-
- def handle_MANPATH (self, cmd, value):
-
- return 'setenv MANPATH ${MANPATH}:%s' % (value.strip('"'),)
-
- def handle_ADDLDPATH (self, cmd, value):
-
- return None
-
- def handle_CLASSPATH (self, cmd, value):
-
- return 'setenv CLASSPATH %s' % (value,)
-
- def handle_VERSION (self, cmd, value):
-
- return '# %s=%s' % (cmd, value)
-
- def handle_ENV_VARS (self, c, v):
-
- return None
-
- def handle_special (self, cmd, value):
-
- return 'setenv %s %s' % (cmd, value)
-
-
-class StdOutBashEnvEntry (BashEnvEntry):
-
- def getHeader (self, vm_name):
- return None
-
- def _gh (self, name, c, v):
-
- O = getattr(BashEnvEntry, 'handle_' + name)(self, c, v)
- if O is not None:
- if O.startswith('#'):
- return None
- else:
- return 'export ' + O
- else:
- return None
-
- def handle_ADDPATH (self, c, v): return self._gh('ADDPATH', c, v)
- def handle_MANPATH (self, c, v): return self._gh('MANPATH', c, v)
- def handle_ADDLDPATH (self, c, v): return self._gh('ADDLDPATH', c, v)
- def handle_CLASSPATH (self, c, v): return self._gh('CLASSPATH', c, v)
- def handle_VERSION (self, c, v): return self._gh('VERSION', c, v)
- def handle_special (self, c, v): return self._gh('special', c, v)
-
-
-class StdOutTcshEnvEntry (StdOutBashEnvEntry, TcshEnvEntry):
-
- def _gh (self, name, c, v):
-
- O = getattr(TcshEnvEntry, 'handle_' + name)(self, c, v)
- if O is not None:
- if O.startswith('#'):
- return None
- else:
- return O
- else:
- return None
-
-
-class EnvOutput:
-
- def header (self, headStr):
-
- return None
-
-
-class EnvFileOutput (EnvOutput):
-
- def __init__ (self, config_file='20java', config_path='/etc/env.d'):
-
- try:
- self.configFile = open(os.path.join(config_path, config_file), 'w')
- except (IOError, OSError), e:
- raise OptionRuntimeError(
- 'Error opening JVM configuration file %s' % (str(e),)
- )
-
- def header (self, headStr):
-
- self.configFile.write(headStr + '\n')
-
- def line (self, line):
- self.configFile.write(line + '\n')
-
- def cleanUp (self):
- self.configFile.close()
-
-
-class EnvStdoutOutput (EnvOutput):
-
- def line (self, line):
- print line
-
- def cleanUp (self):
- pass
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_exceptions.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_exceptions.py
deleted file mode 100644
index 2e0c472..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_exceptions.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_exceptions.py,v 1.8 2004/07/03 06:33:44 aether Exp $
-
-'''
-Custom exceptions for java-config
-'''
-
-__version__ = "$Revision: 1.8 $" [11:-2]
-
-class OptionNamesAlreadyDefinedException (Exception): pass
-
-class OptionRuntimeError (SystemExit):
-
- """
- A general error for when something goes wrong in an "option class", the main
- java-config program will catch this error and report it to the user without
- bailing out of the whole program (i.e. other command line option will be
- unaffected).
- """
-
- """
- def __init__ (self, errno=1, errstr=None):
-
- SystemExit.__init__(self, errno)
- self.errstring = errstr
- """
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_iface.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_iface.py
deleted file mode 100644
index bf1c9be..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_iface.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# Author: Jason Mobarak <jmob@unm.edu>
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_iface.py,v 1.6 2004/07/03 06:33:44 aether Exp $
-
-__version__ = "$Revision: 1.6 $"[11:-2]
-
-
-class OptInterface:
- '''
- Base Interface for java-config functionality, all classes that
- implement new options must subclass this.
-
- Class fields that must be defined:
-
- usage - A tuple containing a two strings with (short, long) help. Long
- help will be printed when the user requets the --help option followed
- by the name of an option. Short help will be printed when the user
- requests help with no options or calls the java-config program with
- no arguments.
-
- names - The (short, long) names for the option. (i.e. what the user can
- specify on the command line to access a specific option.
- '''
-
- usage = (None, None)
- names = (None, None)
-
- # -Begin- These are not required to be defined in subclasses class
- # whether the option requires root access
- require_root = False
- # whether the option only requires one arg (thus arg1,arg2 will fail)
- single_arg = False
- # -End-
-
- def __call__(self, args):
-
- '''
- The main java-config program calls this method in order to
- run the option, all option classes must define this method with
- the specific signature.
- '''
-
- raise NotImplementedError
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_options.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_options.py
deleted file mode 100644
index 0d430da..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_options.py
+++ /dev/null
@@ -1,934 +0,0 @@
-#!/usr/sbin/env python2
-# -*- coding: UTF-8 -*-
-
-# Author: Jason Mobarak
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_options.py,v 1.41 2004/10/10 21:28:44 karltk Exp $
-
-__version__ = "$Revision: 1.41 $" [11:-2]
-
-import os
-import re
-from glob import glob
-
-import jc_iface
-
-from jc_exceptions import OptionRuntimeError
-from jc_exceptions import OptionNamesAlreadyDefinedException
-
-from jc_util import get_line_from_env_file
-from jc_util import find_exec
-from jc_util import may_want_to_source
-from jc_util import get_java_home
-from jc_util import get_jvm_env_var
-from jc_util import norm_cp
-from jc_util import collect_packages
-from jc_util import collect_library
-from jc_util import collect_vms
-from jc_util import die_no_jh
-from jc_util import warn
-
-from jc_envgen import GenerateEnvEntry
-from jc_envgen import EnvFileOutput
-from jc_envgen import EnvStdoutOutput
-from jc_envgen import BashEnvEntry
-from jc_envgen import TcshEnvEntry
-from jc_envgen import StdOutBashEnvEntry
-from jc_envgen import StdOutTcshEnvEntry
-
-from jc_output import *
-
-env = os.environ
-JAVA_HOME = get_java_home()
-
-# I'm assuming it's safe to assume that keys like 'HOME' are
-# always defined in os.environ
-
-def collect():
-
- """
- The bread and butter of how java-config works -- searches the __dict__
- of the jc_options(this) module and looks for classes that subclass the
- jc_iface.OptInterface class. Hopefully, these class will correctly
- subclass OptInterface and define everything that's required. The classes
- that are found are collected into a working program and iterations of
- the main program dispatch command line options to the class that says it
- implements that option. See jc_iface.OptInterface for more detailed info
- on these classes.
- """
-
- options = {}
- option_to_class = {}
- import jc_options
- jco_dict = jc_options.__dict__
-
- for name in jco_dict.iterkeys():
- obj = jco_dict[name]
- try:
- if issubclass(obj, jc_iface.OptInterface):
- short_name, long_name, usage = \
- obj.names[0], obj.names[1], obj.usage
-
- if not options.has_key(short_name) and \
- not option_to_class.has_key(long_name):
-
- option_to_class[long_name] = obj
- options[short_name] = obj
- else:
- raise \
- OptionNamesAlreadyDefinedException, \
- 'Class %s, defines already defined ' \
- 'option names.' % name
-
- except TypeError: pass # skip non-classes
-
- return options, option_to_class
-
-
-def report_env_update():
-
- print "Env files in %s/.gentoo updated. Source these in your shell's profile." % (env['HOME'])
-
-
-class Help (jc_iface.OptInterface):
-
- usage = (
- 'List all command line options with --help , for '
- 'command specific long help messages use --help=command (ex. --help=javac)',
- )
-
- usage += (usage[0] + ' or all long help messages with --help=*',)
-
- names = ('h:', 'help=')
-
- # Order that options are printed
- order = [
- 'J', 'c', 'j', 'O', 'o','f', 'v', 'p:', 'g:', 'e:', 'l', 'L', 'P:',
- 'S:', 's:', 'A:', 'a:', 'B:', 'b:', 'X', 'x', 'n','i:',
- ]
-
- def _justify(self, S):
- 'Appends some spaces to make the printing of help prettier'
-
- check = Help._justify.LINE_LEN - 5
- space = ' ' * Help._justify.SPACE
-
- L = S.split()
- new_S, fin_S = '', ''
- for word in L:
- if len(new_S+word) <= check:
- new_S += '%s ' % word
- else:
- fin_S += '%s%s\n' % (space, new_S)
- new_S = word + ' '
- fin_S += '%s%s' % (space, new_S)
- return fin_S
-
- # Function constants for customizing how stuff is spaced
- _justify.LINE_LEN = 80
- _justify.SPACE = 4
-
- head = lambda s: \
- bold('Usage:')+' '+turquoise('java-config')+' [ '+ \
- green('OPTIONS')+' ]\n' + bold('Options:')
-
-
- def _print_help(self, klass):
-
- short_name, long_name = self._sub_args(klass)
- long_help = self._justify(klass.usage[1])
- return ' << %s >>\n%s' % \
- (bold('-%s --%s' % (short_name, long_name)), long_help)
-
-
- def _sub_args (self, klass):
- '''
- Change the : and = at the of the "names" to arg1[,arg2] or just
- arg if the function defines "single_arg" as true
- '''
-
- if klass.single_arg:
- short_name = klass.names[0].replace(':', ' argument')
- long_name = klass.names[1].replace('=', '=argument')
- else:
- short_name = klass.names[0].replace(':', ' arg1[,arg2,...]')
- long_name = klass.names[1].replace('=', '=arg1[,arg2,...]')
-
- return short_name, long_name
-
-
- def __call__(self, args):
-
- output_str = ''
- short_list, long_list = collect()
- klass = None
- if args == '*': args = ','.join(Help.order)
- if args == '':
- output_str += self.head() + '\n'
- for option in ['h:'] + Help.order:
- klass = short_list[option]
- short_name, long_name = self._sub_args(klass)
- output_str += ' << %s >> \n%s\n' % \
- (bold('-%s --%s' % (short_name, long_name)), \
- self._justify(klass.usage[0]))
- else:
- args = map(lambda S: S.lstrip('-'), args.split(','))
- if args == ['']: args = Help.order
- output_str += self.head() + '\n'
- for arg in args:
- if short_list.has_key(arg):
- klass = short_list[arg]
- elif short_list.has_key(arg + ':'):
- klass = short_list[arg + ':']
- elif long_list.has_key(arg):
- klass = long_list[arg]
- elif long_list.has_key(arg + '='):
- klass = long_list[arg + '=']
- else:
- raise OptionRuntimeError('command %s not found' % arg)
- if klass:
- output_str += self._print_help(klass) + '\n'
-
- print output_str
-
-class Java (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the java executable',
-
- 'Prints the location of the java virtual machine in the bin '
- 'directory of the java enviroment as specified by the JAVA_HOME '
- 'enviroment variable.'
- )
-
- names= ('J', 'java')
-
- def __call__(self, args):
- print find_exec('java')
-
-class Javac (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the java byte compiler',
-
- 'Prints the location of the java byte compiler (javac) in bin '
- 'directory of the java enviroment as specified by the JAVA_HOME '
- 'enviroment variable.'
- )
-
- names = ('c', 'javac')
-
- def __call__(self, args):
- print find_exec('javac')
-
-
-class Jar (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the jar executable',
-
- 'Prints the location of the jar program in bin directory of the '
- 'java enviroment as specified by the JAVA_HOME enviroment '
- 'variable.'
- )
-
- names = ('j', 'jar')
-
- def __call__(self, args):
- print find_exec('jar')
-
-
-class JDKHome (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the current jdk home',
-
- 'Prints the location of the current java developement kit home, '
- 'as specified by the JDK_HOME enviroment variable.'
- )
-
- names = ('O', 'jdk-home')
-
- def __call__(self, args):
-
- jdkh = get_jvm_env_var('JDK_HOME')
-
- if jdkh is None:
- print
- else:
- print jdkh
-
-
-class JREHome (jc_iface.OptInterface):
-
- usage = (
- 'Print the location of the current jre home',
-
- 'Prints the location of the current java runtime enviroment '
- 'home, as specified by the JRE_HOME enviroment variable.'
- )
-
- names = ('o', 'jre-home')
-
- def __call__(self, args):
-
- jreh = get_jvm_env_var('JRE_HOME')
-
- if jreh is None:
- print
- else:
- print jreh
-
-class ShowActiveVM(jc_iface.OptInterface):
- usage = (
- 'Show the active virtual machine',
- 'Show the active virtual machine'
- )
-
- names = ('f', 'show-active-vm')
-
- def __init__(self):
- self.vmlist = collect_vms()
-
- def __call__(self,args):
- for vm in self.vmlist.iterkeys():
- if (self.vmlist[vm]['JAVA_HOME'] == JAVA_HOME):
- print vm[2:]
-
-class JavaVersion (jc_iface.OptInterface):
-
- usage = (
- 'Print the version information for the in-use jvm',
-
- 'Outputs all version information given by the in-use java '
- 'virtual machine'
- )
-
- names = ('v', 'java-version')
-
- def __call__(self, args):
-
- from commands import getoutput
- print getoutput('%s -version' % find_exec('java'))
-
-
-class Classpath (jc_iface.OptInterface):
-
- usage = (
- 'Print entries in the enviroment or package classpath.',
-
- 'Print the enviroment class with just --classpath. Print the '
- 'classpath for a package with --classpath=pkg1,pkg2 .'
- )
-
- names = ('p:', 'classpath=')
-
- def __call__(self, args):
- cp = []
- if args != '':
- for arg in args.split(','):
- #print bold('Classpath entries in package %s:' % arg)
- try:
- cp.append(collect_packages(arg))
- except OptionRuntimeError, err_msg:
- warn(str(err_msg))
- print ':'.join(cp)
- else:
- #print bold('Entries in the classpath: \n')
- print env['CLASSPATH']
-
-class Librarypath (jc_iface.OptInterface):
-
- usage = (
- 'Print entries in the package library.',
-
- 'Print the library path for a package '
- 'with --library=pkg1,pkg2 .'
- )
-
- names = ('i:', 'library=')
-
- def __call__(self, args):
- cp = []
- for arg in args.split(','):
- try:
- cp.append(collect_library(arg))
- except OptionRuntimeError, err_msg:
- warn(str(err_msg))
- print ':'.join(cp)
-
-
-class Exec (jc_iface.OptInterface):
-
- usage = (
- 'Execute something that should be somewhere in the JAVA_HOME',
-
- 'Searchs the bin directories of the Java Virtual Machine '
- 'specified by the JAVA_HOME enviroment variable and try to '
- 'execute it.'
- )
-
- names = ('e:', 'exec=')
-
- def __call__(self, args):
-
- #print args
- os.system(find_exec(args))
-
-class ListAvailablePackages (jc_iface.OptInterface):
-
- usage = (
- 'List all available packages',
-
- 'List all java packages, package names can be used when using '
- 'the --set-{system, user}-classpath commands'
- )
-
- names = ('l', 'list-available-packages')
-
- def __init__ (self):
-
- self.glob_pkg = os.path.join(
- '/', 'usr', 'share', '*', 'package.env'
- )
-
- self.glob_cp = os.path.join(
- '/', 'usr', 'share', '*', 'classpath.env'
- )
-
- self.glob_pkg_dir = os.path.join(
- '/', 'usr', 'share', 'java', 'packages', '*'
- )
-
- def __call__(self, args):
-
- def scour (pack):
-
- desc = get_line_from_env_file('DESC', pack)
- if desc == None:
- desc = '*Error getting description*'
-
- return desc
-
- for pack in glob(self.glob_pkg):
-
- desc = scour(pack)
-
- pkg_name = os.path.basename(os.path.dirname(pack))
- self.output('[%s] %s (%s)' % (pkg_name, desc, pack))
-
- for pack in glob(self.glob_cp):
-
- pkg_name = os.path.basename(os.path.dirname(pack))
- self.output('[%s] No description (%s)' % (pkg_name, pack))
-
- for pack in glob(self.glob_pkg_dir):
-
- desc = scour(pack)
-
- pkg_name = pack.split(os.sep)[-1]
- self.output('[%s] %s (%s)' % (pkg_name, desc, pack))
-
- def output (self, L):
-
- print L
-
-
-class ListAvailableVMs (jc_iface.OptInterface):
-
- usage = (
- 'List all available virtual machines',
-
- 'Lists all virtuals machines in the /etc/env.d/java '
- 'directory, displays wether a VM is active'
- )
-
- names = ('L', 'list-available-vms')
-
- def __init__(self):
-
- self.vm_list = collect_vms()
-
- def _active_vm (self, java_home):
- # Should fix bug #32611, no need to die if JVM isn't set when
- # listing JVMs
- #die_no_jh()
-
- if java_home == JAVA_HOME: return True
- else: return False
-
- def _disp_vm (self, file_name, cfg):
-
- short_name = file_name[2:]
- vmstr = '[%s] %s (/etc/env.d/java/%s)' \
- % (short_name, cfg['VERSION'], file_name)
- if self._active_vm(cfg['JAVA_HOME']):
- return green(vmstr + ' *')
- else: return vmstr
-
- def __call__(self, args):
-
- for vm in self.vm_list.iterkeys():
- print self._disp_vm(vm, self.vm_list[vm])
-
-source_java_classpath = \
-'''
-if [ -f $HOME/.gentoo/java ] ; then
- . $HOME/.gentoo/java
-fi
-'''
-
-source_java_classpath_csh = \
-'''
-if ( -f $HOME/.gentoo/java.csh ) then
- source $HOME/.gentoo/java.csh
-endif
-'''
-
-executables_a_system_vm_should_have = [
- 'javac',
- 'javadoc',
- 'jar',
-]
-
-def vm_ok_for_system (vm_name, env_gen_obj):
- '''
- Check that a VM has all the binaries it needs to be a
- proper system VM
- '''
-
- suk = False
- java_home = env_gen_obj.vm['JAVA_HOME']
-
- for exe in executables_a_system_vm_should_have:
- try:
- find_exec(exe, java_home=java_home)
- except OptionRuntimeError, e:
- suk = True
- warn(str(e))
-
- try:
- find_exec('rmic', java_home=java_home)
- except OptionRuntimeError, e:
- warn(str(e))
-
- if suk:
- warn(
- 'THIS SYSTEM VM IS NOT SUFFICIENT, '
- 'REQUIRED BINARIES WERE NOT FOUND'
- )
-
-def set_vm(vm_name, system=False):
-
- systemVM = system
- genv = GenerateEnvEntry(vm_name)
-
- if systemVM:
- vm_ok_for_system(vm_name, genv)
- sh_out = EnvFileOutput()
- sh_mkr = BashEnvEntry(system=True)
- else:
- sh_out = EnvFileOutput(
- config_file='java',
- config_path=os.path.join(env['HOME'], '.gentoo')
- )
- sh_mkr = BashEnvEntry(system=False)
-
- csh_out = EnvFileOutput(
- config_file='java.csh',
- config_path=os.path.join(env['HOME'], '.gentoo')
- )
-
- csh_mkr = TcshEnvEntry(system=False)
- csh_mkr.installOutputHandler(csh_out)
- genv.installMaker(csh_mkr)
-
- sh_mkr.installOutputHandler(sh_out)
- genv.installMaker(sh_mkr)
-
- genv.makeEnvEntry()
-
- if systemVM:
- print 'System Virtual Machine set'
- may_want_to_source()
- else:
- report_env_update()
-
-
-class PrintVMEnvVar (jc_iface.OptInterface):
-
- usage = (
- 'Print an environment variable from the currently selected VM',
-
- 'Outputs a specific environment variable for the specified VM'
- )
-
- names = ('g:', 'get-env=')
-
- single_arg = True
-
- def __call__(self, args):
-
- env = get_jvm_env_var(args)
- if env is None:
- print
- else:
- print env
-
-
-class PrintVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Print the environment information for a specified VM',
-
- 'Outputs all the environment information for a specified VM so that '
- 'the output can be evaluated or viewed, takes two arguments, first argument '
- 'is a JVM name (see --list-available-vms), second argument is a shell type '
- 'currently supported is "sh" or "csh", if only one argument is specified "sh" '
- 'is assumed'
- )
-
- names = ('P:', 'print=')
-
- #single_arg = True
-
- def __call__(self, args):
-
- args = args.split(',')
-
- if len(args) == 1:
- shellType = 'sh'
- else:
- shellType = args[1]
-
- try:
- genv = GenerateEnvEntry(args[0])
- except OptionRuntimeError:
- # die silently
- print ''
- return
-
- if shellType == 'sh':
- _ = StdOutBashEnvEntry(False)
- _.installOutputHandler(EnvStdoutOutput())
- genv.installMaker(_)
- elif shellType == 'csh':
- _ = StdOutTcshEnvEntry(False)
- _.installOutputHandler(EnvStdoutOutput())
- genv.installMaker(_)
- else:
- raise OptionRuntimeError('Unsupported shell type specified')
-
- genv.makeEnvEntry()
-
-
-class SetSystemVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Set the VM for the entire system',
-
- 'Set the virtual machine that the entire system will use by '
- 'default'
- )
-
- names = ('S:', 'set-system-vm=')
-
- require_root = True
- single_arg = True
-
- def __call__(self, args):
- set_vm(args, system=True)
-
-
-class SetUserVM (jc_iface.OptInterface):
-
-
- usage = (
- 'Set the VM for a user',
-
- 'Set the virtual machine that the current user will use by '
- 'default'
- )
-
- names = ('s:', 'set-user-vm=')
- single_arg = True
-
- def __call__(self, args):
-
- jc_dir = env['HOME'] + '/.gentoo'
-
- if os.getuid() == 0:
- raise OptionRuntimeError, 'root should always use the system vm'
-
- can_write = os.access(os.path.split(jc_dir)[0], os.R_OK|os.W_OK|os.X_OK)
- if not can_write:
- raise OptionRuntimeError('Cannot write to ${HOME}')
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
- elif not os.path.exists(jc_dir):
- raise OptionRuntimeError('${HOME}/.gentoo exists but is not a directory')
-
- set_vm(args)
-
- if not os.path.isfile(jc_dir + '/java-env'):
- file(os.path.join(jc_dir, 'java-env'), 'w').write(
- source_java_classpath
- )
-
- if not os.path.isfile(jc_dir + '/java-env.csh'):
- file(os.path.join(jc_dir, 'java-env.csh'), 'w').write(
- source_java_classpath_csh
- )
-
-
-class SetSystemClasspath (jc_iface.OptInterface):
-
- # /etc/env.d/21java-classpath
-
- usage = (
- 'Set the system classpath',
-
- 'Set the system classpath based on the package names specified, '
- 'available packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('A:', 'set-system-classpath=')
- require_root = True
-
- def __call__(self, args):
-
- #if os.getuid() != 0: raise OptionRuntimeError, 'root access required'
- if args == '':
- raise OptionRuntimeError, \
- 'if you want to clean the classpath use --clean-system-classpath'
-
- else:
- try:
- fn = os.path.join('/', 'etc', 'env.d', '21java-classpath')
- fp = file(fn, 'w')
- except (OSError, IOError), e:
- raise OptionRuntimeError(
- 'Error opening configuration file, ' + str(e)
- )
-
- try:
- fp.write('CLASSPATH=%s\n' % (norm_cp(collect_packages(args)),))
- except (OSError, IOError), e:
- raise OptionRuntimeError(
- 'Error writing configuration file, ' + str(e)
- )
-
- print 'System classpath set'
- may_want_to_source()
-
-
-class AddSystemClasspath (jc_iface.OptInterface):
-
- # /etc/env.d/21java-classpath
-
- usage = (
- 'Append to the system classpath',
-
- 'Append the package names specified to the system '
- 'classpath. Packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('B:', 'add-system-classpath=')
- require_root = True
-
- conf_file = os.path.join('/', 'etc', 'env.d', '21java-classpath')
-
- def __call__(self, args):
-
- if args == '':
- raise OptionRuntimeError(
- 'if you want to clean the classpath use --clean-system-classpath')
-
- else:
- old_classpath = None
-
- if os.path.exists(self.conf_file):
- try:
- old_classpath = file(self.conf_file, 'r').read().strip()
-
- except (OSError, IOError), e:
- warn ("Error when reading classpath file " + str(e))
- return
-
- try:
- old_classpath = old_classpath.split('=', 1)[1]
- #old_classpath = re.sub('CLASSPATH=', '', old_classpath)
-
- except IndexError:
- warn ("Malformed CLASSPATH in /etc/env.d/21java-classpath")
- return
- else:
- old_classpath = ""
-
-
- try:
-
- file(self.conf_file, 'w').write(
- 'CLASSPATH=%s\n' % (
- norm_cp(old_classpath + ':' + collect_packages(args)),))
-
- except (OSError, IOError), e:
- warn ("Error writing classpath file " + str(e))
- return
-
-
- print 'System classpath set'
- may_want_to_source()
-
-class SetUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Set the user classpath',
-
- 'Set the user classpath based on the package names '
- 'specified, available packages can be found with the '
- '--list-available-packages option.'
- )
-
- names = ('a:', 'set-user-classpath=')
-
- def __call__(self, args):
-
- jc_dir = os.path.join(env['HOME'], '.gentoo')
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
-
- file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write(
- 'CLASSPATH=${CLASSPATH}:' + collect_packages(args)
- )
-
- if not os.path.isfile(os.path.join(jc_dir, 'java-env')):
-
- file(os.path.join(jc_dir, 'java-env'), 'w').write(
- source_java_classpath
- )
-
- report_env_update()
-
-
-class AppendUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Append to the user classpath',
-
- 'Append the package names specified to the user '
- 'classpath, available packages can be found with '
- 'the --list-available-packages option.'
- )
-
- names = ('b:', 'add-user-classpath=')
-
- def __call__(self, args):
-
- jc_dir = os.path.join(env['HOME'], '.gentoo')
- old_classpath = ''
-
- if not os.path.isdir(jc_dir):
- os.mkdir(jc_dir)
-
- elif os.path.isfile(os.path.join(jc_dir, 'java-env-classpath')):
- old_classpath = file(os.path.join(jc_dir, 'java-env-classpath'), 'r').read()
- old_classpath = re.sub('CLASSPATH=\${CLASSPATH}:', '', old_classpath)
-
- file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write(
- 'CLASSPATH=${CLASSPATH}:' + norm_cp(old_classpath + ':' + collect_packages(args))
- )
-
- if not os.path.isfile(os.path.join(jc_dir, 'java-env')):
- file(os.path.join(jc_dir, 'java-env'), 'w').write(source_java_classpath)
-
- report_env_update()
-
-class CleanSystemClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Clean the classpath of all packages',
-
- 'Whipes the classpath of all packages, this is done by '
- 'removing the /etc/env.d/21java-classpath file.'
- )
-
- names = ('X', 'clean-system-classpath')
-
- require_root = True
- env_file = '/etc/env.d/21java-classpath'
-
- def __call__(self, args):
-
- #if os.getuid() != 0: raise OptionRuntimeError, 'root access required'
- if os.path.isfile(self.env_file):
- print 'Cleaning system classpath...'
- os.remove(self.env_file)
- #if os.system('/usr/sbin/env-update') != 0:
- # raise OptionRuntimeError, 'env-update command not found!'
- print 'System classpath cleaned'
- may_want_to_source()
-
-class CleanUserClasspath (jc_iface.OptInterface):
-
- usage = (
- 'Clean the user classpath of all packages',
-
- 'Whipes the user classpath of all packages, '
- 'this is done by removing the '
- '~/.gentoo/java-env-classpath file.'
- )
-
- names = ('x', 'clean-user-classpath')
- require_root = False
-
- def __init__ (self):
-
- self.env_file = os.path.join(env['HOME'], '.gentoo', 'java-env-classpath')
-
- def __call__(self, args):
-
- if os.path.isfile(self.env_file):
- print 'Cleaning user classpath...'
- os.remove(self.env_file)
- print 'User classpath cleaned'
- report_env_update()
- else:
- print 'No user classpath file found'
-
-
-
-class NoColors (jc_iface.OptInterface):
-
- usage = (
- 'Turn off all colors.',
-
- 'Turn off all instances of color or bold escape '
- 'codes that java-config might use.'
- )
-
- names = ('n', 'nocolor')
- require_root = False
-
- def __call__ (self, args):
- nocolor()
-
-if __name__ == '__main__':
-
- import __main__
- name, thing = None, None
- for (name, thing) in __main__.__dict__.iteritems():
- try:
- if issubclass(thing, __main__.jc_iface.OptInterface):
- print blue('jc_iface.OptInterface: ') + bold(name)
- else:
- print 'Not a subclass: ' + name
- except TypeError:
- print 'This was not a class: ' + name
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_output.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_output.py
deleted file mode 100644
index 52c784b..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_output.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1998-2003 Daniel Robbins, Gentoo Technologies, Inc.
-# Distributed under the GNU Public License v2
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_output.py,v 1.2 2004/07/03 06:33:44 aether Exp $
-
-import os,sys
-
-havecolor=1
-dotitles=1
-
-codes={}
-codes["reset"]="\x1b[0m"
-codes["bold"]="\x1b[01m"
-
-codes["teal"]="\x1b[36;06m"
-codes["turquoise"]="\x1b[36;01m"
-
-codes["fuscia"]="\x1b[35;01m"
-codes["purple"]="\x1b[35;06m"
-
-codes["blue"]="\x1b[34;01m"
-codes["darkblue"]="\x1b[34;06m"
-
-codes["green"]="\x1b[32;01m"
-codes["darkgreen"]="\x1b[32;06m"
-
-codes["yellow"]="\x1b[33;01m"
-codes["brown"]="\x1b[33;06m"
-
-codes["red"]="\x1b[31;01m"
-codes["darkred"]="\x1b[31;06m"
-
-def xtermTitle(mystr):
- if havecolor and dotitles and os.environ.has_key("TERM"):
- myt=os.environ["TERM"]
- if myt in ["xterm","Eterm","aterm","rxvt"]:
- sys.stderr.write("\x1b]1;\x07\x1b]2;"+str(mystr)+"\x07")
- sys.stderr.flush()
-
-def xtermTitleReset():
- if havecolor and dotitles and os.environ.has_key("TERM"):
- myt=os.environ["TERM"]
- xtermTitle(os.environ["TERM"])
-
-
-def notitles():
- "turn off title setting"
- dotitles=0
-
-def nocolor():
- "turn off colorization"
- havecolor=0
- for x in codes.keys():
- codes[x]=""
-
-def resetColor():
- return codes["reset"]
-
-def ctext(color,text):
- return codes[ctext]+text+codes["reset"]
-
-def bold(text):
- return codes["bold"]+text+codes["reset"]
-def white(text):
- return bold(text)
-
-def teal(text):
- return codes["teal"]+text+codes["reset"]
-def turquoise(text):
- return codes["turquoise"]+text+codes["reset"]
-def darkteal(text):
- return turquoise(text)
-
-def fuscia(text):
- return codes["fuscia"]+text+codes["reset"]
-def purple(text):
- return codes["purple"]+text+codes["reset"]
-
-def blue(text):
- return codes["blue"]+text+codes["reset"]
-def darkblue(text):
- return codes["darkblue"]+text+codes["reset"]
-
-def green(text):
- return codes["green"]+text+codes["reset"]
-def darkgreen(text):
- return codes["darkgreen"]+text+codes["reset"]
-
-def yellow(text):
- return codes["yellow"]+text+codes["reset"]
-def brown(text):
- return codes["brown"]+text+codes["reset"]
-def darkyellow(text):
- return brown(text)
-
-def red(text):
- return codes["red"]+text+codes["reset"]
-def darkred(text):
- return codes["darkred"]+text+codes["reset"]
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_util.py b/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_util.py
deleted file mode 100644
index 63d918f..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/java_config/jc_util.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# $Header: /var/cvsroot/gentoo-src/java-config/python/java_config/jc_util.py,v 1.22 2004/10/10 21:28:44 karltk Exp $
-
-__version__ = "$Revision: 1.22 $"
-
-import os
-import re
-import glob
-import sys
-
-sys.path.insert(0, '/usr/lib/portage/pym')
-from jc_output import *
-from jc_exceptions import OptionRuntimeError
-
-env = os.environ
-ENV_DIR = '/etc/env.d'
-
-def warn (msg):
-
- sys.stderr.write(red(msg) + '\n')
-
-
-def get_line_from_env_file (query, fn):
-
- fp = open(fn)
- rStr = _get_line_from_env_file(query, fp)
- fp.close()
-
- return rStr
-
-
-def _get_line_from_env_file (query, fp):
-
- while True:
-
- try: line = fp.readline()
- except (OSError, IOError,), e:
- raise OptionRuntimeError('Error reading file ' + str(e))
-
- if line == '': # EOF reached query not found
- return None
-
- if line.strip().startswith(query):
- S = line.split('=', 1)
- return S[-1].strip()
-
-
-def get_jvm_env_var (name):
-
- jh = None
- user_env_dir = get_jvm_env_var.user_env_dir
-
- if env.has_key(name):
- jh = env[name]
- else:
- try:
- jh = get_line_from_env_file(name, os.path.join(user_env_dir, 'java'))
- except (IOError, OSError):
- try:
- jh = get_line_from_env_file(name, os.path.join(ENV_DIR, '20java'))
- except (IOError, OSError):
- pass
-
- return jh
-
-get_jvm_env_var.user_env_dir = os.path.join(env.get('HOME', 'THERE_IS_NO_HOME'), '.gentoo')
-
-def get_java_home():
-
- return get_jvm_env_var ('JAVA_HOME')
-
-
-JAVA_HOME = get_java_home()
-
-
-def die_no_jh ():
- """
- Send an error up to java-config if there is no JAVA_HOME set
- in the enviroment
- """
-
- if JAVA_HOME is None:
- raise OptionRuntimeError, \
- 'No JAVA_HOME available! Please set your Java '\
- 'Virtual Machine'
-
-
-def find_exec(exe, java_home=None):
- """
- Find executable 'exe' and return it, search the /bin and /jre/bin dirs
- of current JVM. Raises an error if the command isn't executable or if it
- can't be found
- """
-
- jh = JAVA_HOME
-
- if java_home is not None:
- jh = java_home
-
- exec_0 = jh+'/bin/'+exe
- exec_1 = jh+'/jre/bin/'+exe
- die_no_jh()
- if os.path.isfile(exec_0):
- if not os.access(exec_0, os.X_OK):
- raise OptionRuntimeError, \
- '%s command is not executable' % exec_0
- return exec_0
- elif os.path.isfile(exec_1):
- if not os.access(exec_1, os.X_OK):
- raise OptionRuntimeError, \
- '%s command is not executable' % exec_1
- return exec_1
- else:
- raise OptionRuntimeError, '%s not found at %s or %s' % (exe, exec_0, exec_1,)
-
-
-may_want_to_source_txt = \
-'''You may want to update your enviroment by running:
-\t"/usr/sbin/env-update && source /etc/profile"'''
-
-
-def may_want_to_source():
- print may_want_to_source_txt
-
-
-def norm_cp (classpath):
- """
- Normalize a classpath string
-
- @type classpath: C{str}
- """
-
- stripped_classpath = re.sub(':+', ':', classpath.strip(':'))
- pkgs = stripped_classpath.split(":")
-
- classpath_dict = {}
- for x in pkgs:
- classpath_dict[x] = True
-
- return ':'.join(classpath_dict.keys())
-
-def collect_library(args):
-
- args = args.strip().split(',')
- library_list= []
-
- for pkg in args:
-
- pkg_env = collect_packages.pkg_env(pkg)
- library = None
-
- if os.path.isfile(pkg_env):
- library = get_line_from_env_file('LIBRARY_PATH', pkg_env)
- else:
- raise OptionRuntimeError, 'Could not find package %s' % pkg
-
- if library is None:
- raise OptionRuntimeError, 'Could not find library path for %s' % pkg
-
- else:
- library_list.append(library)
-
- return norm_cp(':'.join(library_list))
-
-
-def collect_packages (args):
-
- args = args.strip().split(',')
- classpath_list = []
-
- for pkg in args:
-
- cp_env = collect_packages.cp_env(pkg)
- pkg_env = collect_packages.pkg_env(pkg)
- classpath = None
-
- if os.path.isfile(pkg_env):
- classpath = get_line_from_env_file('CLASSPATH', pkg_env) + ':'
-
- elif os.path.isfile(cp_env):
- classpath = open(cp_env).read().strip()
-
- if classpath is None:
- raise OptionRuntimeError, 'Could not find package %s' % pkg
-
- else:
- classpath_list.append(classpath)
-
- adl_pkgs = collect_packages.adl_pkgs(pkg)
-
- for pkg in adl_pkgs:
- classpath_list.append(get_line_from_env_file('CLASSPATH', pkg))
-
- return norm_cp(':'.join(classpath_list))
-
-collect_packages.cp_env = lambda pkg: os.path.join(
- '/', 'usr', 'share', pkg, 'classpath.env'
-)
-
-collect_packages.pkg_env = lambda pkg: os.path.join(
- '/', 'usr', 'share', pkg, 'package.env'
-)
-
-collect_packages.adl_pkgs = lambda pkg: glob.glob(
- os.path.join(
- '/', 'usr', 'share', pkg, 'packages', '*'
- )
-)
-
-
-def collect_vms():
-
- from cfg_parse import getconfig
-
- vm_list = {}
- vm_dir = collect_vms.vm_dir
-
- if os.path.isdir(vm_dir):
- for fn in os.listdir(vm_dir):
- conf_file = os.path.join(vm_dir, fn)
- if not (os.path.isfile(conf_file) and
- os.access(conf_file, os.R_OK)):
- continue
- cfg = getconfig(conf_file, env)
- # Try block should fix bug #32347
- try:
- if os.path.isdir(cfg['JAVA_HOME']):
- vm_list[fn] = cfg
- except KeyError:
- warn(
- 'Cannot find JAVA_HOME in config file ' +
- conf_file
- )
- return vm_list
-
-collect_vms.vm_dir = os.path.join(ENV_DIR, 'java')
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/java-config-1.2.11/setup.py b/sci-chemistry/dsv/java-config-1.2.11/setup.py
deleted file mode 100644
index b8319bc..0000000
--- a/sci-chemistry/dsv/java-config-1.2.11/setup.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /usr/bin/env python2.2
-# $Header: /var/cvsroot/gentoo-src/java-config/python/setup.py,v 1.3 2004/07/03 06:33:44 aether Exp $
-
-__version__ = '$Revision: 1.3 $'
-
-from distutils.core import setup
-import os
-import java_config
-
-setup (
-
-name = 'java-config',
-version = java_config.version,
-description = 'java enviroment configuration tool',
-long_description = \
-"""
-java-config is a tool for configuring various enviroment
-variables and configuration files involved in the java
-enviroment for Gentoo Linux.
-""",
-author = 'Jason Mobarak',
-author_email = 'aether@gentoo.org',
-packages = ['', 'java_config'],
-package_dir = { '' : os.curdir, 'java_config' : os.curdir + '/java_config' }
-
-)
-
-# vim: noet:ts=4:
diff --git a/sci-chemistry/dsv/license.txt b/sci-chemistry/dsv/license.txt
deleted file mode 100644
index d76a8e9..0000000
--- a/sci-chemistry/dsv/license.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-ACCELRYS SOFTWARE INC.
-End User License Agreement
-
-
-BY INSTALLING OR USING THE SOFTWARE ("SOFTWARE") OF ACCELRYS SOFTWARE INC.
-("ACCELRYS") THAT ACCOMPANIES THIS END USER LICENSE AGREEMENT (THIS
-"AGREEMENT"), YOU ARE CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO
-THIS AGREEMENT. IF YOU AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN
-PLEASE CLICK ON THE "ACCEPT" BUTTON. IF YOU DO NOT AGREE TO ALL OF THE TERMS
-OF THIS AGREEMENT, CLICK THE "DO NOT ACCEPT" BUTTON AND DO NOT INSTALL OR USE
-THE SOFTWARE.
-
-LICENSE GRANT. Subject to the terms of this Agreement, Accelrys or one of its
-subsidiaries or authorized distributors (collectively "Accelrys") grants to
-you, free of charge, a nonexclusive, non-transferable license to use Accelrys"
-Software and accompanying documentation ("Documentation"), if any, in the
-manner described below under "Scope of License Grant." The term of the
-license is perpetual. The license shall remain in effect for such term unless
-terminated as set forth in the Section entitled "Termination" below.
-
-SCOPE OF LICENSE GRANT.
-You may: download and install the Software, and use the Software on your
-computer; make copies of the Software for your use as a backup, or for use on
-other computers owned by you; provided that such copies are subject to this
-License Agreement and include all proprietary and copyright notices contained
-in the Software.
-You may not: modify, translate, reverse engineer, decompile, disassemble
-(except and solely to the extent an applicable statute expressly and
-specifically prohibits such restrictions), or create derivative works based on
-the Software, or any portion thereof; copy the Software other than as specified
-above; rent, lease, grant a security interest in, or otherwise transfer rights
-to the Software; or remove any proprietary notices or labels on the Software.
-All rights not expressly granted by Accelrys under this Agreement are reserved
-by Accelrys. No support or maintenance shall be provided.
-
-NO WARRANTY. The Software and Documentation are provided "AS IS" and without
-any warranty of any kind. ACCELRYS AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
-AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF
-THIRD PARTIES' RIGHTS. IF THE JURISDICTION WHERE YOU OBTAINED THIS LICENSE
-DOES NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES OR CONDITIONS, THE DURATION
-OF ANY AND ALL APPLICABLE IMPLIED WARRANTIES AND CONDITIONS, IF ANY, SHALL BE
-LIMITED TO ONE (1) YEAR AFTER YOU DOWNLOAD THE SOFTWARE. NO DEALER, AGENT, OR
-EMPLOYEE OF ACCELRYS IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR
-ADDITIONS TO THIS LIMITED WARRANTY.
-
-SOME JURISDICTIONS DO NOT ALLOW EXCLUSIONS OF IMPLIED WARRANTIES OR LIMITATIONS
-ON HOW LONG AN IMPLIED WARRANTY MAY LAST, SO THE ABOVE EXCLUSIONS OR
-LIMITATIONS MAY NOT APPLY TO YOU. THE ABOVE WARRANTY GIVES YOU SPECIFIC LEGAL
-RIGHTS, AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM JURISDICTION TO
-JURISDICTION.
-
-TITLE. Title, ownership rights, and intellectual property rights in and to the
-Software and Documentation shall at all times remain in Accelrys and/or its
-suppliers. Accelrys reserves any rights not expressly granted under this
-Agreement. The Software is protected by copyright and other intellectual
-property laws and by international treaties.
-
-TERMINATION. The license granted hereunder will terminate automatically if you
-fail to comply with the terms and conditions of this Agreement. You may
-terminate this license at any time by ceasing all use of the Software and
-Documentation. Upon any such termination, you must destroy all copies of the
-Software and Documentation. No refunds or credits will be due.
-
-EXPORT CONTROLS. The Software and related technology may not be downloaded or
-otherwise exported or re-exported (i) into (or to a national or resident of)
-Cuba, Iran, Libya, North Korea, Sudan, Syria or any other country to which the
-U.S. has embargoed goods; or (ii) to anyone on the U.S. Department of the
-Treasury list of Specially Designated Nationals and Blocked Persons, or the
-U.S. Department of Commerce, the Denied Persons List and Entity List. By
-installing or using the Software, you are agreeing to the foregoing and you are
-representing and warranting that you are not located in, under the control of,
-or a national or resident of any such country or on any such list. In
-addition, you agree to comply with any other applicable U.S. export control
-laws and any local laws in your jurisdiction that may affect your right to
-import, export, or use the Software. By installing or using the Software, you
-are also representing and warranting that you will not use, or permit or
-authorize others to use, the Software in connection with the design,
-development, production, stockpiling or use of any chemical or biological
-weapons. You agree to defend, indemnify and hold Accelrys harmless from any
-claims arising out of or relating to your violation of any such export control
-laws.
-
-LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL ACCELRYS OR ITS
-SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT,
-SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS OR REVENUE, BUSINESS INTERRUPTION, LOSS OF
-DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES,
-WHETHER FORESEEABLE OR NOT. IN NO EVENT WILL ACCELRYS BE LIABLE FOR ANY
-DAMAGES IN EXCESS OF THE AMOUNT ACCELRYS RECEIVED FROM YOU FOR A LICENSE TO THE
-SOFTWARE, EVEN IF ACCELRYS SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH
-DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. THIS LIMITATION OF LIABILITY
-SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM
-ACCELRYS' NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.
-SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU IN
-ITS ENTIRETY.
-
-U.S. GOVERNMENT END USERS. The Software is a "commercial item," as that term
-is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-software" and "commercial computer software documentation," as such terms are
-used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and
-48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
-Users acquire the Software with only those rights set forth in this Agreement.
-
-GENERAL. This Agreement represents the complete and final agreement concerning
-the license granted hereunder and replaces any and all prior or contemporaneous
-understandings or agreements, written or oral, regarding the subject matter.
-This Agreement may be amended only by a writing executed by both parties. If
-any provision of this Agreement is held to be unenforceable, such provision
-shall be reformed only to the extent necessary to make it enforceable, and the
-remainder of this Agreement shall nonetheless remain in full force and effect.
-This Agreement shall be construed, governed, and enforced solely and
-exclusively by the laws of the State of California, USA, excluding conflict of
-law provisions. The United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded from this Agreement. You
-hereby agree that the courts located in the county of San Diego, the State of
-California, USA, will constitute the sole and exclusive forum for the
-resolution of any and all disputes arising out of or in connection with this
-Agreement and you hereby irrevocably consent to the personal jurisdiction and
-venue of such courts and irrevocably waive any objections thereto. You may not
-assign this Agreement to any third party without first obtaining the express
-written consent of Accelrys, and any assignment by you without such consent
-shall be null and void. Accelrys may freely assign this Agreement to any third
-party. If you have any questions concerning this Agreement, you may contact
-Accelrys at 10188 Telesis Court, Suite 100, San Diego, CA 92121, USA; (858)
-799-5000, Attention: Legal.