blob: d41784eb7a83b9c5d9239bba32bc332dfb37c9aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils perl-module
MY_PV=${PV//\./-}
DESCRIPTION="Screen DNA sequences for interspersed repeats and low complexity DNA"
HOMEPAGE="http://repeatmasker.org/"
SRC_URI="http://www.repeatmasker.org/RepeatMasker-open-${MY_PV}.tar.gz"
LICENSE="OSL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=">=dev-lang/perl-5.8"
RDEPEND="
dev-perl/Text-Soundex
sci-biology/phrap
<=sci-biology/repeatmasker-libraries-20160829
sci-biology/rmblast
!sci-biology/trf
>=sci-biology/trf-bin-4.0.4
"
S="${WORKDIR}/RepeatMasker"
PATCHES=( "${FILESDIR}"/"${P}"__configure.patch )
src_configure() {
sed \
-e "s#/usr/bin/which#which#g" \
-e "s#/usr/bin/perl#perl#g" \
-i "${S}"/configure || die
perl_set_version
insinto ${VENDOR_LIB}
sed -e "s#/usr/perl5/lib/#${VENDOR_LIB}/#g" -i "${S}"/configure || die
# The below is wrong as it causes:
# Enter path [ /var/tmp/portage/sci-biology/repeatmasker-4.0.1-r1/work/RepeatMasker ]:
# -- 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
# -e 's|> \($rmLocation/Libraries/RepeatMasker.lib\)|> '${D}'/\1|'
sed -i -e 's/system( "clear" );//' "${S}/configure" || die
mkdir -p "${ED}"/usr/share/repeatmasker/Libraries/ || die
#
# the below files is actually overwritten by buildRMLibFromEMBL.pl so the 'blah'
# item does not get installed
echo ">blah\natgc" > "${ED}"/usr/share/repeatmasker/Libraries/RepeatMasker.lib || die
# below try to define paths to trf, cross_match, rmblast and nhmmer as search tools
echo "
env
${S}
${EPREFIX}/opt/trf/bin
1
${EPREFIX}/usr/bin
Y
2
${EPREFIX}/usr/bin
Y
4
${EPREFIX}/usr/bin
Y
5" | "${S}"/configure || die "configure failed"
sed -i -e "s|use lib $FindBin::RealBin;|use lib ${EPREFIX}/usr/share/${PN}/lib;|" \
-e "s|.*\(taxonomy.dat\)|${EPREFIX}/usr/share/${PN}/Libraries/\1|" \
-e "/$REPEATMASKER_DIR/ s|$FindBin::RealBin|${EPREFIX}/usr/share/${PN}|" \
"${S}"/{DateRepeats,ProcessRepeats,RepeatMasker,DupMasker,RepeatProteinMask,RepeatMaskerConfig.pm,Taxonomy.pm} || die
}
# configure failed to 'cp RepeatMaskerConfig.tmpl RepeatMaskerConfig.pm'
# replace also /u1/local/bin/perl with proper Gentoo PATH
src_install() {
exeinto /usr/share/${PN}
for i in DateRepeats ProcessRepeats RepeatMasker DupMasker RepeatProteinMask; do
doexe $i
dosym ../share/${PN}/$i /usr/bin/$i
done
perl_set_version
insinto "${VENDOR_LIB}"
doins "${S}"/*.pm "${S}"/Libraries/*.pm
# zap the supposedly misplaced RepeatAnnotationData.pm file
rm -r "${S}"/Libraries/*.pm || die
# if sci-biology/repeatmasker-libraries is installed prevent file collision
# and do NOT install Libraries/RepeatMaskerLib.embl file which contains
# a limited version of the file: 20110419-min
rm -r Libraries/RepeatMaskerLib.embl || die
insinto /usr/share/${PN}
doins -r util Matrices Libraries *.help
keepdir /usr/share/${PN}/Libraries
dodoc README INSTALL *.help
}
pkg_postinst(){
einfo "RepeatMasker provides bundled human repeats database"
einfo "from Dfam-1.0 database www.dfam.org"
einfo "You can configure which search search engine is to be used and"
einfo "PATHs to the search binaries are defined in"
einfo "${EPREFIX}/usr/share/${PN}/lib/RepeatMaskerConfig.pm"
einfo "Supported search engines are:"
optfeature "cross_match" sci-biology/phrap
optfeature "rmblast" sci-biology/rmblast
optfeature "nhmmer" \>=sci-biology/hmmer-3.1
einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
einfo "repeatmasker-libraries-20160829 (RepBase 21.12) is the last"
einfo "version compatible with <repeatmasker-4.0.7"
}
|