summaryrefslogtreecommitdiff
path: root/dev-perl/Bio-SamTools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /dev-perl/Bio-SamTools
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'dev-perl/Bio-SamTools')
-rw-r--r--dev-perl/Bio-SamTools/Bio-SamTools-1.430.0-r1.ebuild38
-rw-r--r--dev-perl/Bio-SamTools/Manifest2
-rw-r--r--dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy-r1.patch110
3 files changed, 150 insertions, 0 deletions
diff --git a/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0-r1.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0-r1.ebuild
new file mode 100644
index 000000000000..861acb6faa27
--- /dev/null
+++ b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_AUTHOR=LDS
+DIST_VERSION=1.43
+inherit perl-module toolchain-funcs multilib
+
+DESCRIPTION="Read SAM/BAM database files"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="|| ( Apache-2.0 Artistic-2 GPL-1+ )"
+
+RDEPEND="
+ >=sci-biology/bioperl-1.6.9
+ sci-biology/samtools:0.1-legacy=
+"
+DEPEND="
+ dev-perl/Module-Build
+ sci-biology/samtools:0.1-legacy=
+"
+BDEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-CBuilder
+ >=dev-perl/Module-Build-0.420.0
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.430.0-legacy-r1.patch
+)
+
+src_configure() {
+ tc-export CC
+ SAM_LIB="${EPREFIX}/usr/$(get_libdir)/libbam-0.1-legacy.so" \
+ SAM_INCLUDE="${EPREFIX}/usr/include/bam-0.1-legacy" \
+ perl-module_src_configure
+}
diff --git a/dev-perl/Bio-SamTools/Manifest b/dev-perl/Bio-SamTools/Manifest
index 9130d1cf0d4e..d21de481858c 100644
--- a/dev-perl/Bio-SamTools/Manifest
+++ b/dev-perl/Bio-SamTools/Manifest
@@ -1,4 +1,6 @@
+AUX Bio-SamTools-1.430.0-legacy-r1.patch 2934 BLAKE2B 17e310aeac8d2548e168c125d498b623fb3ea6ac59da52c9dd7918c4a42a5fe6c3a11488fe67d833f265151330f339e6700bb323e5e6f355a445e58b96546246 SHA512 ac995f9a55e7cac70238f7945f56f91bbbafe207dc55b05115d519737c9a626fa57ccb265c78f028c1a03297bf5916dc60b7d51fe9988b30d27021b03717c750
AUX Bio-SamTools-1.430.0-legacy.patch 2466 BLAKE2B ab4a384031f4f2b333700e9ddf62d7a8293f88c0390b8f151a6b0657f4f59613f1e33d259f9b575fb8348593dfdc408e4d6168ecba3c3863a856f3ef6abefa9f SHA512 3e886216a966144aa69aa86d3ffa28ee8f9aadec84f760259aad9fcdc09ca69499655e8c3d81a5b39d79fd503f14e0159bdf2422d66458f1e9095b2fb05da26a
DIST Bio-SamTools-1.43.tar.gz 340833 BLAKE2B 2b488667b86ef1bedb7cf74dfdcb3abc0302d9f309c1fc3077682bb400c8307f3b7d8fb1a9015a26f9a17f9e9955845d160512aa3273c368b720fe51b4392458 SHA512 cd5bc6213c093f5105399c95278803afcc537bb3d191686cda0193b82fda2580749bf7533791899939a78963fcc0d6b36eabe9c309c9c6816a9849e3c892c41b
+EBUILD Bio-SamTools-1.430.0-r1.ebuild 785 BLAKE2B ebf4bcc864c98ccf5bbeb62091a8e8a4c960b6d8956b9fc72c5ed802ffbbc382c87c07aef467cc2c21bf811bea1df8aa28e867c14f60cbfec4654cab5329f8ff SHA512 676d31ac906659d14a1addc620a40c846de0e3c73c7b1bfafdef2da60fc97a21e78102d5d2f067af23361eedce9159a07de82c20ac2df79d885a4c1509fee7a2
EBUILD Bio-SamTools-1.430.0.ebuild 591 BLAKE2B d92daf9d86f1d8a4b60257fd810d012794d41e7082555a89b1fa66f2f2bb65b2585a27d68684d2dd1820dda214905868c752bbcbf3083e32d1797848cfaae4cc SHA512 fe282e0404be9a758e1f42ec9d12ae1dd935aa0f9fca8d07e07f55ae6453b2c615868de859b4e5af9f2195c18b988f0ac8132db0c8c0a880843178bce041b221
MISC metadata.xml 1642 BLAKE2B 8e00b2305f870d0007a22f366376d77d359df2ab54d279da2c7b791da320f72e7d110956251c3adcddaf8b4b318110b5ff4b6cde4a6cd359cbb403f666c7de93 SHA512 d518abd6c3f99c370ce401f7fce792b2d55d29fc2baccb54f8a32f2e2c385acf3dd7f31f3c3fc0764fb3b754e4bd3378eef0002a0e4d48b2ae2a116c85379c50
diff --git a/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy-r1.patch b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy-r1.patch
new file mode 100644
index 000000000000..ee9bde8fe3d0
--- /dev/null
+++ b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy-r1.patch
@@ -0,0 +1,110 @@
+From 82942523b2db5143a9da0f9d2f8ec83a26c8d5b0 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 | 14 +++++++-------
+ c_bin/bam2bedgraph.c | 2 +-
+ c_bin/makefile | 6 +++---
+ lib/Bio/DB/Sam.xs | 6 +++---
+ 4 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Build.PL b/Build.PL
+index 685815f..882f231 100644
+--- a/Build.PL
++++ b/Build.PL
+@@ -4,11 +4,10 @@ use strict;
+ use Module::Build;
+ use Module::Load::Conditional qw(can_load);
+
+-my $HeaderFile = "bam.h";
+-my $LibFile = "libbam.a";
+-my $ReadLine;
+-
+-my ($sam_include,$sam_lib) = find_sam(); # may exit with error here
++my ($sam_include,$sam_lib) = do {
++ ($ENV{"SAM_INCLUDE"} || die "SAM_INCLUDE not set"),
++ ($ENV{"SAM_LIB"} || die "SAM_LIB not set")
++};
+
+ my $class = Module::Build->subclass(code=><<EOF);
+ sub process_c_bin_files {
+@@ -39,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-0.1-legacy','-lpthread','-lz'],
+
+ extra_compiler_flags=>[
+
+@@ -67,7 +66,7 @@ $build->add_build_element('c_bin');
+ $build->create_build_script;
+
+ exit 0;
+-
++=for non-gentoo
+ sub find_sam {
+ my ($sam_include,$sam_lib);
+
+@@ -162,6 +161,7 @@ sub prompt {
+ $ReadLine->addhistory($in) if $in =~ /\S/;
+ return $in;
+ }
++=cut
+
+ sub _samtools {
+ $ENV{SAMTOOLS} ||
+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.26.2
+