diff options
author | Donnie Berkholz <spyderous@gentoo.org> | 2005-12-04 08:27:33 +0000 |
---|---|---|
committer | Donnie Berkholz <spyderous@gentoo.org> | 2005-12-04 08:27:33 +0000 |
commit | 470d71852c0eb4b52d60d88cf4a7f15fda7c3567 (patch) | |
tree | 50e80004237c2305e58b50cb6ba126b1c8167dcf /sci-chemistry/webmo | |
parent | for sci-chemistry/webmo. (diff) | |
download | gentoo-2-470d71852c0eb4b52d60d88cf4a7f15fda7c3567.tar.gz gentoo-2-470d71852c0eb4b52d60d88cf4a7f15fda7c3567.tar.bz2 gentoo-2-470d71852c0eb4b52d60d88cf4a7f15fda7c3567.zip |
Add a Web interface to a number of computational chemistry programs. Ones in portage include mopac7, gamess and tinker. Also works for Gaussian, NWChem, QChem, Molpro, etc. What needs work: reinstallations without screwing the old configuration, and the reconfig script so editing globals.int isn't required.
(Portage version: 2.0.53)
Diffstat (limited to 'sci-chemistry/webmo')
-rw-r--r-- | sci-chemistry/webmo/ChangeLog | 17 | ||||
-rw-r--r-- | sci-chemistry/webmo/Manifest | 8 | ||||
-rw-r--r-- | sci-chemistry/webmo/files/add-gamess-data-directory.patch | 42 | ||||
-rw-r--r-- | sci-chemistry/webmo/files/digest-webmo-6.0.003 | 1 | ||||
-rw-r--r-- | sci-chemistry/webmo/files/dont-be-interactive-if-root.patch | 49 | ||||
-rw-r--r-- | sci-chemistry/webmo/files/dont-check-unneeded-things.patch | 114 | ||||
-rw-r--r-- | sci-chemistry/webmo/files/gentoo-locations.patch | 42 | ||||
-rw-r--r-- | sci-chemistry/webmo/metadata.xml | 9 | ||||
-rw-r--r-- | sci-chemistry/webmo/webmo-6.0.003.ebuild | 119 |
9 files changed, 401 insertions, 0 deletions
diff --git a/sci-chemistry/webmo/ChangeLog b/sci-chemistry/webmo/ChangeLog new file mode 100644 index 000000000000..1b038d44cb30 --- /dev/null +++ b/sci-chemistry/webmo/ChangeLog @@ -0,0 +1,17 @@ +# ChangeLog for sci-chemistry/webmo +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/webmo/ChangeLog,v 1.1 2005/12/04 08:27:33 spyderous Exp $ + +*webmo-6.0.003 (04 Dec 2005) + + 04 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>; + +files/add-gamess-data-directory.patch, + +files/dont-be-interactive-if-root.patch, + +files/dont-check-unneeded-things.patch, +files/gentoo-locations.patch, + +metadata.xml, +webmo-6.0.003.ebuild: + Add a Web interface to a number of computational chemistry programs. Ones in + portage include mopac7, gamess and tinker. Also works for Gaussian, NWChem, + QChem, Molpro, etc. What needs work: reinstallations without screwing the + old configuration, and the reconfig script so editing globals.int isn't + required. + diff --git a/sci-chemistry/webmo/Manifest b/sci-chemistry/webmo/Manifest new file mode 100644 index 000000000000..cffc2d867982 --- /dev/null +++ b/sci-chemistry/webmo/Manifest @@ -0,0 +1,8 @@ +MD5 8e94349e3989b4b0219b8b5d8616ff4a files/add-gamess-data-directory.patch 2112 +MD5 ea0135b660aec5e5627dd9929a937a41 files/digest-webmo-6.0.003 66 +MD5 b796d945112067cc23afa05e1c0f7463 files/dont-be-interactive-if-root.patch 1851 +MD5 ebcb1f46115574118ae40fc9fd01023d files/dont-check-unneeded-things.patch 3577 +MD5 c3f7daf2719dca6df3f68a7193213e63 files/gentoo-locations.patch 1939 +MD5 9922421ed5b1825187078d2466f0994a files/reconfig 617 +MD5 baccb961693e808c176bbe3e2d865af1 files/setup.conf 213 +MD5 9b2350b125e1a36d4752af77ab327447 webmo-6.0.003.ebuild 3269 diff --git a/sci-chemistry/webmo/files/add-gamess-data-directory.patch b/sci-chemistry/webmo/files/add-gamess-data-directory.patch new file mode 100644 index 000000000000..9120a5c89e1e --- /dev/null +++ b/sci-chemistry/webmo/files/add-gamess-data-directory.patch @@ -0,0 +1,42 @@ +diff -urN WebMO.install.orig/cgi-bin/interfaces/gamess.int.disabled WebMO.install/cgi-bin/interfaces/gamess.int.disabled +--- WebMO.install.orig/cgi-bin/interfaces/gamess.int.disabled 2005-12-03 14:58:39.000000000 -0800 ++++ WebMO.install/cgi-bin/interfaces/gamess.int.disabled 2005-12-03 14:58:59.000000000 -0800 +@@ -3,6 +3,7 @@ + interfaceDescription{'gamess_name'}="Gamess" + gamessVersion="Unknown" + gamessGMSPATH="/usr/bin" ++gamessDATAPATH="/usr/share/gamess/ericfmt" + gamessBinary="gamess.00.x" + gamessDdikick="ddikick.x" + cpuMin="0" +diff -urN WebMO.install.orig/cgi-bin/run_gamess.cgi WebMO.install/cgi-bin/run_gamess.cgi +--- WebMO.install.orig/cgi-bin/run_gamess.cgi 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/cgi-bin/run_gamess.cgi 2005-12-03 14:54:54.000000000 -0800 +@@ -30,7 +30,7 @@ + $ENV{'IRCDATA'} = $output_file.".irc"; + $ENV{'PUNCH'} = $output_file.".dat"; + $ENV{'INPUT'} = "$input_file.inp"; +-$ENV{'ERICFMT'} = "$gamessGMSPATH/ericfmt.dat"; ++$ENV{'ERICFMT'} = "$gamessDATAPATH/ericfmt.dat"; + $ENV{'PATH'} = $ENV{'PATH'}.":".$gamessGMSPATH; + + # if we are using PBS, find out which host we are running on +diff -urN WebMO.install.orig/source/gamessmgr_admin.html WebMO.install/source/gamessmgr_admin.html +--- WebMO.install.orig/source/gamessmgr_admin.html 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/source/gamessmgr_admin.html 2005-12-03 14:55:00.000000000 -0800 +@@ -30,10 +30,14 @@ + <TD><INPUT TYPE="text" NAME="gamessVersion" VALUE="<PERL>$gamessVersion</PERL>" SIZE=50></TD> + </TR> + <TR> +- <TD><B>Gamess directory</B></TD> ++ <TD><B>Gamess binary directory</B></TD> + <TD><INPUT TYPE="text" NAME="gamessGMSPATH" VALUE="<PERL>$gamessGMSPATH</PERL>" SIZE=50></TD> + </TR> + <TR> ++ <TD><B>Gamess data directory (ericfmt)</B></TD> ++ <TD><INPUT TYPE="text" NAME="gamessDATAPATH" VALUE="<PERL>$gamessDATAPATH</PERL>" SIZE=50></TD> ++ </TR> ++ <TR> + <TD><B>Gamess binary (name, not path)</B></TD> + <TD><INPUT TYPE="text" NAME="gamessBinary" VALUE="<PERL>$gamessBinary</PERL>" SIZE=50></TD> + </TR> diff --git a/sci-chemistry/webmo/files/digest-webmo-6.0.003 b/sci-chemistry/webmo/files/digest-webmo-6.0.003 new file mode 100644 index 000000000000..3dffc03ca534 --- /dev/null +++ b/sci-chemistry/webmo/files/digest-webmo-6.0.003 @@ -0,0 +1 @@ +MD5 8e19ca928fbc9128513b01f9e82bfcd6 WebMO.6.0.003.tar.gz 1197672 diff --git a/sci-chemistry/webmo/files/dont-be-interactive-if-root.patch b/sci-chemistry/webmo/files/dont-be-interactive-if-root.patch new file mode 100644 index 000000000000..fdc7691cae88 --- /dev/null +++ b/sci-chemistry/webmo/files/dont-be-interactive-if-root.patch @@ -0,0 +1,49 @@ +--- WebMO.install.orig/setup.pl 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/setup.pl 2005-12-03 11:39:51.000000000 -0800 +@@ -82,26 +84,26 @@ + #get a username + my $username = `whoami`; chomp $username; + my $homedir = $ENV{'HOME'} ne "" ? $ENV{'HOME'} : `echo ~`; chomp $homedir; +-if ($username eq "root") +-{ +- print <<END; +- +-You are installing WebMO as the user 'root'. It is strongly suggested that +-you do not install WebMO as 'root', but rather do one of the following: +- 1) Create a new 'webmo'account; log into this account, and install WebMO +- into the 'webmo' home directory +- 2) Log into an existing user acconut, and install WebMO into the home +- directory +- 3) Continue installation as 'root', but install WebMO into your system +- wide html/cgi-bin directory (do not install into a user home directory +- as 'root', as the cgi scripts may not run correctly) +- +-END +- print "Do you wish to continue with setup?"; +- my $choice = <STDIN>; +- chomp $choice; +- exit (0) unless ($choice =~ /^y/i); +-} ++#if ($username eq "root") ++#{ ++# print <<END; ++# ++#You are installing WebMO as the user 'root'. It is strongly suggested that ++#you do not install WebMO as 'root', but rather do one of the following: ++# 1) Create a new 'webmo'account; log into this account, and install WebMO ++# into the 'webmo' home directory ++# 2) Log into an existing user acconut, and install WebMO into the home ++# directory ++# 3) Continue installation as 'root', but install WebMO into your system ++# wide html/cgi-bin directory (do not install into a user home directory ++# as 'root', as the cgi scripts may not run correctly) ++# ++#END ++# print "Do you wish to continue with setup?"; ++# my $choice = <STDIN>; ++# chomp $choice; ++# exit (0) unless ($choice =~ /^y/i); ++#} + + #get license information + ÷r; diff --git a/sci-chemistry/webmo/files/dont-check-unneeded-things.patch b/sci-chemistry/webmo/files/dont-check-unneeded-things.patch new file mode 100644 index 000000000000..ad62f8021ce7 --- /dev/null +++ b/sci-chemistry/webmo/files/dont-check-unneeded-things.patch @@ -0,0 +1,114 @@ +--- WebMO.install.orig/scripts/diagnose.pl 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/scripts/diagnose.pl 2005-12-03 18:52:58.000000000 -0800 +@@ -80,26 +80,26 @@ + print handle "\n"; + + # Check home directory +-if ($ENV{'HOME'} ne "") +-{ +- print handle "<H3>Checking Home Directory</H3>"; +- my $stat_info = stat($ENV{'HOME'}); +- my $leng = length($ENV{'HOME'}); +- +- print handle "Checking home directory:"; +- if (($stat_info->mode & 00001) != 1) +- { +- print handle " " x (59 - $leng); +- print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; +- printf handle "<B>Home directory must be world-executable if WebMO is installed there</B>\n" +- } +- else +- { +- print handle " " x (59 - $leng); +- print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; +- } +- print handle "\n"; +-} ++#if ($ENV{'HOME'} ne "") ++#{ ++# print handle "<H3>Checking Home Directory</H3>"; ++# my $stat_info = stat($ENV{'HOME'}); ++# my $leng = length($ENV{'HOME'}); ++# ++# print handle "Checking home directory:"; ++# if (($stat_info->mode & 00001) != 1) ++# { ++# print handle " " x (59 - $leng); ++# print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; ++# printf handle "<B>Home directory must be world-executable if WebMO is installed there</B>\n" ++# } ++# else ++# { ++# print handle " " x (59 - $leng); ++# print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; ++# } ++# print handle "\n"; ++#} + + # Check permissions + print handle "<H3>Checking CGI Directory</H3>"; +@@ -345,36 +345,36 @@ + } + + # check for AddHandler for cgi scripts +- print handle ($text = "Checking for AddHandler cgi-scripts enabled: "); +- $len = length($text); +- @results = grep(/AddHandler cgi\-script/, @contents); +- if ($results[0] =~ /^#/) +- { +- print handle " " x (70 - $len); +- print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; +- print handle "<B>Uncomment the line 'AddHandle cgi-scripts .cgi'</B>\n"; +- } +- else +- { +- print handle " " x (70 - $len); +- print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; +- } ++# print handle ($text = "Checking for AddHandler cgi-scripts enabled: "); ++# $len = length($text); ++# @results = grep(/AddHandler cgi\-script/, @contents); ++# if ($results[0] =~ /^#/) ++# { ++# print handle " " x (70 - $len); ++# print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; ++# print handle "<B>Uncomment the line 'AddHandle cgi-scripts .cgi'</B>\n"; ++# } ++# else ++# { ++# print handle " " x (70 - $len); ++# print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; ++# } + + # check for user directories +- print handle ($text = "Checking for UserDir enabled: "); +- $len = length($text); +- @results = grep(/UserDir /, @contents); +- if ($results[0] =~ /^#/) +- { +- print handle " " x (70 - $len); +- print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; +- print handle "<B>Uncomment the line 'UserDir public_html'</B>\n"; +- } +- else +- { +- print handle " " x (70 - $len); +- print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; +- } ++# print handle ($text = "Checking for UserDir enabled: "); ++# $len = length($text); ++# @results = grep(/UserDir /, @contents); ++# if ($results[0] =~ /^#/) ++# { ++# print handle " " x (70 - $len); ++# print handle "<FONT COLOR=\"red\"><B>Failed</B></FONT>\n"; ++# print handle "<B>Uncomment the line 'UserDir public_html'</B>\n"; ++# } ++# else ++# { ++# print handle " " x (70 - $len); ++# print handle "<FONT COLOR=\"green\"><B>Passed</B></FONT>\n"; ++# } + + # check for suexec + print handle ($text = "Checking for suExec enabled: "); diff --git a/sci-chemistry/webmo/files/gentoo-locations.patch b/sci-chemistry/webmo/files/gentoo-locations.patch new file mode 100644 index 000000000000..6bff53af4579 --- /dev/null +++ b/sci-chemistry/webmo/files/gentoo-locations.patch @@ -0,0 +1,42 @@ +diff -urN WebMO.install.orig/cgi-bin/interfaces/gamess.int.disabled WebMO.install/cgi-bin/interfaces/gamess.int.disabled +--- WebMO.install.orig/cgi-bin/interfaces/gamess.int.disabled 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/cgi-bin/interfaces/gamess.int.disabled 2005-12-03 14:56:09.000000000 -0800 +@@ -2,7 +2,7 @@ + interfaceDescription{'gamess_admin'}="Edit preferences specific to Gamess" + interfaceDescription{'gamess_name'}="Gamess" + gamessVersion="Unknown" +-gamessGMSPATH="/usr/local/gamess" ++gamessGMSPATH="/usr/bin" + gamessBinary="gamess.00.x" + gamessDdikick="ddikick.x" + cpuMin="0" +diff -urN WebMO.install.orig/cgi-bin/interfaces/mopac.int.disabled WebMO.install/cgi-bin/interfaces/mopac.int.disabled +--- WebMO.install.orig/cgi-bin/interfaces/mopac.int.disabled 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/cgi-bin/interfaces/mopac.int.disabled 2005-12-03 14:57:07.000000000 -0800 +@@ -2,8 +2,8 @@ + interfaceDescription{'mopac_admin'}="Edit preferences specific to Mopac" + interfaceDescription{'mopac_name'}="Mopac" + mopacVersion="7" +-mopacPath="/usr/local/mopac7/mopac.exe" +-mopacScratch="/scratch" ++mopacPath="/usr/bin/mopac7" ++mopacScratch="/tmp" + mopacExternal="/usr/local/mopac7" + cpuMin="0" + cpuMax="100" +diff -urN WebMO.install.orig/cgi-bin/interfaces/tinker.int.disabled WebMO.install/cgi-bin/interfaces/tinker.int.disabled +--- WebMO.install.orig/cgi-bin/interfaces/tinker.int.disabled 2005-11-21 07:40:28.000000000 -0800 ++++ WebMO.install/cgi-bin/interfaces/tinker.int.disabled 2005-12-03 14:57:31.000000000 -0800 +@@ -2,9 +2,9 @@ + interfaceDescription{'tinker_admin'}="Edit preferences specific to Tinker" + interfaceDescription{'tinker_name'}="Tinker" + tinkerVersion="4.2" +-tinkerBinDir="/usr/local/tinker/bin" +-tinkerBinExt="x" +-tinkerParamDir="/usr/local/tinker/params" ++tinkerBinDir="/usr/bin" ++tinkerBinExt="" ++tinkerParamDir="/usr/share/tinker/params" + cpuMin="0" + cpuMax="100" + cpuDefault="100" diff --git a/sci-chemistry/webmo/metadata.xml b/sci-chemistry/webmo/metadata.xml new file mode 100644 index 000000000000..211b8bd0f0a4 --- /dev/null +++ b/sci-chemistry/webmo/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<maintainer> +<email>spyderous@gentoo.org</email> +<name>Donnie Berkholz</name> +</maintainer> +</pkgmetadata> diff --git a/sci-chemistry/webmo/webmo-6.0.003.ebuild b/sci-chemistry/webmo/webmo-6.0.003.ebuild new file mode 100644 index 000000000000..22798675d2be --- /dev/null +++ b/sci-chemistry/webmo/webmo-6.0.003.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/webmo/webmo-6.0.003.ebuild,v 1.1 2005/12/04 08:27:33 spyderous Exp $ + +inherit eutils webapp + +MY_SRC_PN="WebMO" +MY_SRC_P="${MY_SRC_PN}.${PV}" +DESCRIPTION="Web-based interface to computational chemistry packages" +HOMEPAGE="http://webmo.net/" +SRC_URI="${MY_SRC_P}.tar.gz" +LICENSE="WebMO" +SLOT="${PVR}" +KEYWORDS="~x86" +RESTRICT="fetch" +IUSE="" +RDEPEND="dev-lang/perl + net-www/apache" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_SRC_PN}.install" + +pkg_nofetch() { + einfo "Go to http://webmo.net/ and register for a free license." + einfo "Download ${SRC_URI} and place it in ${DISTDIR}." +} + +src_unpack() { + # We need a license number to proceed + if [[ -z ${WEBMO_LICENSE} ]]; then + msg="You must set WEBMO_LICENSE to your license number in make.conf." + ewarn "$msg" + die "$msg" + fi + + # Check for invalid license values. Valid are dddd-dddd-dddd + if [[ ${WEBMO_LICENSE} != [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ]]; then + msg="Invalid license format. Licenses should be DDDD-DDDD-DDDD (D is a digit)." + ewarn "$msg" + die "$msg" + fi + + unpack ${A} + + # Set up program locations to match where portage installs them + epatch ${FILESDIR}/gentoo-locations.patch + + # Add a data directory for gamess, because WebMO expects everything + # in one directory instead of FHS + # (Depends on gentoo-locations.patch) + epatch ${FILESDIR}/add-gamess-data-directory.patch + + # Comment out section of setup script that is interactive if run as root + epatch ${FILESDIR}/dont-be-interactive-if-root.patch + + # Don't check for user directories, because we aren't installing in ~ + epatch ${FILESDIR}/dont-check-unneeded-things.patch + + # Make setup.conf + create_setup_conf +} + +src_compile() { + # Doesn't compile, it's perl+html + true +} + +src_install() { + webapp_src_preinst + + # Install everything + perl setup.pl || die "Check ${S}/diagnose.html for errors" + + # Get ${D} out of main config file + dosed "${MY_CGIBINDIR}/webmo/interfaces/globals.int" + + webapp_hook_script ${FILESDIR}/reconfig + + local files=$(find ${D}${MY_HOSTROOTDIR}/webmo ${D}${MY_CGIBINDIR}/webmo/interfaces) + # Add the directories themselves + files="${files} ${MY_HOSTROOTDIR}/webmo ${MY_CGIBINDIR}/webmo/interfaces" + files=$(echo ${files} | sed -e "s:${D}::g") + for file in ${files}; do + webapp_configfile "${file}" + webapp_serverowned "${file}" + done + + webapp_src_install +} + +pkg_postinst() { + einfo + einfo "Be sure that this line is uncommented in httpd.conf:" + einfo "AddHandle cgi-scripts .cgi" + einfo + einfo "The diagnose.pl script can be run if WebMO doesn't work properly." + einfo + + webapp_pkg_postinst +} + +create_setup_conf() { + local SETUP_CONF="${S}/setup.conf" + + echo_setup perlPath /usr/bin/perl "${SETUP_CONF}" + echo_setup htmlBase "${D}${MY_HTDOCSDIR}" "${SETUP_CONF}" + echo_setup url_htmlBase /webmo "${SETUP_CONF}" + echo_setup cgiBase "${D}${MY_CGIBINDIR}/webmo" "${SETUP_CONF}" + echo_setup url_cgiBase /cgi-bin/webmo "${SETUP_CONF}" + echo_setup userBase "${D}${MY_HOSTROOTDIR}/webmo" "${SETUP_CONF}" + echo_setup license "${WEBMO_LICENSE}" "${SETUP_CONF}" +} + +# Takes three arguments: +# 1: variable, 2: value, 3: file to echo them to +echo_setup() { + # All values must be double-quoted, so escape the inner quotes. + echo "${1}=\"${2}\"" >> ${3} +} |