summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-07-27 18:47:38 +0000
committerJustin Lecher <jlec@gentoo.org>2010-07-27 18:47:38 +0000
commit2ed4837555a4e4bffe72e704c4629dac01c67f74 (patch)
treea4f6d1893ab662d85cc040505e5e67a944f79cb1 /sci-chemistry/vmd
parentamd64 stable, bug 327689 (diff)
downloadhistorical-2ed4837555a4e4bffe72e704c4629dac01c67f74.tar.gz
historical-2ed4837555a4e4bffe72e704c4629dac01c67f74.tar.bz2
historical-2ed4837555a4e4bffe72e704c4629dac01c67f74.zip
Make it really prefix ready, don't mix CFLAGS/CXXFLAGS,clean old patches
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/vmd')
-rw-r--r--sci-chemistry/vmd/ChangeLog14
-rw-r--r--sci-chemistry/vmd/Manifest19
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.5-config-gentoo.patch114
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.6-config-gentoo.patch113
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.6-fix-crash-on-tcl8.5.patch49
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch37
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.6-tcltk8.5.patch50
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.7-config.patch142
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.7-gentoo.patch48
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.7-respect-flags.patch28
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.7-use-bash-startup.patch13
-rw-r--r--sci-chemistry/vmd/vmd-1.8.7-r2.ebuild179
12 files changed, 269 insertions, 537 deletions
diff --git a/sci-chemistry/vmd/ChangeLog b/sci-chemistry/vmd/ChangeLog
index 0e80ffc282bb..338052d7cd77 100644
--- a/sci-chemistry/vmd/ChangeLog
+++ b/sci-chemistry/vmd/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sci-chemistry/vmd
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/ChangeLog,v 1.30 2010/07/24 17:27:05 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/ChangeLog,v 1.31 2010/07/27 18:47:37 jlec Exp $
+
+*vmd-1.8.7-r2 (27 Jul 2010)
+
+ 27 Jul 2010; Justin Lecher <jlec@gentoo.org>
+ -files/vmd-1.8.5-config-gentoo.patch,
+ -files/vmd-1.8.6-config-gentoo.patch,
+ -files/vmd-1.8.6-fix-crash-on-tcl8.5.patch,
+ -files/vmd-1.8.6-python-2.5.patch, -files/vmd-1.8.6-tcltk8.5.patch,
+ vmd-1.8.7-r1.ebuild, +vmd-1.8.7-r2.ebuild, -files/vmd-1.8.7-config.patch,
+ files/vmd-1.8.7-gentoo.patch, +files/vmd-1.8.7-respect-flags.patch,
+ -files/vmd-1.8.7-use-bash-startup.patch:
+ Make it really prefix ready, don't mix CFLAGS/CXXFLAGS,clean old patches
24 Jul 2010; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r1.ebuild:
Added prefix changes, thanks rei4dan #327517; keyworded for ~-linux prefix
diff --git a/sci-chemistry/vmd/Manifest b/sci-chemistry/vmd/Manifest
index 37580b50a70b..0c38b32ba439 100644
--- a/sci-chemistry/vmd/Manifest
+++ b/sci-chemistry/vmd/Manifest
@@ -1,24 +1,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX vmd-1.8.5-config-gentoo.patch 4714 RMD160 192224a4a05e249c357f08e13d0811dcfb60f7ea SHA1 9b008b3313c969517dacf1c721e894151d0771f7 SHA256 8e7ac5124de52dbef9469c8416b1f011ffe3420043c5a58c2183b67dd66a6be9
-AUX vmd-1.8.6-config-gentoo.patch 4666 RMD160 1fb149ab58292f42abbe4d658aff0334d3fe73f9 SHA1 27a7ea51772e93e858ef23bf09d819e75d6418b5 SHA256 6dc232ee1c01a56bb94bdf193f024e868f957a22b6c1c8666d2d443801a36f03
-AUX vmd-1.8.6-fix-crash-on-tcl8.5.patch 1355 RMD160 19f86942aabda74eb5726346b84012b6509b67f1 SHA1 921c554d9a6e296251ce01e22f5bf03c7bcc8841 SHA256 98bcd0c524f0392a12149c5d6ab15cff489edf1092315a74110f655de482ca4e
-AUX vmd-1.8.6-python-2.5.patch 860 RMD160 4f9f83800e0f5083fcd32a016404c909da4042a6 SHA1 bb401cccbb18428cc0fdce5cf4b5fd3a910a9cea SHA256 652e5dbb44d2c14c13886e9e7bc2677287bfdd520e7489547cffc2331b39d7ec
-AUX vmd-1.8.6-tcltk8.5.patch 2348 RMD160 d1661e1effd1ab35def56cbd53601801427f96a0 SHA1 b7b7fd68cb6e9c8fea12c4544179daaada5dd36b SHA256 d1e39f5d67af22281ccf1bf56e1360778e03d1b1ea6c6c184a0d269f49edee2c
-AUX vmd-1.8.7-config.patch 5960 RMD160 3cc9368c09525328a2fde0b9322e55b60f86d675 SHA1 22af045aa42113ecddb8245387d3e60cb133570a SHA256 a838a8ef8be710c2ed5cec9d0ad47055e47cbc649b9187ba8b7d551e342ad39a
-AUX vmd-1.8.7-gentoo.patch 39209 RMD160 3078ba58c691684cd342c7ea3fbf8e0d23f77399 SHA1 ed0cbb1fabe9a5fc67a00c3d4cedc18681f107b2 SHA256 afb312f5b1066b82f8aa17bdd88bded7beec99f67cd8646906f4d04af2eccd37
-AUX vmd-1.8.7-use-bash-startup.patch 717 RMD160 f061a9e4c90115b3eab42d754e66f62240b3fb69 SHA1 73001ba99f97ce484610593b50bafcbed7943889 SHA256 3f9a8c9f8f0f461b8dd3985d71265c942e655e56e1745b75c25f547821d4228c
+AUX vmd-1.8.7-gentoo.patch 40425 RMD160 ff4969a813a8bdb93c69a445d30ffdab8f46f64e SHA1 f001456e38e927c0cbc6502444676544d8187524 SHA256 a0af0c88c7bbbd3387b1c69b527f4b28f667a063d1be293c3c4a1c3f0db203ac
+AUX vmd-1.8.7-respect-flags.patch 954 RMD160 1b4162173e8856801a9d37faf527d870ccc0a5a1 SHA1 7684b9c95cd87f4033aff6713a25841e31216eb9 SHA256 fbd8d610550673e58d336fcc9b780248241f78a9a418230f877972a480aac9b4
AUX vmd.desktop 296 RMD160 83dbf38b9b90b42b1b913a8a4a572d5570e55f2e SHA1 077d414e2a1ba3fcbdac02559b9efdfeb26fa9dd SHA256 5008ea2c950955f416061a14c35a2b2146df29df290b7f5b1e2f3c48d7ce7d8d
AUX vmd.png 8365 RMD160 faea1a2dba00d47b39c06d303a18420a89489e10 SHA1 61ee9b247b540540d99d69fbebe685464a2eb105 SHA256 d83f568615ad954f582d986975997186fdacfd8f79c30f49d6aaf07ba2eb6aa7
DIST vmd-1.8.7.src.tar.gz 23853864 RMD160 1c4751552d7b3f376f91a4b28ee9d4a028ded01a SHA1 409b6f8959d551f581991073f98885b47c21c25c SHA256 72fe2fb7eff4c805a886ea929c7e143a3a1be57cc817b5d1719d29e591d80316
EBUILD vmd-1.8.7-r1.ebuild 5287 RMD160 7011f3f6a7b5e939c96c17e723358cd76356e776 SHA1 a6ad3d7331456cae5ed9d48f497039d86ccdb0de SHA256 fad38ad6ac0f56c6bf4b6e9502f7265f22cf73acb13189eaef35d6c2ffc4b483
-MISC ChangeLog 5748 RMD160 e4aa561c447b77b4ce1e635bbc07bef6e0239c3c SHA1 d3a1d2083b1c74484d36daa460ee55a53aafc27f SHA256 3f98043151ae844b6bf42e34407199a4c79d429712e9a7e65a0d978fa7b771e6
+EBUILD vmd-1.8.7-r2.ebuild 5566 RMD160 0619d8c34cbef4ba8f3810afd441950d34ea6f77 SHA1 938571b161dfb56034dcef9efe3f78732d152c45 SHA256 950f29b23588d79b7241e1e5eec05d20e36686fbc16e0955777b142814108862
+MISC ChangeLog 6285 RMD160 17b8241943ee9fd3a67d2f84f9f5037cf2bdb07d SHA1 87c3ca51b105ee53abd6a1167ff1acc6230ef116 SHA256 7b3a4aff4d36b55bf6b4a57499869590cc7bc452f1a003104220a5604e65e075
MISC metadata.xml 470 RMD160 8db746301d113b2039240036dd0c4c58c2a231c8 SHA1 56e25a98a48d31c6dfdc877326621dcb07b9c290 SHA256 28ba86d2d3878f8c4e8f584cc8ef2d0e464f73492d0a09bea2d22ead10682cd8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
-iEYEARECAAYFAkxLIm8ACgkQgAnW8HDreRZhdQCgs8NXGC6HyuP8rrjYAnFh7wfe
-41QAnjMAPVK4Ul21IdLPghtYnTtdRIv9
-=Qbs4
+iEUEARECAAYFAkxPKdAACgkQgAnW8HDreRbodwCgxQ9wTythbPDI0/Ijuv3rMYKG
+ubEAlRh0Utstmdv9ArYOC88i6vh5W2c=
+=o0gX
-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/vmd/files/vmd-1.8.5-config-gentoo.patch b/sci-chemistry/vmd/files/vmd-1.8.5-config-gentoo.patch
deleted file mode 100644
index 754977954aaa..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.5-config-gentoo.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -Naur vmd-1.8.5/configure vmd-1.8.5-new/configure
---- vmd-1.8.5/configure 2006-08-25 16:39:51.000000000 -0400
-+++ vmd-1.8.5-new/configure 2006-12-22 08:26:32.000000000 -0500
-@@ -13,10 +13,10 @@
- $install_name = "vmd";
-
- # Directory where VMD startup script is installed, should be in users' paths.
--$install_bin_dir="/usr/local/bin";
-+$install_bin_dir="gentoo-bindir";
-
- # Directory where VMD files and executables are installed
--$install_library_dir="/usr/local/lib/$install_name";
-+$install_library_dir="gentoo-libdir/$install_name";
-
-
- # optionally override hard-coded defaults above with environment variables
-@@ -121,29 +121,6 @@
- # Configure script code begins here
- ############################################################################
-
--## Test for existence of a properly compiled plugin tree
--if (!(-e "plugins")) {
-- print "\n";
-- print "VMD plugin directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
--} else {
-- if (!(-e "plugins/include/vmdplugin.h")) {
-- print "\n";
-- print "VMD plugin include files or directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
-- }
--}
--
- #################### Parse command line options ###########
- # list of allowed architectures
- @archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'HPUX11', 'AIX4', 'AIX5', 'AIX5_64', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXIA64', 'LINUXPPC', 'MACOSX', 'MACOSXX86', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'SOLARISX86_64', 'WIN32', 'WIN64');
-@@ -409,8 +386,8 @@
-
- ################ Plugin options
- #
--$plugin_dir = "../plugins";
--$molfile_dir = "$plugin_dir/$config_arch/molfile";
-+$plugin_dir = "gentoo-plugindir";
-+$molfile_dir = "$plugin_dir/compile/lib_LINUX/molfile";
- $plugin_include = "-I$plugin_dir/include -I$molfile_dir";
- $plugin_library = "-L$molfile_dir";
- $plugin_libs = "-lmolfile_plugin";
-@@ -510,8 +487,8 @@
- ################ FLTK GUI
- $fltk_defines = "-DVMDGUI -DVMDFLTK";
- $fltk_dir = "$vmd_library_dir/fltk";
--$fltk_include = "-I$fltk_dir/include";
--$fltk_library = "-L$fltk_dir/$config_arch";
-+$fltk_include = "-Igentoo-fltk-include";
-+$fltk_library = "-Lgentoo-fltk-libs";
- $fltk_libs = "-lfltk -lX11";
- #@fltk_cc = ('forms_ui.c');
- @fltk_ccpp = ( 'ColorFltkMenu.C',
-@@ -797,8 +774,8 @@
- #######################
- $netcdf_defines = "";
- $netcdf_dir = "$vmd_library_dir/netcdf";
--$netcdf_include = "-I$netcdf_dir/include";
--$netcdf_library = "-L$netcdf_dir/lib_$config_arch";
-+$netcdf_include = "-Igentoo-netcdf-include";
-+$netcdf_library = "-Lgentoo-netcdf-libs";
- $netcdf_libs = "-lnetcdf";
- @netcdf_cc = ();
- @netcdf_ccpp = ();
-@@ -859,9 +836,9 @@
- ###################
- $python_defines = "-DVMDPYTHON";
- $python_dir = "$vmd_library_dir/python";
--$python_include = "-I$python_dir/lib_$config_arch/include/python2.2";
--$python_library = "-L$python_dir/lib_$config_arch/lib/python2.2/config";
--$python_libs = "-lpython2.2 -lpthread";
-+$python_include = "-Igentoo-python-include";
-+$python_library = "-Lgentoo-python-lib";
-+$python_libs = "-lgentoo-python-link -lpthread";
- @python_h = ('PythonTextInterp.h',
- 'VMDTkinterMenu.h',
- 'py_commands.h',
-@@ -1441,8 +1418,8 @@
- $opengl_libs = "-lGL -lGLU";
- # $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lXext -lX11";
-
-- $arch_cc = "gcc";
-- $arch_ccpp = "g++";
-+ $arch_cc = "gentoo-gcc";
-+ $arch_ccpp = "gentoo-g++";
- # test hack to statically link libstd++
- # $arch_ccpp = "gcc";
- $arch_depend_flag = "-MM";
-@@ -1451,8 +1428,8 @@
- $arch_shcppopts = "-fPIC";
- $arch_shldopts = "";
-
-- $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -O3";
-- $arch_copts = "-m32 -Wall -O3";
-+ $arch_opt_flag = "gentoo-cflags";
-+ $arch_copts = "gentoo-cflags";
-
- if ($config_static) {
- $arch_lopts = "-static";
diff --git a/sci-chemistry/vmd/files/vmd-1.8.6-config-gentoo.patch b/sci-chemistry/vmd/files/vmd-1.8.6-config-gentoo.patch
deleted file mode 100644
index 950b2f6b1836..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.6-config-gentoo.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- ../vmd-1.8.6-orig/configure 2007-04-14 17:08:43.000000000 -0500
-+++ vmd-1.8.6/configure 2007-04-14 17:30:28.000000000 -0500
-@@ -13,10 +13,10 @@
- $install_name = "vmd";
-
- # Directory where VMD startup script is installed, should be in users' paths.
--$install_bin_dir="/usr/local/bin";
-+$install_bin_dir="gentoo-bindir";
-
- # Directory where VMD files and executables are installed
--$install_library_dir="/usr/local/lib/$install_name";
-+$install_library_dir="gentoo-libdir/$install_name";
-
-
- # optionally override hard-coded defaults above with environment variables
-@@ -123,29 +123,6 @@
- # Configure script code begins here
- ############################################################################
-
--## Test for existence of a properly compiled plugin tree
--if (!(-e "plugins")) {
-- print "\n";
-- print "VMD plugin directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
--} else {
-- if (!(-e "plugins/include/vmdplugin.h")) {
-- print "\n";
-- print "VMD plugin include files or directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
-- }
--}
--
- #################### Parse command line options ###########
- # list of allowed architectures
- @archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'HPUX11', 'AIX4', 'AIX5', 'AIX5_64', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXIA64', 'LINUXPPC', 'MACOSX', 'MACOSXX86', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'SOLARISX86_64', 'WIN32', 'WIN64');
-@@ -423,8 +400,8 @@
-
- ################ Plugin options
- #
--$plugin_dir = "../plugins";
--$molfile_dir = "$plugin_dir/$config_arch/molfile";
-+$plugin_dir = "gentoo-plugindir";
-+$molfile_dir = "$plugin_dir/compile/lib_LINUX/molfile";
- $plugin_include = "-I$plugin_dir/include -I$molfile_dir";
- $plugin_library = "-L$molfile_dir";
- $plugin_libs = "-lmolfile_plugin";
-@@ -529,8 +506,8 @@
- ################ FLTK GUI
- $fltk_defines = "-DVMDGUI -DVMDFLTK";
- $fltk_dir = "$vmd_library_dir/fltk";
--$fltk_include = "-I$fltk_dir/include";
--$fltk_library = "-L$fltk_dir/$config_arch";
-+$fltk_include = "-Igentoo-fltk-include";
-+$fltk_library = "-Lgentoo-fltk-libs";
- $fltk_libs = "-lfltk -lX11";
- #@fltk_cc = ('forms_ui.c');
- @fltk_cu = ();
-@@ -886,8 +863,8 @@
- #######################
- $netcdf_defines = "";
- $netcdf_dir = "$vmd_library_dir/netcdf";
--$netcdf_include = "-I$netcdf_dir/include";
--$netcdf_library = "-L$netcdf_dir/lib_$config_arch";
-+$netcdf_include = "-Igentoo-netcdf-include";
-+$netcdf_library = "-Lgentoo-netcdf-libs";
- $netcdf_libs = "-lnetcdf";
- @netcdf_cc = ();
- @netcdf_cu = ();
-@@ -954,9 +931,9 @@
- ###################
- $python_defines = "-DVMDPYTHON";
- $python_dir = "$vmd_library_dir/python";
--$python_include = "-I$python_dir/lib_$config_arch/include/python2.2";
--$python_library = "-L$python_dir/lib_$config_arch/lib/python2.2/config";
--$python_libs = "-lpython2.2 -lpthread";
-+$python_include = "-Igentoo-python-include";
-+$python_library = "-Lgentoo-python-lib";
-+$python_libs = "-lgentoo-python-link -lpthread";
- @python_h = ('PythonTextInterp.h',
- 'VMDTkinterMenu.h',
- 'py_commands.h',
-@@ -1555,8 +1532,8 @@
- $opengl_libs = "-lGL -lGLU";
- # $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lXext -lX11";
-
-- $arch_cc = "gcc";
-- $arch_ccpp = "g++";
-+ $arch_cc = "gentoo-gcc";
-+ $arch_ccpp = "gentoo-g++";
- # test hack to statically link libstd++
- # $arch_ccpp = "gcc";
- $arch_depend_flag = "-MM";
-@@ -1565,8 +1542,8 @@
- $arch_shcppopts = "-fPIC";
- $arch_shldopts = "";
-
-- $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -O3";
-- $arch_copts = "-m32 -Wall -O3";
-+ $arch_opt_flag = "gentoo-cflags";
-+ $arch_copts = "gentoo-cflags";
- if ($config_swig) {
- $swig_cflags .= " -fno-strict-aliasing";
- }
diff --git a/sci-chemistry/vmd/files/vmd-1.8.6-fix-crash-on-tcl8.5.patch b/sci-chemistry/vmd/files/vmd-1.8.6-fix-crash-on-tcl8.5.patch
deleted file mode 100644
index db83164ce710..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.6-fix-crash-on-tcl8.5.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- vmd-1.8.6/src/TclTextInterp.C.orig 2009-02-02 23:24:27.000000000 +0300
-+++ vmd-1.8.6/src/TclTextInterp.C 2009-02-02 23:35:33.000000000 +0300
-@@ -100,7 +100,9 @@
-
- TclTextInterp::TclTextInterp(VMDApp *vmdapp)
- : app(vmdapp) {
--
-+#if 0
-+ Tcl_InitMemory(interp); // enable Tcl memory debugging features when compiled with TCL_MEM_DEBUG
-+#endif
- interp = Tcl_CreateInterp();
- commandPtr = Tcl_NewObj();
- Tcl_IncrRefCount(commandPtr);
-@@ -310,8 +312,16 @@
- callLevel++;
- Tcl_RecordAndEvalObj(interp, commandPtr, 0);
- callLevel--;
--
-+#if TCL_MINOR_VERSION >= 5
-+ if (Tcl_IsShared(commandPtr)) {
-+ Tcl_DecrRefCount(commandPtr);
-+ commandPtr = Tcl_NewObj();
-+ Tcl_IncrRefCount(commandPtr);
-+ }
-+#else
-+// XXX this crashes Tcl 8.5.[46] with an internal panic
- Tcl_SetObjLength(commandPtr, 0);
-+#endif
-
- // if ok, send to stdout; if not, send to stderr
- Tcl_Obj *resultPtr = Tcl_GetObjResult(interp);
-@@ -388,8 +398,16 @@
- if (app->exitFlag) break;
-
- Tcl_RecordAndEvalObj(interp, cmdPtr, 0);
-+#if TCL_MINOR_VERSION >= 5
-+ if (Tcl_IsShared(cmdPtr)) {
-+ Tcl_DecrRefCount(cmdPtr);
-+ cmdPtr = Tcl_NewObj();
-+ Tcl_IncrRefCount(cmdPtr);
-+ }
-+#else
-+ // XXX this crashes Tcl 8.5.[46] with an internal panic
- Tcl_SetObjLength(cmdPtr, 0);
--
-+#endif
- // XXX what's this here for?
- app->display_update();
-
diff --git a/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch b/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch
deleted file mode 100644
index ad8d0ae9b51a..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- vmd-1.8.6/src/py_atomsel.C 2007-04-08 07:04:03.000000000 +0200
-+++ vmd-1.8.6.new/src/py_atomsel.C 2007-09-20 19:30:41.000000000 +0200
-@@ -25,6 +25,10 @@
- #include "py_commands.h"
- #include "BondSearch.h"
-
-+#if PY_VERSION_HEX < ((2<<24)|(5<<16))
-+typedef int Py_ssize_t;
-+#endif
-+
- typedef struct {
- PyObject_HEAD
- AtomSel *atomSel;
-@@ -915,9 +919,11 @@
- * Support for mapping protocol
- */
-
--static int
--atomselection_length( PyAtomSelObject *a ) {
-- return a->atomSel->selected;
-+
-+static Py_ssize_t
-+atomselection_length(PyObject *a)
-+{
-+ return ((PyAtomSelObject *)a)->atomSel->selected;
- }
-
- // for integer argument, return True or False if index in in selection
-@@ -935,7 +941,7 @@
- }
-
- static PyMappingMethods atomsel_mapping = {
-- (inquiry)atomselection_length,
-+ atomselection_length,
- (binaryfunc)atomselection_subscript,
- 0
- };
diff --git a/sci-chemistry/vmd/files/vmd-1.8.6-tcltk8.5.patch b/sci-chemistry/vmd/files/vmd-1.8.6-tcltk8.5.patch
deleted file mode 100644
index abb9be3e3431..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.6-tcltk8.5.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naur vmd-1.8.6/configure vmd-1.8.6.new/configure
---- vmd-1.8.6/configure 2007-04-08 01:03:49.000000000 -0400
-+++ vmd-1.8.6.new/configure 2008-03-11 09:53:43.000000000 -0400
-@@ -591,8 +591,8 @@
- if ($config_tk) { $tcl_include .= " -I$stock_tk_include_dir"; }
- $tcl_library = "-L$stock_tcl_library_dir";
- if ($config_tk) { $tcl_library .= " -L$stock_tk_library_dir"; }
--$tcl_libs = "-ltcl8.4";
--if ($config_tk) { $tcl_libs = "-ltk8.4 -lX11 " . $tcl_libs; }
-+$tcl_libs = "-ltcl";
-+if ($config_tk) { $tcl_libs = "-ltk -lX11 " . $tcl_libs; }
-
- @tcl_cc = ();
- @tcl_cu = ();
-@@ -1843,8 +1843,8 @@
- $fltk_libs = "-lfltk-x11 -lX11";
- $opengl_include = $opengl_include . " -I/usr/X11R6/include";
- $opengl_libs = "-L/usr/X11R6/lib -lGLU -lGL -framework Carbon -lXext -lX11";
-- $tcl_libs = "-ltcl8.4-x11";
-- if ($config_tk) { $tcl_libs = "-ltk8.4-x11 -lX11 " . $tcl_libs; }
-+ $tcl_libs = "-ltcl-x11";
-+ if ($config_tk) { $tcl_libs = "-ltk-x11 -lX11 " . $tcl_libs; }
- $vmd_libs = "$tcl_libs";
- } else {
- ##
-@@ -1936,8 +1936,8 @@
- $fltk_libs = "-lfltk-x11 -lX11";
- $opengl_include = $opengl_include . " -I/usr/X11R6/include";
- $opengl_libs = "-L/usr/X11R6/lib -lGLU -lGL -framework Carbon -lXext -lX11";
-- $tcl_libs = "-ltcl8.4-x11";
-- if ($config_tk) { $tcl_libs = "-ltk8.4-x11 -lX11 " . $tcl_libs; }
-+ $tcl_libs = "-ltcl-x11";
-+ if ($config_tk) { $tcl_libs = "-ltk-x11 -lX11 " . $tcl_libs; }
- $vmd_libs = "$tcl_libs";
- } else {
- ##
-diff -Naur vmd-1.8.6/src/cmd_render.C vmd-1.8.6.new/src/cmd_render.C
---- vmd-1.8.6/src/cmd_render.C 2007-04-08 01:04:03.000000000 -0400
-+++ vmd-1.8.6.new/src/cmd_render.C 2008-03-11 09:53:12.000000000 -0400
-@@ -211,8 +211,8 @@
- // likely to lead to memory leaks in various scripts. There's also currently
- // no way to read out the size of the display in VMD (sad, I know), so
- // it's just easier to set it here.
-- Tk_PhotoSetSize(handle, xs, ys);
-- Tk_PhotoPutBlock(handle, &blk, 0, 0, xs, ys, TK_PHOTO_COMPOSITE_SET);
-+ Tk_PhotoSetSize(interp, handle, xs, ys);
-+ Tk_PhotoPutBlock(interp, handle, &blk, 0, 0, xs, ys, TK_PHOTO_COMPOSITE_SET);
- free(img);
- return TCL_OK;
- }
diff --git a/sci-chemistry/vmd/files/vmd-1.8.7-config.patch b/sci-chemistry/vmd/files/vmd-1.8.7-config.patch
deleted file mode 100644
index 7850e9f32b6b..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.7-config.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff -Naur vmd-1.8.7/configure vmd-1.8.7.new/configure
---- vmd-1.8.7/configure 2009-08-01 03:19:34.000000000 -0400
-+++ vmd-1.8.7.new/configure 2009-08-07 09:12:43.000000000 -0400
-@@ -13,10 +13,10 @@
- $install_name = "vmd";
-
- # Directory where VMD startup script is installed, should be in users' paths.
--$install_bin_dir="/usr/local/bin";
-+$install_bin_dir="gentoo-bindir";
-
- # Directory where VMD files and executables are installed
--$install_library_dir="/usr/local/lib/$install_name";
-+$install_library_dir="gentoo-libdir/$install_name";
-
-
- # optionally override hard-coded defaults above with environment variables
-@@ -128,29 +128,6 @@
- # Configure script code begins here
- ############################################################################
-
--## Test for existence of a properly compiled plugin tree
--if (!(-e "plugins")) {
-- print "\n";
-- print "VMD plugin directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
--} else {
-- if (!(-e "plugins/include/vmdplugin.h")) {
-- print "\n";
-- print "VMD plugin include files or directory not found.\n";
-- print "Please compile the VMD plugins and do 'make distrib' to copy them\n";
-- print "into a 'plugins' directory linked or located in this directory.\n";
-- print "Be sure your PLUGINDIR environment variable is set before running\n";
-- print "'make distrib' in the plugin build area.\n";
-- print "\n";
-- die "Halting configuration until VMD plugins are built.\n";
-- }
--}
--
- #################### Parse command line options ###########
- # list of allowed architectures
- @archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'HPUX11', 'AIX4', 'AIX5', 'AIX5_64', 'AIX6_64', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXIA64', 'LINUXPPC', 'LINUXPPC64', 'MACOSX', 'MACOSXX86', 'MACOSXX86_64', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'SOLARISX86_64', 'WIN32', 'WIN64');
-@@ -435,7 +412,7 @@
-
- ################ Plugin options
- #
--$plugin_dir = "../plugins";
-+$plugin_dir = "gentoo-plugindir";
- $plugin_include = "-I$plugin_dir/include";
- $plugin_library = "";
- $plugin_libs = "";
-@@ -448,7 +425,7 @@
- @plugin_extra = ();
-
- if ($config_staticplugin) {
-- $molfile_dir = "$plugin_dir/$config_arch/molfile";
-+ $molfile_dir = "$plugin_dir/compile/lib_LINUX/molfile";
- $plugin_include .= " -I$molfile_dir";
- $plugin_library .= " -L$molfile_dir";
- $plugin_libs .= " -lmolfile_plugin";
-@@ -550,8 +527,8 @@
- ################ FLTK GUI
- $fltk_defines = "-DVMDGUI -DVMDFLTK";
- $fltk_dir = "$vmd_library_dir/fltk";
--$fltk_include = "-I$fltk_dir/include";
--$fltk_library = "-L$fltk_dir/$config_arch";
-+$fltk_include = "-Igentoo-fltk-include";
-+$fltk_library = "-Lgentoo-fltk-libs";
- $fltk_libs = "-lfltk -lX11";
- #@fltk_cc = ('forms_ui.c');
- @fltk_cu = ();
-@@ -612,8 +589,8 @@
- if ($config_tk) { $tcl_include .= " -I$stock_tk_include_dir"; }
- $tcl_library = "-L$stock_tcl_library_dir";
- if ($config_tk) { $tcl_library .= " -L$stock_tk_library_dir"; }
--$tcl_libs = "-ltcl8.5";
--if ($config_tk) { $tcl_libs = "-ltk8.5 -lX11 " . $tcl_libs; }
-+$tcl_libs = "-ltcl";
-+if ($config_tk) { $tcl_libs = "-ltk -lX11 " . $tcl_libs; }
-
- @tcl_cc = ();
- @tcl_cu = ();
-@@ -938,8 +915,8 @@
- #######################
- $netcdf_defines = "";
- $netcdf_dir = "$vmd_library_dir/netcdf";
--$netcdf_include = "-I$netcdf_dir/include";
--$netcdf_library = "-L$netcdf_dir/lib_$config_arch";
-+$netcdf_include = "-Igentoo-netcdf-include";
-+$netcdf_library = "-Lgentoo-netcdf-libs";
- $netcdf_libs = "-lnetcdf";
- @netcdf_cc = ();
- @netcdf_cu = ();
-@@ -1007,9 +984,9 @@
- $python_defines = "-DVMDPYTHON";
- $python_dir = "$vmd_library_dir/python";
- $numpy_dir = "$vmd_library_dir/numpy";
--$python_include = "-I$python_dir/lib_$config_arch/include/python2.5 -I$numpy_dir/lib_$config_arch/include -I$python_dir/lib_$config_arch/lib/python2.5/site-packages/numpy/core/include";
--$python_library = "-L$python_dir/lib_$config_arch/lib/python2.5/config";
--$python_libs = "-lpython2.5 -lpthread";
-+$python_include = "-Igentoo-python-include -Igentoo-numpy-include";
-+$python_library = "-Lgentoo-python-lib";
-+$python_libs = "-lgentoo-python-link -lpthread";
- @python_h = ('PythonTextInterp.h',
- 'VMDTkinterMenu.h',
- 'py_commands.h',
-@@ -1621,8 +1598,8 @@
-
- # XFree 4.0 Direct Rendering Interface and GLX
- $opengl_dir = "/usr/X11R6";
-- $opengl_include = "-I$opengl_dir/include";
-- $opengl_library = "-L$opengl_dir/lib";
-+ $opengl_include = "-Igentoo-opengl-include";
-+ $opengl_library = "-Lgentoo-opengl-libs";
- $opengl_libs = "-lGL -lGLU";
- # $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lXext -lX11";
-
-@@ -1650,15 +1627,15 @@
- $arch_lopts .= "-i-static ";
- } else {
- # compling with GCC
-- $arch_cc = "gcc";
-- $arch_ccpp = "g++";
-+ $arch_cc = "gentoo-gcc";
-+ $arch_ccpp = "gentoo-g++";
- $arch_depend_flag = "-MM";
-- $arch_shld = "g++ -shared";
-+ $arch_shld = "gentoo-g++ -shared";
- $arch_shlibname = "so";
- $arch_shcppopts = "-fPIC";
- $arch_shldopts = "";
-- $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -O3";
-- $arch_copts = "-m32 -Wall -O3";
-+ $arch_opt_flag = "gentoo-cflags";
-+ $arch_copts = "gentoo-cflags";
-
- if ($config_static) {
- $arch_lopts = "-static";
diff --git a/sci-chemistry/vmd/files/vmd-1.8.7-gentoo.patch b/sci-chemistry/vmd/files/vmd-1.8.7-gentoo.patch
index c80ed09be17b..e8c82c2bf872 100644
--- a/sci-chemistry/vmd/files/vmd-1.8.7-gentoo.patch
+++ b/sci-chemistry/vmd/files/vmd-1.8.7-gentoo.patch
@@ -40,7 +40,7 @@ index 1b6ea67..d13aca1 100644
+++ b/plugins/Makefile.rej
@@ -3,7 +3,6 @@
# Makefile for molecule file readers
- # $Id: vmd-1.8.7-gentoo.patch,v 1.1 2010/05/18 07:22:51 jlec Exp $
+ # $Id: vmd-1.8.7-gentoo.patch,v 1.2 2010/07/27 18:47:33 jlec Exp $
-- .SILENT:
@@ -48,7 +48,7 @@ index 1b6ea67..d13aca1 100644
@@ -17,7 +16,6 @@
# Makefile for molecule file readers
- # $Id: vmd-1.8.7-gentoo.patch,v 1.1 2010/05/18 07:22:51 jlec Exp $
+ # $Id: vmd-1.8.7-gentoo.patch,v 1.2 2010/07/27 18:47:33 jlec Exp $
-+ .SILENT:
@@ -543,19 +543,30 @@ index 96e70dc..8d10ef4 100644
VMFILES = molefacture.tcl molefacture_builder.tcl \
molefacture_edit.tcl molefacture_geometry.tcl molefacture_gui.tcl \
diff --git a/plugins/molfile_plugin/Makefile b/plugins/molfile_plugin/Makefile
-index 18fb6dc..f17bdda 100644
+index 18fb6dc..e32b130 100644
--- a/plugins/molfile_plugin/Makefile
+++ b/plugins/molfile_plugin/Makefile
@@ -1,7 +1,6 @@
# Makefile for molecule file readers
- # $Id: vmd-1.8.7-gentoo.patch,v 1.1 2010/05/18 07:22:51 jlec Exp $
+ # $Id: vmd-1.8.7-gentoo.patch,v 1.2 2010/07/27 18:47:33 jlec Exp $
-.SILENT:
.SUFFIXES:
+@@ -14,8 +13,8 @@ INCDIR = -I../include -I${SRCDIR}
+
+ VPATH = src ../include ${ARCHDIR}
+
+-SCCFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
+-SCXXFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
++SCCFLAGS = $(CFLAGS) $(DEF)"STATIC_PLUGIN"
++SCXXFLAGS = $(CXXFLAGS) $(DEF)"STATIC_PLUGIN"
+
+ #
+ # Rules
diff --git a/plugins/molfile_plugin/src/cifplugin/Makefile b/plugins/molfile_plugin/src/cifplugin/Makefile
-index 1dfa768..88f4b7b 100644
+index 1dfa768..e3f380b 100644
--- a/plugins/molfile_plugin/src/cifplugin/Makefile
+++ b/plugins/molfile_plugin/src/cifplugin/Makefile
@@ -1,6 +1,5 @@
@@ -565,6 +576,15 @@ index 1dfa768..88f4b7b 100644
.SUFFIXES:
+@@ -14,7 +13,7 @@ INCDIR = -I../include -I${SRCDIR}
+ VPATH = src ../include ${ARCHDIR}
+
+ SCCFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
+-SCXXFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
++SCXXFLAGS = $(CXXFLAGS) $(DEF)"STATIC_PLUGIN"
+
+ #
+ # Rules
diff --git a/plugins/moltoptools/Makefile b/plugins/moltoptools/Makefile
index 3599cb7..8d80ec2 100644
--- a/plugins/moltoptools/Makefile
@@ -1018,7 +1038,7 @@ index aa95b41..66ee516 100644
VMFILES = zoomseq.tcl pkgIndex.tcl
VMVERSION = 1.1
diff --git a/vmd-1.8.7/configure b/vmd-1.8.7/configure
-index f01944a..2763347 100755
+index f01944a..b04bade 100755
--- a/vmd-1.8.7/configure
+++ b/vmd-1.8.7/configure
@@ -13,10 +13,10 @@
@@ -1170,6 +1190,22 @@ index f01944a..2763347 100755
if ($config_static) {
# link everything statically (this won't work due to libGL issues)
+@@ -2714,11 +2691,11 @@ LIBDIRS = $LIBDIRS
+ DEFINES = $DEFINES
+
+ # compiler and compiler directives
+-CC = $arch_cc
+-CFLAGS = $arch_copts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags
++CC = gentoo-gcc
++CFLAGS = gentoo-cflags -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags
+
+-CCPP = $arch_ccpp
+-CPPFLAGS = $arch_opt_flag $arch_cppopts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags
++CCPP = gentoo-g++
++CPPFLAGS = gentoo-cxxflags $arch_cppopts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags
+
+ NVCC = $arch_nvcc
+ NVCCFLAGS = $arch_nvccflags -DARCH_$config_arch \$(DEFINES) \$(INCDIRS)
@@ -2766,7 +2743,7 @@ $config_progname: y.tab.h \$(VMD_OBJS)
if [ ! -r ./$arch_template_repository ]; then \\
ln -s $vmd_src_dir/$arch_template_repository ./$arch_template_repository ; \\
diff --git a/sci-chemistry/vmd/files/vmd-1.8.7-respect-flags.patch b/sci-chemistry/vmd/files/vmd-1.8.7-respect-flags.patch
new file mode 100644
index 000000000000..cd1281e3b682
--- /dev/null
+++ b/sci-chemistry/vmd/files/vmd-1.8.7-respect-flags.patch
@@ -0,0 +1,28 @@
+diff --git a/plugins/molfile_plugin/Makefile b/plugins/molfile_plugin/Makefile
+index 18fb6dc..8659573 100644
+--- a/plugins/molfile_plugin/Makefile
++++ b/plugins/molfile_plugin/Makefile
+@@ -14,8 +14,8 @@ INCDIR = -I../include -I${SRCDIR}
+
+ VPATH = src ../include ${ARCHDIR}
+
+-SCCFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
+-SCXXFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
++SCCFLAGS = $(CFLAGS) $(DEF)"STATIC_PLUGIN"
++SCXXFLAGS = $(CXXFLAGS) $(DEF)"STATIC_PLUGIN"
+
+ #
+ # Rules
+diff --git a/plugins/molfile_plugin/src/cifplugin/Makefile b/plugins/molfile_plugin/src/cifplugin/Makefile
+index 1dfa768..9de3f6b 100644
+--- a/plugins/molfile_plugin/src/cifplugin/Makefile
++++ b/plugins/molfile_plugin/src/cifplugin/Makefile
+@@ -14,7 +14,7 @@ INCDIR = -I../include -I${SRCDIR}
+ VPATH = src ../include ${ARCHDIR}
+
+ SCCFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
+-SCXXFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLUGIN"
++SCXXFLAGS = $(CXXFLAGS) $(DEF)"STATIC_PLUGIN"
+
+ #
+ # Rules
diff --git a/sci-chemistry/vmd/files/vmd-1.8.7-use-bash-startup.patch b/sci-chemistry/vmd/files/vmd-1.8.7-use-bash-startup.patch
deleted file mode 100644
index 422d95c69d11..000000000000
--- a/sci-chemistry/vmd/files/vmd-1.8.7-use-bash-startup.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur vmd-1.8.7.old/configure vmd-1.8.7/configure
---- vmd-1.8.7.old/configure 2009-08-01 03:19:34.000000000 -0400
-+++ vmd-1.8.7/configure 2009-08-05 09:30:33.000000000 -0400
-@@ -2804,8 +2804,7 @@
- -\$(COPY) ../data/.vmdrc ../data/.vmdsensors ../data/vmd_completion.dat "$install_library_dir"
- \$(CD) $vmd_bin_dir ; \\
- if [ -f run_vmd_tmp ]; then \$(DELETE) run_vmd_tmp; fi ; \\
-- if [ ! -x "/bin/csh" ]; then \\
-- \$(ECHO) "Info: /bin/csh shell not found, installing Bourne shell startup script instead" ; \\
-+ if [ -x "/bin/bash" ]; then \\
- \$(ECHO) '#!/bin/sh' >> run_vmd_tmp ; \\
- \$(ECHO) 'defaultvmddir="$install_library_dir"' >> run_vmd_tmp ; \\
- \$(ECHO) 'vmdbasename=vmd' >> run_vmd_tmp ; \\
diff --git a/sci-chemistry/vmd/vmd-1.8.7-r2.ebuild b/sci-chemistry/vmd/vmd-1.8.7-r2.ebuild
new file mode 100644
index 000000000000..bfe487b72169
--- /dev/null
+++ b/sci-chemistry/vmd/vmd-1.8.7-r2.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/vmd-1.8.7-r2.ebuild,v 1.1 2010/07/27 18:47:38 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2"
+
+inherit eutils multilib python toolchain-funcs
+
+DESCRIPTION="Visual Molecular Dynamics"
+HOMEPAGE="http://www.ks.uiuc.edu/Research/vmd/"
+SRC_URI="${P}.src.tar.gz"
+
+SLOT="0"
+LICENSE="vmd"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="tachyon"
+
+RESTRICT="fetch"
+
+# currently, tk-8.5* with USE=truetype breaks some
+# tk apps such as Sequence Viewer or Timeline.
+DEPEND="
+ || (
+ >=dev-lang/tk-8.5[-truetype]
+ =dev-lang/tk-8.4*
+ )
+ dev-lang/perl
+ dev-python/numpy
+ sci-biology/stride
+ sci-libs/netcdf
+ virtual/opengl
+ x11-libs/fltk:1.1
+ x11-libs/libXft"
+
+RDEPEND="${DEPEND}
+ x11-terms/xterm
+ tachyon? ( media-gfx/tachyon )"
+
+VMD_DOWNLOAD="http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD"
+# Binary only plugin!!
+QA_TEXTRELS="usr/lib*/vmd/plugins/LINUX/tcl/intersurf1.1/bin/intersurf.so"
+QA_PRESTRIPPED="usr/lib*/vmd/plugins/LINUX/tcl/intersurf1.1/bin/intersurf.so"
+QA_DT_HASH_amd64="usr/lib64/vmd/plugins/LINUX/tcl/intersurf1.1/bin/intersurf.so"
+QA_DT_HASH_x86="usr/lib/vmd/plugins/LINUX/tcl/intersurf1.1/bin/intersurf.so"
+
+pkg_nofetch() {
+ elog "Please download ${A} from"
+ elog "${VMD_DOWNLOAD}"
+ elog "after agreeing to the license and then move it to "
+ elog "${DISTDIR}"
+}
+
+src_prepare() {
+ # apply LINUX-arch patches to vmd configure
+ cd "${WORKDIR}" && epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ # prepare the plugins
+ cd "${WORKDIR}"/plugins
+
+ sed -e "s:CC = gcc:CC = $(tc-getCC):" \
+ -e "s:CXX = g++:CXX = $(tc-getCXX):" \
+ -e "s:COPTO =.*\":COPTO = -fPIC -o\":" \
+ -e "s:LOPTO = .*\":LOPTO = ${LDFLAGS} -fPIC -o\":" \
+ -e "s:CCFLAGS =.*\":CCFLAGS = ${CFLAGS}\":" \
+ -e "s:CXXFLAGS =.*\":CXXFLAGS = ${CXXFLAGS}\":" \
+ -e "s:SHLD = gcc:SHLD = $(tc-getCC):" \
+ -e "s:-ltcl8.5:-ltcl:" \
+ -i Make-arch || die "Failed to set up plugins Makefile"
+
+ # prepare vmd itself
+ cd "${S}"
+
+ # PREFIX
+ sed \
+ -e "s:/usr/include/:${EPREFIX}/usr/include:g" \
+ -i configure || die
+
+ sed -e "s:gentoo-bindir:${ED}/usr/bin:" \
+ -e "s:gentoo-libdir:${ED}/usr/$(get_libdir):" \
+ -i configure || die "failed to adjust install paths"
+
+ sed -e "s:gentoo-opengl-include:${EPREFIX}/usr/include/GL:" \
+ -e "s:gentoo-opengl-libs:${EPREFIX}/usr/$(get_libdir):" \
+ -i configure || die "failed to adjust OpenGL paths"
+
+ sed -e "s:gentoo-gcc:$(tc-getCC):" \
+ -e "s:gentoo-g++:$(tc-getCXX):" \
+ -e "s:gentoo-cflags:${CFLAGS}:" \
+ -e "s:gentoo-cxxflags:${CXXFLAGS}:" \
+ -e "s:gentoo-ldflags:${LDFLAGS}:g" \
+ -i configure || die "Failed to adjust C compiler/flags"
+
+ sed -e "s:gentoo-plugindir:${WORKDIR}/plugins:" \
+ -i configure || die "Failed to set up linking to plugin files"
+
+ sed -e "s:gentoo-fltk-include:${EPREFIX}/usr/include/fltk-1.1:" \
+ -e "s:gentoo-fltk-libs:${EPREFIX}/usr/$(get_libdir)/fltk-1.1 -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/fltk-1.1:" \
+ -i configure || die "failed setting up fltk"
+
+ sed -e "s:gentoo-netcdf-include:${EPREFIX}/usr/include:" \
+ -e "s:gentoo-netcdf-libs:${EPREFIX}/usr/$(get_libdir):" \
+ -i configure || die "failed to set up netcdf"
+
+ local NUMPY_INCLUDE="numpy/core/include"
+ sed -e "s:gentoo-python-include:${EPREFIX}$(python_get_includedir):" \
+ -e "s:gentoo-python-lib:${EPREFIX}$(python_get_libdir):" \
+ -e "s:gentoo-python-link:$(PYTHON):" \
+ -e "s:gentoo-numpy-include:${EPREFIX}$(python_get_sitedir)/${NUMPY_INCLUDE}:" \
+ -i configure || die "failed setting up python"
+
+ sed -e "s:LINUXPPC:LINUX:g" \
+ -e "s:LINUXALPHA:LINUX:g" \
+ -e "s:LINUXAMD64:LINUX:g" \
+ -i "${S}"/bin/vmd.sh || die "failed setting up vmd wrapper script"
+}
+
+src_configure() {
+ local myconfig="LINUX OPENGL FLTK TK TCL PTHREADS PYTHON IMD NETCDF NUMPY NOSILENT"
+ rm -f configure.options && echo $myconfig >> configure.options
+
+ ./configure &> /dev/null || die "failed to configure"
+}
+
+src_compile() {
+ # build plugins
+ cd "${WORKDIR}"/plugins
+
+ emake -j1 \
+ LINUX TCLINC="-I${EPREFIX}/usr/include" \
+ TCLLIB="-L${EPREFIX}/usr/$(get_libdir)" \
+ NETCDFLIB="-L${EPREFIX}/usr/$(get_libdir)" \
+ NETCDFINC="-I${EPREFIX}/usr/include" \
+ NETCDFLDFLAGS="-lnetcdf" \
+ || die "failed to build plugins"
+
+ # build vmd
+ cd "${S}"/src
+ emake || die "failed to build vmd"
+}
+
+src_install() {
+ # install plugins
+ cd "${WORKDIR}"/plugins
+ PLUGINDIR=${ED}/usr/$(get_libdir)/${PN}/plugins make distrib || \
+ die "failed to install plugins"
+
+ # install vmd
+ cd "${S}"/src
+ make install || die "failed to install vmd"
+
+ # export STRIDE_BIN so VMD knows where to find stride
+ echo "STRIDE_BIN=${EPREFIX}/usr/bin/stride" > "${T}"/99${PN} || \
+ die "Failed to create vmd env file"
+ doenvd "${T}"/99${PN} || die "Failed to install vmd env file"
+
+ # install docs
+ cd "${S}"
+ dodoc Announcement README doc/ig.pdf doc/ug.pdf
+
+ # remove some of the things we don't want and need in
+ # /usr/lib
+ cd "${ED}"/usr/$(get_libdir)/vmd
+ rm -fr doc README Announcement LICENSE || \
+ die "failed to clean up /usr/lib/vmd directory"
+
+ # adjust path in vmd wrapper
+ sed \
+ -e "s:${ED}::" -i "${ED}"/usr/bin/${PN} \
+ -e "/^defaultvmddir/s:^.*$:defaultvmddir=\"${EPREFIX}/usr/$(get_libdir)/${PN}\":g" \
+ || die "failed to set up vmd wrapper script"
+
+ # install icon and generate desktop entry
+ insinto /usr/share/pixmaps
+ doins "${FILESDIR}"/vmd.png || die "Failed to install vmd icon"
+ insinto /usr/share/applications
+ doins "${FILESDIR}"/vmd.desktop || die "Failed to install desktop entry"
+}