diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-perl/Bio-SamTools/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-perl/Bio-SamTools/files')
-rw-r--r-- | dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch | 59 | ||||
-rw-r--r-- | dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch | 88 |
2 files changed, 147 insertions, 0 deletions
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 + diff --git a/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch new file mode 100644 index 000000000000..8464f06a2f01 --- /dev/null +++ b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch @@ -0,0 +1,88 @@ +From 74b38ded97f7a1940c3a37b9aec9b3287a3a78bd Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentfredric@gmail.com> +Date: Sun, 10 Sep 2017 13:33:32 +1200 +Subject: Fix linking/compiling for bam-0.1-legacy + +--- + Build.PL | 6 +++--- + c_bin/bam2bedgraph.c | 2 +- + c_bin/makefile | 6 +++--- + lib/Bio/DB/Sam.xs | 6 +++--- + 4 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/Build.PL b/Build.PL +index 685815f..2611759 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -4,8 +4,8 @@ use strict; + use Module::Build; + use Module::Load::Conditional qw(can_load); + +-my $HeaderFile = "bam.h"; +-my $LibFile = "libbam.a"; ++my $HeaderFile = "bam-0.1-legacy/bam.h"; ++my $LibFile = "libbam-0.1-legacy.so"; + my $ReadLine; + + my ($sam_include,$sam_lib) = find_sam(); # may exit with error here +@@ -39,7 +39,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-0.1-legacy','-lpthread','-lz'], + + extra_compiler_flags=>[ + +diff --git a/c_bin/bam2bedgraph.c b/c_bin/bam2bedgraph.c +index 298e9a8..91218fa 100644 +--- a/c_bin/bam2bedgraph.c ++++ b/c_bin/bam2bedgraph.c +@@ -1,5 +1,5 @@ + #include <stdio.h> +-#include "sam.h" ++#include "bam-0.1-legacy/sam.h" + + typedef struct { + uint32_t ltid; +diff --git a/c_bin/makefile b/c_bin/makefile +index 9aef917..0abbb4c 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-0.1-legacy -lpthread -lm -lz + + clean: + rm -f *.o $(PROG) +diff --git a/lib/Bio/DB/Sam.xs b/lib/Bio/DB/Sam.xs +index 023f655..86410fb 100644 +--- a/lib/Bio/DB/Sam.xs ++++ b/lib/Bio/DB/Sam.xs +@@ -25,9 +25,9 @@ + + #include <unistd.h> + #include <math.h> +-#include "bam.h" +-#include "khash.h" +-#include "faidx.h" ++#include "bam-0.1-legacy/bam.h" ++#include "bam-0.1-legacy/khash.h" ++#include "bam-0.1-legacy/faidx.h" + + /* stolen from bam_aux.c */ + #define MAX_REGION 1<<29 +-- +2.14.1 + |