From f97ef187d571f241aac89ee6ee2ba430a1ceee61 Mon Sep 17 00:00:00 2001
From: Tavis Ormandy <taviso@gentoo.org>
Date: Sat, 11 Oct 2003 09:42:51 +0000
Subject: Applying patch required for newer versions of FvwmTabs

---
 dev-perl/X11-Protocol/ChangeLog                    |   8 +-
 dev-perl/X11-Protocol/Manifest                     |   4 +-
 dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild  |  22 +++
 .../X11-Protocol/files/X11-Protocol-0.51.s2.patch  | 182 +++++++++++++++++++++
 .../X11-Protocol/files/digest-X11-Protocol-0.51-r1 |   1 +
 5 files changed, 214 insertions(+), 3 deletions(-)
 create mode 100644 dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild
 create mode 100644 dev-perl/X11-Protocol/files/X11-Protocol-0.51.s2.patch
 create mode 100644 dev-perl/X11-Protocol/files/digest-X11-Protocol-0.51-r1

(limited to 'dev-perl')

diff --git a/dev-perl/X11-Protocol/ChangeLog b/dev-perl/X11-Protocol/ChangeLog
index b22cb4a25fac..27a94ca7d659 100644
--- a/dev-perl/X11-Protocol/ChangeLog
+++ b/dev-perl/X11-Protocol/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog for dev-perl/X11-Protocol
 # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/X11-Protocol/ChangeLog,v 1.2 2003/10/07 14:27:47 taviso Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/X11-Protocol/ChangeLog,v 1.3 2003/10/11 09:42:46 taviso Exp $
+
+*X11-Protocol-0.51-r1 (11 Oct 2003)
+
+  11 Oct 2003; Tavis Ormandy <taviso@gentoo.org> X11-Protocol-0.51-r1.ebuild,
+  files/X11-Protocol-0.51.s2.patch:
+  Applying patch required for newer verions of FvwmTabs
 
   07 Oct 2003; Tavis Ormandy <taviso@gentoo.org> X11-Protocol-0.51.ebuild:
   stable on alpha/x86
diff --git a/dev-perl/X11-Protocol/Manifest b/dev-perl/X11-Protocol/Manifest
index 6b6f2046d6b2..e58a9788b92b 100644
--- a/dev-perl/X11-Protocol/Manifest
+++ b/dev-perl/X11-Protocol/Manifest
@@ -1,6 +1,6 @@
 MD5 5347595bcbabda730c87e3d5f9412688 X11-Protocol-0.51.ebuild 557
-MD5 62fbbe56766588edba149bfded564b59 X11-Protocol-0.51-r1.ebuild 644
-MD5 50aac1893ed3333cb29ba3afcd209cad ChangeLog 450
+MD5 761e38367e8793b583fd049f878251da X11-Protocol-0.51-r1.ebuild 656
+MD5 c6e6aff14b5a6fc07f71300b3be05c4f ChangeLog 658
 MD5 f24e90787470f41e63101e1a77d646b6 files/digest-X11-Protocol-0.51-r1 68
 MD5 f24e90787470f41e63101e1a77d646b6 files/digest-X11-Protocol-0.51 68
 MD5 f76aed1895831b1029b2bbaff495eee6 files/X11-Protocol-0.51.s2.patch 5688
