From d42200bec37eef2a7478d88988ff00addd0a9202 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Jan 2020 11:50:47 +0000 Subject: gentoo resync : 25.01.2020 --- sci-chemistry/vmd/Manifest | 2 +- sci-chemistry/vmd/vmd-1.9.3-r2.ebuild | 269 ---------------------------------- sci-chemistry/vmd/vmd-1.9.3-r3.ebuild | 269 ++++++++++++++++++++++++++++++++++ 3 files changed, 270 insertions(+), 270 deletions(-) delete mode 100644 sci-chemistry/vmd/vmd-1.9.3-r2.ebuild create mode 100644 sci-chemistry/vmd/vmd-1.9.3-r3.ebuild (limited to 'sci-chemistry/vmd') diff --git a/sci-chemistry/vmd/Manifest b/sci-chemistry/vmd/Manifest index b97cc2703b74..d9ce76a3bb96 100644 --- a/sci-chemistry/vmd/Manifest +++ b/sci-chemistry/vmd/Manifest @@ -8,6 +8,6 @@ DIST vmd-1.9.3-gentoo-patches.tar.xz 14804 BLAKE2B 64e5df40ed88c23c924d32636495f DIST vmd-1.9.3.src.tar 129566720 BLAKE2B 848f3280d51765dcd18722dd233e0cdee3b7c0ac3dd48324260ebe1604ba781ca0a1fe4cae6652501d23d5d41712020e17dbb6bc21a1856eb3289a4aab6b774b SHA512 0502df1e8b60c570ca88b779b4153acfaa599a78df53fa96fca36301bab902864118332b5524ae7d170d3a9e429cf1e13d69e1197268b5e841afc0bb56a737ba EBUILD vmd-1.9.2.ebuild 7210 BLAKE2B 939b500dd5a0b9d8c0d3c5aaa55a7fe82a5b3c5b92da1d8a422a0c9dbfce8141d121884c5028df44f74f3c5f0c4ef7d6b85fa47cc7adbbf58db4a449d224c74a SHA512 1c8ae6a79494116d5e07cd98921c35ade1bdf7b209b673c9360d0a4edb4b881b8a000eb4c8c0b64d51616011c2e8a7858ba7ce348877eb897882a459b9688cad EBUILD vmd-1.9.3-r1.ebuild 7567 BLAKE2B b6a6fd153b890881be02c2a5cdc085802cb356658939401b7958e65f375f763d84872fc31b12fb21b195a810247e1624ae7a123bbf417fdd05ad4288a23c7d8c SHA512 48ef4d47d68211f7443be546566f20e4bbebdf6948027c6649d1730fb0b77e98d540a26a0ab18000a6937ae3a536b9cdefe2bc0d4c7c0724dd63f0eacd63c1ed -EBUILD vmd-1.9.3-r2.ebuild 7748 BLAKE2B 2f0d785b37f195b6b87dd3d16902a11b899aef466134604d985f7d55380c75b471ea9540a19799cdf0b8316c709fb9453b3c041aa73c4ae623719ef1cd118fa1 SHA512 0321b3fb46edb1224ba133dbd6798ccefe5376a8a2d8fb71d416b1c1401f2676f25003f73260a70cf695c25e2b3ed32cfcea79f1c0721b193d4584db0ad1d8d1 +EBUILD vmd-1.9.3-r3.ebuild 7748 BLAKE2B 2f0d785b37f195b6b87dd3d16902a11b899aef466134604d985f7d55380c75b471ea9540a19799cdf0b8316c709fb9453b3c041aa73c4ae623719ef1cd118fa1 SHA512 0321b3fb46edb1224ba133dbd6798ccefe5376a8a2d8fb71d416b1c1401f2676f25003f73260a70cf695c25e2b3ed32cfcea79f1c0721b193d4584db0ad1d8d1 EBUILD vmd-1.9.3.ebuild 7165 BLAKE2B fed03484e69abef1d82f52985becb144642141b18d01993f58073a4063f91e7d89cc45a506573cec2a523131eb0d75033cdd4cc3595d14bd491fca60f46540ab SHA512 83356c309cd1332a13677ca086394de9adb741e167c40f80b8585545c4c7931ad7108a80ddab6cd25aa71fb843afb11b2e12264098dd9a4933e76fac79005684 MISC metadata.xml 778 BLAKE2B 6c4202950f57a4d7a3004e966c761325a0a31ab19fe06a6bd69882bd685e41424953104ff653c03d6cbbcb60bb9aba45fbcec43cd228c4bb57fcb1c63a2bd881 SHA512 b967b71fb9f1b47a9d3b69e6958dfb0314a9f071dade7ed1876e91dfa73188748faf11ef832d240a71745b36a30422bde79de2e9ff8e5ec6b6da4b11b40d19c9 diff --git a/sci-chemistry/vmd/vmd-1.9.3-r2.ebuild b/sci-chemistry/vmd/vmd-1.9.3-r2.ebuild deleted file mode 100644 index 8d8897a57f8a..000000000000 --- a/sci-chemistry/vmd/vmd-1.9.3-r2.ebuild +++ /dev/null @@ -1,269 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python2_7 ) - -inherit cuda desktop flag-o-matic prefix python-single-r1 toolchain-funcs xdg - -DESCRIPTION="Visual Molecular Dynamics" -HOMEPAGE="http://www.ks.uiuc.edu/Research/vmd/" -SRC_URI=" - https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz - ${P}.src.tar -" - -SLOT="0" -LICENSE="vmd" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="cuda gromacs msms povray sqlite tachyon xinerama" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RESTRICT="fetch" - -# currently, tk-8.5* with USE=truetype breaks some -# tk apps such as Sequence Viewer or Timeline. -CDEPEND=" - >=dev-lang/tk-8.6.1:0= - dev-lang/perl - dev-libs/expat - || ( - dev-python/numpy-python2[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - ) - sci-libs/netcdf:0= - virtual/opengl - >=x11-libs/fltk-1.1.10-r2:1 - x11-libs/libXft - x11-libs/libXi - ${PYTHON_DEPS} - cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= ) - gromacs? ( >=sci-chemistry/gromacs-5.0.4-r1:0=[tng] ) - sqlite? ( dev-db/sqlite:3= ) - tachyon? ( >=media-gfx/tachyon-0.99_beta6 ) - xinerama? ( x11-libs/libXinerama ) -" -DEPEND="${CDEPEND}" -BDEPEND=" - virtual/pkgconfig - dev-lang/swig -" -RDEPEND="${CDEPEND} - sci-biology/stride - sci-chemistry/chemical-mime-data - sci-chemistry/surf - x11-terms/xterm - msms? ( sci-chemistry/msms-bin ) - povray? ( media-gfx/povray ) -" - -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 from" - elog "${VMD_DOWNLOAD}" - elog "after agreeing to the license and get" - elog "https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz" - elog "Place both into your DISTDIR directory" - elog - elog "Due to an upstream bug (https://bugs.gentoo.org/640440) sources" - elog "file may get downloaded as a compressed tarball or not. In that case" - elog "you will need to ensure you uncompress the file and rename it" - elog "as ${P}.src.tar" -} - -src_prepare() { - xdg_src_prepare - - use cuda && cuda_sanitize - - eapply "${FILESDIR}"/${PN}-1.9.1-cuda-device_ptr.patch - - cd "${WORKDIR}"/plugins || die - - eapply -p2 "${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 '/^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}" || die - - eapply -p2 "${WORKDIR}"/${P}-gentoo-base.patch - eapply "${FILESDIR}"/${P}-configure-libtachyon.patch - eapply "${FILESDIR}"/${P}-tmpdir.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-libtachyon-include:${EPREFIX}/usr/include/tachyon:g" \ - -e "s:gentoo-libtachyon-libs:${EPREFIX}/usr/$(get_libdir):g" \ - -e "s:gentoo-netcdf-include:${EPREFIX}/usr/include:g" \ - -e "s:gentoo-netcdf-libs:${EPREFIX}/usr/$(get_libdir):g" \ - -i configure || die - - 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 - sed \ - -e '/compute_/d' \ - -i configure || die - sed \ - -e 's:-gencode .*code=sm_..::' \ - -i 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" - - EMAKEOPTS=( - TCLINC="-I${EPREFIX}/usr/include" - TCLLIB="-L${EPREFIX}/usr/$(get_libdir)" - TCLLDFLAGS="-shared" - NETCDFLIB="$($(tc-getPKG_CONFIG) --libs-only-L netcdf)${EPREFIX}/usr/$(get_libdir)/libnetcdf.so" - NETCDFINC="$($(tc-getPKG_CONFIG) --cflags-only-I netcdf)${EPREFIX}/usr/include" - NETCDFLDFLAGS="$($(tc-getPKG_CONFIG) --libs netcdf)" - NETCDFDYNAMIC=1 - EXPATINC="-I${EPREFIX}/usr/include" - EXPATLIB="$($(tc-getPKG_CONFIG) --libs expat)" - EXPATLDFLAGS="-shared" - EXPATDYNAMIC=1 - ) - if use gromacs; then - EMAKEOPTS+=( - TNGLIB="$($(tc-getPKG_CONFIG) --libs libgromacs)" - TNGINC="-I${EPREFIX}/usr/include" - TNGLDFLAGS="-shared" - TNGDYNAMIC=1 - ) - fi - if use sqlite; then - EMAKEOPTS+=( - SQLITELIB="$($(tc-getPKG_CONFIG) --libs sqlite3)" - SQLITEINC="-I${EPREFIX}/usr/include" - SQLITELDFLAGS="-shared" - SQLITEDYNAMIC=1 - ) - fi -} - -src_configure() { - local myconf="OPENGL OPENGLPBUFFER COLVARS 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 tachyon && myconf+=" LIBTACHYON" - use xinerama && myconf+=" XINERAMA" - - export \ - PYTHON_INCLUDE_DIR="$(python_get_includedir)" \ - PYTHON_LIBRARY_DIR="$(python_get_library_path)" \ - PYTHON_LIBRARY="$(python_get_LIBS)" \ - NUMPY_INCLUDE_DIR="$(python_get_sitedir)/numpy/core/include" \ - NUMPY_LIBRARY_DIR="$(python_get_sitedir)/numpy/core/include" - - perl ./configure LINUX \ - ${myconf} || die -} - -src_compile() { - # build plugins - cd "${WORKDIR}"/plugins || die - - emake \ - ${EMAKEOPTS[@]} \ - LINUX - - # build vmd - cd "${S}"/src || die - emake -} - -src_install() { - # install plugins - cd "${WORKDIR}"/plugins || die - emake \ - PLUGINDIR="${ED}/usr/$(get_libdir)/${PN}/plugins" \ - distrib - - # install vmd - cd "${S}"/src || die - emake install - - # install docs - cd "${S}" || die - 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 || die - 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 - # Open PDB files with VMD - echo "MimeType=chemical/x-pdb;" >> "${WORKDIR}"/vmd.desktop || die - domenu "${WORKDIR}"/vmd.desktop -} diff --git a/sci-chemistry/vmd/vmd-1.9.3-r3.ebuild b/sci-chemistry/vmd/vmd-1.9.3-r3.ebuild new file mode 100644 index 000000000000..8d8897a57f8a --- /dev/null +++ b/sci-chemistry/vmd/vmd-1.9.3-r3.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) + +inherit cuda desktop flag-o-matic prefix python-single-r1 toolchain-funcs xdg + +DESCRIPTION="Visual Molecular Dynamics" +HOMEPAGE="http://www.ks.uiuc.edu/Research/vmd/" +SRC_URI=" + https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz + ${P}.src.tar +" + +SLOT="0" +LICENSE="vmd" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="cuda gromacs msms povray sqlite tachyon xinerama" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="fetch" + +# currently, tk-8.5* with USE=truetype breaks some +# tk apps such as Sequence Viewer or Timeline. +CDEPEND=" + >=dev-lang/tk-8.6.1:0= + dev-lang/perl + dev-libs/expat + || ( + dev-python/numpy-python2[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) + sci-libs/netcdf:0= + virtual/opengl + >=x11-libs/fltk-1.1.10-r2:1 + x11-libs/libXft + x11-libs/libXi + ${PYTHON_DEPS} + cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= ) + gromacs? ( >=sci-chemistry/gromacs-5.0.4-r1:0=[tng] ) + sqlite? ( dev-db/sqlite:3= ) + tachyon? ( >=media-gfx/tachyon-0.99_beta6 ) + xinerama? ( x11-libs/libXinerama ) +" +DEPEND="${CDEPEND}" +BDEPEND=" + virtual/pkgconfig + dev-lang/swig +" +RDEPEND="${CDEPEND} + sci-biology/stride + sci-chemistry/chemical-mime-data + sci-chemistry/surf + x11-terms/xterm + msms? ( sci-chemistry/msms-bin ) + povray? ( media-gfx/povray ) +" + +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 from" + elog "${VMD_DOWNLOAD}" + elog "after agreeing to the license and get" + elog "https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz" + elog "Place both into your DISTDIR directory" + elog + elog "Due to an upstream bug (https://bugs.gentoo.org/640440) sources" + elog "file may get downloaded as a compressed tarball or not. In that case" + elog "you will need to ensure you uncompress the file and rename it" + elog "as ${P}.src.tar" +} + +src_prepare() { + xdg_src_prepare + + use cuda && cuda_sanitize + + eapply "${FILESDIR}"/${PN}-1.9.1-cuda-device_ptr.patch + + cd "${WORKDIR}"/plugins || die + + eapply -p2 "${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 '/^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}" || die + + eapply -p2 "${WORKDIR}"/${P}-gentoo-base.patch + eapply "${FILESDIR}"/${P}-configure-libtachyon.patch + eapply "${FILESDIR}"/${P}-tmpdir.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-libtachyon-include:${EPREFIX}/usr/include/tachyon:g" \ + -e "s:gentoo-libtachyon-libs:${EPREFIX}/usr/$(get_libdir):g" \ + -e "s:gentoo-netcdf-include:${EPREFIX}/usr/include:g" \ + -e "s:gentoo-netcdf-libs:${EPREFIX}/usr/$(get_libdir):g" \ + -i configure || die + + 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 + sed \ + -e '/compute_/d' \ + -i configure || die + sed \ + -e 's:-gencode .*code=sm_..::' \ + -i 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" + + EMAKEOPTS=( + TCLINC="-I${EPREFIX}/usr/include" + TCLLIB="-L${EPREFIX}/usr/$(get_libdir)" + TCLLDFLAGS="-shared" + NETCDFLIB="$($(tc-getPKG_CONFIG) --libs-only-L netcdf)${EPREFIX}/usr/$(get_libdir)/libnetcdf.so" + NETCDFINC="$($(tc-getPKG_CONFIG) --cflags-only-I netcdf)${EPREFIX}/usr/include" + NETCDFLDFLAGS="$($(tc-getPKG_CONFIG) --libs netcdf)" + NETCDFDYNAMIC=1 + EXPATINC="-I${EPREFIX}/usr/include" + EXPATLIB="$($(tc-getPKG_CONFIG) --libs expat)" + EXPATLDFLAGS="-shared" + EXPATDYNAMIC=1 + ) + if use gromacs; then + EMAKEOPTS+=( + TNGLIB="$($(tc-getPKG_CONFIG) --libs libgromacs)" + TNGINC="-I${EPREFIX}/usr/include" + TNGLDFLAGS="-shared" + TNGDYNAMIC=1 + ) + fi + if use sqlite; then + EMAKEOPTS+=( + SQLITELIB="$($(tc-getPKG_CONFIG) --libs sqlite3)" + SQLITEINC="-I${EPREFIX}/usr/include" + SQLITELDFLAGS="-shared" + SQLITEDYNAMIC=1 + ) + fi +} + +src_configure() { + local myconf="OPENGL OPENGLPBUFFER COLVARS 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 tachyon && myconf+=" LIBTACHYON" + use xinerama && myconf+=" XINERAMA" + + export \ + PYTHON_INCLUDE_DIR="$(python_get_includedir)" \ + PYTHON_LIBRARY_DIR="$(python_get_library_path)" \ + PYTHON_LIBRARY="$(python_get_LIBS)" \ + NUMPY_INCLUDE_DIR="$(python_get_sitedir)/numpy/core/include" \ + NUMPY_LIBRARY_DIR="$(python_get_sitedir)/numpy/core/include" + + perl ./configure LINUX \ + ${myconf} || die +} + +src_compile() { + # build plugins + cd "${WORKDIR}"/plugins || die + + emake \ + ${EMAKEOPTS[@]} \ + LINUX + + # build vmd + cd "${S}"/src || die + emake +} + +src_install() { + # install plugins + cd "${WORKDIR}"/plugins || die + emake \ + PLUGINDIR="${ED}/usr/$(get_libdir)/${PN}/plugins" \ + distrib + + # install vmd + cd "${S}"/src || die + emake install + + # install docs + cd "${S}" || die + 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 || die + 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 + # Open PDB files with VMD + echo "MimeType=chemical/x-pdb;" >> "${WORKDIR}"/vmd.desktop || die + domenu "${WORKDIR}"/vmd.desktop +} -- cgit v1.2.3