aboutsummaryrefslogtreecommitdiff
path: root/biology/tinker/scripts
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2001-01-24 17:58:44 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2001-01-24 17:58:44 +0000
commit5c6705c3ff1f892e9a4399318f3f19b076f1ced6 (patch)
tree1993e5411490bb6fd7c306303f9cb84c876e5891 /biology/tinker/scripts
parent9ddea6faab4451b1ff6f7873bd97b93a6166d336 (diff)
Notes
Diffstat (limited to 'biology/tinker/scripts')
-rw-r--r--biology/tinker/scripts/build_viewer47
1 files changed, 47 insertions, 0 deletions
diff --git a/biology/tinker/scripts/build_viewer b/biology/tinker/scripts/build_viewer
new file mode 100644
index 000000000000..24fb838c4fd0
--- /dev/null
+++ b/biology/tinker/scripts/build_viewer
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# This builds the molecular viewer for tinker files. It is a modified
+# version of rasmol. One of the problems with rasmol is that is only
+# works at one color depth. This script will build three viewers at
+# different color depths, 8-bit, 16-bit, and 32-bit. The binaries are
+# called tview-8, tview-16, and tview-32 respectively.
+
+cd ${WRKSRC}/../rasmol
+
+cp Imakefile Imakefile.orig
+
+sed s@/user/ponder@${PREFIX}/share@ Imakefile > Imakefile.temp
+
+sed s@'ComplexProgramTarget(rasmol)'@'ComplexProgramTarget(tview-32)'@ \
+ Imakefile.temp > Imakefile
+
+xmkmf -a
+
+make clean && make
+
+sed -e s@'DEPTHDEF = -DTHIRTYTWOBIT'@'# DEPTHDEF = -DTHIRTYTWOBIT'@ \
+ -e s@'# DEPTHDEF = -DSIXTEENBIT'@'DEPTHDEF = -DSIXTEENBIT'@ \
+ -e s@'ComplexProgramTarget(rasmol)'@'ComplexProgramTarget(tview-16)'@ \
+ Imakefile.temp > Imakefile
+
+xmkmf -a
+
+make clean && make
+
+sed -e s@'DEPTHDEF = -DTHIRTYTWOBIT'@'# DEPTHDEF = -DTHIRTYTWOBIT'@ \
+ -e s@'# DEPTHDEF = -DEIGHTBIT'@'DEPTHDEF = -DEIGHTBIT'@ \
+ -e s@'ComplexProgramTarget(rasmol)'@'ComplexProgramTarget(tview-8)'@ \
+ Imakefile.temp > Imakefile
+
+xmkmf -a
+
+make clean && make
+
+# Restore Imakefile to original state so that rerunning this script does
+# the right thing.
+rm Imakefile.temp
+mv Imakefile.orig Imakefile
+xmkmf -a
+make clean
+
+exit 0