[perl-Tk] Restore compatibility with perl-ExtUtils-MakeMaker-7.00

Petr Pisar ppisar at fedoraproject.org
Fri Nov 7 09:00:07 UTC 2014


commit e29b98565480bf159d862712e3183f78fa94780f
Author: Petr Písař <ppisar at redhat.com>
Date:   Fri Nov 7 09:54:06 2014 +0100

    Restore compatibility with perl-ExtUtils-MakeMaker-7.00

 ....032-Tk-MMutil-use-X-instead-of-self-PERL.patch |   57 ++++++++++++++++++++
 perl-Tk.spec                                       |   10 +++-
 2 files changed, 66 insertions(+), 1 deletions(-)
---
diff --git a/Tk-804.032-Tk-MMutil-use-X-instead-of-self-PERL.patch b/Tk-804.032-Tk-MMutil-use-X-instead-of-self-PERL.patch
new file mode 100644
index 0000000..39eebc2
--- /dev/null
+++ b/Tk-804.032-Tk-MMutil-use-X-instead-of-self-PERL.patch
@@ -0,0 +1,57 @@
+From f579b535e68977bab6547ac58a0fe62791ea2309 Mon Sep 17 00:00:00 2001
+From: Slaven Rezic <slaven at rezic.de>
+Date: Thu, 6 Nov 2014 20:02:45 +0000
+Subject: [PATCH] Tk::MMutil: use $^X instead of $self->{PERL}
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since ExtUtils::MakeMaker 6.99_10, the PERL object member is quoted.
+This caused the subsequent extraction commands to be run with an
+invalid command (the perl binary *with* quotes). Unfortunately
+this system() call failed silently, so the real problem showed
+up in a strange dependency problem, see
+https://rt.cpan.org/Ticket/Display.html?id=100044
+
+Instead of $self->{PERL}, now simply $^X is used. Also, the
+extraction commands do not fail silently anymore.
+
+Reference to the EUMM ticket:
+https://rt.cpan.org/Ticket/Display.html?id=100159
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ Tk/MMutil.pm | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/Tk/MMutil.pm b/Tk/MMutil.pm
+index 7a78c1b..6df5c70 100644
+--- a/Tk/MMutil.pm
++++ b/Tk/MMutil.pm
+@@ -115,19 +115,15 @@ sub mTk_CHO
+  $self->{O_FILES} = [grep s/\.c(pp|xx|c)?$/$self->{OBJ_EXT}/i, @o_files] ;
+  $self->{'MTK'}   = $mTk;
+  my $tk = installed_tk();
+- my $perl = $self->{'PERL'};
+- if ($IsWin32 && !-f $perl && -f "$perl.exe")
+-  {
+-   print "perl=$perl X=$^X\n";
+-   $perl = "$perl.exe";
+-   $self->{'PERL'} = $perl;
+-  }
++ my $perl = $^X;
+  foreach my $file (sort keys %$mTk)
+   {
+    unless (-f $file && -M $file < -M $mTk->{$file})
+     {
+      warn "Extracting $file\n";
+-     system($perl,"$tk/pTk/Tcl-pTk",$mTk->{$file},$file);
++     my @cmd = ($perl,"$tk/pTk/Tcl-pTk",$mTk->{$file},$file);
++     system @cmd;
++     die "The command '@cmd' failed with $?" if $? != 0;
+     }
+   }
+ }
+-- 
+1.9.3
+
diff --git a/perl-Tk.spec b/perl-Tk.spec
index 081a226..5aaca2c 100644
--- a/perl-Tk.spec
+++ b/perl-Tk.spec
@@ -6,7 +6,7 @@
 Name:           perl-Tk
 # devel version fix for perl 5.14: 
 Version:        804.032
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Perl Graphical User Interface ToolKit
 
 Group:          Development/Libraries
@@ -31,6 +31,9 @@ Patch7:         Tk-804.032-fix-race-condition-in-errordialog.t.patch
 # Fix t/fileevent2.t failure with /dev/null on stdin, bug #1141117,
 # CPAN RT#98891
 Patch8:         Tk-804.032-Use-pipe-instead-of-stdin-in-t-fileevent2.t.patch
+# Restore compatibility with perl-ExtUtils-MakeMaker-7.00, bug #1161470,
+# CPAN RT#100044
+Patch9:         Tk-804.032-Tk-MMutil-use-X-instead-of-self-PERL.patch
 
 
 # Versions before this have Unicode issues
@@ -155,6 +158,8 @@ chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm
 %patch7 -p1
 # t/fileevent2.t failure
 %patch8 -p1
+# compatibility with EU::MM 7
+%patch9 -p1
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor X11LIB=%{_libdir} XFT=1
@@ -202,6 +207,9 @@ find __demos/ -type f -exec chmod -x {} \;
 
 
 %changelog
+* Fri Nov 07 2014 Petr Pisar <ppisar at redhat.com> - 804.032-5
+- Restore compatibility with perl-ExtUtils-MakeMaker-7.00 (bug #1161470)
+
 * Fri Sep 12 2014 Petr Pisar <ppisar at redhat.com> - 804.032-4
 - Fix freetype detection
 - Fix creating a window with perl 5.20 (bug #1141117)


More information about the scm-commits mailing list