diff options
author | Justin Riley <justin.t.riley@gmail.com> | 2013-08-19 11:13:59 -0400 |
---|---|---|
committer | Justin Riley <justin.t.riley@gmail.com> | 2013-08-19 11:13:59 -0400 |
commit | fce77799dfca8e4e266fd63d23def0d51838fc89 (patch) | |
tree | e93eb33fabe31628ba122140c237aa6fa615029a | |
parent | more unused ebuild cleanup (diff) | |
download | jtriley-fce77799dfca8e4e266fd63d23def0d51838fc89.tar.gz jtriley-fce77799dfca8e4e266fd63d23def0d51838fc89.tar.bz2 jtriley-fce77799dfca8e4e266fd63d23def0d51838fc89.zip |
vmd: add patch to include thrust/device_ptr (CUDA 5.5)
-rw-r--r-- | sci-chemistry/vmd/ChangeLog | 261 | ||||
-rw-r--r-- | sci-chemistry/vmd/Manifest | 2 | ||||
-rw-r--r-- | sci-chemistry/vmd/files/vmd-1.9.1-cuda-thrust-include-device-ptr.patch | 24 | ||||
-rw-r--r-- | sci-chemistry/vmd/files/vmd-1.9.1-tcl8.6.patch | 25 | ||||
-rw-r--r-- | sci-chemistry/vmd/metadata.xml | 15 | ||||
-rw-r--r-- | sci-chemistry/vmd/vmd-1.9.1-r2.ebuild | 224 |
6 files changed, 551 insertions, 0 deletions
diff --git a/sci-chemistry/vmd/ChangeLog b/sci-chemistry/vmd/ChangeLog new file mode 100644 index 0000000..43b27be --- /dev/null +++ b/sci-chemistry/vmd/ChangeLog @@ -0,0 +1,261 @@ +# ChangeLog for sci-chemistry/vmd +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/vmd/ChangeLog,v 1.56 2013/03/01 08:23:03 jlec Exp $ + + 01 Mar 2013; Justin Lecher <jlec@gentoo.org> vmd-1.9.1.ebuild, + vmd-1.9.1-r1.ebuild, vmd-1.9.1-r2.ebuild: + Fix tcl/tk API to version 8.5, #451824; Upstream says it will be fixed in + version 1.9.2 + + 24 Jan 2013; Justin Lecher <jlec@gentoo.org> vmd-1.9.1.ebuild, + vmd-1.9.1-r1.ebuild: + Force py2, #450716 + + + 18 Jan 2013; Christoph Junghans <ottxor@gentoo.org> vmd-1.9.1-r2.ebuild: + fix deps + +*vmd-1.9.1-r2 (11 Jan 2013) + + 11 Jan 2013; Justin Lecher <jlec@gentoo.org> +vmd-1.9.1-r2.ebuild, + +files/vmd-1.9.1-tcl8.6.patch, metadata.xml: + Use cuda.eclass and slo-operator for tcl + + 29 Nov 2012; Justin Lecher <jlec@gentoo.org> vmd-1.9.1.ebuild, + vmd-1.9.1-r1.ebuild: + Drop dep on old tk + + 15 Nov 2012; Christoph Junghans <ottxor@gentoo.org> vmd-1.9.1-r1.ebuild: + fix build on x86 + +*vmd-1.9.1-r1 (14 Nov 2012) + + 14 Nov 2012; Justin Lecher <jlec@gentoo.org> +vmd-1.9.1-r1.ebuild: + Fix detection of netcdf; #406737, thanks Reinis Danne preparing the patch; + Loosen dep for cuda support, #406083 + + 24 Sep 2012; Mike Frysinger <vapier@gentoo.org> vmd-1.9.1.ebuild: + QA_DT_HASH (old/deprecated) -> QA_FLAGS_IGNORED (new hotness). + + 05 Sep 2012; Justin Lecher <jlec@gentoo.org> -vmd-1.8.7-r2.ebuild, + -vmd-1.9.ebuild, vmd-1.9.1.ebuild: + Bumped to EAPI=4; use domenu; drop old + + 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 because 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..f2b41e3 --- /dev/null +++ b/sci-chemistry/vmd/Manifest @@ -0,0 +1,2 @@ +DIST vmd-1.9.1-gentoo-patches-2.tar.xz 79212 SHA256 1249957baea6fc8d4c05b008362b185b0851d70c6eeed8fbd44d41e7e77f23a8 SHA512 b313ed92652a93647790d668bd71233708fec3e9cead8b13b31dee1277f5ef6f0e8844f563ad51bc320b83a3cda126f8ab74fe4147218c65b594ee5624b46057 WHIRLPOOL 51b8a1486c286c002d893ec4e3aa8301ec7da6b9f2de31e880c7f9523a006a06712adecd5329269c892764761da691a36e1d6e5a730fc1a32c751b7658b96903 +DIST vmd-1.9.1.src.tar.gz 30748110 SHA256 54aa88e03d86d763383e7b98592a152c9d68e78383e13af0dd2aca09b002491f SHA512 a54cb08e8a9ce801c2ca986f746bff0a041a25d5cffebc8d4af50813b6c05d04a3209a27830d580287230edaf3048a78923ae54bf367ab69c3d81388ab1787bd WHIRLPOOL 26d2a855c0768583cd45aed105fdd8f1ef59d59b8ce11c1903f5fc2008ea05989b8a32a0d817725e711613f8abfc22bb5301f20ea8d597efe9c7913790b25bb7 diff --git a/sci-chemistry/vmd/files/vmd-1.9.1-cuda-thrust-include-device-ptr.patch b/sci-chemistry/vmd/files/vmd-1.9.1-cuda-thrust-include-device-ptr.patch new file mode 100644 index 0000000..d65e59c --- /dev/null +++ b/sci-chemistry/vmd/files/vmd-1.9.1-cuda-thrust-include-device-ptr.patch @@ -0,0 +1,24 @@ +diff --git a/vmd-1.9.1/src/CUDAMarchingCubes.cu b/vmd-1.9.1/src/CUDAMarchingCubes.cu +index 5bfe7bf..36faaf0 100755 +--- a/vmd-1.9.1/src/CUDAMarchingCubes.cu ++++ b/vmd-1.9.1/src/CUDAMarchingCubes.cu +@@ -45,6 +45,7 @@ + #include "CUDAMarchingCubes.h" + #include <thrust/scan.h> + #include <thrust/functional.h> ++#include <thrust/device_ptr.h> + + // The number of threads to use for triangle generation + // (limited by shared memory size) +diff --git a/vmd-1.9.1/src/CUDAQuickSurf.cu b/vmd-1.9.1/src/CUDAQuickSurf.cu +index a21ebde..7d94a15 100755 +--- a/vmd-1.9.1/src/CUDAQuickSurf.cu ++++ b/vmd-1.9.1/src/CUDAQuickSurf.cu +@@ -638,6 +638,7 @@ static void * cudadensitythread(void *voidparms) { + // and only considering bins of atoms that fall within that radius. + // + #include <thrust/sort.h> // need thrust sorting primitives ++#include <thrust/device_ptr.h> // need thrust sorting primitives + + #define GRID_CELL_EMPTY 0xffffffff + diff --git a/sci-chemistry/vmd/files/vmd-1.9.1-tcl8.6.patch b/sci-chemistry/vmd/files/vmd-1.9.1-tcl8.6.patch new file mode 100644 index 0000000..0c3e45d --- /dev/null +++ b/sci-chemistry/vmd/files/vmd-1.9.1-tcl8.6.patch @@ -0,0 +1,25 @@ + plugins/molfile_plugin/src/webpdbplugin.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/molfile_plugin/src/webpdbplugin.c b/plugins/molfile_plugin/src/webpdbplugin.c +index 80b3bb9..78597f5 100644 +--- a/plugins/molfile_plugin/src/webpdbplugin.c ++++ b/plugins/molfile_plugin/src/webpdbplugin.c +@@ -202,7 +202,7 @@ static void *open_file_read(const char *filename, const char *filetype, + sprintf(url, "http://www.rcsb.org/pdb/downloadFile.do?fileFormat=pdb&compression=NO&structureId=%s",filename); + sprintf(cmd, "set token [::http::geturl \"%s\"]", url); + if (Tcl_Eval(interp, cmd) != TCL_OK) { +- fprintf(stderr, "Error loading PDB: %s\n",interp->result); ++ fprintf(stderr, "Error loading PDB: %s\n",Tcl_GetStringResult(interp)); + Tcl_DeleteInterp(interp); + return NULL; + } +@@ -211,7 +211,7 @@ static void *open_file_read(const char *filename, const char *filetype, + + result = Tcl_GetVar2(interp, (char *)"state", "body", TCL_GLOBAL_ONLY); + if (!result) { +- fprintf(stderr, "Error loading PDB: %s\n", interp->result); ++ fprintf(stderr, "Error loading PDB: %s\n", Tcl_GetStringResult(interp)); + Tcl_DeleteInterp(interp); + return NULL; + } diff --git a/sci-chemistry/vmd/metadata.xml b/sci-chemistry/vmd/metadata.xml new file mode 100644 index 0000000..b9b5a06 --- /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-r2.ebuild b/sci-chemistry/vmd/vmd-1.9.1-r2.ebuild new file mode 100644 index 0000000..4db1288 --- /dev/null +++ b/sci-chemistry/vmd/vmd-1.9.1-r2.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2013 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-r2.ebuild,v 1.3 2013/03/01 08:23:03 jlec Exp $ + +EAPI=5 + +PYTHON_DEPEND="2" + +inherit cuda eutils multilib prefix python toolchain-funcs + +DESCRIPTION="Visual Molecular Dynamics" +HOMEPAGE="http://www.ks.uiuc.edu/Research/vmd/" +SRC_URI=" + http://dev.gentoo.org/~jlec/distifles/${P}-gentoo-patches-2.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*:0=[-truetype] + 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-4.2.9-r1 ) + 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_PREBUILT="usr/lib*/vmd/plugins/LINUX/tcl/intersurf1.1/bin/intersurf.so" +QA_FLAGS_IGNORED_amd64=" usr/lib64/vmd/plugins/LINUX/tcl/volutil1.3/volutil" +QA_FLAGS_IGNORED_x86=" usr/lib/vmd/plugins/LINUX/tcl/volutil1.3/volutil" + +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-2.tar.xz" + elog "Place both in ${DISTDIR}" +} + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + use cuda && cuda_sanitize + + cd "${WORKDIR}"/plugins + + epatch \ + "${WORKDIR}"/${P}-gentoo-plugins.patch \ + "${FILESDIR}"/${P}-tcl8.6.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 '/^AR /s:=:?=:g' \ + -e '/^RANLIB /s:=:?=:g' \ + -i ../plugins/*/Makefile || die + + tc-export AR RANLIB + + sed \ + -e "s:\$(CXXFLAGS)::g" \ + -i hesstrans/Makefile || die + + # prepare vmd itself + cd "${S}" + + epatch "${WORKDIR}"/${P}-gentoo-base.patch + epatch "${FILESDIR}"/${P}-cuda-thrust-include-device-ptr.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::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 + sed \ + -e "s:gentoo-cuda-lib:${EPREFIX}/opt/cuda/$(get_libdir):g" \ + -e "/NVCCFLAGS/s:=:= ${NVCCFLAGS}:g" \ + -i configure src/Makefile || 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) ${EPREFIX}/usr/$(get_libdir)/libnetcdf.so" \ + NETCDFINC="$(pkg-config --cflags-only-I netcdf) ${EPREFIX}/usr/include" \ + NETCDFLDFLAGS="$(pkg-config --libs netcdf)" \ + LINUX + + # build vmd + cd "${S}"/src + emake +} + +src_install() { + # install plugins + cd "${WORKDIR}"/plugins + emake \ + PLUGINDIR="${ED}/usr/$(get_libdir)/${PN}/plugins" \ + distrib + + # install vmd + cd "${S}"/src + emake install + + # 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 "${WORKDIR}"/vmd.png + eprefixify "${WORKDIR}"/vmd.desktop + sed -i '/^Path/d' "${WORKDIR}"/vmd.desktop || die + domenu "${WORKDIR}"/vmd.desktop +} |