diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2018-04-06 16:29:17 +0300 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2018-04-06 16:29:17 +0300 |
commit | 3139caf52e0992237882384ac30c2e8ab7c5946d (patch) | |
tree | f088fb04fb86c51117b5cedfec32306cd512231b /sci-chemistry/modeller | |
parent | eclass/intel-sdp: drop (diff) | |
download | sci-3139caf52e0992237882384ac30c2e8ab7c5946d.tar.gz sci-3139caf52e0992237882384ac30c2e8ab7c5946d.tar.bz2 sci-3139caf52e0992237882384ac30c2e8ab7c5946d.zip |
sci-chemistry/modeller: Version bump
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'sci-chemistry/modeller')
-rw-r--r-- | sci-chemistry/modeller/Manifest | 1 | ||||
-rw-r--r-- | sci-chemistry/modeller/modeller-9.19.ebuild | 145 |
2 files changed, 146 insertions, 0 deletions
diff --git a/sci-chemistry/modeller/Manifest b/sci-chemistry/modeller/Manifest index 03036caee..8c5c6393b 100644 --- a/sci-chemistry/modeller/Manifest +++ b/sci-chemistry/modeller/Manifest @@ -1 +1,2 @@ DIST modeller-9.12.tar.gz 29273842 BLAKE2B 06b4ba3ed918b7f4552ed4bfb358332e623402b92ba48c8def8b4a4f8fe2eba3f30a02b868746cde5a6d7109129f073851523676544bd749a58b86dc71e19198 SHA512 5c0acaf453771347a9de3a0c7240f7ce376244803748edb28923dbaefda779041211ef4b26af5a2774bdf6bc63d7c7d7e62e1354e1550a6742c9575076864352 +DIST modeller-9.19.tar.gz 34885366 BLAKE2B 46310bb7b26392aab2a68881ff666fe05e973ce85b59d16edcc1dab1b5c3f4a9396d991467d189656ac5b71b509049219e54ff246967f305671e57247bcf1f45 SHA512 04bf1195b58a337541e97fc9812b5c0887909a687e4a6004cc9deb89dd078dbc78148fd81552ba189c063b7373e35f4b4a0603e4638af4e2d40fa30625be4c63 diff --git a/sci-chemistry/modeller/modeller-9.19.ebuild b/sci-chemistry/modeller/modeller-9.19.ebuild new file mode 100644 index 000000000..0d29c3843 --- /dev/null +++ b/sci-chemistry/modeller/modeller-9.19.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 eutils multilib versionator + +DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures" +HOMEPAGE="http://salilab.org/modeller/" +SRC_URI="http://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 + 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.8 ${INPATH}/lib/${EXECTYPE}/libmodeller.so + dosym ../../${INPATH}/lib/${EXECTYPE}/libmodeller.so.8 /usr/$(get_libdir)/libmodeller.so.8 + + 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 ${IN_PATH}/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 +} |