From 6024c981c32f7a37d60e076428994ee1899e4da8 Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Tue, 12 Jul 2016 14:29:28 +0100
Subject: Fix FTBFS with Geopt::Long::Descriptive 0.100

---
 MouseX-Getopt-0.36-GLD-spacing.patch | 47 ++++++++++++++++++++++++++++++++++++
 perl-MouseX-Getopt.spec              | 10 +++++++-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 MouseX-Getopt-0.36-GLD-spacing.patch

diff --git a/MouseX-Getopt-0.36-GLD-spacing.patch 
b/MouseX-Getopt-0.36-GLD-spacing.patch
new file mode 100644
index 0000000..c616220
--- /dev/null
+++ b/MouseX-Getopt-0.36-GLD-spacing.patch
@@ -0,0 +1,47 @@
+--- t/104_override_usage.t
++++ t/104_override_usage.t
+@@ -49,10 +49,16 @@ use Test::Exception;
+ \t--foo              A foo
+ }
+         :
++         $Getopt::Long::Descriptive::VERSION == 0.099 ?
+          qq{usage: 104_override_usage.t [-?] [long options...]
+ \t-? --usage --help    Prints this usage information.
+ \t--foo INT            A foo
+ }
++        :
++         qq{usage: 104_override_usage.t [-?] [long options...]
++\t-? --usage --help  Prints this usage information.
++\t--foo INT          A foo
++}
+ 
+      ];
+ 
+--- t/110_sort_usage_by_attr_order.t
++++ t/110_sort_usage_by_attr_order.t
+@@ -34,7 +34,7 @@ usage: 110_sort_usage_by_attr_order.t [-
+     --bar              Documentation for "bar"
+     --baz              Documentation for "baz"
+ USAGE
+-if ( $Getopt::Long::Descriptive::VERSION >= 0.099 )
++if ( $Getopt::Long::Descriptive::VERSION == 0.099 )
+ {
+ $expected = <<'USAGE';
+ usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
+@@ -44,6 +44,16 @@ usage: 110_sort_usage_by_attr_order.t [-
+     --baz STR            Documentation for "baz"
+ USAGE
+ }
++if ( $Getopt::Long::Descriptive::VERSION >= 0.100 )
++{
++$expected = <<'USAGE';
++usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
++    -? --usage --help  Prints this usage information.
++    --foo STR          Documentation for "foo"
++    --bar STR          Documentation for "bar"
++    --baz STR          Documentation for "baz"
++USAGE
++}
+ $expected =~ s/^[ ]{4}/\t/xmsg;
+ is($obj->usage->text, $expected, 'Usage text has nicely sorted options');
+ 
diff --git a/perl-MouseX-Getopt.spec b/perl-MouseX-Getopt.spec
index d9a71c4..1187378 100644
--- a/perl-MouseX-Getopt.spec
+++ b/perl-MouseX-Getopt.spec
@@ -1,10 +1,11 @@
 Name:          perl-MouseX-Getopt
 Summary:       Mouse role for processing command line options
 Version:       0.36
-Release:       7%{?dist}
+Release:       8%{?dist}
 License:       GPL+ or Artistic
 URL:           http://search.cpan.org/dist/MouseX-Getopt/
 Source0:       
http://search.cpan.org/CPAN/authors/id/G/GF/GFUJI/MouseX-Getopt-%{version}.tar.gz
+Patch0:                MouseX-Getopt-0.36-GLD-spacing.patch
 BuildArch:     noarch
 # Module Build
 BuildRequires: perl
@@ -51,6 +52,10 @@ objects using parameters passed in from the command line.
 %prep
 %setup -q -n MouseX-Getopt-%{version}
 
+# Fix tests for GLD help output again
+# https://github.com/gfx/mousex-getopt/pull/10
+%patch0
+
 %build
 perl Build.PL --installdirs=vendor
 ./Build
@@ -78,6 +83,9 @@ perl Build.PL --installdirs=vendor
 %{_mandir}/man3/MouseX::Getopt::Strict.3*
 
 %changelog
+* Tue Jul 12 2016 Paul Howarth <p...@city-fan.org> - 0.36-8
+- Fix FTBFS with Geopt::Long::Descriptive 0.100
+
 * Wed May 18 2016 Jitka Plesnikova <jples...@redhat.com> - 0.36-7
 - Perl 5.24 re-rebuild of bootstrapped packages
 
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-MouseX-Getopt.git/commit/?h=perl-MouseX-Getopt-0.36-8.fc25&id=6024c981c32f7a37d60e076428994ee1899e4da8
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to