public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-SamTools/, dev-perl/Bio-SamTools/files/
@ 2020-05-20 17:01 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2020-05-20 17:01 UTC (permalink / raw
  To: gentoo-commits

commit:     1442f328453dc90ea24b64ec3abd4e661504f408
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 17:00:14 2020 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Wed May 20 17:01:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1442f328

dev-perl/Bio-SamTools: Add fixed version for bug #661112

- Reworked patches so the autodetection stuff is nixed, because its
  really silly and doesn't work.
- Paths now computed in ebuild and passed explicitly
- Fix handling of libdir for lib64 re bug #661112, but in a different
  way than proposed by Sławomir Nizio, mostly because I didn't see that
  suggestion until after I'd done all my changes (but also because
      relying on a hardcoded path in the code is also fragile)
- Converted to EAPI7
- Removed unused empty variable assignments

Bug: https://bugs.gentoo.org/661112
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>

 .../Bio-SamTools/Bio-SamTools-1.430.0-r1.ebuild    |  38 +++++++
 .../files/Bio-SamTools-1.430.0-legacy-r1.patch     | 110 +++++++++++++++++++++
 2 files changed, 148 insertions(+)

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 00000000000..861acb6faa2
--- /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/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 00000000000..ee9bde8fe3d
--- /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
+


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

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-SamTools/, dev-perl/Bio-SamTools/files/
@ 2020-06-20  4:32 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2020-06-20  4:32 UTC (permalink / raw
  To: gentoo-commits

commit:     2a866fb9126e4c0a780620e041598cc6d3726ad3
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 20 04:28:41 2020 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sat Jun 20 04:28:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a866fb9

dev-perl/Bio-SamTools: Cleanup old 1.430.0

- Unstable(~) eclipsed by 1.430.0-r1 for ~1 month

Closes: https://bugs.gentoo.org/661112
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>

 dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild  | 33 --------
 .../files/Bio-SamTools-1.430.0-legacy.patch        | 88 ----------------------
 2 files changed, 121 deletions(-)

diff --git a/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild b/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
deleted file mode 100644
index 1147cec5a48..00000000000
--- a/dev-perl/Bio-SamTools/Bio-SamTools-1.430.0.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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/files/Bio-SamTools-1.430.0-legacy.patch b/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch
deleted file mode 100644
index 8464f06a2f0..00000000000
--- a/dev-perl/Bio-SamTools/files/Bio-SamTools-1.430.0-legacy.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-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
-


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

end of thread, other threads:[~2020-06-20  4:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20 17:01 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Bio-SamTools/, dev-perl/Bio-SamTools/files/ Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2020-06-20  4:32 Kent Fredric

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