Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-SamTools/files/, dev-perl/Bio-SamTools/
Date: Sun, 10 Sep 2017 03:29:41
Message-Id: 1505013759.29bb345f1ea0a356c7e7e4eca3ab3bc405a7d846.kentnl@gentoo
1 commit: 29bb345f1ea0a356c7e7e4eca3ab3bc405a7d846
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 10 03:20:29 2017 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 10 03:22:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29bb345f
7
8 dev-perl/Bio-SamTools: Bump to version 1.430.0
9
10 - Links against samtools:0.1-legacy series, as even though this code
11 previously attempted to use 1.0+, closer inspection indicated
12 incomplete linking, missing symbols, and failing tests introduced
13 by this attempt. Additionally, upstream EXPLICITLY STATE the lack of
14 current support for samtools 1.0
15
16 - Restores DIST_TEST as I can now test they work
17
18 - Fold swathe of sed commands into patch
19
20 Upstream:
21 - Ship some test files requried for tests to pass
22
23 Closes: https://bugs.gentoo.org/611970
24 Closes: https://bugs.gentoo.org/604950
25 Package-Manager: Portage-2.3.6, Repoman-2.3.2
26
27 dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild | 33 ++++++++
28 dev-perl/Bio-SamTools/Manifest | 1 +
29 .../files/Bio-SamTools-1.430.0-legacy.patch | 88 ++++++++++++++++++++++
30 3 files changed, 122 insertions(+)
31
32 diff --git a/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
33 new file mode 100644
34 index 00000000000..1147cec5a48
35 --- /dev/null
36 +++ b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
37 @@ -0,0 +1,33 @@
38 +# Copyright 1999-2017 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=6
42 +
43 +DIST_AUTHOR=LDS
44 +DIST_VERSION=1.43
45 +inherit perl-module toolchain-funcs
46 +
47 +DESCRIPTION="Read SAM/BAM database files"
48 +
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE=""
52 +LICENSE="|| ( Apache-2.0 Artistic-2 GPL-1+ )"
53 +
54 +RDEPEND="
55 + >=sci-biology/bioperl-1.6.9
56 + sci-biology/samtools:0.1-legacy=
57 +"
58 +DEPEND="${RDEPEND}
59 + virtual/perl-ExtUtils-CBuilder
60 + >=dev-perl/Module-Build-0.420.0
61 +"
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${PN}-1.430.0-legacy.patch
65 +)
66 +
67 +src_prepare() {
68 + perl-module_src_prepare
69 + tc-export CC
70 +}
71
72 diff --git a/dev-perl/Bio-SamTools/Manifest b/dev-perl/Bio-SamTools/Manifest
73 index 733a42f0cc5..f379ea7e384 100644
74 --- a/dev-perl/Bio-SamTools/Manifest
75 +++ b/dev-perl/Bio-SamTools/Manifest
76 @@ -1 +1,2 @@
77 DIST Bio-SamTools-1.42.tar.gz 337821 SHA256 ef4b736e86442ce61f56ddd94befc302ccc4646cae3c45407e107400c703584c SHA512 6a1f95104ce91a800a314c304915af9d6e1cc477c7d5f42b640d0a27b18cd32c4ad9e261cac5556f4863652570a3c573d34245963fc4b9ade067981b2a329271 WHIRLPOOL 5a216e51173ee5a9a930013718452bcbfbcffe1aa1663f50d567daf17378a50135b1b0b6d750c9aece05de268e730faf6c54963823c037559fb50ed95dda32c7
78 +DIST Bio-SamTools-1.43.tar.gz 340833 SHA256 7085ee5e97ad75dbbebd8583072d67b2b06d29e7a9f9741c9ac58dabe300d3fd SHA512 cd5bc6213c093f5105399c95278803afcc537bb3d191686cda0193b82fda2580749bf7533791899939a78963fcc0d6b36eabe9c309c9c6816a9849e3c892c41b WHIRLPOOL cd5ece1f08e2b4c8c64c4d289abc7a7035c18f725c28df4e9ac0319efdabb2137864b6d0b692928469c4c48010bf0ab823990a2074cef4c1a87707f5fd3f31e4
79
80 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
81 new file mode 100644
82 index 00000000000..8464f06a2f0
83 --- /dev/null
84 +++ b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch
85 @@ -0,0 +1,88 @@
86 +From 74b38ded97f7a1940c3a37b9aec9b3287a3a78bd Mon Sep 17 00:00:00 2001
87 +From: Kent Fredric <kentfredric@×××××.com>
88 +Date: Sun, 10 Sep 2017 13:33:32 +1200
89 +Subject: Fix linking/compiling for bam-0.1-legacy
90 +
91 +---
92 + Build.PL | 6 +++---
93 + c_bin/bam2bedgraph.c | 2 +-
94 + c_bin/makefile | 6 +++---
95 + lib/Bio/DB/Sam.xs | 6 +++---
96 + 4 files changed, 10 insertions(+), 10 deletions(-)
97 +
98 +diff --git a/Build.PL b/Build.PL
99 +index 685815f..2611759 100644
100 +--- a/Build.PL
101 ++++ b/Build.PL
102 +@@ -4,8 +4,8 @@ use strict;
103 + use Module::Build;
104 + use Module::Load::Conditional qw(can_load);
105 +
106 +-my $HeaderFile = "bam.h";
107 +-my $LibFile = "libbam.a";
108 ++my $HeaderFile = "bam-0.1-legacy/bam.h";
109 ++my $LibFile = "libbam-0.1-legacy.so";
110 + my $ReadLine;
111 +
112 + my ($sam_include,$sam_lib) = find_sam(); # may exit with error here
113 +@@ -39,7 +39,7 @@ my $build = $class->new(
114 + dist_abstract => 'Perl interface to SamTools library for DNA sequencing',
115 + license => 'perl',
116 + include_dirs => [$sam_include],
117 +- extra_linker_flags => ["-L$sam_lib",'-lbam','-lpthread','-lz'],
118 ++ extra_linker_flags => ["-L$sam_lib",'-lbam-0.1-legacy','-lpthread','-lz'],
119 +
120 + extra_compiler_flags=>[
121 +
122 +diff --git a/c_bin/bam2bedgraph.c b/c_bin/bam2bedgraph.c
123 +index 298e9a8..91218fa 100644
124 +--- a/c_bin/bam2bedgraph.c
125 ++++ b/c_bin/bam2bedgraph.c
126 +@@ -1,5 +1,5 @@
127 + #include <stdio.h>
128 +-#include "sam.h"
129 ++#include "bam-0.1-legacy/sam.h"
130 +
131 + typedef struct {
132 + uint32_t ltid;
133 +diff --git a/c_bin/makefile b/c_bin/makefile
134 +index 9aef917..0abbb4c 100644
135 +--- a/c_bin/makefile
136 ++++ b/c_bin/makefile
137 +@@ -1,5 +1,5 @@
138 +-CC= gcc
139 +-CFLAGS= -g -Wall -O2 -fPIC
140 ++CC?= gcc
141 ++CFLAGS?= -g -Wall -O2 -fPIC
142 + DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
143 + INCLUDES=
144 + LIBPATH=
145 +@@ -14,7 +14,7 @@ PROG= bam2bedgraph
146 + all:$(PROG)
147 +
148 + bam2bedgraph: bam2bedgraph.o
149 +- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBPATH) -lbam -lpthread -lm -lz
150 ++ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBPATH) -lbam-0.1-legacy -lpthread -lm -lz
151 +
152 + clean:
153 + rm -f *.o $(PROG)
154 +diff --git a/lib/Bio/DB/Sam.xs b/lib/Bio/DB/Sam.xs
155 +index 023f655..86410fb 100644
156 +--- a/lib/Bio/DB/Sam.xs
157 ++++ b/lib/Bio/DB/Sam.xs
158 +@@ -25,9 +25,9 @@
159 +
160 + #include <unistd.h>
161 + #include <math.h>
162 +-#include "bam.h"
163 +-#include "khash.h"
164 +-#include "faidx.h"
165 ++#include "bam-0.1-legacy/bam.h"
166 ++#include "bam-0.1-legacy/khash.h"
167 ++#include "bam-0.1-legacy/faidx.h"
168 +
169 + /* stolen from bam_aux.c */
170 + #define MAX_REGION 1<<29
171 +--
172 +2.14.1
173 +