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: Tue, 24 Nov 2015 19:28:13
Message-Id: 1448393264.62c5ffc75e7cea39f2488c7567ea47808c57b8f8.mmokrejs@gentoo
1 commit: 62c5ffc75e7cea39f2488c7567ea47808c57b8f8
2 Author: Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
3 AuthorDate: Tue Nov 24 19:27:44 2015 +0000
4 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
5 CommitDate: Tue Nov 24 19:27:44 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=62c5ffc7
7
8 sci-biology/repeatmasker: heavily patch configure to return error codes and die upon error; add more DEPENDencies
9
10 Package-Manager: portage-2.2.18
11
12 sci-biology/repeatmasker/ChangeLog | 10 ++
13 sci-biology/repeatmasker/files/configure.patch | 122 +++++++++++++++++++++
14 sci-biology/repeatmasker/metadata.xml | 5 +
15 .../repeatmasker/repeatmasker-4.0.1-r1.ebuild | 100 +++++++++++++++++
16 4 files changed, 237 insertions(+)
17
18 diff --git a/sci-biology/repeatmasker/ChangeLog b/sci-biology/repeatmasker/ChangeLog
19 new file mode 100644
20 index 0000000..67ed4e6
21 --- /dev/null
22 +++ b/sci-biology/repeatmasker/ChangeLog
23 @@ -0,0 +1,10 @@
24 +# ChangeLog for sci-biology/repeatmasker
25 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
26 +# $Id$
27 +
28 +*repeatmasker-4.0.1-r1 (24 Nov 2015)
29 +
30 + 24 Nov 2015; Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
31 + +files/configure.patch, +metadata.xml, +repeatmasker-4.0.1-r1.ebuild:
32 + sci-biology/repeatmasker: heavily patch configure to return error codes and
33 + die upon error; add more DEPENDencies
34
35 diff --git a/sci-biology/repeatmasker/files/configure.patch b/sci-biology/repeatmasker/files/configure.patch
36 new file mode 100644
37 index 0000000..0b8a75c
38 --- /dev/null
39 +++ b/sci-biology/repeatmasker/files/configure.patch
40 @@ -0,0 +1,122 @@
41 +--- configure.ori 2013-02-21 02:32:30.000000000 +0100
42 ++++ configure 2015-11-24 19:54:50.630202150 +0100
43 +@@ -253,17 +253,16 @@
44 + close INVERS;
45 + }
46 + else {
47 +- print "\nYour RepeatMasker installation is missing a library file.\n"
48 ++ die "\nYour RepeatMasker installation is missing a library file.\n"
49 + . "RepeatMasker requires a minimal set of library sequences to run\n"
50 + . "properly. Please check that all files were extracted from the\n"
51 + . "distribution before re-running the configure program.\n\n";
52 +- exit;
53 + }
54 +
55 + print "\n -- Building monolithic RM database...";
56 + system(
57 + "$rmLocation/util/buildRMLibFromEMBL.pl $rmLocation/Libraries/RepeatMaskerLib.embl > $rmLocation/Libraries/RepeatMasker.lib 2>/dev/null"
58 +-);
59 ++) and die "$rmLocation/util/buildRMLibFromEMBL.pl $rmLocation/Libraries/RepeatMaskerLib.embl command filed with: $!";
60 +
61 + ##
62 + ## TRF location
63 +@@ -475,7 +474,7 @@
64 + }
65 + close IN;
66 + close OUT;
67 +- system( "mv $configFile.tmp $configFile" );
68 ++ system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
69 + }
70 +
71 + }
72 +@@ -607,15 +606,15 @@
73 + }
74 + close IN;
75 + close OUT;
76 +- system( "mv $configFile.tmp $configFile" );
77 ++ system( "mv $configFile.tmp $configFile" ) and die "Faled to mv $configFile.tmp $configFile: $!";
78 +
79 + # Freeze RM and RMPep libraries for RepeatModeler use among others
80 + my $rmLocation = "$FindBin::Bin";
81 + print "Building RMBlast frozen libraries..\n";
82 + system( "$pgLocation/makeblastdb -dbtype nucl -in "
83 +- . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" );
84 ++ . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" ) and die "$pgLocation/makeblastdb -dbtype nucl -in $rmLocation/Libraries/RepeatMasker.lib failed: $!";
85 + system( "$pgLocation/makeblastdb -dbtype prot -in "
86 +- . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" );
87 ++ . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" ) and die "$pgLocation/makeblastdb -dbtype prot -in $rmLocation/Libraries/RepeatPeps.lib failed with: $!";
88 +
89 + my $pgDefault = &promptScreen(
90 + "",
91 +@@ -682,15 +681,15 @@
92 + }
93 + close IN;
94 + close OUT;
95 +- system( "mv $configFile.tmp $configFile" );
96 ++ system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
97 +
98 + # Freeze RM and RMPep libraries
99 + my $rmLocation = "$FindBin::Bin";
100 + print "Building WUBlast/ABBlast frozen libraries..\n";
101 + system( "$wuLocation/xdformat -n -I "
102 +- . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" );
103 ++ . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" ) and die "$wuLocation/xdformat -n -I $rmLocation/Libraries/RepeatMasker.lib failed with: $!";
104 + system( "$wuLocation/xdformat -p -I "
105 +- . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" );
106 ++ . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" ) and die "$wuLocation/xdformat -p -I $rmLocation/Libraries/RepeatPeps.lib failed with: $!";
107 +
108 + my $wuDefault = &promptScreen(
109 + "",
110 +@@ -748,7 +747,7 @@
111 + }
112 + }
113 + else {
114 +- print "ERROR: Could not find nhmmer program in this directory!\n";
115 ++ print "ERROR: Could not find nhmmer program in '$location' directory!\n";
116 + }
117 + if ( $goodParam == 0 ) {
118 + print "<PRESS ENTER TO CONTINUE>\n";
119 +@@ -773,7 +772,7 @@
120 + }
121 + close IN;
122 + close OUT;
123 +- system( "mv $configFile.tmp $configFile" );
124 ++ system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
125 +
126 + my $default = &promptScreen(
127 + "",
128 +@@ -827,7 +826,7 @@
129 + }
130 + close IN;
131 + close OUT;
132 +- system( "mv $configFile.tmp $configFile" );
133 ++ system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
134 +
135 + my $deDefault = &promptScreen(
136 + "",
137 +@@ -863,9 +862,6 @@
138 +
139 + my $answer = undef;
140 +
141 +- # Clear the screen
142 +- system( "clear" );
143 +-
144 + print "\n\n\n";
145 + print $screenText;
146 + my $numLines = ( $screenText =~ s/(\n)/$1/g );
147 +--- configure.ori 2015-11-24 20:10:58.640204679 +0100
148 ++++ configure 2015-11-24 20:11:00.970204685 +0100
149 +@@ -728,11 +728,12 @@
150 + # HMMER 3.0dev (March 2010); http://hmmer.org/
151 + # HMMER 3.1dev_0.33 (July 2012); http://hmmer.org
152 + # HMMER hmmer3.1-snap20120830 (August 2012); http://hmmer.org/
153 ++ # HMMER 3.1b2 (February 2015); http://hmmer.org/
154 + while ( $result =~ /([^\n\r]*)[\n\r]/ig ) {
155 + my $line = $1;
156 +
157 + if ( $line =~ /^#\s+HMMER\s+(\d+\.\d+)((dev)?(_\d+\.\d+)?\s+\(.*\)).*/
158 +- || $line =~ /^#\s+HMMER\s+hmmer(\d+\.\d+)-snap.*/ )
159 ++ || $line =~ /^#\s+HMMER\s+hmmer(\d+\.\d+)-snap.*/ || $line =~ /^#\s+HMMER\s+(\d+\.\d+).*/)
160 + {
161 + if ( $1 >= 3.1 ) {
162 + $goodParam = 1;
163
164 diff --git a/sci-biology/repeatmasker/metadata.xml b/sci-biology/repeatmasker/metadata.xml
165 new file mode 100644
166 index 0000000..f17a827
167 --- /dev/null
168 +++ b/sci-biology/repeatmasker/metadata.xml
169 @@ -0,0 +1,5 @@
170 +<?xml version="1.0" encoding="UTF-8"?>
171 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
172 +<pkgmetadata>
173 + <herd>sci-biology</herd>
174 +</pkgmetadata>
175
176 diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild
177 new file mode 100644
178 index 0000000..9507e23
179 --- /dev/null
180 +++ b/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild
181 @@ -0,0 +1,100 @@
182 +# Copyright 1999-2015 Gentoo Foundation
183 +# Distributed under the terms of the GNU General Public License v2
184 +# $Id$
185 +
186 +EAPI=5
187 +
188 +inherit eutils
189 +
190 +MY_PV=${PV//\./-}
191 +
192 +DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
193 +HOMEPAGE="http://repeatmasker.org/"
194 +SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
195 +
196 +LICENSE="OSL-2.1"
197 +SLOT="0"
198 +KEYWORDS="~amd64 ~x86"
199 +IUSE=""
200 +
201 +DEPEND=">=dev-lang/perl-5.8"
202 +RDEPEND="
203 + sci-biology/rmblast
204 + >=sci-biology/trf-4.0.4
205 + sci-biology/repeatmasker-libraries
206 + sci-biology/phrap"
207 +# dev-perl/Text-Soundex see bug #566740
208 +
209 +S="${WORKDIR}/RepeatMasker"
210 +
211 +src_prepare(){
212 + epatch "${FILESDIR}"/configure.patch
213 +}
214 +
215 +src_configure() {
216 + # The below is wrong as it causes:
217 + # Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
218 + # -- 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
219 + # -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
220 + sed -i -e 's/system( "clear" );//' "${S}/configure" || die
221 + mkdir -p ${D}//usr/share/repeatmasker/Libraries/ || die
222 + #
223 + # the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
224 + # item does not get installed
225 + echo ">blah\natgc" > ${D}//usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
226 + # below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
227 + echo "
228 +env
229 +${S}
230 +/opt/bin
231 +1
232 +/usr/bin
233 +Y
234 +2
235 +/usr/bin
236 +Y
237 +4
238 +/usr/bin
239 +Y
240 +5" | "${S}/configure" || die "configure failed"
241 + sed -i -e 's|use lib $FindBin::RealBin;|use lib "/usr/share/'${PN}'/lib";|' \
242 + -e 's|".*\(taxonomy.dat\)"|"/usr/share/'${PN}'/\1"|' \
243 + -e '/$REPEATMASKER_DIR/ s|$FindBin::RealBin|/usr/share/'${PN}'|' \
244 + "${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
245 +}
246 +# configure failed to 'cp RepeatMaskerConfig.tmpl RepeatMaskerConfig.pm'
247 +# replace also /u1/local/bin/perl with proper Gentoo PATH
248 +
249 +src_install() {
250 + exeinto /usr/share/${PN}
251 + for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
252 + doexe $i || die
253 + dosym /usr/share/${PN}/$i /usr/bin/$i || die
254 + done
255 +
256 + dodir /usr/share/${PN}/lib
257 + insinto /usr/share/${PN}/lib
258 + doins "${S}"/*.pm || die
259 +
260 + # if sci-biology/repeatmasker-libraries is installed prevent file collision
261 + # and do NOT install Libraries/RepeatMaskerLib.embl file which contains
262 + # a limited version of the file: 20110419-min
263 + rm -rf Libraries/RepeatMaskerLib.embl
264 + insinto /usr/share/${PN}
265 + doins -r util Matrices Libraries taxonomy.dat *.help || die
266 + keepdir /usr/share/${PN}/Libraries
267 +
268 + dodoc README INSTALL *.help
269 +}
270 +
271 +pkg_postinst(){
272 + einfo "RepeatMasker provides bundled human repeats database"
273 + einfo "from Dfam-1.0 database www.dfam.org"
274 + einfo "You can configure which search search engine is to be used and"
275 + einfo "PATHs to the search binaries in RepeatMaskerConfig.pm"
276 + einfo "Supported search engines are:"
277 + einfo "cross_match from sci-biology/phrap"
278 + einfo "rmblast from sci-biology/rmblast"
279 + einfo "nhmmer from >=sci-biology/hmmer-3.1"
280 + einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
281 +}