summaryrefslogtreecommitdiff
path: root/sci-chemistry/modeller
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /sci-chemistry/modeller
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'sci-chemistry/modeller')
-rw-r--r--sci-chemistry/modeller/Manifest3
-rw-r--r--sci-chemistry/modeller/metadata.xml12
-rw-r--r--sci-chemistry/modeller/modeller-9.25.ebuild149
3 files changed, 164 insertions, 0 deletions
diff --git a/sci-chemistry/modeller/Manifest b/sci-chemistry/modeller/Manifest
new file mode 100644
index 000000000000..916b23db6e7c
--- /dev/null
+++ b/sci-chemistry/modeller/Manifest
@@ -0,0 +1,3 @@
+DIST modeller-9.25.tar.gz 44820658 BLAKE2B b3e8a3cc8cc70689a25bc5ed2eee294d67bef8eea9ed4b64d41aba3a27c0bc428ae58e74d734da0eaab7e4fabb213d098b9ba66b9569557159ac7d4a58244b0a SHA512 93f273aba0ec0f884cde5bbcc24769a09386bfc6bf1744d80001e41924b1a682225ba3c554fb9898ef3bfd1fd8451f9458bb92431b20f2f51b01781e79686c91
+EBUILD modeller-9.25.ebuild 3853 BLAKE2B f31103dbdd31165fc0ba51c751cfe965a6534ea5b626cd8a6e78a4a5882254d4d20741f75f278a8c5b23ac7fa1ad05261b03d6e8370b11a441efd89d8ee13390 SHA512 6e9da5dd875a221430c49f981fadc0e1f777ea5f33e5eca877b8de085ee1e4fd846a2dcfc38c0bcc541945b62338c4ba028840fcca39d98c408ef437d6e17f93
+MISC metadata.xml 374 BLAKE2B d93e2ad2f09971909382ad65fc5f5033487979b0694f9dc656439573973f55ce1865e5a30584e55e1c48fdd93898601ac2b11e269fb2b1c5adc3ff8dde66f35d SHA512 1c61c58e1cfbbb42342f7a87625e0044e51523f7a2f7270ecfea537c622965e64195fc88eb8f70fac648a0154a19f4a852b88383de1dcd6e17ff0ac0dc6e22d8
diff --git a/sci-chemistry/modeller/metadata.xml b/sci-chemistry/modeller/metadata.xml
new file mode 100644
index 000000000000..7daa2ce7e5f8
--- /dev/null
+++ b/sci-chemistry/modeller/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/modeller/modeller-9.25.ebuild b/sci-chemistry/modeller/modeller-9.25.ebuild
new file mode 100644
index 000000000000..c07e63480561
--- /dev/null
+++ b/sci-chemistry/modeller/modeller-9.25.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} )
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit distutils-r1 eutils multilib
+
+DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures"
+HOMEPAGE="https://salilab.org/modeller/"
+SRC_URI="https://salilab.org/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="modeller"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+SLOT="0"
+
+RESTRICT="mirror"
+
+DEPEND=">=dev-lang/swig-1.3"
+RDEPEND=""
+
+INPATH="${EPREFIX}"/opt/modeller${ver}
+
+QA_PREBUILT="/opt/*"
+
+pkg_setup() {
+ case ${ARCH} in
+ x86)
+ EXECTYPE="i386-intel8";;
+ amd64)
+ EXECTYPE="x86_64-intel8";;
+ *)
+ die "Your arch "${ARCH}" does not appear supported at this time.";;
+ esac
+}
+
+python_prepare_all(){
+ sed "s:i386-intel8:${EXECTYPE}:g" -i src/swig/setup.py || die
+ rm -rf modlib/modeller/python_library || die
+ sed -i '1 i\#!/usr/bin/python' bin/modslave.py || die
+ 2to3 -w -n modlib/modeller || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile(){
+ cd src/swig || die
+ swig -python -keyword -nodefaultctor -nodefaultdtor -noproxy modeller.i || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd src/swig || die
+ distutils-r1_python_install
+}
+
+python_install_all(){
+ cd "${S}" || die
+ sed \
+ -e "/^EXECUTABLE_TYPE/s:xxx:${EXECTYPE}:g" \
+ -e "/MODINSTALL/s:xxx:\"${INPATH}\":g" \
+ -i bin/modscript || die
+
+ sed -e "s;@TOPDIR\@;\"${INPATH}\";" \
+ -e "s;@EXETYPE\@;${EXECTYPE};" \
+ bin/modpy.sh.in > "${T}/modpy.sh"
+
+ insinto ${INPATH}
+ doins -r modlib
+ python_foreach_impl python_domodule modlib/modeller
+
+ insinto ${INPATH}/bin
+ doins -r bin/{lib,*top}
+
+ exeinto ${INPATH}/bin
+ doexe bin/{modscript,mod${PV}_${EXECTYPE}} "${T}"/modpy.sh
+
+ python_foreach_impl python_doscript bin/modslave.py
+ dosym ${INPATH}/bin/modscript /opt/bin/mod${PV}
+ dosym ${INPATH}/bin/modpy.sh /opt/bin/modpy.sh
+
+ exeinto ${INPATH}/lib/${EXECTYPE}/
+ doexe lib/${EXECTYPE}/lib*
+ dosym libmodeller.so.12 ${INPATH}/lib/${EXECTYPE}/libmodeller.so
+ dosym ../../${INPATH}/lib/${EXECTYPE}/libmodeller.so.12 /usr/$(get_libdir)/libmodeller.so.12
+
+ use doc && HTML_DOCS=( doc/. )
+ distutils-r1_python_install_all
+
+ if use examples; then
+ insinto /usr/share/${PN}/
+ doins -r examples
+ fi
+
+ insinto /etc/revdep-rebuild
+ cat >> "${T}"/40-${PN} <<- EOF
+ SEARCH_DIRS_MASK="${EPREFIX}/opt/modeller/lib/"
+ EOF
+ doins "${T}"/40-${PN}
+}
+
+pkg_postinst() {
+ if [[ ! -e "${INPATH}/modlib/modeller/config.py" ]]; then
+ echo install_dir = \"${INPATH}/\"> ${INPATH}/modlib/modeller/config.py
+ fi
+
+ if grep -q license ${INPATH}/modlib/modeller/config.py; then
+ einfo "A license key file is already present in ${INPATH}/modlib/modeller/config.py"
+ else
+ ewarn "Obtain a license Key from"
+ ewarn "http://salilab.org/modeller/registration.html"
+ ewarn "And run this before using modeller:"
+ ewarn "emerge --config =${CATEGORY}/${PF}"
+ ewarn "That way you can [re]enter your license key."
+ fi
+}
+
+pkg_postrm() {
+ ewarn "This package leaves a license Key file in ${INPATH}/modlib/modeller/config.py"
+ ewarn "that you need to remove to completely get rid of modeller."
+}
+
+pkg_config() {
+ ewarn "Your license key is NOT checked for validity here."
+ ewarn " Make sure you type it in correctly."
+ eerror "If you CTRL+C out of this, modeller will not run!"
+ while true
+ do
+ einfo "Please enter your license key:"
+ read license_key1
+ einfo "Please re-enter your license key:"
+ read license_key2
+ if [[ "$license_key1" == "" ]]
+ then
+ echo "You entered a blank license key. Try again."
+ else
+ if [[ "$license_key1" == "$license_key2" ]]
+ then
+ echo license = '"'$license_key1'"' >> "${INPATH}/modlib/modeller/config.py"
+ einfo "Thank you!"
+ break
+ else
+ eerror "Your license key entries do not match. Try again."
+ fi
+ fi
+ done
+}