[packages/perl-Event-Lib] - fix building with libevent 2.1 - rel 3
baggins
baggins at pld-linux.org
Tue Apr 4 19:36:24 CEST 2017
commit d735f6ac4ae17f4dc1cfe16232ea605c9acb89d2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Apr 4 19:36:09 2017 +0200
- fix building with libevent 2.1
- rel 3
libevent-2.1.patch | 38 ++++++++++++++++++++++++++++++++++++++
perl-Event-Lib.spec | 4 +++-
2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/perl-Event-Lib.spec b/perl-Event-Lib.spec
index 19970ed..20a2ec9 100644
--- a/perl-Event-Lib.spec
+++ b/perl-Event-Lib.spec
@@ -9,7 +9,7 @@ Summary: Event::Lib - Perl extentions for event-based programming
Summary(pl.UTF-8): Event::Lib - rozszerzenie Perla dla programowania opertego na zdarzeniach
Name: perl-Event-Lib
Version: 1.04
-Release: 2
+Release: 3
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
#Source0: http://www.cpan.org/modules/by-module/Event/%{pdir}-%{pnam}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Source0: http://search.cpan.org/CPAN/authors/id/C/CR/CRUX/%{pdir}-%{pnam}-%{vers
# Source0-md5: 38bc3b6b9bf44740275dad9198e702fc
#URL: http://search.cpan.org/dist/Event-Lib/
URL: http://search.cpan.org/~crux/Event-Lib/
+Patch0: libevent-2.1.patch
BuildRequires: libevent-devel
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
@@ -49,6 +50,7 @@ oferuje ujednolicony interfejs do nich wszystkich.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL \
diff --git a/libevent-2.1.patch b/libevent-2.1.patch
new file mode 100644
index 0000000..7e0e0ac
--- /dev/null
+++ b/libevent-2.1.patch
@@ -0,0 +1,38 @@
+--- Event-Lib-1.04/Lib.xs~ 2014-09-23 09:06:55.000000000 +0200
++++ Event-Lib-1.04/Lib.xs 2017-04-04 19:35:35.623351764 +0200
+@@ -128,7 +128,7 @@
+ void refresh_event (struct event_args *args, char *class) {
+ SV *sv = newSV(0);
+ sv_setref_pv(sv, class, (void*)args);
+- args->ev.ev_arg = (void*)sv;
++ args->ev.ev_evcallback.evcb_arg = (void*)sv;
+ }
+
+ SV * do_exception_handler (pTHX_ short event, SV *ev, SV *err) {
+@@ -208,7 +208,7 @@
+ * handlers, in which case the ref-cnt has already been decremented */
+ if (!event_pending(&args->ev, event, NULL)) {
+ EvEVENT_SET_off(args);
+- SvREFCNT_dec((SV*)args->ev.ev_arg);
++ SvREFCNT_dec((SV*)args->ev.ev_evcallback.evcb_arg);
+ if (SvOK(ev))
+ DEBUG_trace(args);
+ }
+@@ -582,7 +582,7 @@
+ }
+
+ /* Nope, it's another event so it's ok to increment the ref-cnt */
+- SvREFCNT_inc((SV*)args->ev.ev_arg);
++ SvREFCNT_inc((SV*)args->ev.ev_evcallback.evcb_arg);
+ DEBUG_record_event(aTHX_ ST(0));
+ DEBUG_trace(args);
+ XSRETURN(1);
+@@ -689,7 +689,7 @@
+ /* We are not using ST(0) here but instead the loop-back
+ * object stored inside the event because this is what is
+ * decremented in do_callback and incremented in event_add */
+- SvREFCNT_dec((SV*)args->ev.ev_arg);
++ SvREFCNT_dec((SV*)args->ev.ev_evcallback.evcb_arg);
+
+ DEBUG_trace(args);
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Event-Lib.git/commitdiff/d735f6ac4ae17f4dc1cfe16232ea605c9acb89d2
More information about the pld-cvs-commit
mailing list