public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-DB-HTS/files/, dev-perl/Bio-DB-HTS/
@ 2018-04-26 11:31 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2018-04-26 11:31 UTC (permalink / raw
  To: gentoo-commits

commit:     9a9cafec65f1eb3de700a077dae30537993823cc
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 26 11:25:15 2018 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 11:30:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a9cafec

dev-perl/Bio-DB-HTS: new package

Perl bindings for sci-libs/htslib, used by e.g. Ensembl.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild         | 30 ++++++++++++++++++++++
 dev-perl/Bio-DB-HTS/Manifest                       |  1 +
 .../files/2.10-build_search_for_so.patch           | 29 +++++++++++++++++++++
 dev-perl/Bio-DB-HTS/metadata.xml                   | 17 ++++++++++++
 4 files changed, 77 insertions(+)

diff --git a/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild
new file mode 100644
index 00000000000..02c38cd34f3
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=AVULLO
+DIST_VERSION=2.10
+
+inherit perl-module
+
+DESCRIPTION="Perl bindings for sci-libs/htslib"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="sci-libs/htslib:="
+DEPEND="${RDEPEND}
+	dev-perl/Module-Build
+	test? ( dev-perl/Test-LeakTrace )"
+
+PATCHES=(
+	"${FILESDIR}/2.10-build_search_for_so.patch"
+)
+
+src_configure() {
+	local myconf="--htslib=${EPREFIX}/usr"
+	perl-module_src_configure
+}

diff --git a/dev-perl/Bio-DB-HTS/Manifest b/dev-perl/Bio-DB-HTS/Manifest
new file mode 100644
index 00000000000..536315137fa
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/Manifest
@@ -0,0 +1 @@
+DIST Bio-DB-HTS-2.10.tar.gz 5245650 BLAKE2B a52d9b1e19d5920d61dd365eacfd1a40726500e25a3ab516df5a1d59a7a9d79ce02db7a2145801b6af5df2c41c95e80b49a39db83d27fd7ff3cf88ba0e6a328d SHA512 4e7c01022d9edf48a0e0dcffcbccf34812f236d1b581760ac115c323de5779fb6212eb4ad7d1953811930a6137cc8f5f59028c73d645d1ca5fb6118dd846ad57

diff --git a/dev-perl/Bio-DB-HTS/files/2.10-build_search_for_so.patch b/dev-perl/Bio-DB-HTS/files/2.10-build_search_for_so.patch
new file mode 100644
index 00000000000..b3d11bbbe7a
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/files/2.10-build_search_for_so.patch
@@ -0,0 +1,29 @@
+--- a/Build.PL
++++ b/Build.PL
+@@ -125,7 +125,7 @@
+ 
+     my $hts_lib     = "$root";
+     my $hts_include = "$root/htslib";
+-    if (-f "$hts_lib/libhts.a" && -f "$hts_include/hts.h") {
++    if ((-f "$hts_lib/libhts.so" || -f "$hts_lib/libhts.a") && -f "$hts_include/hts.h") {
+         $self->config_data('hts_lib'     => $hts_lib);
+         $self->config_data('hts_include' => $hts_include);
+         return 1;
+@@ -145,7 +145,7 @@
+ 
+     my $hts_lib     = "$root/lib";
+     my $hts_include = "$root/include/htslib";
+-    if (-f "$hts_lib/libhts.a" && -f "$hts_include/hts.h") {
++    if ((-f "$hts_lib/libhts.so" || -f "$hts_lib/libhts.a") && -f "$hts_include/hts.h") {
+         $self->config_data('hts_lib'     => $hts_lib);
+         $self->config_data('hts_include' => $hts_include);
+         return 1;
+@@ -164,7 +164,7 @@
+ This module requires htslib (http://htslib/org)
+ Install it if you have not done so already.
+ 
+-This script will attempt to locate htslib by looking for hts.h and libhts.a in:
++This script will attempt to locate htslib by looking for hts.h and libhts.so/libhts.a in:
+ 
+   1. --htslib command line argument
+   2. HTSLIB_DIR environment variable

diff --git a/dev-perl/Bio-DB-HTS/metadata.xml b/dev-perl/Bio-DB-HTS/metadata.xml
new file mode 100644
index 00000000000..95abbb699ad
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>marecki@gentoo.org</email>
+		<name>Marek Szuba</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>sci-biology@gentoo.org</email>
+		<name>Gentoo Biology Project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">Ensembl/Bio-DB-HTS</remote-id>
+		<remote-id type="cpan">Bio-DB-HTS</remote-id>
+		<remote-id type="cpan-module">Bio::DB::HTS</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-DB-HTS/files/, dev-perl/Bio-DB-HTS/
@ 2018-05-01  8:45 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2018-05-01  8:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f7bdf03a3823e8156f7e31aea55948702f4882e2
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 08:45:02 2018 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue May  1 08:45:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7bdf03a

dev-perl/Bio-DB-HTS: allow explicit specification of htslib directories

Upstream build script takes a single directory as htslib prefix, then
appends "include/htslib" while looking for header files and "lib" while
looking for library. Unsurprisingly, the latter fails to locate the htslib
library on SYMLINK_LIB=no systems.

I have patched the build script to allow both htslib-includedir and
htslib-libdir to be provided explicitly, thus letting the ebuild take
care of choosing the correct libdir name for the specified
architecture/ABI.

Closes: https://bugs.gentoo.org/654460
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild         |  3 +-
 .../files/2.10-build_split_htslib_opts.patch       | 48 ++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild
index 1490c3fe5ed..0a150300213 100644
--- a/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild
+++ b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.10.ebuild
@@ -23,9 +23,10 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}/2.10-build_search_for_so.patch"
+	"${FILESDIR}/2.10-build_split_htslib_opts.patch"
 )
 
 src_configure() {
-	local myconf="--htslib=${EPREFIX}/usr"
+	local myconf="--htslib-includedir=${EPREFIX}/usr/include/htslib --htslib-libdir=${EPREFIX}/usr/$(get_libdir)"
 	perl-module_src_configure
 }

diff --git a/dev-perl/Bio-DB-HTS/files/2.10-build_split_htslib_opts.patch b/dev-perl/Bio-DB-HTS/files/2.10-build_split_htslib_opts.patch
new file mode 100644
index 00000000000..d68bc54e40d
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/files/2.10-build_split_htslib_opts.patch
@@ -0,0 +1,48 @@
+--- a/Build.PL
++++ b/Build.PL
+@@ -68,7 +68,13 @@
+     # If either of these are set, we expect to find the htslib files there:
+     # (They're explicitly set by the user, so we shouldn't fall back to
+     # finding another copy somewhere else.)
+-    if (my $dir = $self->args('htslib')) {
++    if (my ($incdir, $libdir) = ($self->args('htslib-includedir'), $self->args('htslib-libdir'))) {
++        return 1 if $self->find_hts_in_split_install_dirs($incdir, $libdir);
++        $self->die_hts_not_found(
++            "--htslib-includedir '$incdir' or --htslib-libdir '$libdir' command line parameters do not contain expected files\n"
++        );
++    }
++    elsif (my $dir = $self->args('htslib')) {
+         return 1 if $self->find_hts_in_build_dir($dir);
+         return 1 if $self->find_hts_in_install_dir($dir);
+         $self->die_hts_not_found(
+@@ -155,6 +161,22 @@
+     }
+ }
+ 
++sub find_hts_in_split_install_dirs {
++    my ($self, $hts_include, $hts_lib) = @_;
++
++    chomp($hts_include);
++    chomp($hts_lib);
++
++    if ((-f "$hts_lib/libhts.so" || -f "$hts_lib/libhts.a") && -f "$hts_include/hts.h") {
++        $self->config_data('hts_lib'     => $hts_lib);
++        $self->config_data('hts_include' => $hts_include);
++        return 1;
++    }
++    else {
++        return 0;
++    }
++}
++
+ sub die_hts_not_found {
+     my ($self, $msg) = @_;
+ 
+@@ -166,6 +188,7 @@
+ 
+ This script will attempt to locate htslib by looking for hts.h and libhts.so/libhts.a in:
+ 
++  0. --htslib-includedir and --htslib-libdir command line arguments
+   1. --htslib command line argument
+   2. HTSLIB_DIR environment variable
+   3. --prefix command line argument (which also sets installation location)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-DB-HTS/files/, dev-perl/Bio-DB-HTS/
@ 2018-05-01 13:12 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2018-05-01 13:12 UTC (permalink / raw
  To: gentoo-commits

commit:     4f1be5045ba43a9e9596d89ab2d47e50880f6537
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 13:11:29 2018 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue May  1 13:12:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f1be504

dev-perl/Bio-DB-HTS: bump to 2.11

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild         | 31 +++++++++++
 dev-perl/Bio-DB-HTS/Manifest                       |  1 +
 .../files/2.11-build_split_htslib_opts.patch       | 65 ++++++++++++++++++++++
 3 files changed, 97 insertions(+)

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
new file mode 100644
index 00000000000..e5c23d67da0
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/Bio-DB-HTS-2.11.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=AVULLO
+DIST_VERSION=2.11
+
+inherit perl-module
+
+DESCRIPTION="Perl bindings for sci-libs/htslib"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="sci-biology/bioperl
+	sci-libs/htslib:="
+DEPEND="${RDEPEND}
+	dev-perl/Module-Build
+	test? ( dev-perl/Test-LeakTrace )"
+
+PATCHES=(
+	"${FILESDIR}/2.11-build_split_htslib_opts.patch"
+)
+
+src_configure() {
+	local myconf="--htslib-includedir=${EPREFIX}/usr/include/htslib --htslib-libdir=${EPREFIX}/usr/$(get_libdir)"
+	perl-module_src_configure
+}

diff --git a/dev-perl/Bio-DB-HTS/Manifest b/dev-perl/Bio-DB-HTS/Manifest
index 536315137fa..6770bf66986 100644
--- a/dev-perl/Bio-DB-HTS/Manifest
+++ b/dev-perl/Bio-DB-HTS/Manifest
@@ -1 +1,2 @@
 DIST Bio-DB-HTS-2.10.tar.gz 5245650 BLAKE2B a52d9b1e19d5920d61dd365eacfd1a40726500e25a3ab516df5a1d59a7a9d79ce02db7a2145801b6af5df2c41c95e80b49a39db83d27fd7ff3cf88ba0e6a328d SHA512 4e7c01022d9edf48a0e0dcffcbccf34812f236d1b581760ac115c323de5779fb6212eb4ad7d1953811930a6137cc8f5f59028c73d645d1ca5fb6118dd846ad57
+DIST Bio-DB-HTS-2.11.tar.gz 5250814 BLAKE2B d77ccacebf339a33ab106b997139cdbf79f6c28269a832305e660b28370aca82b4c9824773acdbf8f59b18dd61f40346a9870578dba7b5b989b0f3bc9ad14b35 SHA512 114d90fe92b684250183b45b4d23d2dd45ecdcb2fa54f7b1c311ed668d8e87953adb861f709a0a48ff2b873ce777b21bc3b557bafa0df216b9a71b59facff6fd

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
new file mode 100644
index 00000000000..727c500360d
--- /dev/null
+++ b/dev-perl/Bio-DB-HTS/files/2.11-build_split_htslib_opts.patch
@@ -0,0 +1,65 @@
+diff --git a/Build.PL b/Build.PL
+index 0d684b7..87a223b 100644
+--- a/Build.PL
++++ b/Build.PL
+@@ -68,7 +68,15 @@ sub find_hts {
+     # If either of these are set, we expect to find the htslib files there:
+     # (They're explicitly set by the user, so we shouldn't fall back to
+     # finding another copy somewhere else.)
+-    if (my $dir = $self->args('htslib')) {
++    my $incdir = $self->args('htslib-includedir');
++    my $libdir = $self->args('htslib-libdir');
++    if ($incdir && $libdir) {
++        return 1 if $self->find_hts_in_split_install_dirs($incdir, $libdir);
++        $self->die_hts_not_found(
++            "--htslib-includedir '$incdir' or --htslib-libdir '$libdir' command line parameters do not contain expected files\n"
++        );
++    }
++    elsif (my $dir = $self->args('htslib')) {
+         return 1 if $self->find_hts_in_build_dir($dir);
+         return 1 if $self->find_hts_in_install_dir($dir);
+         $self->die_hts_not_found(
+@@ -158,6 +166,23 @@ sub find_hts_in_install_dir {
+     }
+ }
+ 
++sub find_hts_in_split_install_dirs {
++    my ($self, $hts_include, $hts_lib) = @_;
++
++    chomp($hts_lib);
++    chomp($hts_include);
++    $hts_include =~ s{include/htslib$}{include};
++
++    if (hts_dev_files_exist($hts_lib, $hts_include)) {
++        $self->config_data('hts_lib'     => $hts_lib);
++        $self->config_data('hts_include' => $hts_include);
++        return 1;
++    }
++    else {
++        return 0;
++    }
++}
++
+ sub die_hts_not_found {
+     my ($self, $msg) = @_;
+ 
+@@ -170,12 +195,13 @@ Install it if you have not done so already.
+ This script will attempt to locate HTSlib by looking for htslib/hts.h
+ and libhts.a / libhts.so in:
+ 
+-  1. --htslib command line argument
+-  2. HTSLIB_DIR environment variable
+-  3. --prefix command line argument (which also sets installation location)
+-  4. Alien::HTSlib dependency resolver
+-  5. pkg-config (extra directories can be set in PKG_CONFIG_PATH environment variable)
+-  6. common library locations: /usr /usr/local, /usr/share, /opt/local
++  1. --htslib-includedir and --htslib-libdir command line arguments
++  2. --htslib command line argument
++  3. HTSLIB_DIR environment variable
++  4. --prefix command line argument (which also sets installation location)
++  5. Alien::HTSlib dependency resolver
++  6. pkg-config (extra directories can be set in PKG_CONFIG_PATH environment variable)
++  7. common library locations: /usr /usr/local, /usr/share, /opt/local
+ 
+ END
+ 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-01 13:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-01 13:12 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-DB-HTS/files/, dev-perl/Bio-DB-HTS/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2018-05-01  8:45 Marek Szuba
2018-04-26 11:31 Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox