public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Martin Mokrejs" <mmokrejs@fold.natur.cuni.cz>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/repeatmasker/, sci-biology/repeatmasker/files/
Date: Tue, 24 Nov 2015 19:28:05 +0000 (UTC)	[thread overview]
Message-ID: <1448393264.62c5ffc75e7cea39f2488c7567ea47808c57b8f8.mmokrejs@gentoo> (raw)

commit:     62c5ffc75e7cea39f2488c7567ea47808c57b8f8
Author:     Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Tue Nov 24 19:27:44 2015 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Tue Nov 24 19:27:44 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=62c5ffc7

sci-biology/repeatmasker: heavily patch configure to return error codes and die upon error; add more DEPENDencies

Package-Manager: portage-2.2.18

 sci-biology/repeatmasker/ChangeLog                 |  10 ++
 sci-biology/repeatmasker/files/configure.patch     | 122 +++++++++++++++++++++
 sci-biology/repeatmasker/metadata.xml              |   5 +
 .../repeatmasker/repeatmasker-4.0.1-r1.ebuild      | 100 +++++++++++++++++
 4 files changed, 237 insertions(+)

diff --git a/sci-biology/repeatmasker/ChangeLog b/sci-biology/repeatmasker/ChangeLog
new file mode 100644
index 0000000..67ed4e6
--- /dev/null
+++ b/sci-biology/repeatmasker/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-biology/repeatmasker
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Id$
+
+*repeatmasker-4.0.1-r1 (24 Nov 2015)
+
+  24 Nov 2015; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  +files/configure.patch, +metadata.xml, +repeatmasker-4.0.1-r1.ebuild:
+  sci-biology/repeatmasker: heavily patch configure to return error codes and
+  die upon error; add more DEPENDencies

