commit:     8e3157e581a2503912b86bb5e48fb73e82c26cc9
Author:     Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Tue Mar 31 20:18:38 2015 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Tue Mar 31 20:18:38 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8e3157e5

sci-biology/amos: fix installation process and dependencies

Package-Manager: portage-2.2.18

 sci-biology/amos/ChangeLog                         |  9 ++-
 sci-biology/amos/amos-3.1.0-r2.ebuild              | 66 ++++++++++++++++++++++
 sci-biology/amos/amos-9999.ebuild                  | 27 ++++++++-
 sci-biology/amos/files/amos-3.1.0-gcc-4.7.patch    | 15 +++++
 ...mos-3.1.0-goBambus2.py-indent-and-cleanup.patch | 25 ++++++++
 5 files changed, 138 insertions(+), 4 deletions(-)

diff --git a/sci-biology/amos/ChangeLog b/sci-biology/amos/ChangeLog
index 7d1df6d..9bdce77 100644
--- a/sci-biology/amos/ChangeLog
+++ b/sci-biology/amos/ChangeLog
@@ -1,7 +1,14 @@
 # ChangeLog for sci-biology/amos
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*amos-3.1.0-r2 (31 Mar 2015)
+
+  31 Mar 2015; Martin Mokrejs <mmokr...@fold.natur.cuni.cz>
+  +amos-3.1.0-r2.ebuild, +files/amos-3.1.0-gcc-4.7.patch,
+  +files/amos-3.1.0-goBambus2.py-indent-and-cleanup.patch, amos-9999.ebuild:
+  sci-biology/amos: fix installation process and dependencies
+
   29 Dec 2013; Justin Lecher <j...@gentoo.org> -amos-3.1.0-r1.ebuild,
   amos-9999.ebuild, -files/amos-3.1.0-gcc-4.7.patch,
   -files/amos-3.1.0-goBambus2.py-indent-and-cleanup.patch,

