1 |
commit: 3139caf52e0992237882384ac30c2e8ab7c5946d |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 6 13:29:17 2018 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 6 13:29:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3139caf5 |
7 |
|
8 |
sci-chemistry/modeller: Version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.28, Repoman-2.3.9 |
11 |
|
12 |
sci-chemistry/modeller/modeller-9.19.ebuild | 145 ++++++++++++++++++++++++++++ |
13 |
1 file changed, 145 insertions(+) |
14 |
|
15 |
diff --git a/sci-chemistry/modeller/modeller-9.19.ebuild b/sci-chemistry/modeller/modeller-9.19.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000..0d29c3843 |
18 |
--- /dev/null |
19 |
+++ b/sci-chemistry/modeller/modeller-9.19.ebuild |
20 |
@@ -0,0 +1,145 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python2_7 ) |
27 |
+ |
28 |
+inherit distutils-r1 eutils multilib versionator |
29 |
+ |
30 |
+DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures" |
31 |
+HOMEPAGE="http://salilab.org/modeller/" |
32 |
+SRC_URI="http://salilab.org/${PN}/${PV}/${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="modeller" |
35 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
36 |
+IUSE="doc examples" |
37 |
+SLOT="0" |
38 |
+ |
39 |
+RESTRICT="mirror" |
40 |
+ |
41 |
+DEPEND=">=dev-lang/swig-1.3" |
42 |
+RDEPEND="" |
43 |
+ |
44 |
+INPATH="${EPREFIX}"/opt/modeller${ver} |
45 |
+ |
46 |
+QA_PREBUILT="/opt/*" |
47 |
+ |
48 |
+pkg_setup() { |
49 |
+ case ${ARCH} in |
50 |
+ x86) |
51 |
+ EXECTYPE="i386-intel8";; |
52 |
+ amd64) |
53 |
+ EXECTYPE="x86_64-intel8";; |
54 |
+ *) |
55 |
+ die "Your arch "${ARCH}" does not appear supported at this time.";; |
56 |
+ esac |
57 |
+} |
58 |
+ |
59 |
+python_prepare_all(){ |
60 |
+ sed "s:i386-intel8:${EXECTYPE}:g" -i src/swig/setup.py || die |
61 |
+ distutils-r1_python_prepare_all |
62 |
+} |
63 |
+ |
64 |
+python_compile(){ |
65 |
+ cd src/swig || die |
66 |
+ swig -python -keyword -nodefaultctor -nodefaultdtor -noproxy modeller.i || die |
67 |
+ distutils-r1_python_compile |
68 |
+} |
69 |
+ |
70 |
+python_install() { |
71 |
+ cd src/swig || die |
72 |
+ distutils-r1_python_install |
73 |
+} |
74 |
+ |
75 |
+python_install_all(){ |
76 |
+ cd "${S}" || die |
77 |
+ sed \ |
78 |
+ -e "/^EXECUTABLE_TYPE/s:xxx:${EXECTYPE}:g" \ |
79 |
+ -e "/MODINSTALL/s:xxx:\"${INPATH}\":g" \ |
80 |
+ -i bin/modscript || die |
81 |
+ |
82 |
+ sed -e "s;@TOPDIR\@;\"${INPATH}\";" \ |
83 |
+ -e "s;@EXETYPE\@;${EXECTYPE};" \ |
84 |
+ bin/modpy.sh.in > "${T}/modpy.sh" |
85 |
+ |
86 |
+ insinto ${INPATH} |
87 |
+ doins -r modlib |
88 |
+ python_foreach_impl python_domodule modlib/modeller |
89 |
+ |
90 |
+ insinto ${INPATH}/bin |
91 |
+ doins -r bin/{lib,*top} |
92 |
+ |
93 |
+ exeinto ${INPATH}/bin |
94 |
+ doexe bin/{modscript,mod${PV}_${EXECTYPE}} "${T}"/modpy.sh |
95 |
+ |
96 |
+ python_foreach_impl python_doscript bin/modslave.py |
97 |
+ dosym ${INPATH}/bin/modscript /opt/bin/mod${PV} |
98 |
+ dosym ${INPATH}/bin/modpy.sh /opt/bin/modpy.sh |
99 |
+ |
100 |
+ exeinto ${INPATH}/lib/${EXECTYPE}/ |
101 |
+ doexe lib/${EXECTYPE}/lib* |
102 |
+ dosym libmodeller.so.8 ${INPATH}/lib/${EXECTYPE}/libmodeller.so |
103 |
+ dosym ../../${INPATH}/lib/${EXECTYPE}/libmodeller.so.8 /usr/$(get_libdir)/libmodeller.so.8 |
104 |
+ |
105 |
+ use doc && HTML_DOCS=( doc/. ) |
106 |
+ distutils-r1_python_install_all |
107 |
+ |
108 |
+ if use examples; then |
109 |
+ insinto /usr/share/${PN}/ |
110 |
+ doins -r examples |
111 |
+ fi |
112 |
+ |
113 |
+ insinto /etc/revdep-rebuild |
114 |
+ cat >> "${T}"/40-${PN} <<- EOF |
115 |
+ SEARCH_DIRS_MASK="${EPREFIX}/opt/modeller/lib/" |
116 |
+ EOF |
117 |
+ doins "${T}"/40-${PN} |
118 |
+} |
119 |
+ |
120 |
+pkg_postinst() { |
121 |
+ if [[ ! -e "${INPATH}/modlib/modeller/config.py" ]]; then |
122 |
+ echo install_dir = \"${INPATH}/\"> ${INPATH}/modlib/modeller/config.py |
123 |
+ fi |
124 |
+ |
125 |
+ if grep -q license ${INPATH}/modlib/modeller/config.py; then |
126 |
+ einfo "A license key file is already present in ${IN_PATH}/modlib/modeller/config.py" |
127 |
+ else |
128 |
+ ewarn "Obtain a license Key from" |
129 |
+ ewarn "http://salilab.org/modeller/registration.html" |
130 |
+ ewarn "And run this before using modeller:" |
131 |
+ ewarn "emerge --config =${CATEGORY}/${PF}" |
132 |
+ ewarn "That way you can [re]enter your license key." |
133 |
+ fi |
134 |
+} |
135 |
+ |
136 |
+pkg_postrm() { |
137 |
+ ewarn "This package leaves a license Key file in ${INPATH}/modlib/modeller/config.py" |
138 |
+ ewarn "that you need to remove to completely get rid of modeller." |
139 |
+} |
140 |
+ |
141 |
+pkg_config() { |
142 |
+ ewarn "Your license key is NOT checked for validity here." |
143 |
+ ewarn " Make sure you type it in correctly." |
144 |
+ eerror "If you CTRL+C out of this, modeller will not run!" |
145 |
+ while true |
146 |
+ do |
147 |
+ einfo "Please enter your license key:" |
148 |
+ read license_key1 |
149 |
+ einfo "Please re-enter your license key:" |
150 |
+ read license_key2 |
151 |
+ if [[ "$license_key1" == "" ]] |
152 |
+ then |
153 |
+ echo "You entered a blank license key. Try again." |
154 |
+ else |
155 |
+ if [[ "$license_key1" == "$license_key2" ]] |
156 |
+ then |
157 |
+ echo license = '"'$license_key1'"' >> "${INPATH}/modlib/modeller/config.py" |
158 |
+ einfo "Thank you!" |
159 |
+ break |
160 |
+ else |
161 |
+ eerror "Your license key entries do not match. Try again." |
162 |
+ fi |
163 |
+ fi |
164 |
+ done |
165 |
+} |