perl-net/perl-net.patch

Fri, 03 Aug 2012 15:43:37 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 15:43:37 +0200
changeset 457
c5fbc773861c
parent 99
161326b4f1f9
permissions
-rw-r--r--

Adapt buildconf to conform to OpenPKG simplistic man path hierarchy.

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

mercurial