diff --git a/sci-biology/amos/amos-3.1.0-r2.ebuild 
b/sci-biology/amos/amos-3.1.0-r2.ebuild
new file mode 100644
index 0000000..b814791
--- /dev/null
+++ b/sci-biology/amos/amos-3.1.0-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/amos/amos-3.1.0-r1.ebuild,v 1.1 
2013/12/29 00:24:16 jlec Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit eutils python-r1
+
+DESCRIPTION="A Modular, Open-Source whole genome assembler"
+HOMEPAGE="http://amos.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="qt4"
+
+DEPEND="
+       dev-libs/boost
+       qt4? ( dev-qt/qtcore:4 )"
+RDEPEND="${DEPEND}
+       dev-lang/perl
+       dev-perl/DBI
+       dev-perl/Statistics-Descriptive
+       sci-biology/blat
+       sci-biology/mummer"
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${P}-gcc-4.7.patch \
+               "${FILESDIR}"/${P}-goBambus2.py-indent-and-cleanup.patch
+}
+
+# amos-3.1.0-r2/work/amos-3.1.0/src/Bambus/Untangler/DotLib.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/Bambus/Untangler/AsmLib.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/FASTAreader.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/AmosFoundation.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/Foundation.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/AmosLib.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/FASTArecord.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/ParseFasta.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/xfig.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/FASTAwriter.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/FASTAgrammar.pm
+# amos-3.1.0-r2/work/amos-3.1.0/src/PerlModules/FASTAiterator.pm
+
+#  --with-jellyfish        location of Jellyfish headers
+
+src_install() {
+       default
+       python_replicate_script "${ED}"/usr/bin/goBambus2
+       # bambus needs TIGR::FASTAreader.pm and others
+       # configure --libdir sadly copies both *.a files and *.pm into 
/usr/lib64/AMOS/ and /usr/lib64/TIGR/, work around it
+       mkdir -p "${D}"/usr/share/"${PN}"/perl/AMOS || die
+       mv "${D}"/usr/lib64/AMOS/*.pm "${D}"/usr/share/"${PN}"/perl/AMOS || die
+       mkdir -p "${D}"/usr/share/"${PN}"/perl/TIGR || die
+       mv "${D}"/usr/lib64/TIGR/*.pm "${D}"/usr/share/"${PN}"/perl/TIGR || die
+       echo "PERL5LIB=/usr/share/${PN}/perl" > "${S}/99${PN}"
+       doenvd "${S}/99${PN}" || die
+       # move also /usr/lib64/AMOS/AMOS.py to /usr/bin
+       mv "${D}"/usr/lib64/AMOS/*.py "${D}"/usr/bin || die
+}

diff --git a/sci-biology/amos/amos-9999.ebuild 
b/sci-biology/amos/amos-9999.ebuild
index baecc2f..610c3d6 100644
--- a/sci-biology/amos/amos-9999.ebuild
+++ b/sci-biology/amos/amos-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -16,11 +16,32 @@ 
EGIT_REPO_URI="git://amos.git.sourceforge.net/gitroot/amos/amos"
 LICENSE="Artistic"
 SLOT="0"
 KEYWORDS=""
-IUSE=""
+IUSE="mpi qt4"
 
 DEPEND="
+       mpi? ( virtual/mpi )
        dev-libs/boost
-       dev-qt/qtcore:4"
+       qt4? ( dev-qt/qtcore:4 )
+       sci-biology/blat
+       sci-biology/jellyfish"
 RDEPEND="${DEPEND}
        dev-perl/DBI
+       dev-perl/Statistics-Descriptive
        sci-biology/mummer"
+
+#  --with-jellyfish        location of Jellyfish headers
+
+src_install() {
+       default
+       python_replicate_script "${ED}"/usr/bin/goBambus2
+       # bambus needs TIGR::FASTAreader.pm and others
+       # configure --libdir sadly copies both *.a files and *.pm into 
/usr/lib64/AMOS/ and /usr/lib64/TIGR/, work around it
+       mkdir -p "${D}/usr/share/${PN}/perl/AMOS" || die
+       mv "${D}"/usr/lib64/AMOS/*.pm "${D}/usr/share/${PN}/perl/AMOS" || die
+       mkdir -p "${D}"/usr/share/"${PN}"/perl/TIGR || die
+       mv "${D}"/usr/lib64/TIGR/*.pm "${D}"/usr/share/"${PN}"/perl/TIGR || die
+       echo "PERL5LIB=/usr/share/${PN}/perl" > "${S}/99${PN}"
+       doenvd "${S}/99${PN}" || die
+       # move also /usr/lib64/AMOS/AMOS.py to /usr/bin
+       mv "${D}"/usr/lib64/AMOS/*.py "${D}"/usr/bin || die
+}

diff --git a/sci-biology/amos/files/amos-3.1.0-gcc-4.7.patch 
b/sci-biology/amos/files/amos-3.1.0-gcc-4.7.patch
new file mode 100644
index 0000000..de2a411
--- /dev/null
+++ b/sci-biology/amos/files/amos-3.1.0-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ src/Align/find-tandem.cc |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/Align/find-tandem.cc b/src/Align/find-tandem.cc
+index ddf1cab..a29e21e 100644
+--- a/src/Align/find-tandem.cc
++++ b/src/Align/find-tandem.cc
+@@ -7,6 +7,7 @@
+ #include <vector>
+ #include <ctime>
+ #include <sys/time.h>
++#include <unistd.h>
+ using namespace std;
+ 
+ const int OFFSET_TABLE_SIZE = 100;

diff --git 
a/sci-biology/amos/files/amos-3.1.0-goBambus2.py-indent-and-cleanup.patch 
b/sci-biology/amos/files/amos-3.1.0-goBambus2.py-indent-and-cleanup.patch
new file mode 100644
index 0000000..97a8f59
--- /dev/null
+++ b/sci-biology/amos/files/amos-3.1.0-goBambus2.py-indent-and-cleanup.patch
@@ -0,0 +1,25 @@
+--- amos-3.1.0/src/Pipeline/goBambus2.py.orig  2013-09-11 01:05:29.850090457 
+0200
++++ amos-3.1.0/src/Pipeline/goBambus2.py       2013-09-11 01:07:03.250090701 
+0200
+@@ -1,7 +1,7 @@
+ #pipeline script for assembly + Bambus 2
+ #contributed by Todd J Treangen
+ 
+-import string, sys, os, subprocess#, spincursor
++import sys, os, subprocess#, spincursor
+ 
+ RED =    "\033[0;31m"
+ GREEN =  "\033[0;32m"
+@@ -360,7 +360,7 @@
+                 print "\t\t%s...failed%s"%(RED,NONE)
+                 sys.exit(1)
+ 
+-       p = subprocess.Popen(AMOSDIR+"OutputResults -b %s -prefix %s 
%s"%(amosbank, prefix+".scaff.linear"), shell=True, stdin=subprocess.PIPE, 
stdout=vtext, stderr=logfile)
++        p = subprocess.Popen(AMOSDIR+"OutputResults -b %s -prefix %s 
%s"%(amosbank, prefix+".scaff.linear"), shell=True, stdin=subprocess.PIPE, 
stdout=vtext, stderr=logfile)
+ 
+         if xopt_dict["verbose"] == 1:
+             print "10) running OutputResults"
+@@ -388,4 +388,3 @@
+             else:
+                 print "\t\t%s...failed%s"%(RED,NONE)
+                 sys.exit(1)
+-)

Reply via email to