Gentoo Archives: gentoo-commits

From: Christoph Junghans <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/votca-csg/
Date: Thu, 14 Jul 2016 17:30:39
Message-Id: 1468517422.6cb701d4e1f513c9d98a6cebf208ecfc95e0220a.ottxor@gentoo
1 commit: 6cb701d4e1f513c9d98a6cebf208ecfc95e0220a
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 14 17:28:41 2016 +0000
4 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 14 17:30:22 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cb701d4
7
8 sci-chemistry/votca-csg: import live ebuild from sci
9
10 Package-Manager: portage-2.2.28
11
12 sci-chemistry/votca-csg/votca-csg-9999.ebuild | 114 ++++++++++++++++++++++++++
13 1 file changed, 114 insertions(+)
14
15 diff --git a/sci-chemistry/votca-csg/votca-csg-9999.ebuild b/sci-chemistry/votca-csg/votca-csg-9999.ebuild
16 new file mode 100644
17 index 0000000..1b619ba
18 --- /dev/null
19 +++ b/sci-chemistry/votca-csg/votca-csg-9999.ebuild
20 @@ -0,0 +1,114 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +
27 +CMAKE_MAKEFILE_GENERATOR="ninja"
28 +
29 +inherit bash-completion-r1 cmake-utils multilib
30 +
31 +IUSE="doc examples extras +gromacs hdf5"
32 +PDEPEND="extras? ( =sci-chemistry/${PN}apps-${PV} )"
33 +if [ "${PV}" != "9999" ]; then
34 + SRC_URI="https://github.com/${PN/-//}/archive/v${PV}.tar.gz -> ${P}.tar.gz
35 + doc? ( https://github.com/${PN/-//}-manual/releases/download/v${PV}/${PN}-manual-${PV}.pdf )
36 + examples? ( https://github.com/${PN/-//}-tutorials/archive/v${PV}.tar.gz -> ${PN}-tutorials-${PV}.tar.gz )"
37 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
38 + S="${WORKDIR}/${P#votca-}"
39 +else
40 + inherit git-r3
41 + EGIT_REPO_URI="git://github.com/${PN/-//}.git https://github.com/${PN/-//}.git"
42 + KEYWORDS=""
43 +fi
44 +
45 +DESCRIPTION="Votca coarse-graining engine"
46 +HOMEPAGE="http://www.votca.org"
47 +
48 +LICENSE="Apache-2.0"
49 +SLOT="0"
50 +
51 +RDEPEND="
52 + =sci-libs/votca-tools-${PV}
53 + gromacs? ( sci-chemistry/gromacs:= )
54 + hdf5? ( sci-libs/hdf5 )
55 + dev-lang/perl
56 + app-shells/bash:*"
57 +
58 +DEPEND="${RDEPEND}
59 + doc? (
60 + app-doc/doxygen[dot]
61 + dev-texlive/texlive-latexextra
62 + virtual/latex-base
63 + dev-tex/pgf
64 + )
65 + >=app-text/txt2tags-2.5
66 + virtual/pkgconfig"
67 +
68 +DOCS=( README.md NOTICE CHANGELOG.md )
69 +
70 +src_unpack() {
71 + if [[ ${PV} != *9999 ]]; then
72 + default
73 + else
74 + git-r3_src_unpack
75 + if use doc; then
76 + EGIT_REPO_URI="git://github.com/${PN/-//}-manual.git https://github.com/${PN/-//}-manual.git"
77 + EGIT_BRANCH="master"
78 + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-manual"\
79 + git-r3_src_unpack
80 + fi
81 + if use examples; then
82 + EGIT_REPO_URI="git://github.com/${PN/-//}-tutorials.git https://github.com/${PN/-//}-tutorials.git"
83 + EGIT_BRANCH="master"
84 + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN#votca-}-tutorials"\
85 + git-r3_src_unpack
86 + fi
87 + fi
88 +}
89 +
90 +src_configure() {
91 + mycmakeargs=(
92 + -DWITH_GMX=$(usex gromacs)
93 + -DWITH_H5MD=$(usex hdf5)
94 + -DWITH_RC_FILES=OFF
95 + -DLIB=$(get_libdir)
96 + )
97 + cmake-utils_src_configure
98 +}
99 +
100 +src_install() {
101 + cmake-utils_src_install
102 + newbashcomp scripts/csg-completion.bash csg_call
103 + for i in "${ED}"/usr/bin/csg_*; do
104 + [[ ${i} = *csg_call ]] && continue
105 + bashcomp_alias csg_call "${i##*/}"
106 + done
107 + if use doc; then
108 + if [[ ${PV} = *9999* ]]; then
109 + #we need to do that here, because we need an installed version of csg to build the manual
110 + [[ ${CHOST} = *-darwin* ]] && \
111 + emake -C "${WORKDIR}/${PN}"-manual PATH="${PATH}${PATH:+:}${ED}/usr/bin" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}${DYLD_LIBRARY_PATH:+:}${ED}/usr/$(get_libdir)" \
112 + || emake -C "${WORKDIR}/${PN}"-manual PATH="${PATH}${PATH:+:}${ED}/usr/bin" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}${ED}/usr/$(get_libdir)"
113 + newdoc "${WORKDIR}/${PN}"-manual/manual.pdf "${PN}-manual-${PV}.pdf"
114 + else
115 + dodoc "${DISTDIR}/${PN}-manual-${PV}.pdf"
116 + fi
117 + cmake-utils_src_make -C "${CMAKE_BUILD_DIR}" html
118 + dodoc -r "${CMAKE_BUILD_DIR}"/share/doc/html
119 + fi
120 + if use examples; then
121 + insinto "/usr/share/doc/${PF}/tutorials"
122 + docompress -x "/usr/share/doc/${PF}/tutorials"
123 + rm -rf "${WORKDIR}/${PN#votca-}"-tutorials*/CMake*
124 + doins -r "${WORKDIR}/${PN#votca-}"-tutorials*/*
125 + fi
126 +}
127 +
128 +pkg_postinst() {
129 + einfo
130 + einfo "Please read and cite:"
131 + einfo "VOTCA, J. Chem. Theory Comput. 5, 3211 (2009). "
132 + einfo "http://dx.doi.org/10.1021/ct900369w"
133 + einfo
134 +}