aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2021-07-22 13:12:11 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2021-07-22 13:27:39 +0500
commitff56baf97e8c8a3551b3a1875d3d480c56782331 (patch)
tree623eee5175a394e4ddc984124c55d96746a85b2c /sci-biology
parentboinc.eclass: new eclass (diff)
downloadguru-ff56baf97e8c8a3551b3a1875d3d480c56782331.tar.gz
guru-ff56baf97e8c8a3551b3a1875d3d480c56782331.tar.bz2
guru-ff56baf97e8c8a3551b3a1875d3d480c56782331.zip
sci-biology/cmdock: revbump (new eclass)
Also includes a hack to install both sphinx and doxygen docs. pkgcheck isn't very happy about it, but who cares. Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/cmdock/cmdock-0.1.3-r1.ebuild98
-rw-r--r--sci-biology/cmdock/metadata.xml5
2 files changed, 102 insertions, 1 deletions
diff --git a/sci-biology/cmdock/cmdock-0.1.3-r1.ebuild b/sci-biology/cmdock/cmdock-0.1.3-r1.ebuild
new file mode 100644
index 000000000..099977f0a
--- /dev/null
+++ b/sci-biology/cmdock/cmdock-0.1.3-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+BOINC_APP_OPTIONAL="true"
+
+DOCS_BUILDER="sphinx"
+DOCS_AUTODOC=0
+DOCS_DIR="docs"
+
+inherit python-any-r1 boinc-app docs meson
+
+DESCRIPTION="Program for docking ligands to proteins and nucleic acids"
+HOMEPAGE="https://gitlab.com/Jukic/cmdock https://www.rxdock.org"
+SRC_URI="https://gitlab.com/Jukic/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
+S="${WORKDIR}/${PN}-v${PV}"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="apidoc boinc"
+REQUIRED_USE="apidoc? ( doc )"
+
+RDEPEND="
+ dev-lang/perl
+ boinc? ( sci-misc/boinc-wrapper )
+"
+BDEPEND="
+ dev-cpp/eigen:3
+ dev-cpp/indicators
+ >=dev-cpp/pcg-cpp-0.98.1_p20210406-r1
+ dev-libs/cxxopts
+ apidoc? ( app-doc/doxygen )
+"
+
+DOCS=( INSTALL.md README.md )
+
+BOINC_MASTER_URL="https://www.sidock.si/sidock/"
+BOINC_INVITATION_CODE="Crunch_4Science"
+BOINC_APP_HELPTEXT=\
+"The easiest way to do something useful with this application
+is to attach it to SiDock@home BOINC project."
+
+foreach_wrapper_job() {
+ sed -i "$1" \
+ -e "s:@PREFIX@:${EPREFIX}/opt/${P}:g" || die
+}
+
+src_prepare() {
+ default
+ rm -r include/indicators || die
+}
+
+src_configure() {
+ # very weird directory layout
+ local emesonargs=(
+ --prefix="${EPREFIX}/opt/${P}"
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+
+ # subshell prevents from overriding global
+ # DOCS_BUILDER and DOCS_OUTDIR
+ use apidoc && (
+ DOCS_BUILDER="doxygen"
+ DOCS_OUTDIR="${S}/_build/html/api"
+ docs_compile
+ )
+ docs_compile
+}
+
+src_install() {
+ meson_src_install
+
+ if use boinc; then
+ doappinfo "${FILESDIR}"/app_info_${PV}.xml
+ dowrapper ${PN}-boinc-zcp
+
+ # install a blank file
+ insinto $(get_project_root)
+ insopts --owner boinc --group boinc
+ : newins - docking_out.sd
+ fi
+}
+
+pkg_postinst() {
+ use boinc && boinc-app_pkg_postinst
+}
+
+pkg_postrm() {
+ use boinc && boinc-app_pkg_postrm
+}
diff --git a/sci-biology/cmdock/metadata.xml b/sci-biology/cmdock/metadata.xml
index f0cb44b3d..beddf8090 100644
--- a/sci-biology/cmdock/metadata.xml
+++ b/sci-biology/cmdock/metadata.xml
@@ -4,13 +4,16 @@
<upstream>
<remote-id type="gitlab">Jukic/cmdock</remote-id>
<bugs-to>https://gitlab.com/Jukic/cmdock/-/issues</bugs-to>
- <doc>https://www.rxdock.org/api-documentation/devel/html</doc>
+ <doc>https://www.rxdock.org/documentation/devel/html</doc>
</upstream>
<maintainer type="person">
<email>cyber+gentoo@sysrq.in</email>
<name>Anna</name>
</maintainer>
<use>
+ <flag name="apidoc">
+ Build API documentation using <pkg>app-doc/doxygen</pkg>
+ </flag>
<flag name="boinc">
Use CmDock with SiDock@home BOINC project
</flag>