dev-perl/Boulder: Bulk fixes and fix for bug #678004
authorKent Fredric <kentnl@gentoo.org>
Tue, 9 Jul 2019 15:33:53 +0000 (03:33 +1200)
committerKent Fredric <kentnl@gentoo.org>
Tue, 9 Jul 2019 15:35:01 +0000 (03:35 +1200)
- Convert to EAPI6
- Omit Boulder::Store support unless USE=store is specified, as
  Boulder::Store requires DB_File, which requires perl built with
  USE="berkdb", and triggering a perl rebuild flipping a use flag
  could really complicate portage's capacity to solve dependencies,
  and possibly break your perl. (This is exposed bug bug #678004)
- Omit Boulder::Labbase as the module is incomplete, is documented as
  such, and loads dependencies that aren't available on Gentoo or on
  CPAN.
- Omit Boulder::XML and its dependency on XML-Parser unless USE=xml is
  specified, as XML handling is not in any way critical to this module.
- Remove uncondtional compile-time assertion for XML::Parser
- Omit Boulder::Genbank and related assets unless USE=genbank is
  specified, as this necesarily adds a dependency on dev-perl/CGI as
  part of its Entrez accessor
- Provide examples via USE="examples"

Closes: https://bugs.gentoo.org/678004
Package-Manager: Portage-2.3.66, Repoman-2.3.16
Signed-off-by: Kent Fredric <kentnl@gentoo.org>
dev-perl/Boulder/Boulder-1.300.0-r2.ebuild [new file with mode: 0644]
dev-perl/Boulder/files/Boulder-1.30-no-xml-parser-check.patch [new file with mode: 0644]
dev-perl/Boulder/metadata.xml

diff --git a/dev-perl/Boulder/Boulder-1.300.0-r2.ebuild b/dev-perl/Boulder/Boulder-1.300.0-r2.ebuild
new file mode 100644 (file)
index 0000000..a9c7506
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=LDS
+DIST_VERSION=1.30
+DIST_EXAMPLES=( "eg/*" )
+inherit perl-module
+
+DESCRIPTION="An API for hierarchical tag/value structures"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="genbank store xml"
+
+RDEPEND="
+       genbank? ( dev-perl/CGI )
+       store? ( virtual/perl-DB_File )
+       xml? ( dev-perl/XML-Parser )
+"
+DEPEND="${RDEPEND}
+       virtual/perl-ExtUtils-MakeMaker
+"
+PATCHES=(
+       "${FILESDIR}/${PN}-${DIST_VERSION}-no-xml-parser-check.patch"
+)
+PERL_RM_FILES=(
+       # Incomplete, instructs not to use, deps not in Gentoo
+       "Boulder/Labbase.pm"
+)
+src_prepare() {
+       use xml || PERL_RM_FILES+=(
+               "Boulder/XML.pm"
+       )
+       use genbank || PERL_RM_FILES+=(
+               "Boulder/Genbank.pm"
+               "Stone/GB_Sequence.pm"
+               "doc/genbank_tags.txt"
+               "eg/gb_get"
+               "eg/gb_search"
+               "eg/genbank.pl"
+               "eg/genbank2.pl"
+               "eg/genbank3.pl"
+       )
+       use store || PERL_RM_FILES+=(
+               "Boulder/Store.pm"
+               "t/store.t"
+       )
+       perl-module_src_prepare
+}
diff --git a/dev-perl/Boulder/files/Boulder-1.30-no-xml-parser-check.patch b/dev-perl/Boulder/files/Boulder-1.30-no-xml-parser-check.patch
new file mode 100644 (file)
index 0000000..13ce879
--- /dev/null
@@ -0,0 +1,30 @@
+From 82eaa751a4aebb6cce70b83407c1fafd13334130 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 10 Jul 2019 02:58:13 +1200
+Subject: Remove hardcoded XML::Parser check
+
+This test isn't necessary and is a vestigal side effect of old build
+chains that didn't have prereqs.
+
+As this dependency is only needed if you're using Boulder::XML, its
+rather redundant.
+---
+ Makefile.PL | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 2fe3176..245f16e 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,8 +1,5 @@
+ use ExtUtils::MakeMaker;
+-eval "use XML::Parser; 1" 
+-  || warn "XML::Parser module not found.  This module is required to use Boulder::XML\n";
+-
+ WriteMakefile(
+     'NAME'    => 'Boulder',
+     'DISTNAME'  => 'Boulder',
+-- 
+2.22.0
+
index 31ec77c20009888d76f487849a20d7548137ee31..2971ad7b7ca49c5a1608cc3c054d460f09d18f8d 100644 (file)
@@ -12,7 +12,6 @@
     <remote-id type="cpan-module">Boulder::Blast::NCBI</remote-id>
     <remote-id type="cpan-module">Boulder::Blast::WU</remote-id>
     <remote-id type="cpan-module">Boulder::Genbank</remote-id>
-    <remote-id type="cpan-module">Boulder::Labbase</remote-id>
     <remote-id type="cpan-module">Boulder::LocusLink</remote-id>
     <remote-id type="cpan-module">Boulder::Medline</remote-id>
     <remote-id type="cpan-module">Boulder::Omim</remote-id>
@@ -35,4 +34,9 @@
     <remote-id type="cpan-module">UnigeneAccessor</remote-id>
     <remote-id type="cpan-module">Yank</remote-id>
   </upstream>
+  <use>
+    <flag name="genbank">Provide support with Boulder::Genbank for decoding Genbank data records</flag>
+    <flag name="store">Provide support with Boulder::Store for persisting Stone objects</flag>
+  </use>
+
 </pkgmetadata>