>>>>> gregor herrmann <gre...@debian.org> writes: >>>>> On Mon, 23 Dec 2013 18:54:58 +0000, Ivan Shmakov wrote:
[…] >> An (untested) change is MIMEd. > Could you please: > - provide a proper quilt patch against our git repo patch instead of > instructions what needs to be done where Sure; MIMEd. BTW, I choose to use IO::Socket::IP (which I also suggest for adding to Recommends:) instead of IO::Socket::INET6, as the former is expected to end up in the Perl “core”. > - actually test the changes :) I’ve briefly tested the change. For instance, with 0.56-4: $ perl zkgqj6rkxouaqmkzrhqukdem6d.perl Can't connect to display `violet.siamics.net:1': Invalid argument at /usr/share/perl5/X11/Protocol.pm line 2270. $ 0.56-5, no IO::Socket::IP installed: $ perl zkgqj6rkxouaqmkzrhqukdem6d.perl Can't connect to display `violet.siamics.net:1': Invalid argument at /usr/share/perl5/X11/Protocol.pm line 2270. $ 0.56-5, IO::Socket::IP: $ perl zkgqj6rkxouaqmkzrhqukdem6d.perl _NET_WM_WINDOW_TYPE → ["a\1\0\0", 4, 32, 0] _NET_SUPPORTING_WM_CHECK → ["\16\0\xA0\0", 33, 32, 0] _NET_WM_NAME → ["Openbox", 306, 8, 0] WM_CLASS → ["", 31, 8, 0] WM_TRANSIENT_FOR → ["\2\0\0\0", 33, 32, 0] WM_LOCALE_NAME → ["C", 31, 8, 0] … -- FSF associate member #7257
Description: Use IO::Socket::IP if available (or IO::Socket::INET if not) Author: Ivan Shmakov <i...@siamics.net> Last-Update: 2014-04-11 16:34:39.461642+00:00 --- a/Protocol/Connection/INETSocket.pm +++ b/Protocol/Connection/INETSocket.pm @@ -17,10 +17,18 @@ use vars qw($VERSION @ISA); $VERSION = 0.01; +our $SOCKET_CLASS; + +$SOCKET_CLASS + = ((eval { require IO::Socket::IP }) + ? "IO::Socket::IP" + : do { require IO::Socket::INET; "IO::Socket::INET"; }) + unless (defined ($SOCKET_CLASS)); + sub open { my($pkg) = shift; my($host, $dispnum) = @_; - my($sock) = IO::Socket::INET->new('PeerAddr' => $host, + my($sock) = $SOCKET_CLASS->new ('PeerAddr' => $host, 'PeerPort' => 6000 + $dispnum, 'Type' => SOCK_STREAM(), 'Proto' => "tcp");
diff --git a/debian/changelog b/debian/changelog index 0104ff6..a4ea430 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,10 @@ libx11-protocol-perl (0.56-5) UNRELEASED; urgency=low [ gregor herrmann ] * Strip trailing slash from metacpan URLs. - -- Salvatore Bonaccorso <car...@debian.org> Sun, 06 Jan 2013 22:09:03 +0100 + [ Ivan Shmakov ] + * Use IO::Socket::IP for IPv6 support if available. Closes: #732999 + + -- Ivan Shmakov <i...@siamics.net> Fri, 11 Apr 2014 16:40:43 +0000 libx11-protocol-perl (0.56-4) unstable; urgency=low diff --git a/debian/control b/debian/control index 956ddc9..208e8a5 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,7 @@ Homepage: https://metacpan.org/release/X11-Protocol Package: libx11-protocol-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends} +Recommends: libio-socket-ip Description: Perl module for the X Window System Protocol, version 11 X11::Protocol is a client-side interface to the X11 Protocol (see X(1) for information about X11), allowing perl programs to display windows and diff --git a/debian/patches/series b/debian/patches/series index 5299247..2443084 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ spelling.patch +io-socket-ip.patch
#!/usr/bin/perl ### zkgqj6rkxouaqmkzrhqukdem6d.perl -*- Perl -*- ## Test X11::Protocol vs. IPv6 ### Ivan Shmakov, 2014 ## To the extent possible under law, the author(s) have dedicated all ## copyright and related and neighboring rights to this software to the ## public domain worldwide. This software is distributed without any ## warranty. ## You should have received a copy of the CC0 Public Domain Dedication ## along with this software. If not, see ## <http://creativecommons.org/publicdomain/zero/1.0/>. ### Code: use common::sense; use English qw (-no_match_vars); require Carp; require Data::Dump; require Encode; require Encode::Locale; # require IO::Socket::IP; require X11::Protocol; sub localize_io { my ($wr_p) = shift (); foreach my $f (@_) { $f->binmode (! -t $f ? ":encoding(locale)" : $wr_p ? ":encoding(console_out)" : ":encoding(console_in)"); } ## . @_; } localize_io (0, \*STDIN); localize_io (1, \*STDERR, \*STDOUT); my $x = X11::Protocol->new (); my $w0 = $x->{"root"}; my ($w0_root, $w0_parent, @tlw) = $x->req ("QueryTree", $w0); foreach my $w (@tlw) { foreach my $atom ($x->req ("ListProperties", $w)) { my @prop = $x->req ("GetProperty", $w, $atom, "AnyPropertyType", 0, 200, 0); print ($x->atom_name ($atom), " → ", scalar (Data::Dump::dump (\@prop)), "\n"); } } ### zkgqj6rkxouaqmkzrhqukdem6d.perl ends here