summaryrefslogtreecommitdiff
path: root/dev-perl/Bio-SamTools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-perl/Bio-SamTools
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-perl/Bio-SamTools')
-rw-r--r--dev-perl/Bio-SamTools/Bio-SamTools-1.420.0.ebuild49
-rw-r--r--dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild33
-rw-r--r--dev-perl/Bio-SamTools/Manifest9
-rw-r--r--dev-perl/Bio-SamTools/files/Bio-SamTools-1.390.0-samtools-1.patch59
-rw-r--r--dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch88
-rw-r--r--dev-perl/Bio-SamTools/metadata.xml32
6 files changed, 270 insertions, 0 deletions
diff --git a/dev-perl/Bio-SamTools/Bio-SamTools-1.420.0.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.420.0.ebuild
new file mode 100644
index 000000000000..2688bc95030a
--- /dev/null
+++ b/dev-perl/Bio-SamTools/Bio-SamTools-1.420.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=LDS
+DIST_VERSION=1.42
+inherit perl-module toolchain-funcs
+
+DESCRIPTION="Read SAM/BAM database files"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+LICENSE="|| ( Apache-2.0 Artistic-2 GPL-1+ )"
+
+RDEPEND="
+ >=sci-biology/bioperl-1.6.9
+ >=sci-biology/samtools-1:0
+"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-CBuilder
+ >=dev-perl/Module-Build-0.420.0
+"
+
+DIST_TEST=skip
+# cannot load its own library, fundamentally b0rken
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.390.0-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";|' \
+ -i Build.PL || die
+ 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 "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/Bio-SamTools-1.430.0.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
new file mode 100644
index 000000000000..1147cec5a486
--- /dev/null
+++ b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=LDS
+DIST_VERSION=1.43
+inherit perl-module toolchain-funcs
+
+DESCRIPTION="Read SAM/BAM database files"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+LICENSE="|| ( Apache-2.0 Artistic-2 GPL-1+ )"
+
+RDEPEND="
+ >=sci-biology/bioperl-1.6.9
+ sci-biology/samtools:0.1-legacy=
+"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-CBuilder
+ >=dev-perl/Module-Build-0.420.0
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.430.0-legacy.patch
+)
+
+src_prepare() {
+ perl-module_src_prepare
+ tc-export CC
+}
diff --git a/dev-perl/Bio-SamTools/Manifest b/dev-perl/Bio-SamTools/Manifest
new file mode 100644
index 000000000000..bac72ab86332
--- /dev/null
+++ b/dev-perl/Bio-SamTools/Manifest
@@ -0,0 +1,9 @@
+AUX Bio-SamTools-1.390.0-samtools-1.patch 1633 SHA256 5ee87fd2bd4bb7336a2ecd58e3be3448097f3d4ecd53b277645d97a62ac0d80b SHA512 e2c984d76dba66956aeaa81bd803191d71e0084b405745d77d2d00206f6a054d0d378763b46aac89dd2cbd1f6d33ae67a246c707829181d14110f35cd89b9b82 WHIRLPOOL ec4f3ac2f8943add73937dfde096d47d5c80df04eed02cfccaa7fe26993a4b7455da64c036ab24eb3d82fae7bfa3a1be7a42a3606bcda6b47fb1bec3116e146a
+AUX Bio-SamTools-1.430.0-legacy.patch 2466 SHA256 5015c18821348efc0024aa5450e389a1afd6da8115bedd0ce5227e19add73dca SHA512 3e886216a966144aa69aa86d3ffa28ee8f9aadec84f760259aad9fcdc09ca69499655e8c3d81a5b39d79fd503f14e0159bdf2422d66458f1e9095b2fb05da26a WHIRLPOOL 86d2b32a276c964dc80378c5d7b245978dce5b3c23ab13336a7122ea5e7d7090fdd3eaef5b21c8a2f27669c74bfe21bcebf28052b496b350742e4f2fe5cb3569
+DIST Bio-SamTools-1.42.tar.gz 337821 SHA256 ef4b736e86442ce61f56ddd94befc302ccc4646cae3c45407e107400c703584c SHA512 6a1f95104ce91a800a314c304915af9d6e1cc477c7d5f42b640d0a27b18cd32c4ad9e261cac5556f4863652570a3c573d34245963fc4b9ade067981b2a329271 WHIRLPOOL 5a216e51173ee5a9a930013718452bcbfbcffe1aa1663f50d567daf17378a50135b1b0b6d750c9aece05de268e730faf6c54963823c037559fb50ed95dda32c7
+DIST Bio-SamTools-1.43.tar.gz 340833 SHA256 7085ee5e97ad75dbbebd8583072d67b2b06d29e7a9f9741c9ac58dabe300d3fd SHA512 cd5bc6213c093f5105399c95278803afcc537bb3d191686cda0193b82fda2580749bf7533791899939a78963fcc0d6b36eabe9c309c9c6816a9849e3c892c41b WHIRLPOOL cd5ece1f08e2b4c8c64c4d289abc7a7035c18f725c28df4e9ac0319efdabb2137864b6d0b692928469c4c48010bf0ab823990a2074cef4c1a87707f5fd3f31e4
+EBUILD Bio-SamTools-1.420.0.ebuild 1143 SHA256 ee293d5c12287d90be6ac79fd78b07201aa51794444d1e325a11f876c6a1f5da SHA512 ecb5a06711da9ef3b85278f690efd331eb9fa477997a5f2319265f6ec57d06c0feeed1500113175938bf86c63872c7d85a4d9f9e781bc8d273fb54d9e903dd32 WHIRLPOOL ee00062c2e66808c76fd20aa84912089fae8e6ccec2259f018b38ffbed3274e2b8d57343e5ac28d43773668005bcd977cd5be03ba3127ff99d5e03b22dc89184
+EBUILD Bio-SamTools-1.430.0.ebuild 591 SHA256 82ebd6bc41df5df8a9e2c3acb6ced01933dc023f51e8328cb7fee0d147305e61 SHA512 fe282e0404be9a758e1f42ec9d12ae1dd935aa0f9fca8d07e07f55ae6453b2c615868de859b4e5af9f2195c18b988f0ac8132db0c8c0a880843178bce041b221 WHIRLPOOL 8546608d7b4ec8238e33b0b12aad92535dabe962c4b1f7801fdeb1fb42189865ad68b7997edd0d4eca472cd5be6f2c8ddf3f163d47d7c39c949780647edb8868
+MISC ChangeLog 3092 SHA256 2f534705266cf069098877749936b4f2c3428d5211e0fccfbdf9f32e1d95eefc SHA512 a1b0f5fa9fb8508bc5e7c967f3c2bc9c0daaa4180ef5407f34bdbcd0a02701c4606e312520480acf3ed85446134564250bccb87e2306fbf1723f610197cc2fb9 WHIRLPOOL dfeb7d16b421997c2264f79fff5f157f530970d3fde457500b335f1fb56c99b52dadc65bdabf3d19c0e7ae29e956fea0b423ff72e643673645ae9b077a19687d
+MISC ChangeLog-2015 3072 SHA256 1c84a80caa208976e82a2ecc2df4388b27339c0644cd8d32ccacf07fcb086f0d SHA512 8e9e19d53fb1c8fd9c29c00e5f733db3f4106203d52ea4c9c39421df88ea8e7e60f2d5a51abe2cf0d0e263bbc5fc2d71a18324d10affb29f051d06a195b9e706 WHIRLPOOL eb2d64a626c72ceae7c9a0d1f59c0893d545ffd324343620f2b7e4a0eb7f11a56a60a4a0467e3208915f8be69af5d10076695c444a7499ca94b90889a7324346
+MISC metadata.xml 1642 SHA256 56fa19ee1f43317a94997fe9e6bc7964aab4a262187071432313893d19e65eba SHA512 d518abd6c3f99c370ce401f7fce792b2d55d29fc2baccb54f8a32f2e2c385acf3dd7f31f3c3fc0764fb3b754e4bd3378eef0002a0e4d48b2ae2a116c85379c50 WHIRLPOOL 44b545ba81adcfdfeed29ef1f63684997052dfab6802ffa9b63e054a8ff2ed52fab667a71c676c4c7b7acdc7aa8caa8e4f683c1bc74ba09f99f25ffac1d7d646
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
+
diff --git a/dev-perl/Bio-SamTools/metadata.xml b/dev-perl/Bio-SamTools/metadata.xml
new file mode 100644
index 000000000000..268cc35b8f8c
--- /dev/null
+++ b/dev-perl/Bio-SamTools/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpan">Bio-SamTools</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::AlignWrapper</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::Alignment</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::FetchIterator</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::Pileup</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::PileupWrapper</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::Query</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::ReadIterator</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::SplitAlignmentPart</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Bam::Target</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam::Constants</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam::Fai</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam::SamToGBrowse</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam::Segment</remote-id>
+ <remote-id type="cpan-module">Bio::DB::Sam::Segment::Iterator</remote-id>
+ <remote-id type="cpan-module">Bio::SeqFeature::Coverage</remote-id>
+ </upstream>
+</pkgmetadata>