dev-perl/Perl-Tags: Restore tests
authorKent Fredric <kentnl@gentoo.org>
Wed, 27 Dec 2017 06:18:19 +0000 (19:18 +1300)
committerKent Fredric <kentnl@gentoo.org>
Wed, 27 Dec 2017 08:09:55 +0000 (21:09 +1300)
- Migrate Perl 5.26 sed to a patch
- Disable Vim tests without opt-in

Package-Manager: Portage-2.3.18, Repoman-2.3.6

dev-perl/Perl-Tags/Perl-Tags-0.320.0-r1.ebuild [new file with mode: 0644]
dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-dot-inc.patch [new file with mode: 0644]
dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-vim-tests.patch [new file with mode: 0644]
dev-perl/Perl-Tags/metadata.xml

diff --git a/dev-perl/Perl-Tags/Perl-Tags-0.320.0-r1.ebuild b/dev-perl/Perl-Tags/Perl-Tags-0.320.0-r1.ebuild
new file mode 100644 (file)
index 0000000..a79a403
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=OSFAMERON
+DIST_VERSION=0.32
+inherit perl-module
+
+DESCRIPTION="Generate (possibly exuberant) Ctags style tags for Perl sourcecode"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="test minimal"
+
+PATCHES=(
+       "${FILESDIR}/vim_noplugin.patch" # https://rt.cpan.org/Ticket/Display.html?id=105899
+       "${FILESDIR}/${PN}-0.32-no-dot-inc.patch"
+       "${FILESDIR}/${PN}-0.32-no-vim-tests.patch"
+)
+PERL_RM_FILES=(
+       "README.pod" # https://rt.cpan.org/Ticket/Display.html?id=113166
+)
+RDEPEND="
+       dev-perl/File-Find-Rule
+       virtual/perl-Data-Dumper
+       virtual/perl-File-Spec
+       virtual/perl-File-Temp
+       dev-perl/Module-Locate
+       dev-perl/Path-Tiny
+       virtual/perl-parent
+       !minimal? (
+               dev-perl/PPI
+       )
+"
+DEPEND="${RDEPEND}
+       >=virtual/perl-ExtUtils-MakeMaker-6.360.0
+       test? (
+               dev-perl/Capture-Tiny
+               dev-perl/Test-Exception
+               dev-perl/Test-LongString
+               >=virtual/perl-Test-Simple-0.420.0
+               !minimal? (
+                       app-editors/vim[perl]
+               )
+       )
+"
diff --git a/dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-dot-inc.patch b/dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-dot-inc.patch
new file mode 100644 (file)
index 0000000..06c82a1
--- /dev/null
@@ -0,0 +1,25 @@
+From e2124dd7f4a0a43082248bdcfb26aa0c2832d1a2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Mon, 3 Jul 2017 03:15:36 +1200
+Subject: Fix build on Perl 5.26
+
+Bug: https://bugs.gentoo.org/623068
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index ed5c5f7..0a01281 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,6 +1,6 @@
+ use strict;
+ use warnings;
+-use inc::Module::Install;
++use lib q[.]; use inc::Module::Install;
+ 
+ name        'Perl-Tags';
+ all_from    'lib/Perl/Tags.pm';
+-- 
+2.15.1
+
diff --git a/dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-vim-tests.patch b/dev-perl/Perl-Tags/files/Perl-Tags-0.32-no-vim-tests.patch
new file mode 100644 (file)
index 0000000..a9f1c3f
--- /dev/null
@@ -0,0 +1,29 @@
+From 8e0f11c8805c8f7b1dc6f03b864cf782ea8607a5 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 27 Dec 2017 18:59:04 +1300
+Subject: Fence off VIM tests without explicit activation
+
+---
+ t/05_vim.t | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/t/05_vim.t b/t/05_vim.t
+index 8b3c682..becf93a 100644
+--- a/t/05_vim.t
++++ b/t/05_vim.t
+@@ -1,4 +1,12 @@
+ use strict; use warnings;
++
++BEGIN {
++  if ( not $ENV{VIM_TESTS} ) {
++    print "1..0 # SKIP VIM_TESTS not set";
++    exit;
++  }
++}
++
+ use Data::Dumper;
+ 
+ use Test::More tests=>1;
+-- 
+2.15.1
+
index 43448d7550dc1e3ef7022fb52baa328a1c5c249c..90d66e0a4db71a46ffc8f7a0d8c2711106ddfb38 100644 (file)
@@ -7,19 +7,32 @@
     </maintainer>
     <upstream>
         <remote-id type="cpan">Perl-Tags</remote-id>
+        <remote-id type="cpan-module">App::Perl::Tags</remote-id>
         <remote-id type="cpan-module">Perl::Tags</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Hybrid</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Naive</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Naive::Lib</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Naive::Moose</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Naive::Spiffy</remote-id>
         <remote-id type="cpan-module">Perl::Tags::PPI</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::After</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Around</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Augment</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Before</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Class</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Constant</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Field</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Has</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Label</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Method</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Override</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Package</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Recurse</remote-id>
+        <remote-id type="cpan-module">Perl::Tags::Tag::Role</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Stub</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Sub</remote-id>
         <remote-id type="cpan-module">Perl::Tags::Tag::Var</remote-id>
+        <remote-id type="cpan-module">Test::Perl::Tags</remote-id>
     </upstream>
 </pkgmetadata>