commit 5737b1de123f497c02718326863189f83aa55fe8
Author: Petr Písař <[email protected]>
Date: Mon Nov 3 10:00:22 2014 +0100
Fix overloading = operator for perl 5.20
perl-Qt.spec | 6 ++-
...copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch | 42 ++++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/perl-Qt.spec b/perl-Qt.spec
index 0d143a0..3e79e7f 100644
--- a/perl-Qt.spec
+++ b/perl-Qt.spec
@@ -13,6 +13,9 @@ Patch1: 0001-Changes-to-support-perl-5.18.0.patch
Patch2: 0002-Fixes-for-perl-5.18.patch
# Adjust to perl-5.20.0, bug #1136340, CPAN RT#98790
Patch3:
Qt-0.96.0-Bundle-Devel-Peel-SvREFCNT_inc-removed-from-perl-5.2.patch
+# Adjust to perl-5.20.0, bug #1136340, CPAN RT#98790, in new upstream
+# <git://anongit.kde.org/perlqt>
+Patch4:
perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
BuildRequires: cmake
@@ -62,6 +65,7 @@ Development files for perl-Qt.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
mkdir build
@@ -119,7 +123,7 @@ make test
%{_datadir}/perlqt
%changelog
-* Thu Sep 11 2014 Petr Pisar <[email protected]> - 0.96.0-13
+* Mon Nov 03 2014 Petr Pisar <[email protected]> - 0.96.0-13
- Adjust to perl-5.20.0 (bug #1136340)
* Fri Aug 29 2014 Jitka Plesnikova <[email protected]> - 0.96.0-12
diff --git
a/perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
b/perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
new file mode 100644
index 0000000..7acb6d8
--- /dev/null
+++ b/perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
@@ -0,0 +1,42 @@
+From 1b665848e178301344386717c658386d160d222a Mon Sep 17 00:00:00 2001
+From: Chris Burel <[email protected]>
+Date: Fri, 31 Oct 2014 11:23:18 -0700
+Subject: [PATCH] Use a copy of the Qt::AutoLoad::AUTOLOAD variable.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This appears to be a change in Perl's behavior. The way the operator
+overloading in PerlQt works is that it first tries to find an operator method
+on the class itself, and then next it tries to find one in the so-called
+QGlobalSpace, which is a place defined by the smoke library for global Qt
+functions. Perl passes the underlying XS code the full package and function
+being called, which PerlQt splits into 2 strings, one for the package name, and
+one for the method name. PerlQt null-terminates the package name string, and
+in previous versions of Perl, this modification did not affect the source
+$AUTOLOAD variable. In Perl 5.20.0, it does update the Perl variable, and then
+causes confusion down the line.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1136340
+https://bugs.kde.org/show_bug.cgi?id=340518
+Signed-off-by: Petr Písař <[email protected]>
+---
+ qtcore/src/util.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qtcore/src/util.cpp b/qtcore/src/util.cpp
+index a163e7e..b913af3 100644
+--- a/qtcore/src/util.cpp
++++ b/qtcore/src/util.cpp
+@@ -2047,7 +2047,7 @@ XS(XS_AUTOLOAD) {
+ PERL_SET_CONTEXT(PL_curinterp);
+ // Figure out which package and method is being called, based on the
+ // autoload variable
+- SV* autoload = get_sv( "Qt::AutoLoad::AUTOLOAD", TRUE );
++ SV* autoload = sv_mortalcopy( get_sv( "Qt::AutoLoad::AUTOLOAD", TRUE ) );
+ char* package = SvPV_nolen( autoload );
+ char* methodname = 0;
+ // Splits off the method name from the package
+--
+1.9.3
+
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/perl-devel