perl-net/perl-net.patch

changeset 622
e35cb8425f97
parent 621
3e3f0a094486
child 623
1a897ff6f07a
     1.1 --- a/perl-net/perl-net.patch	Tue Aug 28 18:55:10 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,303 +0,0 @@
     1.4 -Index: Net-IRC-0.79/Makefile.PL
     1.5 ---- Net-IRC-0.79/Makefile.PL.orig	2009-12-23 18:05:52.000000000 +0100
     1.6 -+++ Net-IRC-0.79/Makefile.PL	2010-12-19 13:16:21.000000000 +0100
     1.7 -@@ -4,29 +4,6 @@
     1.8 - # the contents of the Makefile that is written.
     1.9 - 
    1.10 - exit 0 if $ENV{AUTOMATED_TESTING};
    1.11 --my $ok = 'I acknowledge that Net::IRC is unsupported and I wish to proceed.';
    1.12 --my $warning = <<WILLROBINSON;
    1.13 ----------------------------------------------------------------------------------
    1.14 --********************************************************************************
    1.15 --DANGER, WILL ROBINSON! DANGER!
    1.16 --
    1.17 --This module has been deprecated, abandoned, and is no longer supported. It has
    1.18 --not seen active development in five years, and its original author has moved on.
    1.19 --We *STRONGLY* recommend you port your code to either Bot::BasicBot or
    1.20 --POE::Component::IRC. Please feel free to stop by irc.freenode.net/#perl for help
    1.21 --making this transition. Or, if you insist on proceeding, please type the
    1.22 --following line exactly as is and then press Enter:
    1.23 --
    1.24 --$ok
    1.25 --********************************************************************************
    1.26 ----------------------------------------------------------------------------------
    1.27 --WILLROBINSON
    1.28 --
    1.29 ---t STDIN or die $warning;
    1.30 --warn $warning;
    1.31 --chomp(my $acceptance = <STDIN>);
    1.32 --die "Refusing to install due to lack of confirmation" unless $acceptance eq $ok;
    1.33 --
    1.34 - 
    1.35 - WriteMakefile(
    1.36 - 	      'NAME'  => 'Net::IRC',
    1.37 -Index: Net-Packet-3.27/Makefile.PL
    1.38 ---- Net-Packet-3.27/Makefile.PL.orig	2009-11-09 18:58:29.000000000 +0100
    1.39 -+++ Net-Packet-3.27/Makefile.PL	2010-12-19 13:15:40.000000000 +0100
    1.40 -@@ -15,7 +15,6 @@
    1.41 -       Time::HiRes   => 0,
    1.42 -       Net::IPv6Addr => 0,
    1.43 -       Net::IPv4Addr => 0,
    1.44 --      Socket6       => 0,
    1.45 -       Bit::Vector   => 0,
    1.46 -    },
    1.47 -    ABSTRACT_FROM => 'lib/Net/Packet.pm',
    1.48 -Index: Net-Patricia-1.15/libpatricia/patricia.c
    1.49 ---- Net-Patricia-1.15/libpatricia/patricia.c.orig	2009-04-19 06:28:15.000000000 +0200
    1.50 -+++ Net-Patricia-1.15/libpatricia/patricia.c	2010-12-19 13:15:40.000000000 +0100
    1.51 -@@ -38,24 +38,24 @@
    1.52 - /* prefix_tochar
    1.53 -  * convert prefix information to bytes
    1.54 -  */
    1.55 --u_char *
    1.56 -+unsigned char *
    1.57 - prefix_tochar (prefix_t * prefix)
    1.58 - {
    1.59 -     if (prefix == NULL)
    1.60 - 	return (NULL);
    1.61 - 
    1.62 --    return ((u_char *) & prefix->add.sin);
    1.63 -+    return ((unsigned char *) & prefix->add.sin);
    1.64 - }
    1.65 - 
    1.66 - int 
    1.67 --comp_with_mask (void *addr, void *dest, u_int mask)
    1.68 -+comp_with_mask (void *addr, void *dest, unsigned int mask)
    1.69 - {
    1.70 - 
    1.71 -     if ( /* mask/8 == 0 || */ memcmp (addr, dest, mask / 8) == 0) {
    1.72 - 	int n = mask / 8;
    1.73 - 	int m = ((-1) << (8 - (mask % 8)));
    1.74 - 
    1.75 --	if (mask % 8 == 0 || (((u_char *)addr)[n] & m) == (((u_char *)dest)[n] & m))
    1.76 -+	if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned char *)dest)[n] & m))
    1.77 - 	    return (1);
    1.78 -     }
    1.79 -     return (0);
    1.80 -@@ -70,7 +70,7 @@
    1.81 - int
    1.82 - inet_pton (int af, const char *src, void *dst)
    1.83 - {
    1.84 --    u_long result;  
    1.85 -+    unsigned long result;  
    1.86 - 
    1.87 -     if (af == AF_INET) {
    1.88 - 	result = inet_addr(src);
    1.89 -@@ -104,7 +104,7 @@
    1.90 - {
    1.91 -     if (af == AF_INET) {
    1.92 -         int i, c, val;
    1.93 --        u_char xp[4] = {0, 0, 0, 0};
    1.94 -+        unsigned char xp[4] = {0, 0, 0, 0};
    1.95 - 
    1.96 -         for (i = 0; ; i++) {
    1.97 - 	    c = *src++;
    1.98 -@@ -153,7 +153,7 @@
    1.99 - 
   1.100 -         struct buffer {
   1.101 -             char buffs[16][48+5];
   1.102 --            u_int i;
   1.103 -+            unsigned int i;
   1.104 -         } *buffp;
   1.105 - 
   1.106 - #    if 0
   1.107 -@@ -172,7 +172,7 @@
   1.108 - 	buff = buffp->buffs[buffp->i++%16];
   1.109 -     }
   1.110 -     if (prefix->family == AF_INET) {
   1.111 --	u_char *a;
   1.112 -+	unsigned char *a;
   1.113 - 	assert (prefix->bitlen <= 32);
   1.114 - 	a = prefix_touchar (prefix);
   1.115 - 	if (with_len) {
   1.116 -@@ -272,7 +272,7 @@
   1.117 - prefix_t *
   1.118 - ascii2prefix (int family, char *string)
   1.119 - {
   1.120 --    u_long bitlen, maxbitlen = 0;
   1.121 -+    unsigned long bitlen, maxbitlen = 0;
   1.122 -     char *cp;
   1.123 -     struct in_addr sin;
   1.124 - #ifdef HAVE_IPV6
   1.125 -@@ -491,8 +491,8 @@
   1.126 - patricia_search_exact (patricia_tree_t *patricia, prefix_t *prefix)
   1.127 - {
   1.128 -     patricia_node_t *node;
   1.129 --    u_char *addr;
   1.130 --    u_int bitlen;
   1.131 -+    unsigned char *addr;
   1.132 -+    unsigned int bitlen;
   1.133 - 
   1.134 -     assert (patricia);
   1.135 -     assert (prefix);
   1.136 -@@ -563,8 +563,8 @@
   1.137 - {
   1.138 -     patricia_node_t *node;
   1.139 -     patricia_node_t *stack[PATRICIA_MAXBITS + 1];
   1.140 --    u_char *addr;
   1.141 --    u_int bitlen;
   1.142 -+    unsigned char *addr;
   1.143 -+    unsigned int bitlen;
   1.144 -     int cnt = 0;
   1.145 - 
   1.146 -     assert (patricia);
   1.147 -@@ -662,8 +662,8 @@
   1.148 - patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
   1.149 - {
   1.150 -     patricia_node_t *node, *new_node, *parent, *glue;
   1.151 --    u_char *addr, *test_addr;
   1.152 --    u_int bitlen, check_bit, differ_bit;
   1.153 -+    unsigned char *addr, *test_addr;
   1.154 -+    unsigned int bitlen, check_bit, differ_bit;
   1.155 -     int i, j, r;
   1.156 - 
   1.157 -     assert (patricia);
   1.158 -Index: Net-Patricia-1.15/libpatricia/patricia.h
   1.159 ---- Net-Patricia-1.15/libpatricia/patricia.h.orig	2009-04-19 06:28:15.000000000 +0200
   1.160 -+++ Net-Patricia-1.15/libpatricia/patricia.h	2010-12-19 13:15:40.000000000 +0100
   1.161 -@@ -15,10 +15,10 @@
   1.162 - #ifndef _PATRICIA_H
   1.163 - #define _PATRICIA_H
   1.164 - 
   1.165 --/* typedef unsigned int u_int; */
   1.166 -+/* typedef unsigned int unsigned int; */
   1.167 - typedef void (*void_fn_t)();
   1.168 - /* { from defs.h */
   1.169 --#define prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
   1.170 -+#define prefix_touchar(prefix) ((unsigned char *)&(prefix)->add.sin)
   1.171 - #define MAXLINE 1024
   1.172 - #define BIT_TEST(f, b)  ((f) & (b))
   1.173 - /* } */
   1.174 -@@ -40,15 +40,15 @@
   1.175 - /* { from mrt.h */
   1.176 - 
   1.177 - typedef struct _prefix4_t {
   1.178 --    u_short family;		/* AF_INET | AF_INET6 */
   1.179 --    u_short bitlen;		/* same as mask? */
   1.180 -+    unsigned short family;		/* AF_INET | AF_INET6 */
   1.181 -+    unsigned short bitlen;		/* same as mask? */
   1.182 -     int ref_count;		/* reference count */
   1.183 -     struct in_addr sin;
   1.184 - } prefix4_t;
   1.185 - 
   1.186 - typedef struct _prefix_t {
   1.187 --    u_short family;		/* AF_INET | AF_INET6 */
   1.188 --    u_short bitlen;		/* same as mask? */
   1.189 -+    unsigned short family;		/* AF_INET | AF_INET6 */
   1.190 -+    unsigned short bitlen;		/* same as mask? */
   1.191 -     int ref_count;		/* reference count */
   1.192 -     union {
   1.193 - 		struct in_addr sin;
   1.194 -@@ -61,7 +61,7 @@
   1.195 - /* } */
   1.196 - 
   1.197 - typedef struct _patricia_node_t {
   1.198 --   u_int bit;			/* flag if this node used */
   1.199 -+   unsigned int bit;			/* flag if this node used */
   1.200 -    prefix_t *prefix;		/* who we are in patricia tree */
   1.201 -    struct _patricia_node_t *l, *r;	/* left and right children */
   1.202 -    struct _patricia_node_t *parent;/* may be used */
   1.203 -@@ -71,7 +71,7 @@
   1.204 - 
   1.205 - typedef struct _patricia_tree_t {
   1.206 -    patricia_node_t 	*head;
   1.207 --   u_int		maxbits;	/* for IP, 32 bit addresses */
   1.208 -+   unsigned int		maxbits;	/* for IP, 32 bit addresses */
   1.209 -    int num_active_node;		/* for debug purpose */
   1.210 - } patricia_tree_t;
   1.211 - 
   1.212 -Index: Net-Pcap-0.16/Makefile.PL
   1.213 ---- Net-Pcap-0.16/Makefile.PL.orig	2007-12-24 00:06:15.000000000 +0100
   1.214 -+++ Net-Pcap-0.16/Makefile.PL	2010-12-19 13:15:40.000000000 +0100
   1.215 -@@ -23,7 +23,8 @@
   1.216 - }
   1.217 - else {
   1.218 -     $options{CCFLAGS} = '-Wall -Wwrite-strings' if $Config{ccname} eq 'gcc' and $] >= 5.006;
   1.219 --    $options{LIBS}    = '-lpcap';
   1.220 -+    $options{INC}     = '-I/openpkg/include';
   1.221 -+    $options{LIBS}    = '-L/openpkg/lib -lpcap';
   1.222 - }
   1.223 - 
   1.224 - for my $arg (@ARGV) {
   1.225 -Index: Net-Pcap-0.16/Pcap.xs
   1.226 ---- Net-Pcap-0.16/Pcap.xs.orig	2008-01-01 05:22:22.000000000 +0100
   1.227 -+++ Net-Pcap-0.16/Pcap.xs	2010-12-19 13:15:40.000000000 +0100
   1.228 -@@ -33,7 +33,7 @@
   1.229 - #define NEED_sv_2pv_nolen 1
   1.230 - #include "ppport.h"
   1.231 - 
   1.232 --#include <pcap.h>
   1.233 -+#include "pcap.h"
   1.234 - 
   1.235 - #ifdef _CYGWIN
   1.236 - #include <Win32-Extensions.h>
   1.237 -Index: Net-RabbitMQ-0.0.4/Makefile.PL
   1.238 ---- Net-RabbitMQ-0.0.4/Makefile.PL.orig	2009-11-12 21:15:45.000000000 +0100
   1.239 -+++ Net-RabbitMQ-0.0.4/Makefile.PL	2010-12-19 13:15:40.000000000 +0100
   1.240 -@@ -2,12 +2,16 @@
   1.241 - use ExtUtils::MakeMaker 5.16 ;
   1.242 - use Config ;
   1.243 - 
   1.244 --my @parts = qw/api connection debug framing mem socket table/;
   1.245 --my $cfiles = join(' ', map { "librabbitmq/amqp_$_.c" } @parts);
   1.246 --
   1.247 - WriteMakefile(
   1.248 -         NAME            => 'Net::RabbitMQ',
   1.249 -         VERSION_FROM    => 'RabbitMQ.pm',
   1.250 --	OBJECT          => "RabbitMQ.o $cfiles",
   1.251 -+	'MYEXTLIB'	=> 'librabbitmq/librabbitmq$(LIB_EXT)',
   1.252 -+	OBJECT          => "RabbitMQ.o",
   1.253 -         );
   1.254 - 
   1.255 -+sub MY::postamble {
   1.256 -+'
   1.257 -+$(MYEXTLIB): librabbitmq/Makefile
   1.258 -+	cd librabbitmq && $(MAKE) $(PASTHRU)
   1.259 -+';
   1.260 -+}
   1.261 -Index: Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL
   1.262 ---- Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL.orig	2010-12-19 13:15:40.000000000 +0100
   1.263 -+++ Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL	2010-12-19 13:15:40.000000000 +0100
   1.264 -@@ -0,0 +1,22 @@
   1.265 -+
   1.266 -+use ExtUtils::MakeMaker;
   1.267 -+
   1.268 -+$Verbose = 1;
   1.269 -+
   1.270 -+WriteMakefile(
   1.271 -+    NAME  => 'Net::RabbitMQ::librabbitmq',
   1.272 -+    SKIP  => [ qw(all static static_lib dynamic dynamic_lib test) ],
   1.273 -+    clean => { 'FILES' => 'librabbitmq$(LIB_EXT)' },
   1.274 -+);
   1.275 -+
   1.276 -+sub MY::top_targets {
   1.277 -+'
   1.278 -+all :: static
   1.279 -+test ::
   1.280 -+static :: librabbitmq$(LIB_EXT)
   1.281 -+librabbitmq$(LIB_EXT): $(O_FILES)
   1.282 -+	$(AR) cr librabbitmq$(LIB_EXT) $(O_FILES)
   1.283 -+	$(RANLIB) librabbitmq$(LIB_EXT)
   1.284 -+
   1.285 -+';
   1.286 -+}
   1.287 -Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp.h
   1.288 ---- Net-RabbitMQ-0.0.4/librabbitmq/amqp.h.orig	2009-12-19 08:59:44.000000000 +0100
   1.289 -+++ Net-RabbitMQ-0.0.4/librabbitmq/amqp.h	2010-12-19 13:15:40.000000000 +0100
   1.290 -@@ -5,6 +5,9 @@
   1.291 - extern "C" {
   1.292 - #endif
   1.293 - 
   1.294 -+#include <sys/types.h>
   1.295 -+#include <unistd.h>
   1.296 -+
   1.297 - typedef int amqp_boolean_t;
   1.298 - typedef uint32_t amqp_method_number_t;
   1.299 - typedef uint32_t amqp_flags_t;
   1.300 -Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h
   1.301 ---- Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h.orig	2009-11-12 21:15:45.000000000 +0100
   1.302 -+++ Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h	2010-12-19 13:15:40.000000000 +0100
   1.303 -@@ -1,2 +1,3 @@
   1.304 -+#undef VERSION
   1.305 - #define VERSION "0.0.1"
   1.306 - 

mercurial