Gentoo Archives: gentoo-commits

From: Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/repeatmasker/, sci-biology/repeatmasker/files/
Date: Fri, 29 Mar 2019 16:25:03
Message-Id: 1553876652.777780e24faa006c5883307c0dadd31cab8cecd8.mmokrejs@gentoo
1 commit: 777780e24faa006c5883307c0dadd31cab8cecd8
2 Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
3 AuthorDate: Fri Mar 29 16:24:12 2019 +0000
4 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
5 CommitDate: Fri Mar 29 16:24:12 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=777780e2
7
8 sci-biology/repeatmasker: rewamp configuration code
9
10 The changes are partly based on https://github.com/gentoo/sci/pull/580
11 from Michael Schubert but it seems we could figure out the paths
12 to binaries automatically using `which`.
13
14 Block between the USE options and allow only a single to be enabled,
15 that is what configure requires, otherwise it enters a loop.
16
17 The hmmer is the default in configure and preferred.
18
19 Tested with `USE="hmmer -wublast -phrap -rmblast"` and other
20 combinations while only one is allowed.
21
22 If users have wublast/abblast/rmblast/crossmatch in the PATHS we just
23 pick it.
24
25 `which` returns a '.' (dot) if a binary was not found, we need to zap it
26 otherwise configure enters a loop.
27
28 In the end, one can get:
29
30 Add a Search Engine:
31 1. CrossMatch: [ Configured ]
32 2. RMBlast - NCBI Blast with RepeatMasker extensions: [ Configured ]
33 3. WUBlast/ABBlast (required by DupMasker): [ Un-configured ]
34 4. HMMER3.1 & DFAM: [ Configured, Default ]
35
36 5. Done
37
38 properly written into
39
40 /usr/lib64/perl5/vendor_perl/5.28.0/RepeatMaskerConfig.pm
41
42 Package-Manager: Portage-2.3.62, Repoman-2.3.12
43 Signed-off-by: Martin Mokrejs <mmokrejs <AT> fold.natur.cuni.cz>
44
45 .../files/repeatmasker-4.0.6__configure.patch | 4 +-
46 sci-biology/repeatmasker/metadata.xml | 6 +
47 .../repeatmasker/repeatmasker-4.0.6-r3.ebuild | 111 ----------------
48 .../repeatmasker/repeatmasker-4.0.6-r4.ebuild | 142 +++++++++++++++++++++
49 .../repeatmasker/repeatmasker-4.0.8-r1.ebuild | 111 ----------------
50 .../repeatmasker/repeatmasker-4.0.8-r2.ebuild | 142 +++++++++++++++++++++
51 6 files changed, 292 insertions(+), 224 deletions(-)
52
53 diff --git a/sci-biology/repeatmasker/files/repeatmasker-4.0.6__configure.patch b/sci-biology/repeatmasker/files/repeatmasker-4.0.6__configure.patch
54 index e4042190f..c1e0cfb55 100644
55 --- a/sci-biology/repeatmasker/files/repeatmasker-4.0.6__configure.patch
56 +++ b/sci-biology/repeatmasker/files/repeatmasker-4.0.6__configure.patch
57 @@ -1,5 +1,5 @@
58 ---- configure.ori 2015-11-24 20:56:46.000000000 +0100
59 -+++ configure 2015-11-24 20:59:58.000000000 +0100
60 +--- RepeatMasker/configure.ori 2015-11-24 20:56:46.000000000 +0100
61 ++++ RepeatMasker/configure 2015-11-24 20:59:58.000000000 +0100
62 @@ -253,17 +253,16 @@
63 close INVERS;
64 }
65
66 diff --git a/sci-biology/repeatmasker/metadata.xml b/sci-biology/repeatmasker/metadata.xml
67 index 8417d1580..de382fa16 100644
68 --- a/sci-biology/repeatmasker/metadata.xml
69 +++ b/sci-biology/repeatmasker/metadata.xml
70 @@ -5,4 +5,10 @@
71 <email>sci-biology@g.o</email>
72 <name>Gentoo Biology Project</name>
73 </maintainer>
74 + <use>
75 + <flag name="phrap">Use cross_match search engine as default</flag>
76 + <flag name="rmblast">Use RM-BLAST search engine as default</flag>
77 + <flag name="hmmer">Use HMMER search engine as default</flag>
78 + <flag name="wublast">Use wublast or abblast search engine as default</flag>
79 + </use>
80 </pkgmetadata>
81
82 diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.6-r3.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.6-r3.ebuild
83 deleted file mode 100644
84 index d41784eb7..000000000
85 --- a/sci-biology/repeatmasker/repeatmasker-4.0.6-r3.ebuild
86 +++ /dev/null
87 @@ -1,111 +0,0 @@
88 -# Copyright 1999-2018 Gentoo Authors
89 -# Distributed under the terms of the GNU General Public License v2
90 -
91 -EAPI=6
92 -
93 -inherit eutils perl-module
94 -
95 -MY_PV=${PV//\./-}
96 -
97 -DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
98 -HOMEPAGE="http://repeatmasker.org/"
99 -SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
100 -
101 -LICENSE="OSL-2.1"
102 -SLOT="0"
103 -KEYWORDS="~amd64 ~x86"
104 -IUSE=""
105 -
106 -DEPEND=">=dev-lang/perl-5.8"
107 -RDEPEND="
108 - dev-perl/Text-Soundex
109 - sci-biology/phrap
110 - <=sci-biology/repeatmasker-libraries-20160829
111 - sci-biology/rmblast
112 - !sci-biology/trf
113 - >=sci-biology/trf-bin-4.0.4
114 -"
115 -
116 -S="${WORKDIR}/RepeatMasker"
117 -
118 -PATCHES=( "${FILESDIR}"/"${P}"__configure.patch )
119 -
120 -src_configure() {
121 - sed \
122 - -e "s#/usr/bin/which#which#g" \
123 - -e "s#/usr/bin/perl#perl#g" \
124 - -i "${S}"/configure || die
125 - perl_set_version
126 - insinto ${VENDOR_LIB}
127 - sed -e "s#/usr/perl5/lib/#${VENDOR_LIB}/#g" -i "${S}"/configure || die
128 - # The below is wrong as it causes:
129 - # Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
130 - # -- Building monolithic RM database...sh: /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/image///usr/share/repeatmasker/Libraries/RepeatMasker.lib: No such file or directory
131 - # -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
132 - sed -i -e 's/system( "clear" );//' "${S}/configure" || die
133 - mkdir -p "${ED}"/usr/share/repeatmasker/Libraries/ || die
134 - #
135 - # the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
136 - # item does not get installed
137 - echo ">blah\natgc" > "${ED}"/usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
138 - # below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
139 - echo "
140 -env
141 -${S}
142 -${EPREFIX}/opt/trf/bin
143 -1
144 -${EPREFIX}/usr/bin
145 -Y
146 -2
147 -${EPREFIX}/usr/bin
148 -Y
149 -4
150 -${EPREFIX}/usr/bin
151 -Y
152 -5" | "${S}"/configure || die "configure failed"
153 - sed -i -e "s|use lib $FindBin::RealBin;|use lib ${EPREFIX}/usr/share/${PN}/lib;|" \
154 - -e "s|.*\(taxonomy.dat\)|${EPREFIX}/usr/share/${PN}/Libraries/\1|" \
155 - -e "/$REPEATMASKER_DIR/ s|$FindBin::RealBin|${EPREFIX}/usr/share/${PN}|" \
156 - "${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
157 -}
158 -# configure failed to 'cp RepeatMaskerConfig.tmpl RepeatMaskerConfig.pm'
159 -# replace also /u1/local/bin/perl with proper Gentoo PATH
160 -
161 -src_install() {
162 - exeinto /usr/share/${PN}
163 - for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
164 - doexe $i
165 - dosym ../share/${PN}/$i /usr/bin/$i
166 - done
167 -
168 - perl_set_version
169 - insinto "${VENDOR_LIB}"
170 - doins "${S}"/*.pm "${S}"/Libraries/*.pm
171 - # zap the supposedly misplaced RepeatAnnotationData.pm file
172 - rm -r "${S}"/Libraries/*.pm || die
173 -
174 - # if sci-biology/repeatmasker-libraries is installed prevent file collision
175 - # and do NOT install Libraries/RepeatMaskerLib.embl file which contains
176 - # a limited version of the file: 20110419-min
177 - rm -r Libraries/RepeatMaskerLib.embl || die
178 - insinto /usr/share/${PN}
179 - doins -r util Matrices Libraries *.help
180 - keepdir /usr/share/${PN}/Libraries
181 -
182 - dodoc README INSTALL *.help
183 -}
184 -
185 -pkg_postinst(){
186 - einfo "RepeatMasker provides bundled human repeats database"
187 - einfo "from Dfam-1.0 database www.dfam.org"
188 - einfo "You can configure which search search engine is to be used and"
189 - einfo "PATHs to the search binaries are defined in"
190 - einfo "${EPREFIX}/usr/share/${PN}/lib/RepeatMaskerConfig.pm"
191 - einfo "Supported search engines are:"
192 - optfeature "cross_match" sci-biology/phrap
193 - optfeature "rmblast" sci-biology/rmblast
194 - optfeature "nhmmer" \>=sci-biology/hmmer-3.1
195 - einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
196 - einfo "repeatmasker-libraries-20160829 (RepBase 21.12) is the last"
197 - einfo "version compatible with <repeatmasker-4.0.7"
198 -}
199
200 diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.6-r4.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.6-r4.ebuild
201 new file mode 100644
202 index 000000000..8216bfe7f
203 --- /dev/null
204 +++ b/sci-biology/repeatmasker/repeatmasker-4.0.6-r4.ebuild
205 @@ -0,0 +1,142 @@
206 +# Copyright 1999-2019 Gentoo Authors
207 +# Distributed under the terms of the GNU General Public License v2
208 +
209 +EAPI=6
210 +
211 +inherit eutils perl-module
212 +
213 +MY_PV=${PV//\./-}
214 +
215 +DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
216 +HOMEPAGE="http://repeatmasker.org/"
217 +SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
218 +
219 +LICENSE="OSL-2.1"
220 +SLOT="0"
221 +KEYWORDS="~amd64 ~x86"
222 +IUSE="phrap rmblast hmmer wublast"
223 +# RepeatMaskerConfig.pm says:
224 +# Default search tool can be one of "hmmer", "crossmatch", "wublast", "decypher" or "ncbi".
225 +# Upstream uses "hmmer" as the default.
226 +
227 +DEPEND=">=dev-lang/perl-5.8"
228 +RDEPEND="
229 + <=sci-biology/repeatmasker-libraries-20160829
230 + dev-perl/Text-Soundex
231 + phrap? ( !hmmer? ( !rmblast? ( !wublast? ( sci-biology/phrap ) ) ) )
232 + rmblast? ( !hmmer? ( !phrap? ( !wublast? ( sci-biology/rmblast ) ) ) )
233 + hmmer? ( !phrap? ( !wublast? ( !rmblast? ( sci-biology/hmmer ) ) ) )
234 + !sci-biology/trf
235 + >=sci-biology/trf-bin-4.0.4
236 +"
237 +# wublast? ( sci-biology/wublast || sci-biology/abblast )
238 +# ncbi? ( would that be ncbi-tools++ or ncbi-blast+ ) ???
239 +
240 +S="${WORKDIR}/RepeatMasker"
241 +
242 +PATCHES=( "${FILESDIR}"/"${P}"__configure.patch )
243 +
244 +src_configure() {
245 + sed \
246 + -e "s#/usr/bin/which#which#g" \
247 + -e "s#/usr/bin/perl#perl#g" \
248 + -i "${S}"/configure || die
249 + perl_set_version
250 + insinto ${VENDOR_LIB}
251 + sed -e "s#/usr/perl5/lib/#${VENDOR_LIB}/#g" -i "${S}"/configure || die
252 + # The below is wrong as it causes:
253 + # Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
254 + # -- Building monolithic RM database...sh: /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/image///usr/share/repeatmasker/Libraries/RepeatMasker.lib: No such file or directory
255 + # -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
256 + sed -i -e 's/system( "clear" );//' "${S}/configure" || die
257 + mkdir -p "${ED}"/usr/share/repeatmasker/Libraries/ || die
258 + #
259 + # the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
260 + # item does not get installed
261 + echo ">blah\natgc" > "${ED}"/usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
262 + # below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
263 + #
264 + local my_crossmatch=`which cross_match 2>/dev/null`
265 + local my_rmblastn=`which rmblastn 2>/dev/null`
266 + local my_hmmer=`which nhmmscan 2>/dev/null`
267 + local my_wublast=`which xdformat 2>/dev/null` # actually configure looks for 'setdb' executable
268 + # configure is inconsistent at first, we must pass even a wrong path for cross_match, rmblastn, hmmer otherwise it enters a loop
269 + # but, for wublast we must pass in an empty string otherwise it looks for 'setdb' executable in the non-existing directory and enters a loop
270 + if [ "$my_crossmatch" != '.' ]; then local crossmatchdir=`dirname "$my_crossmatch"` else local crossmatchdir="${EPREFIX}/usr/bin"; fi
271 + if [ "$my_rmblastn" != '.' ]; then local rmblastdir=`dirname "$my_rmblastn"` else local rmblastdir="${EPREFIX}/usr/bin"; fi
272 + if [ "$my_hmmer" != '.' ]; then local hmmerdir=`dirname "$my_hmmer"` else local hmmerdir="${EPREFIX}/usr/bin"; fi
273 + if [ "$my_wublast" != '.' ]; then local wublastdir=`dirname "$my_wublast"` else local wublastdir=""; fi
274 + echo "crossmatchdir=${crossmatchdir} rmblastdir=${rmblastdir} wublastdir=${wublastdir} hmmerdir=${hmmerdir}"
275 + # pick the preferred-one
276 + local CONF=( x env ${S} "${EPREFIX}"/opt/bin )
277 + if use phrap; then
278 + CONF+=( 1 "${crossmatchdir}" Y )
279 + else
280 + CONF+=( 1 "${crossmatchdir}" N )
281 + fi
282 + if use rmblast; then
283 + CONF+=( 2 "${rmblastdir}" Y )
284 + else
285 + CONF+=( 2 "${rmblastdir}" N )
286 + fi
287 + if use wublast; then
288 + # no ebuild available but pick anything from PATH
289 + CONF+=( 3 "${wublastdir}" Y )
290 + else
291 + CONF+=( 3 "${wublastdir}" N )
292 + fi
293 + if use hmmer; then
294 + CONF+=( 4 "${hmmerdir}" Y )
295 + else
296 + CONF+=( 4 "${hmmerdir}" N )
297 + fi
298 + CONF+=( 5 )
299 + echo "Will feed configure with: ${CONF[@]}"
300 + printf '%s\n' "${CONF[@]}" | "${S}/configure" || die "configure failed"
301 +
302 + sed -i -e "/use lib/s|\"\$FindBin::RealBin|\"${EPREFIX}/usr/share/${PN}/lib|" \
303 + -e "/use lib/s|\$FindBin::RealBin|\"${EPREFIX}/usr/share/${PN}/lib\"|" \
304 + -e "/\$REPEATMASKER_DIR/ s|\$FindBin::RealBin|${EPREFIX}/usr/share/${PN}|" \
305 + "${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
306 +}
307 +
308 +src_install() {
309 + exeinto /usr/share/${PN}
310 + for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
311 + doexe $i
312 + dosym ../share/${PN}/$i /usr/bin/$i
313 + done
314 +
315 + perl_set_version
316 + insinto "${VENDOR_LIB}"
317 + doins "${S}"/*.pm "${S}"/Libraries/*.pm
318 + # zap the supposedly misplaced RepeatAnnotationData.pm file
319 + rm -r "${S}"/Libraries/*.pm || die
320 +
321 + # if sci-biology/repeatmasker-libraries is installed prevent file collision
322 + # and do NOT install Libraries/RepeatMaskerLib.embl file which contains
323 + # a limited version of the file: 20110419-min
324 + rm -r Libraries/RepeatMaskerLib.embl || die
325 + insinto /usr/share/${PN}
326 + doins -r util Matrices Libraries *.help
327 + keepdir /usr/share/${PN}/Libraries
328 +
329 + dodoc README INSTALL *.help
330 +}
331 +
332 +pkg_postinst(){
333 + cd "${S}" || die
334 + einfo "RepeatMasker provides bundled human repeats database from"
335 + einfo " Dfam-1.0 database www.dfam.org"
336 + einfo "You can configure which search search engine is to be used and"
337 + einfo "Current default search engine defined in"
338 + einfo " ${EPREFIX}${VENDOR_LIB}/RepeatMaskerConfig.pm is:"
339 + einfo `grep 'DEFAULT_SEARCH_ENGINE =' RepeatMaskerConfig.pm`
340 + einfo "\nSupported search engines are:"
341 + optfeature "cross_match" sci-biology/phrap
342 + optfeature "rmblast" sci-biology/rmblast
343 + optfeature "nhmmer" \>=sci-biology/hmmer-3.1
344 + einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
345 + einfo "\nThe repeatmasker-libraries-20160829 (RepBase 21.12) was the last"
346 + einfo "version compatible with <repeatmasker-4.0.7"
347 +}
348
349 diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.8-r1.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.8-r1.ebuild
350 deleted file mode 100644
351 index 9b4af2312..000000000
352 --- a/sci-biology/repeatmasker/repeatmasker-4.0.8-r1.ebuild
353 +++ /dev/null
354 @@ -1,111 +0,0 @@
355 -# Copyright 1999-2018 Gentoo Authors
356 -# Distributed under the terms of the GNU General Public License v2
357 -
358 -EAPI=6
359 -
360 -inherit eutils perl-module
361 -
362 -MY_PV=${PV//\./-}
363 -
364 -DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
365 -HOMEPAGE="http://repeatmasker.org/"
366 -SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
367 -
368 -LICENSE="OSL-2.1"
369 -SLOT="0"
370 -KEYWORDS="~amd64 ~x86"
371 -IUSE=""
372 -
373 -DEPEND=">=dev-lang/perl-5.8"
374 -RDEPEND="
375 - dev-perl/Text-Soundex
376 - sci-biology/phrap
377 - >sci-biology/repeatmasker-libraries-20160829
378 - sci-biology/rmblast
379 - !sci-biology/trf
380 - >=sci-biology/trf-bin-4.0.4
381 -"
382 -
383 -S="${WORKDIR}/RepeatMasker"
384 -
385 -PATCHES=( "${FILESDIR}"/"${P}"__configure.patch )
386 -
387 -src_configure() {
388 - sed \
389 - -e "s#/usr/bin/which#which#g" \
390 - -e "s#/usr/bin/perl#perl#g" \
391 - -i "${S}"/configure || die
392 - perl_set_version
393 - insinto ${VENDOR_LIB}
394 - sed -e "s#/usr/perl5/lib/#${VENDOR_LIB}/#g" -i "${S}"/configure || die
395 - # The below is wrong as it causes:
396 - # Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
397 - # -- Building monolithic RM database...sh: /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/image///usr/share/repeatmasker/Libraries/RepeatMasker.lib: No such file or directory
398 - # -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
399 - sed -i -e 's/system( "clear" );//' "${S}/configure" || die
400 - mkdir -p "${ED}"/usr/share/repeatmasker/Libraries/ || die
401 - #
402 - # the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
403 - # item does not get installed
404 - echo ">blah\natgc" > "${ED}"/usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
405 - # below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
406 - echo "
407 -env
408 -${S}
409 -${EPREFIX}/opt/trf/bin
410 -1
411 -${EPREFIX}/usr/bin
412 -Y
413 -2
414 -${EPREFIX}/usr/bin
415 -Y
416 -4
417 -${EPREFIX}/usr/bin
418 -Y
419 -5" | "${S}"/configure || die "configure failed"
420 - sed -i -e "s|use lib $FindBin::RealBin;|use lib ${EPREFIX}/usr/share/${PN}/lib;|" \
421 - -e "s|.*\(taxonomy.dat\)|${EPREFIX}/usr/share/${PN}/Libraries/\1|" \
422 - -e "/$REPEATMASKER_DIR/ s|$FindBin::RealBin|${EPREFIX}/usr/share/${PN}|" \
423 - "${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
424 -}
425 -# configure failed to 'cp RepeatMaskerConfig.tmpl RepeatMaskerConfig.pm'
426 -# replace also /u1/local/bin/perl with proper Gentoo PATH
427 -
428 -src_install() {
429 - exeinto /usr/share/${PN}
430 - for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
431 - doexe $i
432 - dosym ../share/${PN}/$i /usr/bin/$i
433 - done
434 -
435 - perl_set_version
436 - insinto "${VENDOR_LIB}"
437 - doins "${S}"/*.pm "${S}"/Libraries/*.pm
438 - # zap the supposedly misplaced RepeatAnnotationData.pm file
439 - rm -r "${S}"/Libraries/*.pm || die
440 -
441 - # if sci-biology/repeatmasker-libraries is installed prevent file collision
442 - # and do NOT install Libraries/RepeatMaskerLib.embl file which contains
443 - # a limited version of the file: 20110419-min
444 - rm -r Libraries/RepeatMaskerLib.embl || die
445 - insinto /usr/share/${PN}
446 - doins -r util Matrices Libraries *.help
447 - keepdir /usr/share/${PN}/Libraries
448 -
449 - dodoc README.md INSTALL *.help
450 -}
451 -
452 -pkg_postinst(){
453 - einfo "RepeatMasker provides bundled human repeats database"
454 - einfo "from Dfam-1.0 database www.dfam.org"
455 - einfo "You can configure which search search engine is to be used and"
456 - einfo "PATHs to the search binaries are defined in"
457 - einfo "${EPREFIX}/usr/share/${PN}/lib/RepeatMaskerConfig.pm"
458 - einfo "Supported search engines are:"
459 - optfeature "cross_match" sci-biology/phrap
460 - optfeature "rmblast" sci-biology/rmblast
461 - optfeature "nhmmer" \>=sci-biology/hmmer-3.1
462 - einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
463 - einfo "repeatmasker-libraries-20160829 (RepBase 21.12) was the last"
464 - einfo "version compatible with <repeatmasker-4.0.7"
465 -}
466
467 diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.8-r2.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.8-r2.ebuild
468 new file mode 100644
469 index 000000000..02700ba2b
470 --- /dev/null
471 +++ b/sci-biology/repeatmasker/repeatmasker-4.0.8-r2.ebuild
472 @@ -0,0 +1,142 @@
473 +# Copyright 1999-2019 Gentoo Authors
474 +# Distributed under the terms of the GNU General Public License v2
475 +
476 +EAPI=6
477 +
478 +inherit eutils perl-module
479 +
480 +MY_PV=${PV//\./-}
481 +
482 +DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
483 +HOMEPAGE="http://repeatmasker.org/"
484 +SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
485 +
486 +LICENSE="OSL-2.1"
487 +SLOT="0"
488 +KEYWORDS="~amd64 ~x86"
489 +IUSE="phrap rmblast hmmer wublast"
490 +# RepeatMaskerConfig.pm says:
491 +# Default search tool can be one of "hmmer", "crossmatch", "wublast", "decypher" or "ncbi".
492 +# Upstream uses "hmmer" as the default.
493 +
494 +DEPEND=">=dev-lang/perl-5.8"
495 +RDEPEND="
496 + >sci-biology/repeatmasker-libraries-20160829
497 + dev-perl/Text-Soundex
498 + phrap? ( !hmmer? ( !rmblast? ( !wublast? ( sci-biology/phrap ) ) ) )
499 + rmblast? ( !hmmer? ( !phrap? ( !wublast? ( sci-biology/rmblast ) ) ) )
500 + hmmer? ( !phrap? ( !wublast? ( !rmblast? ( sci-biology/hmmer ) ) ) )
501 + !sci-biology/trf
502 + >=sci-biology/trf-bin-4.0.4
503 +"
504 +# wublast? ( sci-biology/wublast || sci-biology/abblast )
505 +# ncbi? ( would that be ncbi-tools++ or ncbi-blast+ ) ???
506 +
507 +S="${WORKDIR}/RepeatMasker"
508 +
509 +PATCHES=( "${FILESDIR}"/"${P}"__configure.patch )
510 +
511 +src_configure() {
512 + sed \
513 + -e "s#/usr/bin/which#which#g" \
514 + -e "s#/usr/bin/perl#perl#g" \
515 + -i "${S}"/configure || die
516 + perl_set_version
517 + insinto ${VENDOR_LIB}
518 + sed -e "s#/usr/perl5/lib/#${VENDOR_LIB}/#g" -i "${S}"/configure || die
519 + # The below is wrong as it causes:
520 + # Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
521 + # -- Building monolithic RM database...sh: /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/image///usr/share/repeatmasker/Libraries/RepeatMasker.lib: No such file or directory
522 + # -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
523 + sed -i -e 's/system( "clear" );//' "${S}/configure" || die
524 + mkdir -p "${ED}"/usr/share/repeatmasker/Libraries/ || die
525 + #
526 + # the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
527 + # item does not get installed
528 + echo ">blah\natgc" > "${ED}"/usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
529 + # below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
530 + #
531 + local my_crossmatch=`which cross_match 2>/dev/null`
532 + local my_rmblastn=`which rmblastn 2>/dev/null`
533 + local my_hmmer=`which nhmmscan 2>/dev/null`
534 + local my_wublast=`which xdformat 2>/dev/null` # actually configure looks for 'setdb' executable
535 + # configure is inconsistent at first, we must pass even a wrong path for cross_match, rmblastn, hmmer otherwise it enters a loop
536 + # but, for wublast we must pass in an empty string otherwise it looks for 'setdb' executable in the non-existing directory and enters a loop
537 + if [ "$my_crossmatch" != '.' ]; then local crossmatchdir=`dirname "$my_crossmatch"` else local crossmatchdir="${EPREFIX}/usr/bin"; fi
538 + if [ "$my_rmblastn" != '.' ]; then local rmblastdir=`dirname "$my_rmblastn"` else local rmblastdir="${EPREFIX}/usr/bin"; fi
539 + if [ "$my_hmmer" != '.' ]; then local hmmerdir=`dirname "$my_hmmer"` else local hmmerdir="${EPREFIX}/usr/bin"; fi
540 + if [ "$my_wublast" != '.' ]; then local wublastdir=`dirname "$my_wublast"` else local wublastdir=""; fi
541 + echo "crossmatchdir=${crossmatchdir} rmblastdir=${rmblastdir} wublastdir=${wublastdir} hmmerdir=${hmmerdir}"
542 + # pick the preferred-one
543 + local CONF=( x env ${S} "${EPREFIX}"/opt/bin )
544 + if use phrap; then
545 + CONF+=( 1 "${crossmatchdir}" Y )
546 + else
547 + CONF+=( 1 "${crossmatchdir}" N )
548 + fi
549 + if use rmblast; then
550 + CONF+=( 2 "${rmblastdir}" Y )
551 + else
552 + CONF+=( 2 "${rmblastdir}" N )
553 + fi
554 + if use wublast; then
555 + # no ebuild available but pick anything from PATH
556 + CONF+=( 3 "${wublastdir}" Y )
557 + else
558 + CONF+=( 3 "${wublastdir}" N )
559 + fi
560 + if use hmmer; then
561 + CONF+=( 4 "${hmmerdir}" Y )
562 + else
563 + CONF+=( 4 "${hmmerdir}" N )
564 + fi
565 + CONF+=( 5 )
566 + echo "Will feed configure with: ${CONF[@]}"
567 + printf '%s\n' "${CONF[@]}" | "${S}/configure" || die "configure failed"
568 +
569 + sed -i -e "/use lib/s|\"\$FindBin::RealBin|\"${EPREFIX}/usr/share/${PN}/lib|" \
570 + -e "/use lib/s|\$FindBin::RealBin|\"${EPREFIX}/usr/share/${PN}/lib\"|" \
571 + -e "/\$REPEATMASKER_DIR/ s|\$FindBin::RealBin|${EPREFIX}/usr/share/${PN}|" \
572 + "${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
573 +}
574 +
575 +src_install() {
576 + exeinto /usr/share/${PN}
577 + for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
578 + doexe $i
579 + dosym ../share/${PN}/$i /usr/bin/$i
580 + done
581 +
582 + perl_set_version
583 + insinto "${VENDOR_LIB}"
584 + doins "${S}"/*.pm "${S}"/Libraries/*.pm
585 + # zap the supposedly misplaced RepeatAnnotationData.pm file
586 + rm -r "${S}"/Libraries/*.pm || die
587 +
588 + # if sci-biology/repeatmasker-libraries is installed prevent file collision
589 + # and do NOT install Libraries/RepeatMaskerLib.embl file which contains
590 + # a limited version of the file: 20110419-min
591 + rm -r Libraries/RepeatMaskerLib.embl || die
592 + insinto /usr/share/${PN}
593 + doins -r util Matrices Libraries *.help
594 + keepdir /usr/share/${PN}/Libraries
595 +
596 + dodoc README.md INSTALL *.help
597 +}
598 +
599 +pkg_postinst(){
600 + cd "${S}" || die
601 + einfo "RepeatMasker provides bundled human repeats database from"
602 + einfo " Dfam-1.0 database www.dfam.org"
603 + einfo "You can configure which search search engine is to be used and"
604 + einfo "Current default search engine defined in"
605 + einfo " ${EPREFIX}${VENDOR_LIB}/RepeatMaskerConfig.pm is:"
606 + einfo `grep 'DEFAULT_SEARCH_ENGINE =' RepeatMaskerConfig.pm`
607 + einfo "\nSupported search engines are:"
608 + optfeature "cross_match" sci-biology/phrap
609 + optfeature "rmblast" sci-biology/rmblast
610 + optfeature "nhmmer" \>=sci-biology/hmmer-3.1
611 + einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
612 + einfo "\nThe repeatmasker-libraries-20160829 (RepBase 21.12) was the last"
613 + einfo "version compatible with <repeatmasker-4.0.7"
614 +}