From 02997787788778b0f41ab375bf0d936cf20d2329 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Fri, 24 Apr 2015 17:43:33 +0000 Subject: Fix build with Perl 5.18+ qw(...) can no longer be used as parentheses Also, rename a patch to stick to our naming scheme. Sponsored by: Absolight --- japanese/p5-Text-MeCab/Makefile | 7 ------- japanese/p5-Text-MeCab/files/patch-Makefile.pm | 24 ---------------------- .../files/patch-inc_Module_Install_Makefile.pm | 24 ++++++++++++++++++++++ .../files/patch-inc_Module_Install_XSUtil.pm | 11 ++++++++++ .../files/patch-tools_probe__mecab.pl | 11 ++++++++++ 5 files changed, 46 insertions(+), 31 deletions(-) delete mode 100644 japanese/p5-Text-MeCab/files/patch-Makefile.pm create mode 100644 japanese/p5-Text-MeCab/files/patch-inc_Module_Install_Makefile.pm create mode 100644 japanese/p5-Text-MeCab/files/patch-inc_Module_Install_XSUtil.pm create mode 100644 japanese/p5-Text-MeCab/files/patch-tools_probe__mecab.pl (limited to 'japanese/p5-Text-MeCab') diff --git a/japanese/p5-Text-MeCab/Makefile b/japanese/p5-Text-MeCab/Makefile index f00102e98e3a..3165745eb7c8 100644 --- a/japanese/p5-Text-MeCab/Makefile +++ b/japanese/p5-Text-MeCab/Makefile @@ -25,9 +25,6 @@ USES= perl5 USE_PERL5= configure CONFIGURE_ARGS= = 5.18 -BROKEN= Does not build with Perl 5.18 or above -.endif - .include diff --git a/japanese/p5-Text-MeCab/files/patch-Makefile.pm b/japanese/p5-Text-MeCab/files/patch-Makefile.pm deleted file mode 100644 index 9d1e9c8cc5b6..000000000000 --- a/japanese/p5-Text-MeCab/files/patch-Makefile.pm +++ /dev/null @@ -1,24 +0,0 @@ ---- inc/Module/Install/Makefile.pm.orig 2010-07-09 05:30:37.888238012 +0900 -+++ inc/Module/Install/Makefile.pm 2010-07-09 05:31:07.586884004 +0900 -@@ -213,21 +213,6 @@ - # Make sure we have a new enough MakeMaker - require ExtUtils::MakeMaker; - -- if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { -- # MakeMaker can complain about module versions that include -- # an underscore, even though its own version may contain one! -- # Hence the funny regexp to get rid of it. See RT #35800 -- # for details. -- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/; -- $self->build_requires( 'ExtUtils::MakeMaker' => $v ); -- $self->configure_requires( 'ExtUtils::MakeMaker' => $v ); -- } else { -- # Allow legacy-compatibility with 5.005 by depending on the -- # most recent EU:MM that supported 5.005. -- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 ); -- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 ); -- } -- - # Generate the MakeMaker params - my $args = $self->makemaker_args; - $args->{DISTNAME} = $self->name; diff --git a/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_Makefile.pm b/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_Makefile.pm new file mode 100644 index 000000000000..9d1e9c8cc5b6 --- /dev/null +++ b/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_Makefile.pm @@ -0,0 +1,24 @@ +--- inc/Module/Install/Makefile.pm.orig 2010-07-09 05:30:37.888238012 +0900 ++++ inc/Module/Install/Makefile.pm 2010-07-09 05:31:07.586884004 +0900 +@@ -213,21 +213,6 @@ + # Make sure we have a new enough MakeMaker + require ExtUtils::MakeMaker; + +- if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { +- # MakeMaker can complain about module versions that include +- # an underscore, even though its own version may contain one! +- # Hence the funny regexp to get rid of it. See RT #35800 +- # for details. +- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/; +- $self->build_requires( 'ExtUtils::MakeMaker' => $v ); +- $self->configure_requires( 'ExtUtils::MakeMaker' => $v ); +- } else { +- # Allow legacy-compatibility with 5.005 by depending on the +- # most recent EU:MM that supported 5.005. +- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 ); +- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 ); +- } +- + # Generate the MakeMaker params + my $args = $self->makemaker_args; + $args->{DISTNAME} = $self->name; diff --git a/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_XSUtil.pm b/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_XSUtil.pm new file mode 100644 index 000000000000..2f23525a5dd2 --- /dev/null +++ b/japanese/p5-Text-MeCab/files/patch-inc_Module_Install_XSUtil.pm @@ -0,0 +1,11 @@ +--- inc/Module/Install/XSUtil.pm.orig 2015-04-24 17:35:21 UTC ++++ inc/Module/Install/XSUtil.pm +@@ -242,7 +242,7 @@ sub cc_assert_lib { + + if ( ! $self->{xsu_loaded_checklib} ) { + my $loaded_lib = 0; +- foreach my $checklib qw(inc::Devel::CheckLib Devel::CheckLib) { ++ foreach my $checklib ( qw(inc::Devel::CheckLib Devel::CheckLib) ) { + eval "use $checklib 0.4"; + if (!$@) { + $loaded_lib = 1; diff --git a/japanese/p5-Text-MeCab/files/patch-tools_probe__mecab.pl b/japanese/p5-Text-MeCab/files/patch-tools_probe__mecab.pl new file mode 100644 index 000000000000..678f9f8f2ca6 --- /dev/null +++ b/japanese/p5-Text-MeCab/files/patch-tools_probe__mecab.pl @@ -0,0 +1,11 @@ +--- tools/probe_mecab.pl.orig 2015-04-24 17:31:37 UTC ++++ tools/probe_mecab.pl +@@ -43,7 +43,7 @@ if ($^O eq 'MSWin32') { + } else { + # try probing in places where we expect it to be + my $default_config; +- foreach my $path qw(/usr/bin /usr/local/bin /opt/local/bin) { ++ foreach my $path ( qw(/usr/bin /usr/local/bin /opt/local/bin) ) { + my $tmp = File::Spec->catfile($path, 'mecab-config'); + if (-f $tmp && -x _) { + $default_config = $tmp; -- cgit v1.2.3