1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 CMAKE_MAKEFILE_GENERATOR="ninja"
8 inherit bash-completion-r1 cmake-utils multilib
10 IUSE="doc examples extras +gromacs hdf5"
11 PDEPEND="extras? ( =sci-chemistry/${PN}apps-${PV} )"
12 if [ "${PV}" != "9999" ]; then
13 SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz
14 doc? ( https://github.com/${PN/-//}-manual/releases/download/v${PV}/${PN}-manual-${PV}.pdf )
15 examples? ( https://github.com/${PN/-//}-tutorials/archive/v${PV}.tar.gz -> ${PN}-tutorials-${PV}.tar.gz )"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
17 S="${WORKDIR}/${P#votca-}"
20 EGIT_REPO_URI="https://github.com/${PN/-//}.git"
22 PDEPEND="${PDEPEND} doc? ( =app-doc/${PN}-manual-${PV} )"
25 DESCRIPTION="Votca coarse-graining engine"
26 HOMEPAGE="http://www.votca.org"
32 =sci-libs/votca-tools-${PV}
33 gromacs? ( sci-chemistry/gromacs:= )
34 hdf5? ( sci-libs/hdf5 )
41 dev-texlive/texlive-latexextra
45 >=app-text/txt2tags-2.5
48 DOCS=( README.md NOTICE CHANGELOG.md )
51 if [[ ${PV} != *9999 ]]; then
56 EGIT_REPO_URI="https://github.com/${PN/-//}-tutorials.git"
58 EGIT_CHECKOUT_DIR="${WORKDIR}/${PN#votca-}-tutorials"\
66 -DWITH_GMX=$(usex gromacs)
67 -DWITH_H5MD=$(usex hdf5)
71 cmake-utils_src_configure
75 cmake-utils_src_install
76 newbashcomp scripts/csg-completion.bash csg_call
77 for i in "${ED}"/usr/bin/csg_*; do
78 [[ ${i} = *csg_call ]] && continue
79 bashcomp_alias csg_call "${i##*/}"
82 [[ ${PV} != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${PV}.pdf"
83 cmake-utils_src_make -C "${CMAKE_BUILD_DIR}" html
84 dodoc -r "${CMAKE_BUILD_DIR}"/share/doc/html
87 insinto "/usr/share/doc/${PF}/tutorials"
88 docompress -x "/usr/share/doc/${PF}/tutorials"
89 rm -rf "${WORKDIR}/${PN#votca-}"-tutorials*/CMake*
90 doins -r "${WORKDIR}/${PN#votca-}"-tutorials*/*
96 einfo "Please read and cite:"
97 einfo "VOTCA, J. Chem. Theory Comput. 5, 3211 (2009). "
98 einfo "https://dx.doi.org/10.1021/ct900369w"