diff --git a/sci-biology/repeatmasker/files/configure.patch b/sci-biology/repeatmasker/files/configure.patch
new file mode 100644
index 0000000..0b8a75c
--- /dev/null
+++ b/sci-biology/repeatmasker/files/configure.patch
@@ -0,0 +1,122 @@
+--- configure.ori	2013-02-21 02:32:30.000000000 +0100
++++ configure	2015-11-24 19:54:50.630202150 +0100
+@@ -253,17 +253,16 @@
+   close INVERS;
+ }
+ else {
+-  print "\nYour RepeatMasker installation is missing a library file.\n"
++  die "\nYour RepeatMasker installation is missing a library file.\n"
+       . "RepeatMasker requires a minimal set of library sequences to run\n"
+       . "properly.  Please check that all files were extracted from the\n"
+       . "distribution before re-running the configure program.\n\n";
+-  exit;
+ }
+ 
+ print "\n  -- Building monolithic RM database...";
+ system(
+ "$rmLocation/util/buildRMLibFromEMBL.pl $rmLocation/Libraries/RepeatMaskerLib.embl > $rmLocation/Libraries/RepeatMasker.lib 2>/dev/null"
+-);
++) and die "$rmLocation/util/buildRMLibFromEMBL.pl $rmLocation/Libraries/RepeatMaskerLib.embl command filed with: $!";
+ 
+ ##
+ ## TRF location
+@@ -475,7 +474,7 @@
+     }
+     close IN;
+     close OUT;
+-    system( "mv $configFile.tmp $configFile" );
++    system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
+   }
+ 
+ }
+@@ -607,15 +606,15 @@
+   }
+   close IN;
+   close OUT;
+-  system( "mv $configFile.tmp $configFile" );
++  system( "mv $configFile.tmp $configFile" ) and die "Faled to mv $configFile.tmp $configFile: $!";
+ 
+   # Freeze RM and RMPep libraries for RepeatModeler use among others
+   my $rmLocation = "$FindBin::Bin";
+   print "Building RMBlast frozen libraries..\n";
+   system(   "$pgLocation/makeblastdb -dbtype nucl -in "
+-          . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" );
++          . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" ) and die "$pgLocation/makeblastdb -dbtype nucl -in $rmLocation/Libraries/RepeatMasker.lib failed: $!";
+   system(   "$pgLocation/makeblastdb -dbtype prot -in "
+-          . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" );
++          . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" ) and die "$pgLocation/makeblastdb -dbtype prot -in $rmLocation/Libraries/RepeatPeps.lib failed with: $!";
+ 
+   my $pgDefault = &promptScreen(
+     "",
+@@ -682,15 +681,15 @@
+   }
+   close IN;
+   close OUT;
+-  system( "mv $configFile.tmp $configFile" );
++  system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
+ 
+   # Freeze RM and RMPep libraries
+   my $rmLocation = "$FindBin::Bin";
+   print "Building WUBlast/ABBlast frozen libraries..\n";
+   system(   "$wuLocation/xdformat -n -I "
+-          . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" );
++          . "$rmLocation/Libraries/RepeatMasker.lib > /dev/null 2>&1" ) and die "$wuLocation/xdformat -n -I $rmLocation/Libraries/RepeatMasker.lib failed with: $!";
+   system(   "$wuLocation/xdformat -p -I "
+-          . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" );
++          . "$rmLocation/Libraries/RepeatPeps.lib > /dev/null 2>&1" ) and die "$wuLocation/xdformat -p -I $rmLocation/Libraries/RepeatPeps.lib failed with: $!";
+ 
+   my $wuDefault = &promptScreen(
+     "",
+@@ -748,7 +747,7 @@
+         }
+       }
+       else {
+-        print "ERROR: Could not find nhmmer program in this directory!\n";
++        print "ERROR: Could not find nhmmer program in '$location' directory!\n";
+       }
+       if ( $goodParam == 0 ) {
+         print "<PRESS ENTER TO CONTINUE>\n";
+@@ -773,7 +772,7 @@
+   }
+   close IN;
+   close OUT;
+-  system( "mv $configFile.tmp $configFile" );
++  system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
+ 
+   my $default = &promptScreen(
+     "",
+@@ -827,7 +826,7 @@
+   }
+   close IN;
+   close OUT;
+-  system( "mv $configFile.tmp $configFile" );
++  system( "mv $configFile.tmp $configFile" ) and die "mv $configFile.tmp $configFile failed with: $!";
+ 
+   my $deDefault = &promptScreen(
+     "",
+@@ -863,9 +862,6 @@
+ 
+   my $answer = undef;
+ 
+-  # Clear the screen
+-  system( "clear" );
+-
+   print "\n\n\n";
+   print $screenText;
+   my $numLines = ( $screenText =~ s/(\n)/$1/g );
+--- configure.ori	2015-11-24 20:10:58.640204679 +0100
++++ configure	2015-11-24 20:11:00.970204685 +0100
+@@ -728,11 +728,12 @@
+         # HMMER 3.0dev (March 2010); http://hmmer.org/
+         # HMMER 3.1dev_0.33 (July 2012); http://hmmer.org
+         # HMMER hmmer3.1-snap20120830 (August 2012); http://hmmer.org/
++	# HMMER 3.1b2 (February 2015); http://hmmer.org/
+         while ( $result =~ /([^\n\r]*)[\n\r]/ig ) {
+           my $line = $1;
+ 
+           if ( $line =~ /^#\s+HMMER\s+(\d+\.\d+)((dev)?(_\d+\.\d+)?\s+\(.*\)).*/
+-               || $line =~ /^#\s+HMMER\s+hmmer(\d+\.\d+)-snap.*/ )
++               || $line =~ /^#\s+HMMER\s+hmmer(\d+\.\d+)-snap.*/ || $line =~ /^#\s+HMMER\s+(\d+\.\d+).*/)
+           {
+             if ( $1 >= 3.1 ) {
+               $goodParam = 1;

diff --git a/sci-biology/repeatmasker/metadata.xml b/sci-biology/repeatmasker/metadata.xml
new file mode 100644
index 0000000..f17a827
--- /dev/null
+++ b/sci-biology/repeatmasker/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>sci-biology</herd>
+</pkgmetadata>

diff --git a/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild b/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild
new file mode 100644
index 0000000..9507e23
--- /dev/null
+++ b/sci-biology/repeatmasker/repeatmasker-4.0.1-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+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="
+	sci-biology/rmblast
+	>=sci-biology/trf-4.0.4
+	sci-biology/repeatmasker-libraries
+	sci-biology/phrap"
+# dev-perl/Text-Soundex see bug #566740
+
+S="${WORKDIR}/RepeatMasker"
+
+src_prepare(){
+	epatch "${FILESDIR}"/configure.patch
+}
+
+src_configure() {
+	# 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 ${D}//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" > ${D}//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}
+/opt/bin
+1
+/usr/bin
+Y
+2
+/usr/bin
+Y
+4
+/usr/bin
+Y
+5" | "${S}/configure" || die "configure failed"
+	sed -i -e 's|use lib $FindBin::RealBin;|use lib "/usr/share/'${PN}'/lib";|' \
+		-e 's|".*\(taxonomy.dat\)"|"/usr/share/'${PN}'/\1"|' \
+		-e '/$REPEATMASKER_DIR/ s|$FindBin::RealBin|/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 || die
+		dosym /usr/share/${PN}/$i /usr/bin/$i || die
+	done
+
+	dodir /usr/share/${PN}/lib
+	insinto /usr/share/${PN}/lib
+	doins "${S}"/*.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 -rf Libraries/RepeatMaskerLib.embl
+	insinto /usr/share/${PN}
+	doins -r util Matrices Libraries taxonomy.dat *.help || die
+	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 in RepeatMaskerConfig.pm"
+	einfo "Supported search engines are:"
+	einfo "cross_match from sci-biology/phrap"
+	einfo "rmblast from sci-biology/rmblast"
+	einfo "nhmmer from >=sci-biology/hmmer-3.1"
+	einfo "abblast/wublast from http://blast.advbiocomp.com/licensing"
+}


             reply	other threads:[~2015-11-24 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 19:28 Martin Mokrejs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-29 16:24 [gentoo-commits] proj/sci:master commit in: sci-biology/repeatmasker/, sci-biology/repeatmasker/files/ Martin Mokrejs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448393264.62c5ffc75e7cea39f2488c7567ea47808c57b8f8.mmokrejs@gentoo \
    --to=mmokrejs@fold.natur.cuni.cz \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox