Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-DB-HTS/files/, dev-perl/Bio-DB-HTS/
Date: Tue, 01 May 2018 13:12:13
Message-Id: 1525180328.4f1be5045ba43a9e9596d89ab2d47e50880f6537.marecki@gentoo
1 commit: 4f1be5045ba43a9e9596d89ab2d47e50880f6537
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 1 13:11:29 2018 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Tue May 1 13:12:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f1be504
7
8 dev-perl/Bio-DB-HTS: bump to 2.11
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild | 31 +++++++++++
13 dev-perl/Bio-DB-HTS/Manifest | 1 +
14 .../files/2.11-build_split_htslib_opts.patch | 65 ++++++++++++++++++++++
15 3 files changed, 97 insertions(+)
16
17 diff --git a/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild
18 new file mode 100644
19 index 00000000000..e5c23d67da0
20 --- /dev/null
21 +++ b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild
22 @@ -0,0 +1,31 @@
23 +# Copyright 1999-2018 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +
28 +DIST_AUTHOR=AVULLO
29 +DIST_VERSION=2.11
30 +
31 +inherit perl-module
32 +
33 +DESCRIPTION="Perl bindings for sci-libs/htslib"
34 +
35 +LICENSE="Apache-2.0"
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~x86"
38 +IUSE="test"
39 +
40 +RDEPEND="sci-biology/bioperl
41 + sci-libs/htslib:="
42 +DEPEND="${RDEPEND}
43 + dev-perl/Module-Build
44 + test? ( dev-perl/Test-LeakTrace )"
45 +
46 +PATCHES=(
47 + "${FILESDIR}/2.11-build_split_htslib_opts.patch"
48 +)
49 +
50 +src_configure() {
51 + local myconf="--htslib-includedir=${EPREFIX}/usr/include/htslib --htslib-libdir=${EPREFIX}/usr/$(get_libdir)"
52 + perl-module_src_configure
53 +}
54
55 diff --git a/dev-perl/Bio-DB-HTS/Manifest b/dev-perl/Bio-DB-HTS/Manifest
56 index 536315137fa..6770bf66986 100644
57 --- a/dev-perl/Bio-DB-HTS/Manifest
58 +++ b/dev-perl/Bio-DB-HTS/Manifest
59 @@ -1 +1,2 @@
60 DIST Bio-DB-HTS-2.10.tar.gz 5245650 BLAKE2B a52d9b1e19d5920d61dd365eacfd1a40726500e25a3ab516df5a1d59a7a9d79ce02db7a2145801b6af5df2c41c95e80b49a39db83d27fd7ff3cf88ba0e6a328d SHA512 4e7c01022d9edf48a0e0dcffcbccf34812f236d1b581760ac115c323de5779fb6212eb4ad7d1953811930a6137cc8f5f59028c73d645d1ca5fb6118dd846ad57
61 +DIST Bio-DB-HTS-2.11.tar.gz 5250814 BLAKE2B d77ccacebf339a33ab106b997139cdbf79f6c28269a832305e660b28370aca82b4c9824773acdbf8f59b18dd61f40346a9870578dba7b5b989b0f3bc9ad14b35 SHA512 114d90fe92b684250183b45b4d23d2dd45ecdcb2fa54f7b1c311ed668d8e87953adb861f709a0a48ff2b873ce777b21bc3b557bafa0df216b9a71b59facff6fd
62
63 diff --git a/dev-perl/Bio-DB-HTS/files/2.11-build_split_htslib_opts.patch b/dev-perl/Bio-DB-HTS/files/2.11-build_split_htslib_opts.patch
64 new file mode 100644
65 index 00000000000..727c500360d
66 --- /dev/null
67 +++ b/dev-perl/Bio-DB-HTS/files/2.11-build_split_htslib_opts.patch
68 @@ -0,0 +1,65 @@
69 +diff --git a/Build.PL b/Build.PL
70 +index 0d684b7..87a223b 100644
71 +--- a/Build.PL
72 ++++ b/Build.PL
73 +@@ -68,7 +68,15 @@ sub find_hts {
74 + # If either of these are set, we expect to find the htslib files there:
75 + # (They're explicitly set by the user, so we shouldn't fall back to
76 + # finding another copy somewhere else.)
77 +- if (my $dir = $self->args('htslib')) {
78 ++ my $incdir = $self->args('htslib-includedir');
79 ++ my $libdir = $self->args('htslib-libdir');
80 ++ if ($incdir && $libdir) {
81 ++ return 1 if $self->find_hts_in_split_install_dirs($incdir, $libdir);
82 ++ $self->die_hts_not_found(
83 ++ "--htslib-includedir '$incdir' or --htslib-libdir '$libdir' command line parameters do not contain expected files\n"
84 ++ );
85 ++ }
86 ++ elsif (my $dir = $self->args('htslib')) {
87 + return 1 if $self->find_hts_in_build_dir($dir);
88 + return 1 if $self->find_hts_in_install_dir($dir);
89 + $self->die_hts_not_found(
90 +@@ -158,6 +166,23 @@ sub find_hts_in_install_dir {
91 + }
92 + }
93 +
94 ++sub find_hts_in_split_install_dirs {
95 ++ my ($self, $hts_include, $hts_lib) = @_;
96 ++
97 ++ chomp($hts_lib);
98 ++ chomp($hts_include);
99 ++ $hts_include =~ s{include/htslib$}{include};
100 ++
101 ++ if (hts_dev_files_exist($hts_lib, $hts_include)) {
102 ++ $self->config_data('hts_lib' => $hts_lib);
103 ++ $self->config_data('hts_include' => $hts_include);
104 ++ return 1;
105 ++ }
106 ++ else {
107 ++ return 0;
108 ++ }
109 ++}
110 ++
111 + sub die_hts_not_found {
112 + my ($self, $msg) = @_;
113 +
114 +@@ -170,12 +195,13 @@ Install it if you have not done so already.
115 + This script will attempt to locate HTSlib by looking for htslib/hts.h
116 + and libhts.a / libhts.so in:
117 +
118 +- 1. --htslib command line argument
119 +- 2. HTSLIB_DIR environment variable
120 +- 3. --prefix command line argument (which also sets installation location)
121 +- 4. Alien::HTSlib dependency resolver
122 +- 5. pkg-config (extra directories can be set in PKG_CONFIG_PATH environment variable)
123 +- 6. common library locations: /usr /usr/local, /usr/share, /opt/local
124 ++ 1. --htslib-includedir and --htslib-libdir command line arguments
125 ++ 2. --htslib command line argument
126 ++ 3. HTSLIB_DIR environment variable
127 ++ 4. --prefix command line argument (which also sets installation location)
128 ++ 5. Alien::HTSlib dependency resolver
129 ++ 6. pkg-config (extra directories can be set in PKG_CONFIG_PATH environment variable)
130 ++ 7. common library locations: /usr /usr/local, /usr/share, /opt/local
131 +
132 + END
133 +