Tue, 28 Aug 2012 18:33:30 +0200
Modernize packaging and use newely appeared versioned tarball URI.
1 Index: Net-IRC-0.79/Makefile.PL
2 --- Net-IRC-0.79/Makefile.PL.orig 2009-12-23 18:05:52.000000000 +0100
3 +++ Net-IRC-0.79/Makefile.PL 2010-12-19 13:16:21.000000000 +0100
4 @@ -4,29 +4,6 @@
5 # the contents of the Makefile that is written.
7 exit 0 if $ENV{AUTOMATED_TESTING};
8 -my $ok = 'I acknowledge that Net::IRC is unsupported and I wish to proceed.';
9 -my $warning = <<WILLROBINSON;
10 ---------------------------------------------------------------------------------
11 -********************************************************************************
12 -DANGER, WILL ROBINSON! DANGER!
13 -
14 -This module has been deprecated, abandoned, and is no longer supported. It has
15 -not seen active development in five years, and its original author has moved on.
16 -We *STRONGLY* recommend you port your code to either Bot::BasicBot or
17 -POE::Component::IRC. Please feel free to stop by irc.freenode.net/#perl for help
18 -making this transition. Or, if you insist on proceeding, please type the
19 -following line exactly as is and then press Enter:
20 -
21 -$ok
22 -********************************************************************************
23 ---------------------------------------------------------------------------------
24 -WILLROBINSON
25 -
26 --t STDIN or die $warning;
27 -warn $warning;
28 -chomp(my $acceptance = <STDIN>);
29 -die "Refusing to install due to lack of confirmation" unless $acceptance eq $ok;
30 -
32 WriteMakefile(
33 'NAME' => 'Net::IRC',
34 Index: Net-Packet-3.27/Makefile.PL
35 --- Net-Packet-3.27/Makefile.PL.orig 2009-11-09 18:58:29.000000000 +0100
36 +++ Net-Packet-3.27/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
37 @@ -15,7 +15,6 @@
38 Time::HiRes => 0,
39 Net::IPv6Addr => 0,
40 Net::IPv4Addr => 0,
41 - Socket6 => 0,
42 Bit::Vector => 0,
43 },
44 ABSTRACT_FROM => 'lib/Net/Packet.pm',
45 Index: Net-Patricia-1.15/libpatricia/patricia.c
46 --- Net-Patricia-1.15/libpatricia/patricia.c.orig 2009-04-19 06:28:15.000000000 +0200
47 +++ Net-Patricia-1.15/libpatricia/patricia.c 2010-12-19 13:15:40.000000000 +0100
48 @@ -38,24 +38,24 @@
49 /* prefix_tochar
50 * convert prefix information to bytes
51 */
52 -u_char *
53 +unsigned char *
54 prefix_tochar (prefix_t * prefix)
55 {
56 if (prefix == NULL)
57 return (NULL);
59 - return ((u_char *) & prefix->add.sin);
60 + return ((unsigned char *) & prefix->add.sin);
61 }
63 int
64 -comp_with_mask (void *addr, void *dest, u_int mask)
65 +comp_with_mask (void *addr, void *dest, unsigned int mask)
66 {
68 if ( /* mask/8 == 0 || */ memcmp (addr, dest, mask / 8) == 0) {
69 int n = mask / 8;
70 int m = ((-1) << (8 - (mask % 8)));
72 - if (mask % 8 == 0 || (((u_char *)addr)[n] & m) == (((u_char *)dest)[n] & m))
73 + if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned char *)dest)[n] & m))
74 return (1);
75 }
76 return (0);
77 @@ -70,7 +70,7 @@
78 int
79 inet_pton (int af, const char *src, void *dst)
80 {
81 - u_long result;
82 + unsigned long result;
84 if (af == AF_INET) {
85 result = inet_addr(src);
86 @@ -104,7 +104,7 @@
87 {
88 if (af == AF_INET) {
89 int i, c, val;
90 - u_char xp[4] = {0, 0, 0, 0};
91 + unsigned char xp[4] = {0, 0, 0, 0};
93 for (i = 0; ; i++) {
94 c = *src++;
95 @@ -153,7 +153,7 @@
97 struct buffer {
98 char buffs[16][48+5];
99 - u_int i;
100 + unsigned int i;
101 } *buffp;
103 # if 0
104 @@ -172,7 +172,7 @@
105 buff = buffp->buffs[buffp->i++%16];
106 }
107 if (prefix->family == AF_INET) {
108 - u_char *a;
109 + unsigned char *a;
110 assert (prefix->bitlen <= 32);
111 a = prefix_touchar (prefix);
112 if (with_len) {
113 @@ -272,7 +272,7 @@
114 prefix_t *
115 ascii2prefix (int family, char *string)
116 {
117 - u_long bitlen, maxbitlen = 0;
118 + unsigned long bitlen, maxbitlen = 0;
119 char *cp;
120 struct in_addr sin;
121 #ifdef HAVE_IPV6
122 @@ -491,8 +491,8 @@
123 patricia_search_exact (patricia_tree_t *patricia, prefix_t *prefix)
124 {
125 patricia_node_t *node;
126 - u_char *addr;
127 - u_int bitlen;
128 + unsigned char *addr;
129 + unsigned int bitlen;
131 assert (patricia);
132 assert (prefix);
133 @@ -563,8 +563,8 @@
134 {
135 patricia_node_t *node;
136 patricia_node_t *stack[PATRICIA_MAXBITS + 1];
137 - u_char *addr;
138 - u_int bitlen;
139 + unsigned char *addr;
140 + unsigned int bitlen;
141 int cnt = 0;
143 assert (patricia);
144 @@ -662,8 +662,8 @@
145 patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
146 {
147 patricia_node_t *node, *new_node, *parent, *glue;
148 - u_char *addr, *test_addr;
149 - u_int bitlen, check_bit, differ_bit;
150 + unsigned char *addr, *test_addr;
151 + unsigned int bitlen, check_bit, differ_bit;
152 int i, j, r;
154 assert (patricia);
155 Index: Net-Patricia-1.15/libpatricia/patricia.h
156 --- Net-Patricia-1.15/libpatricia/patricia.h.orig 2009-04-19 06:28:15.000000000 +0200
157 +++ Net-Patricia-1.15/libpatricia/patricia.h 2010-12-19 13:15:40.000000000 +0100
158 @@ -15,10 +15,10 @@
159 #ifndef _PATRICIA_H
160 #define _PATRICIA_H
162 -/* typedef unsigned int u_int; */
163 +/* typedef unsigned int unsigned int; */
164 typedef void (*void_fn_t)();
165 /* { from defs.h */
166 -#define prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
167 +#define prefix_touchar(prefix) ((unsigned char *)&(prefix)->add.sin)
168 #define MAXLINE 1024
169 #define BIT_TEST(f, b) ((f) & (b))
170 /* } */
171 @@ -40,15 +40,15 @@
172 /* { from mrt.h */
174 typedef struct _prefix4_t {
175 - u_short family; /* AF_INET | AF_INET6 */
176 - u_short bitlen; /* same as mask? */
177 + unsigned short family; /* AF_INET | AF_INET6 */
178 + unsigned short bitlen; /* same as mask? */
179 int ref_count; /* reference count */
180 struct in_addr sin;
181 } prefix4_t;
183 typedef struct _prefix_t {
184 - u_short family; /* AF_INET | AF_INET6 */
185 - u_short bitlen; /* same as mask? */
186 + unsigned short family; /* AF_INET | AF_INET6 */
187 + unsigned short bitlen; /* same as mask? */
188 int ref_count; /* reference count */
189 union {
190 struct in_addr sin;
191 @@ -61,7 +61,7 @@
192 /* } */
194 typedef struct _patricia_node_t {
195 - u_int bit; /* flag if this node used */
196 + unsigned int bit; /* flag if this node used */
197 prefix_t *prefix; /* who we are in patricia tree */
198 struct _patricia_node_t *l, *r; /* left and right children */
199 struct _patricia_node_t *parent;/* may be used */
200 @@ -71,7 +71,7 @@
202 typedef struct _patricia_tree_t {
203 patricia_node_t *head;
204 - u_int maxbits; /* for IP, 32 bit addresses */
205 + unsigned int maxbits; /* for IP, 32 bit addresses */
206 int num_active_node; /* for debug purpose */
207 } patricia_tree_t;
209 Index: Net-Pcap-0.16/Makefile.PL
210 --- Net-Pcap-0.16/Makefile.PL.orig 2007-12-24 00:06:15.000000000 +0100
211 +++ Net-Pcap-0.16/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
212 @@ -23,7 +23,8 @@
213 }
214 else {
215 $options{CCFLAGS} = '-Wall -Wwrite-strings' if $Config{ccname} eq 'gcc' and $] >= 5.006;
216 - $options{LIBS} = '-lpcap';
217 + $options{INC} = '-I/openpkg/include';
218 + $options{LIBS} = '-L/openpkg/lib -lpcap';
219 }
221 for my $arg (@ARGV) {
222 Index: Net-Pcap-0.16/Pcap.xs
223 --- Net-Pcap-0.16/Pcap.xs.orig 2008-01-01 05:22:22.000000000 +0100
224 +++ Net-Pcap-0.16/Pcap.xs 2010-12-19 13:15:40.000000000 +0100
225 @@ -33,7 +33,7 @@
226 #define NEED_sv_2pv_nolen 1
227 #include "ppport.h"
229 -#include <pcap.h>
230 +#include "pcap.h"
232 #ifdef _CYGWIN
233 #include <Win32-Extensions.h>
234 Index: Net-RabbitMQ-0.0.4/Makefile.PL
235 --- Net-RabbitMQ-0.0.4/Makefile.PL.orig 2009-11-12 21:15:45.000000000 +0100
236 +++ Net-RabbitMQ-0.0.4/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
237 @@ -2,12 +2,16 @@
238 use ExtUtils::MakeMaker 5.16 ;
239 use Config ;
241 -my @parts = qw/api connection debug framing mem socket table/;
242 -my $cfiles = join(' ', map { "librabbitmq/amqp_$_.c" } @parts);
243 -
244 WriteMakefile(
245 NAME => 'Net::RabbitMQ',
246 VERSION_FROM => 'RabbitMQ.pm',
247 - OBJECT => "RabbitMQ.o $cfiles",
248 + 'MYEXTLIB' => 'librabbitmq/librabbitmq$(LIB_EXT)',
249 + OBJECT => "RabbitMQ.o",
250 );
252 +sub MY::postamble {
253 +'
254 +$(MYEXTLIB): librabbitmq/Makefile
255 + cd librabbitmq && $(MAKE) $(PASTHRU)
256 +';
257 +}
258 Index: Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL
259 --- Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL.orig 2010-12-19 13:15:40.000000000 +0100
260 +++ Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
261 @@ -0,0 +1,22 @@
262 +
263 +use ExtUtils::MakeMaker;
264 +
265 +$Verbose = 1;
266 +
267 +WriteMakefile(
268 + NAME => 'Net::RabbitMQ::librabbitmq',
269 + SKIP => [ qw(all static static_lib dynamic dynamic_lib test) ],
270 + clean => { 'FILES' => 'librabbitmq$(LIB_EXT)' },
271 +);
272 +
273 +sub MY::top_targets {
274 +'
275 +all :: static
276 +test ::
277 +static :: librabbitmq$(LIB_EXT)
278 +librabbitmq$(LIB_EXT): $(O_FILES)
279 + $(AR) cr librabbitmq$(LIB_EXT) $(O_FILES)
280 + $(RANLIB) librabbitmq$(LIB_EXT)
281 +
282 +';
283 +}
284 Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp.h
285 --- Net-RabbitMQ-0.0.4/librabbitmq/amqp.h.orig 2009-12-19 08:59:44.000000000 +0100
286 +++ Net-RabbitMQ-0.0.4/librabbitmq/amqp.h 2010-12-19 13:15:40.000000000 +0100
287 @@ -5,6 +5,9 @@
288 extern "C" {
289 #endif
291 +#include <sys/types.h>
292 +#include <unistd.h>
293 +
294 typedef int amqp_boolean_t;
295 typedef uint32_t amqp_method_number_t;
296 typedef uint32_t amqp_flags_t;
297 Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h
298 --- Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h.orig 2009-11-12 21:15:45.000000000 +0100
299 +++ Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h 2010-12-19 13:15:40.000000000 +0100
300 @@ -1,2 +1,3 @@
301 +#undef VERSION
302 #define VERSION "0.0.1"