diff options
author | 2014-10-02 10:25:34 +0000 | |
---|---|---|
committer | 2014-10-02 10:25:34 +0000 | |
commit | f517b5a03d4813ae715d3d27ccaa3528ff1832a9 (patch) | |
tree | 3bbfdeed6fbfc0b61b3bfbcea286672cb2d9abb7 /dev-perl/Bio-SamTools | |
parent | Version bump (diff) | |
download | gentoo-2-f517b5a03d4813ae715d3d27ccaa3528ff1832a9.tar.gz gentoo-2-f517b5a03d4813ae715d3d27ccaa3528ff1832a9.tar.bz2 gentoo-2-f517b5a03d4813ae715d3d27ccaa3528ff1832a9.zip |
dev-perl/Bio-SamTools: Make it build with samtools-1, #523568
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'dev-perl/Bio-SamTools')
-rw-r--r-- | dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild | 19 | ||||
-rw-r--r-- | dev-perl/Bio-SamTools/ChangeLog | 6 | ||||
-rw-r--r-- | dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch | 59 |
3 files changed, 77 insertions, 7 deletions
diff --git a/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild index 4ea422c499a0..cde1aa75c77b 100644 --- a/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild +++ b/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild @@ -1,12 +1,13 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild,v 1.2 2014/09/24 07:52:53 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Bio-SamTools/Bio-SamTools-1.390.0-r1.ebuild,v 1.3 2014/10/02 10:25:34 jlec Exp $ EAPI=5 MODULE_AUTHOR=LDS MODULE_VERSION=1.39 -inherit perl-module + +inherit perl-module toolchain-funcs DESCRIPTION="Read SAM/BAM database files" @@ -16,8 +17,7 @@ IUSE="" RDEPEND=" sci-biology/bioperl - >=sci-biology/samtools-0.1.16 - <sci-biology/samtools-1 + >=sci-biology/samtools-1 " DEPEND="${RDEPEND} virtual/perl-ExtUtils-CBuilder @@ -26,7 +26,12 @@ DEPEND="${RDEPEND} SRC_TEST=do +PATCHES=( + "${FILESDIR}"/${P}-samtools-1.patch +) + src_prepare() { + find . -type f -exec chmod +w '{}' + || die sed \ -e 's|my $HeaderFile = "bam.h";|my $HeaderFile = "bam/bam.h";|' \ -e 's|my $LibFile = "libbam.a";|my $LibFile = "libbam.so";|' \ @@ -34,9 +39,11 @@ src_prepare() { sed \ -e 's|#include "bam.h"|#include "bam/bam.h"|' \ -e 's|#include "sam.h"|#include "bam/sam.h"|' \ - -e 's|#include "khash.h"|#include "bam/khash.h"|' \ - -e 's|#include "faidx.h"|#include "bam/faidx.h"|' \ + -e 's|#include "khash.h"|#include "htslib/khash.h"|' \ + -e 's|#include "faidx.h"|#include "htslib/faidx.h"|' \ -i lib/Bio/DB/Sam.xs c_bin/bam2bedgraph.c || die perl-module_src_prepare + + tc-export CC } diff --git a/dev-perl/Bio-SamTools/ChangeLog b/dev-perl/Bio-SamTools/ChangeLog index fdc3e45e8c3f..a2e48a0349cf 100644 --- a/dev-perl/Bio-SamTools/ChangeLog +++ b/dev-perl/Bio-SamTools/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-perl/Bio-SamTools # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/Bio-SamTools/ChangeLog,v 1.15 2014/09/24 07:52:53 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Bio-SamTools/ChangeLog,v 1.16 2014/10/02 10:25:34 jlec Exp $ + + 02 Oct 2014; Justin Lecher <jlec@gentoo.org> Bio-SamTools-1.390.0-r1.ebuild, + +files/Bio-SamTools-1.390.0-samtools-1.patch: + Make it build with samtools-1, #523568 24 Sep 2014; Justin Lecher <jlec@gentoo.org> -Bio-SamTools-1.330.0.ebuild, -Bio-SamTools-1.370.0-r1.ebuild, -Bio-SamTools-1.380.0.ebuild, diff --git a/dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch new file mode 100644 index 000000000000..8e7250c51736 --- /dev/null +++ b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch @@ -0,0 +1,59 @@ + Build.PL | 2 +- + c_bin/makefile | 6 +++--- + lib/Bio/DB/Sam.xs | 9 ++++++--- + 3 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/Build.PL b/Build.PL +index 1393e03..cf97ad5 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -38,7 +38,7 @@ my $build = $class->new( + dist_abstract => 'Perl interface to SamTools library for DNA sequencing', + license => 'perl', + include_dirs => [$sam_include], +- extra_linker_flags => ["-L$sam_lib",'-lbam','-lpthread','-lz'], ++ extra_linker_flags => ["-L$sam_lib",'-lbam','-lhts','-lpthread','-lz'], + + extra_compiler_flags=>[ + +diff --git a/c_bin/makefile b/c_bin/makefile +index 9aef917..96a30f2 100644 +--- a/c_bin/makefile ++++ b/c_bin/makefile +@@ -1,5 +1,5 @@ +-CC= gcc +-CFLAGS= -g -Wall -O2 -fPIC ++CC?= gcc ++CFLAGS?= -g -Wall -O2 -fPIC + DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 + INCLUDES= + LIBPATH= +@@ -14,7 +14,7 @@ PROG= bam2bedgraph + all:$(PROG) + + bam2bedgraph: bam2bedgraph.o +- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBPATH) -lbam -lpthread -lm -lz ++ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBPATH) -lbam -lhts -lpthread -lm -lz + + clean: + rm -f *.o $(PROG) +diff --git a/lib/Bio/DB/Sam.xs b/lib/Bio/DB/Sam.xs +index 5ca303b..7f92860 100644 +--- a/lib/Bio/DB/Sam.xs ++++ b/lib/Bio/DB/Sam.xs +@@ -571,9 +571,12 @@ bama_l_aux(b,...) + Bio::DB::Bam::Alignment b + PROTOTYPE: $;$ + CODE: +- if (items > 1) +- b->l_aux = SvIV(ST(1)); +- RETVAL=b->l_aux; ++ if (items > 1) { ++ RETVAL = SvIV(ST(1)); ++ } ++ else { ++ RETVAL=bam_get_l_aux(b); ++ } + OUTPUT: + RETVAL + |