summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Riley <justin.t.riley@gmail.com>2012-02-27 15:33:02 -0500
committerJustin Riley <justin.t.riley@gmail.com>2012-02-27 15:33:02 -0500
commita1ed8d163827022b477da739ee692d8682c3f784 (patch)
tree5dd23543c1945f5c901abf6401362bd517a5db15 /sci-chemistry
parentmerge latest 0.6.6.10 updates from bug #300917 (diff)
downloadjtriley-a1ed8d163827022b477da739ee692d8682c3f784.tar.gz
jtriley-a1ed8d163827022b477da739ee692d8682c3f784.tar.bz2
jtriley-a1ed8d163827022b477da739ee692d8682c3f784.zip
fix sci-chemistry/vmd-1.9.1 when gcc != 4.4
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/vmd/ChangeLog223
-rw-r--r--sci-chemistry/vmd/Manifest6
-rw-r--r--sci-chemistry/vmd/metadata.xml15
-rw-r--r--sci-chemistry/vmd/vmd-1.9.1.ebuild210
4 files changed, 454 insertions, 0 deletions
diff --git a/sci-chemistry/vmd/ChangeLog b/sci-chemistry/vmd/ChangeLog
new file mode 100644
index 0000000..c913d8b
--- /dev/null
+++ b/sci-chemistry/vmd/ChangeLog
@@ -0,0 +1,223 @@
+# ChangeLog for sci-chemistry/vmd
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/ChangeLog,v 1.46 2012/02/14 15:26:56 alexxy Exp $
+
+ 14 Feb 2012; Alexey Shvetsov <alexxy@gentoo.org> vmd-1.9.1.ebuild:
+ Fix plugin install
+
+*vmd-1.9.1 (14 Feb 2012)
+
+ 14 Feb 2012; Alexey Shvetsov <alexxy@gentoo.org> +vmd-1.9.1.ebuild:
+ Version bump =D
+
+ 10 Jan 2012; Justin Lecher <jlec@gentoo.org> vmd-1.9.ebuild:
+ Remove USE=static-libs beacuse this breaks build, #365051
+
+ 10 Jan 2012; Justin Lecher <jlec@gentoo.org> vmd-1.9.ebuild, metadata.xml:
+ Enhance nofetch msg, fix compilation with USE=cuda and gcc != 4.4*, thanks
+ xarthisius for the help
+
+ 20 Jul 2011; Pacho Ramos <pacho@gentoo.org> metadata.xml:
+ Drop maintainer due retirement, bug #105599
+
+ 15 Jun 2011; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild,
+ vmd-1.9.ebuild:
+ FILESDIR is gone, wverything is mirrored now.
+
+ 13 Jun 2011; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild,
+ vmd-1.9.ebuild:
+ Mirrored files aren't fetchrestricted
+
+ 13 Jun 2011; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild,
+ -files/vmd-1.8.7-gentoo.patch, -files/vmd-1.8.7-respect-flags.patch,
+ vmd-1.9.ebuild, -files/vmd-1.9-gentoo-base.patch,
+ -files/vmd-1.9-gentoo-plugins.patch, -files/vmd.desktop, -files/vmd.png:
+ No binaryfiles in VCS please, #370915
+
+ 27 Mar 2011; Justin Lecher <jlec@gentoo.org> vmd-1.9.ebuild:
+ Correct version of cuda dep, #360401
+
+*vmd-1.9 (22 Mar 2011)
+
+ 22 Mar 2011; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild,
+ +vmd-1.9.ebuild, +files/vmd-1.9-gentoo-base.patch,
+ +files/vmd-1.9-gentoo-plugins.patch, metadata.xml:
+ Version Bump, #358981; Dropped ppc due to missing KEYWORDS in DEPs
+
+ 22 Mar 2011; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild:
+ Restrict fltk version being able to return includedir
+
+ 20 Mar 2011; Justin Lecher <jlec@gentoo.org> -vmd-1.8.7-r1.ebuild,
+ vmd-1.8.7-r2.ebuild:
+ x11-libs/fltk SLOTMOVE 1.1 -> 1, corrected ebuild accordingly
+
+ 11 Dec 2010; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild:
+ QA on quoting
+
+ 30 Oct 2010; Justin Lecher <jlec@gentoo.org> vmd-1.8.7-r2.ebuild:
+ Corrected msms DEP to sci-chemistry/msms-bin
+
+ 21 Aug 2010; Alexey Shvetsov <alexxy@gentoo.org> vmd-1.8.7-r2.ebuild,
+ metadata.xml:
+ Add msms and povray to RDEPS as per bug #293504
+
+*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
+
+ 28 May 2010; Justin Lecher <jlec@gentoo.org> -vmd-1.8.6.ebuild,
+ -vmd-1.8.6-r1.ebuild, -vmd-1.8.7.ebuild:
+ Removed all non PythonABI compatible ebuilds
+
+*vmd-1.8.7-r1 (18 May 2010)
+
+ 18 May 2010; Justin Lecher <jlec@gentoo.org> +vmd-1.8.7-r1.ebuild,
+ files/vmd-1.8.7-config.patch, +files/vmd-1.8.7-gentoo.patch:
+ Fix for new python ABIs, #316187; building netcdf plugin, #306893, thanks
+ Kamil Kisiel for the patch; LDFLAGS are respected now; EAPI=3 and basic
+ fixes for prefix, usability has to be tested
+
+ 23 Feb 2010; Alexey Shvetsov <alexxy@gentoo.org> vmd-1.8.6-r1.ebuild,
+ vmd-1.8.7.ebuild, metadata.xml:
+ add tachyon raytracer as rdep
+
+ 18 Sep 2009; Petteri Räty <betelgeuse@gentoo.org> vmd-1.8.7.ebuild:
+ Remove built_with_use and use proper DEPEND atoms that work properly for
+ both tk 8.4 and 8.5 users.
+
+ 11 Aug 2009; Markus Dittrich <markusle@gentoo.org> vmd-1.8.7.ebuild,
+ +files/vmd.desktop, +files/vmd.png:
+ Added desktop entry and vmd icon (#262275).
+ Thanks much to Bjoern Olausson for creating them.
+
+ 07 Aug 2009; Markus Dittrich <markusle@gentoo.org> vmd-1.8.7.ebuild,
+ files/vmd-1.8.7-config.patch:
+ Remove the EAPI2 check for -truetype and add explicit error logic
+ so tk-8.4 users can emerge vmd as well. Also updated the config
+ patch to handle tk8.4 better.
+
+*vmd-1.8.7 (05 Aug 2009)
+
+ 05 Aug 2009; Markus Dittrich <markusle@gentoo.org> +vmd-1.8.7.ebuild,
+ +files/vmd-1.8.7-config.patch, +files/vmd-1.8.7-use-bash-startup.patch:
+ Version bump (fixes bug #262275).
+
+ 07 Jul 2009; Diego E. Pettenò <flameeyes@gentoo.org> vmd-1.8.6-r1.ebuild:
+ Use elog for fetch error.
+
+ 18 May 2009; Jeff Gardner <je_fro@gentoo.org>
+ +files/vmd-1.8.6-fix-crash-on-tcl8.5.patch:
+ adding alexxy's patch :)
+
+ 17 May 2009; Jeff Gardner <je_fro@gentoo.org> +vmd-1.8.6-r1.ebuild:
+ Fixed by alexxy to work with tcl8.5
+
+*vmd-1.8.6-r1 (17 May 2009)
+
+ 17 May 2009; Jeff Gardner <je_fro@gentoo.org> +vmd-1.8.6-r1.ebuild:
+ Fixed by alexxy to work with tcl5.8
+
+ 12 Nov 2008; Markus Dittrich <markusle@gentoo.org> -vmd-1.8.5.ebuild,
+ vmd-1.8.6.ebuild:
+ Restrict fltk to 1.1 slot since vmd is not fltk-2 ready
+ (see bug #246445). Removed old ebuild.
+
+ 13 Mar 2008; Markus Dittrich <markusle@gentoo.org>
+ +files/vmd-1.8.6-tcltk8.5.patch, vmd-1.8.6.ebuild:
+ Added tcltk-8.5 support (fixes bug #212936).
+
+ 20 Sep 2007; Markus Dittrich <markusle@gentoo.org>
+ +files/vmd-1.8.6-python-2.5.patch, vmd-1.8.6.ebuild:
+ Added patch to fix python-2.5 compile issues on amd64 (fixes bug
+ #192902). Thanks much to milan hodoscek <milan@cmm.ki.si> for his
+ patch.
+
+ 22 Jul 2007; Donnie Berkholz <dberkholz@gentoo.org>; vmd-1.8.5.ebuild,
+ vmd-1.8.6.ebuild:
+ Drop virtual/x11 references.
+
+*vmd-1.8.6 (15 Apr 2007)
+
+ 15 Apr 2007; Markus Dittrich <markusle@gentoo.org>
+ -files/vmd-1.8.4-config-gentoo.patch, -files/vmd-1.8.4-paratool.patch,
+ -files/vmd-1.8.4-plugin-autopsf.patch,
+ +files/vmd-1.8.6-config-gentoo.patch, +vmd-1.8.6.ebuild:
+ Version bump (fixes bug #174595). Thanks much to Jeffrey Gardner
+ <je_fro@gentoo.org> for his patch and ebuild.
+
+ 08 Jan 2007; Danny van Dyk <kugelfang@gentoo.org> -vmd-1.8.4.ebuild,
+ -vmd-1.8.4-r1.ebuild:
+ QA: Removed unused versions.
+
+ 07 Jan 2007; Markus Dittrich <markusle@gentoo.org> vmd-1.8.5.ebuild:
+ Replaced backslashes with colons in some sed statements
+ (see bug #145467).
+
+ 03 Jan 2007; Jeff Gardner <je_fro@gentoo.org> vmd-1.8.5.ebuild:
+ added ~amd64
+
+ 27 Dec 2006; Markus Dittrich <markusle@gentoo.org> vmd-1.8.5.ebuild:
+ Remove netcdf use flag and enable netcdf support by default
+ since it is needed by the catdcd plugin. This fixes bug #159081.
+
+ 22 Dec 2006; Markus Dittrich <markusle@gentoo.org>
+ files/vmd-1.8.5-config-gentoo.patch, vmd-1.8.5.ebuild:
+ Added netcdf support. This fixes bug #158771.
+
+ 09 Nov 2006; Markus Dittrich <markusle@gentoo.org> vmd-1.8.5.ebuild:
+ Enabled IMD functionality. Thanks to Stephane Gagne
+ <sgagne@rsvs.ulaval.ca> for pointing this out (see bug #154429).
+
+ 20 Sep 2006; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
+ (#148281) Change herd to sci-chemistry from sci.
+
+*vmd-1.8.5 (26 Aug 2006)
+
+ 26 Aug 2006; Markus Dittrich <markusle@gentoo.org>
+ -files/vmd-1.8.3-config-gentoo.patch,
+ +files/vmd-1.8.5-config-gentoo.patch, -vmd-1.8.3.ebuild,
+ +vmd-1.8.5.ebuild:
+ Version bump. Also removed some of the old ebuilds.
+
+*vmd-1.8.4-r1 (13 Aug 2006)
+
+ 13 Aug 2006; Markus Dittrich <markusle@gentoo.org>
+ +files/vmd-1.8.4-paratool.patch, +vmd-1.8.4-r1.ebuild:
+ VMD now depends on stride in order to properly display secondary
+ structure information. Also patched a paratool plugin error under
+ tcl-8.4.13.
+
+ 29 Apr 2006; Marien Zwart <marienz@gentoo.org> Manifest:
+ Fix SHA256 digests.
+
+*vmd-1.8.4 (18 Apr 2006)
+
+ 18 Apr 2006; Markus Dittrich <markusle@gentoo.org>
+ +files/vmd-1.8.4-config-gentoo.patch,
+ +files/vmd-1.8.4-plugin-autopsf.patch, +vmd-1.8.4.ebuild:
+ Version bump.
+
+ 21 Mar 2006; Donnie Berkholz <spyderous@gentoo.org>; vmd-1.8.3.ebuild:
+ Keyword ~ppc, and make changes to the wrapper script that may also fix amd64
+ and alpha.
+
+ 14 Feb 2006; Markus Dittrich <markusle@gentoo.org> Manifest:
+ Fixed bogus .Chanlog.swp file entry in Manifest.
+
+*vmd-1.8.3 (10 Feb 2006)
+
+ 10 Feb 2006; Markus Dittrich <markusle@gentoo.org>
+ +files/vmd-1.8.3-config-gentoo.patch, +metadata.xml, +vmd-1.8.3.ebuild:
+ Initial import.
+
diff --git a/sci-chemistry/vmd/Manifest b/sci-chemistry/vmd/Manifest
new file mode 100644
index 0000000..42f8c6e
--- /dev/null
+++ b/sci-chemistry/vmd/Manifest
@@ -0,0 +1,6 @@
+DIST vmd-1.8.7-gentoo-patches.tar.xz 15900 RMD160 1eed2bc6eebacf846a15973e3ec3378de2890551 SHA1 5d157f9288b9552f3bc69af7283f9f83d71b69be SHA256 0a991ccfda6ffc68de930919bd76b9dba208d4ca5c21ce19d283da1c1727fcda
+DIST vmd-1.8.7.src.tar.gz 23853864 RMD160 1c4751552d7b3f376f91a4b28ee9d4a028ded01a SHA1 409b6f8959d551f581991073f98885b47c21c25c SHA256 72fe2fb7eff4c805a886ea929c7e143a3a1be57cc817b5d1719d29e591d80316
+DIST vmd-1.9-gentoo-patches.tar.xz 14508 SHA256 c18b16704c6c186e8ac753c96f38f85413258bce786635b2635a9aa18de5c28c SHA512 7540a5ce570ebd1ba7b913fd9ba531af9fa7b3870d06e64c0ae73e4eb10ce9bc21169ba52f95b1aa635045cdb6fd13f6db51eec38ce5493805c8eda99ce20066 WHIRLPOOL 7843440b89ce974466518c0294d3664c318dcc66b62c6a9029c88395596ffcd7f579dd429d8368164b81eda70700e451e0643920538ed86c1ce3ec6b9f91f690
+DIST vmd-1.9.1-gentoo-patches.tar.xz 79240 SHA256 60fe1b017b1aed5cdd4a417d4a2dbd20f75eae24c83d1da68c504a31bfbdbcd8 SHA512 37856d5e00d3d4452324865190aef4ac05a7a49cbddffe83f568d3190b521f17e6e1e5323dee3127aadfb446ec0871bfd06dff47d640ed862547710ec4b0a421 WHIRLPOOL b3eebffe24a96ad1c7ce9ebc565e1b88d6f52894569a6d72c22e87fb3d6975d14779bd8c4305e3e9f2ecf9d981503b8bcea78a476a1a66eb37b78c759b3bdf60
+DIST vmd-1.9.1.src.tar.gz 30748110 SHA256 54aa88e03d86d763383e7b98592a152c9d68e78383e13af0dd2aca09b002491f SHA512 a54cb08e8a9ce801c2ca986f746bff0a041a25d5cffebc8d4af50813b6c05d04a3209a27830d580287230edaf3048a78923ae54bf367ab69c3d81388ab1787bd WHIRLPOOL 26d2a855c0768583cd45aed105fdd8f1ef59d59b8ce11c1903f5fc2008ea05989b8a32a0d817725e711613f8abfc22bb5301f20ea8d597efe9c7913790b25bb7
+DIST vmd-1.9.src.tar.gz 28639907 SHA256 4209b06faba3af324575570bd0533258471f6c782262c0727b52cdce9de89579 SHA512 d307617b6892483ba7147aeaeb4c88dfd374e00ad68ec8dd3edbc5015e26df9623b49b333e7abe06b9a41436f95093c71006f827fb3607f68b395eb669dc11bc WHIRLPOOL 17f0282043da6da5f2dd934387369465095ec1a0e0298b242044405f1f02afe056b707d5638dc5a81351a9765c23fcada23e78bb6536e11e9f52f896bde961f5
diff --git a/sci-chemistry/vmd/metadata.xml b/sci-chemistry/vmd/metadata.xml
new file mode 100644
index 0000000..be76141
--- /dev/null
+++ b/sci-chemistry/vmd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <herd>sci-chemistry</herd>
+ <use>
+ <flag name="msms">Add support for MSMS SAS calcualtion tool</flag>
+ <flag name="povray">Add support for povray raytracer for HQ images</flag>
+ <flag name="tachyon">Add support for tachyon raytracer for HQ images</flag>
+ <flag name="cuda">Use nvidia cuda toolkit for speeding up computations</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-chemistry/vmd/vmd-1.9.1.ebuild b/sci-chemistry/vmd/vmd-1.9.1.ebuild
new file mode 100644
index 0000000..91cb9d7
--- /dev/null
+++ b/sci-chemistry/vmd/vmd-1.9.1.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/vmd-1.9.1.ebuild,v 1.2 2012/02/14 15:26:56 alexxy 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="
+ mirror://gentoo/${P}-gentoo-patches.tar.xz
+ ${P}.src.tar.gz"
+
+SLOT="0"
+LICENSE="vmd"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cuda msms povray tachyon xinerama"
+
+RESTRICT="fetch"
+
+# currently, tk-8.5* with USE=truetype breaks some
+# tk apps such as Sequence Viewer or Timeline.
+CDEPEND="
+ || (
+ >=dev-lang/tk-8.5[-truetype]
+ =dev-lang/tk-8.4*
+ )
+ dev-lang/perl
+ dev-python/numpy
+ sci-libs/netcdf
+ virtual/opengl
+ >=x11-libs/fltk-1.1.10-r2:1
+ x11-libs/libXft
+ x11-libs/libXi
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-3.1 )
+ xinerama? ( x11-libs/libXinerama )"
+DEPEND="${CDEPEND}
+ dev-lang/swig"
+RDEPEND="${CDEPEND}
+ sci-biology/stride
+ sci-chemistry/surf
+ x11-terms/xterm
+ msms? ( sci-chemistry/msms-bin )
+ povray? ( media-gfx/povray )
+ 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 ${P}.src.tar.gz from"
+ elog "${VMD_DOWNLOAD}"
+ elog "after agreeing to the license and get"
+ elog "http://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz"
+ elog "Place both in ${DISTDIR}"
+}
+
+src_prepare() {
+ cd "${WORKDIR}"/plugins
+
+ epatch "${WORKDIR}"/${P}-gentoo-plugins.patch
+
+ [[ ${SILENT} == yes ]] || sed '/^.SILENT/d' -i $(find -name Makefile)
+
+ 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) -shared:" \
+ -e "s:SHXXLD = g++:SHXXLD = $(tc-getCXX) -shared:" \
+ -e "s:-ltcl8.5:-ltcl:" \
+ -i Make-arch || die "Failed to set up plugins Makefile"
+
+ sed -e "s:\$(CXXFLAGS)::g" \
+ -i hesstrans/Makefile || die
+
+ # prepare vmd itself
+ cd "${S}"
+
+ epatch "${WORKDIR}"/${P}-gentoo-base.patch
+
+ # PREFIX
+ sed \
+ -e "s:/usr/include/:${EPREFIX}/usr/include:g" \
+ -i configure || die
+
+ sed \
+ -e "s:gentoo-bindir:${ED}/usr/bin:g" \
+ -e "s:gentoo-libdir:${ED}/usr/$(get_libdir):g" \
+ -e "s:gentoo-opengl-include:${EPREFIX}/usr/include/GL:g" \
+ -e "s:gentoo-opengl-libs:${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:gentoo-gcc:$(tc-getCC):g" \
+ -e "s:gentoo-g++:$(tc-getCXX):g" \
+ -e "s:gentoo-nvcc:${EPREFIX}/opt/cuda/bin/nvcc:g" \
+ -e "s:gentoo-cflags:${CFLAGS}:g" \
+ -e "s:gentoo-cxxflags:${CXXFLAGS}:g" \
+ -e "s:gentoo-nvflags: -O3 -v:g" \
+ -e "s:gentoo-ldflags:${LDFLAGS}:g" \
+ -e "s:gentoo-plugindir:${WORKDIR}/plugins:g" \
+ -e "s:gentoo-fltk-include:$(fltk-config --includedir):g" \
+ -e "s:gentoo-fltk-libs:$(dirname $(fltk-config --libs)) -Wl,-rpath,$(dirname $(fltk-config --libs)):g" \
+ -e "s:gentoo-netcdf-include:${EPREFIX}/usr/include:g" \
+ -e "s:gentoo-netcdf-libs:${EPREFIX}/usr/$(get_libdir):g" \
+ -i configure || die
+
+# 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"
+
+ if use cuda; then
+ local gcc_bindir="${EPREFIX}$(gcc-config -B)"
+
+ sed \
+ -e "s:gentoo-cuda-lib:${EPREFIX}/opt/cuda/$(get_libdir):g" \
+ -e "/^\$arch_nvccflags/s:=:= \"--compiler-bindir=${gcc_bindir} \" . \n:1" \
+ -i configure || die
+ fi
+
+ sed \
+ -e "s:LINUXPPC:LINUX:g" \
+ -e "s:LINUXALPHA:LINUX:g" \
+ -e "s:LINUXAMD64:LINUX:g" \
+ -e "s:gentoo-stride:${EPREFIX}/usr/bin/stride:g" \
+ -e "s:gentoo-surf:${EPREFIX}/usr/bin/surf:g" \
+ -e "s:gentoo-tachyon:${EPREFIX}/usr/bin/tachyon:g" \
+ -i "${S}"/bin/vmd.sh || die "failed setting up vmd wrapper script"
+}
+
+src_configure() {
+ local myconf="OPENGL FLTK TK TCL PTHREADS PYTHON IMD NETCDF NUMPY NOSILENT XINPUT"
+ rm -f configure.options && echo $myconf >> configure.options
+
+ use cuda && myconf+=" CUDA"
+# use mpi && myconf+=" MPI"
+# use tachion && myconf+=" LIBTACHYON"
+ use xinerama && myconf+=" XINERAMA"
+
+ export \
+ PYTHON_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)" \
+ PYTHON_LIBRARY_DIR="${EPREFIX}$(python_get_libdir)" \
+ PYTHON_LIBRARY="$(python_get_library -l)" \
+ NUMPY_INCLUDE_DIR="${EPREFIX}$(python_get_sitedir)/numpy/core/include" \
+ NUMPY_LIBRARY_DIR="${EPREFIX}$(python_get_sitedir)/numpy/core/include"
+
+ ./configure LINUX \
+ ${myconf} || die
+}
+
+src_compile() {
+ # build plugins
+ cd "${WORKDIR}"/plugins
+
+ emake \
+ TCLINC="-I${EPREFIX}/usr/include" \
+ TCLLIB="-L${EPREFIX}/usr/$(get_libdir)" \
+ NETCDFLIB="$(pkg-config --libs-only-L netcdf)" \
+ NETCDFINC="$(pkg-config --cflags-only-I netcdf)" \
+ NETCDFLDFLAGS="$(pkg-config --libs netcdf)" \
+ LINUX || die
+
+ # build vmd
+ cd "${S}"/src
+ emake || die "failed to build vmd"
+}
+
+src_install() {
+ # install plugins
+ cd "${WORKDIR}"/plugins
+ emake \
+ PLUGINDIR="${ED}/usr/$(get_libdir)/${PN}/plugins" \
+ distrib || die "failed to install plugins"
+
+ # install vmd
+ cd "${S}"/src
+ emake install || die "failed to install vmd"
+
+ # install docs
+ cd "${S}"
+ dodoc Announcement README doc/ig.pdf doc/ug.pdf || die
+
+ # 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 "${WORKDIR}"/vmd.png || die "Failed to install vmd icon"
+ insinto /usr/share/applications
+ doins "${WORKDIR}"/vmd.desktop || die "Failed to install desktop entry"
+}