diff --git a/dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild b/dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild
new file mode 100644
index 000000000000..3148ee0bdee9
--- /dev/null
+++ b/dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/X11-Protocol/X11-Protocol-0.51-r1.ebuild,v 1.1 2003/10/11 09:42:46 taviso Exp $
+
+inherit perl-module eutils
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Client-side interface to the X11 Protocol"
+SRC_URI="http://www.cpan.org/modules/by-module/X11/${P}.tar.gz"
+HOMEPAGE="http://www.cpan.org/modules/by-module/X11/${P}.readme"
+
+SLOT="0"
+LICENSE="Artistic X11"
+KEYWORDS="~x86 ~alpha ~sparc"
+
+DEPEND="${DEPEND}
+		virtual/x11"
+
+src_unpack() {
+	unpack ${A}
+	cd ${S}; epatch ${FILESDIR}/X11-Protocol-0.51.s2.patch
+}
diff --git a/dev-perl/X11-Protocol/files/X11-Protocol-0.51.s2.patch b/dev-perl/X11-Protocol/files/X11-Protocol-0.51.s2.patch
new file mode 100644
index 000000000000..8eded5a697cd
--- /dev/null
+++ b/dev-perl/X11-Protocol/files/X11-Protocol-0.51.s2.patch
@@ -0,0 +1,182 @@
+*** Protocol.pm.orig	Fri Aug 22 18:39:18 2003
+--- Protocol.pm	Sat Oct 11 13:09:04 2003
+***************
+*** 15,21 ****
+  
+  @EXPORT_OK = qw(pad padding padded hexi make_num_hash default_error_handler);
+  
+! $VERSION = "0.51";
+  
+  sub padding ($) {
+      my($x) = @_;
+--- 15,21 ----
+  
+  @EXPORT_OK = qw(pad padding padded hexi make_num_hash default_error_handler);
+  
+! $VERSION = "0.51.s2";
+  
+  sub padding ($) {
+      my($x) = @_;
+***************
+*** 571,593 ****
+      return $mask;
+  }
+  
+  sub default_error_handler {
+!     my($self, $data) = @_;
+!     my($type, $seq, $info, $minor_op, $major_op) 
+! 	= unpack("xCSLSCxxxxxxxxxxxxxxxxxxxxx", $data);
+!     my($t);
+!     $t = join("", "Protocol error: bad $type (",
+! 	      $self->do_interp('Error', $type), "); ",
+! 	      "Sequence Number $seq\n",
+! 	      " Opcode ($major_op, $minor_op) = ",
+! 	      ($self->do_interp('Request', $major_op)
+! 	      or $self->{'ext_request'}{$major_op}[$minor_op][0]), "\n");
+!     if ($type == 2) {
+! 	$t .= " Bad value $info (" . hexi($info) . ")\n";
+!     } elsif ($self->{'error_type'}[$type] & 1) {
+! 	$t .= " Bad resource $info (" . hexi($info) . ")\n";
+!     }
+!     croak($t);
+  }
+  
+  sub handle_input {
+--- 571,598 ----
+      return $mask;
+  }
+  
++ sub make_error_msg {
++ 	my($self, $data) = @_;
++ 	my($type, $seq, $info, $minor_op, $major_op) 
++ 		= unpack("xCSLSCxxxxxxxxxxxxxxxxxxxxx", $data);
++ 	my($t);
++ 	$t = join("", "Protocol error: bad $type (",
++ 		  $self->do_interp('Error', $type), "); ",
++ 		  "Sequence Number $seq\n",
++ 		  " Opcode ($major_op, $minor_op) = ",
++ 		  ($self->do_interp('Request', $major_op)
++ 		  or $self->{'ext_request'}{$major_op}[$minor_op][0]), "\n");
++ 	if ($type == 2) {
++ 		$t .= " Bad value $info (" . hexi($info) . ")\n";
++ 	} elsif ($self->{'error_type'}[$type] & 1) {
++ 		$t .= " Bad resource $info (" . hexi($info) . ")\n";
++ 	}
++ 	return $t;
++ }
++ 
+  sub default_error_handler {
+! 	my($self, $data) = @_;
+! 	croak($self->make_error_msg($data));
+  }
+  
+  sub handle_input {
+***************
+*** 597,604 ****
+      $type_b = $self->get(1);
+      $type = unpack "C", $type_b;
+      if ($type == 0) {
+! 	&{$self->{'error_handler'}}($self, $type_b . $self->get(31));
+! 	return 0;
+      } elsif ($type > 1) {
+  	if ($self->{'event_handler'} eq "queue") {
+  	    push @{$self->{'event_queue'}}, $type_b . $self->get(31);
+--- 602,614 ----
+      $type_b = $self->get(1);
+      $type = unpack "C", $type_b;
+      if ($type == 0) {
+!     	my $data = $type_b . $self->get(31);
+! 	my ($type, $seq, $info, $minor_op, $major_op) 
+! 		= unpack("xCSLSCxxxxxxxxxxxxxxxxxxxxx", $data);
+! 	&{$self->{'error_handler'}}($self, $data);
+! 	# return 0 to denote an error & the sequence number to identify
+! 	# which request it applies to.
+! 	return (0, $seq);
+      } elsif ($type > 1) {
+  	if ($self->{'event_handler'} eq "queue") {
+  	    push @{$self->{'event_queue'}}, $type_b . $self->get(31);
+***************
+*** 2031,2036 ****
+--- 2041,2047 ----
+      my($op, $args, $major, $minor) = (@_, 0);
+      my($data);
+      ($data, $minor) = (&{$op->[1]}($self, @$args), $minor);
++     # print($op->[0] . " req has seq: " . $self->{sequence_num} . "\n");
+      $minor = 0 unless defined $minor;
+      my($len) = (length($data) / 4) + 1;
+      croak "Request too long!\n" if $len > $self->{'maximum_request_length'};
+***************
+*** 2054,2061 ****
+  	$self->give($self->assemble_request($op, \@args, $major, $minor));
+  	$seq = $self->next_sequence();
+  	$self->add_reply($seq & 0xffff, \$data);
+! 	$self->handle_input() until $data;
+  	$self->delete_reply($seq & 0xffff);
+  	return &{$op->[2]}($self, $data);
+      } elsif (@$op == 4) { # Many replies
+  	my($seq, $data, @stuff, @ret);
+--- 2065,2077 ----
+  	$self->give($self->assemble_request($op, \@args, $major, $minor));
+  	$seq = $self->next_sequence();
+  	$self->add_reply($seq & 0xffff, \$data);
+! 	while (1)
+! 	{
+! 	    my @ret = $self->handle_input();
+! 	    last if ($data || ($ret[0] == 0 && $ret[1] == $seq));
+! 	}
+  	$self->delete_reply($seq & 0xffff);
++ 	return undef unless $data;
+  	return &{$op->[2]}($self, $data);
+      } elsif (@$op == 4) { # Many replies
+  	my($seq, $data, @stuff, @ret);
+***************
+*** 2063,2069 ****
+  	$seq = $self->next_sequence();
+  	$self->add_reply($seq & 0xffff, \$data);
+  	for (;;) {
+! 	    $data = 0; $self->handle_input() until $data;
+  	    @stuff = &{$op->[2]}($self, $data);
+  	    last unless @stuff;
+  	    if ($op->[3] eq "ARRAY") {
+--- 2079,2095 ----
+  	$seq = $self->next_sequence();
+  	$self->add_reply($seq & 0xffff, \$data);
+  	for (;;) {
+! 	    $data = 0;
+! 	    while (1)
+! 	    {
+! 		my @ret = $self->handle_input();
+! 		last if ($data || ($ret[0] == 0 && $ret[1] == $seq));
+! 	    }
+! 	    if (!$data)
+! 	    {
+! 		$self->delete_reply($seq & 0xffff);
+! 	    	return undef;
+! 	    }
+  	    @stuff = &{$op->[2]}($self, $data);
+  	    last unless @stuff;
+  	    if ($op->[3] eq "ARRAY") {
+***************
+*** 2392,2399 ****
+  		$self->give($self->assemble_request($op, \@_, $major, $minor));
+  		$seq = $self->next_sequence();
+  		$self->add_reply($seq, \$data);
+! 		$self->handle_input() until $data;
+  		$self->delete_reply($seq);
+  		return &{$op->[2]}($self, $data);
+  	    };
+  	} else { # ListFontsWithInfo
+--- 2418,2430 ----
+  		$self->give($self->assemble_request($op, \@_, $major, $minor));
+  		$seq = $self->next_sequence();
+  		$self->add_reply($seq, \$data);
+! 		while (1)
+! 		{
+! 		    my @ret = $self->handle_input();
+! 		    last if ($data || ($ret[0] == 0 && $ret[1] == $seq));
+! 		}
+  		$self->delete_reply($seq);
++ 		return undef unless $data;
+  		return &{$op->[2]}($self, $data);
+  	    };
+  	} else { # ListFontsWithInfo
diff --git a/dev-perl/X11-Protocol/files/digest-X11-Protocol-0.51-r1 b/dev-perl/X11-Protocol/files/digest-X11-Protocol-0.51-r1
new file mode 100644
index 000000000000..cfa240ad96fa
--- /dev/null
+++ b/dev-perl/X11-Protocol/files/digest-X11-Protocol-0.51-r1
@@ -0,0 +1 @@
+MD5 62211641789f587ef45217ba72d9d8f3 X11-Protocol-0.51.tar.gz 86381
-- 
cgit v1.2.3-65-gdbad