- apply patch for 5.10

f38
Chris Weyl 17 years ago
parent 4cdb0486f2
commit e89cda8bde

@ -0,0 +1,55 @@
diff -ruN Net-SSH-0.18.orig/SSH2.xs Net-SSH-0.18/SSH2.xs
--- Net-SSH-0.18.orig/SSH2.xs 2007-11-10 17:53:25.000000000 -0800
+++ Net-SSH-0.18/SSH2.xs 2008-06-10 03:38:52.000000000 -0700
@@ -1006,7 +1006,7 @@
debug("- [%d] = channel\n", i);
pollfd[i].type = LIBSSH2_POLLFD_CHANNEL;
pollfd[i].fd.channel =
- ((SSH2_CHANNEL*)SvIVX(SvRV(*handle)))->channel;
+ ((SSH2_CHANNEL*)SvIVX(GvSV((GV*)SvRV(*handle))))->channel;
} else if(strEQ(package, "Net::SSH2::Listener")) {
debug("- [%d] = listener\n", i);
pollfd[i].type = LIBSSH2_POLLFD_LISTENER;
diff -ruN Net-SSH-0.18.orig/typemap Net-SSH-0.18/typemap
--- Net-SSH-0.18.orig/typemap 2007-02-24 07:15:23.000000000 -0800
+++ Net-SSH-0.18/typemap 2008-06-10 01:42:42.000000000 -0700
@@ -29,9 +29,9 @@
const char* name = form("_GEN_%ld", (long)net_ch_gensym++);
SvUPGRADE((SV*)gv, SVt_PVGV);
SvUPGRADE((SV*)io, SVt_PVIO);
- SvIVX(gv) = PTR2IV($var);
gv_init(gv, gv_stashpv("Net::SSH2::Channel", 0/*create*/),
name, strlen(name), 0/*multi*/);
+ GvSV(gv) = newSViv(PTR2IV($var));
GvIOp(gv) = io;
sv_magic((SV*)io, newRV((SV*)gv), PERL_MAGIC_tiedscalar, Nullch, 0);
}
@@ -49,9 +49,9 @@
const char* name = form("_GEN_%ld", (long)net_fi_gensym++);
SvUPGRADE((SV*)gv, SVt_PVGV);
SvUPGRADE((SV*)io, SVt_PVIO);
- SvIVX(gv) = PTR2IV($var);
gv_init(gv, gv_stashpv("Net::SSH2::File", 0/*create*/),
name, strlen(name), 0/*multi*/);
+ GvSV(gv) = newSViv(PTR2IV($var));
GvIOp(gv) = io;
sv_magic((SV*)io, newRV((SV*)gv), PERL_MAGIC_tiedscalar, Nullch, 0);
}
@@ -80,7 +80,7 @@
O_CHANNEL
if(sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVGV))
- $var = ($type)SvIVX((SV*)SvRV($arg));
+ $var = ($type)SvIVX(GvSV((GV*)SvRV($arg)));
else
croak(\"${Package}::$func_name() - invalid channel object\");
@@ -98,7 +98,7 @@
O_FILE
if(sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVGV))
- $var = ($type)SvIVX((SV*)SvRV($arg));
+ $var = ($type)SvIVX(GvSV((GV*)SvRV($arg)));
else
croak(\"${Package}::$func_name() - invalid SFTP file object\");

@ -1,12 +1,15 @@
Name: perl-Net-SSH2 Name: perl-Net-SSH2
Version: 0.18 Version: 0.18
Release: 4%{?dist} Release: 5%{?dist}
Summary: Support for the SSH 2 protocol via libSSH2 Summary: Support for the SSH 2 protocol via libSSH2
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/Net-SSH2/ URL: http://search.cpan.org/dist/Net-SSH2/
Source0: http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{version}.tar.gz Source0: http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{version}.tar.gz
# http://rt.cpan.org/Public/Bug/Display.html?id=36614
Patch0: net-ssh2-0.18-perl5.10.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@ -29,6 +32,8 @@ all of the key exchanges, ciphers, and compression of libssh2.
%prep %prep
%setup -q -n Net-SSH2-%{version} %setup -q -n Net-SSH2-%{version}
%patch0 -p1
perl -pi -e 's|^#!perl|#!/usr/bin/perl|' example/* perl -pi -e 's|^#!perl|#!/usr/bin/perl|' example/*
%build %build
@ -62,6 +67,9 @@ rm -rf %{buildroot}
%{_mandir}/man3/* %{_mandir}/man3/*
%changelog %changelog
* Mon Jun 30 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.18-5
- apply patch for 5.10
* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.18-4 * Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.18-4
Rebuild for new perl Rebuild for new perl

Loading…
Cancel
Save