OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   17-Dec-2004 23:47:53
  Branch: HEAD                             Handle: 2004121722475300

  Modified files:
    openpkg-src/perl-net    perl-net.patch perl-net.spec

  Log:
    add prereq for forthcoming flowscan

  Summary:
    Revision    Changes     Path
    1.6         +164 -0     openpkg-src/perl-net/perl-net.patch
    1.78        +11 -1      openpkg-src/perl-net/perl-net.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-net/perl-net.patch
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 perl-net.patch
  --- openpkg-src/perl-net/perl-net.patch       28 Jul 2004 10:50:01 -0000      
1.5
  +++ openpkg-src/perl-net/perl-net.patch       17 Dec 2004 22:47:53 -0000      
1.6
  @@ -43,3 +43,167 @@
    
    #ifdef __cplusplus
    }
  +Index: Net-Patricia-1.010/libpatricia/patricia.c
  +--- Net-Patricia-1.010/libpatricia/patricia.c.orig   2000-10-04 22:41:35 
+0200
  ++++ Net-Patricia-1.010/libpatricia/patricia.c        2004-12-17 23:45:00 
+0100
  +@@ -35,24 +35,24 @@
  + /* prefix_tochar
  +  * convert prefix information to bytes
  +  */
  +-u_char *
  ++unsigned char *
  + prefix_tochar (prefix_t * prefix)
  + {
  +     if (prefix == NULL)
  +     return (NULL);
  + 
  +-    return ((u_char *) & prefix->add.sin);
  ++    return ((unsigned char *) & prefix->add.sin);
  + }
  + 
  + int 
  +-comp_with_mask (void *addr, void *dest, u_int mask)
  ++comp_with_mask (void *addr, void *dest, unsigned int mask)
  + {
  + 
  +     if ( /* mask/8 == 0 || */ memcmp (addr, dest, mask / 8) == 0) {
  +     int n = mask / 8;
  +     int m = ((-1) << (8 - (mask % 8)));
  + 
  +-    if (mask % 8 == 0 || (((u_char *)addr)[n] & m) == (((u_char *)dest)[n] 
& m))
  ++    if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned 
char *)dest)[n] & m))
  +         return (1);
  +     }
  +     return (0);
  +@@ -67,7 +67,7 @@
  + int
  + inet_pton (int af, const char *src, void *dst)
  + {
  +-    u_long result;  
  ++    unsigned long result;  
  + 
  +     if (af == AF_INET) {
  +     result = inet_addr(src);
  +@@ -101,7 +101,7 @@
  + {
  +     if (af == AF_INET) {
  +         int i, c, val;
  +-        u_char xp[4] = {0, 0, 0, 0};
  ++        unsigned char xp[4] = {0, 0, 0, 0};
  + 
  +         for (i = 0; ; i++) {
  +         c = *src++;
  +@@ -150,7 +150,7 @@
  + 
  +         struct buffer {
  +             char buffs[16][48+5];
  +-            u_int i;
  ++            unsigned int i;
  +         } *buffp;
  + 
  + #    if 0
  +@@ -169,7 +169,7 @@
  +     buff = buffp->buffs[buffp->i++%16];
  +     }
  +     if (prefix->family == AF_INET) {
  +-    u_char *a;
  ++    unsigned char *a;
  +     assert (prefix->bitlen <= 32);
  +     a = prefix_touchar (prefix);
  +     if (with_len) {
  +@@ -269,7 +269,7 @@
  + prefix_t *
  + ascii2prefix (int family, char *string)
  + {
  +-    u_long bitlen, maxbitlen = 0;
  ++    unsigned long bitlen, maxbitlen = 0;
  +     char *cp;
  +     struct in_addr sin;
  + #ifdef HAVE_IPV6
  +@@ -466,8 +466,8 @@
  + patricia_search_exact (patricia_tree_t *patricia, prefix_t *prefix)
  + {
  +     patricia_node_t *node;
  +-    u_char *addr;
  +-    u_int bitlen;
  ++    unsigned char *addr;
  ++    unsigned int bitlen;
  + 
  +     assert (patricia);
  +     assert (prefix);
  +@@ -538,8 +538,8 @@
  + {
  +     patricia_node_t *node;
  +     patricia_node_t *stack[PATRICIA_MAXBITS + 1];
  +-    u_char *addr;
  +-    u_int bitlen;
  ++    unsigned char *addr;
  ++    unsigned int bitlen;
  +     int cnt = 0;
  + 
  +     assert (patricia);
  +@@ -637,8 +637,8 @@
  + patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
  + {
  +     patricia_node_t *node, *new_node, *parent, *glue;
  +-    u_char *addr, *test_addr;
  +-    u_int bitlen, check_bit, differ_bit;
  ++    unsigned char *addr, *test_addr;
  ++    unsigned int bitlen, check_bit, differ_bit;
  +     int i, j, r;
  + 
  +     assert (patricia);
  +Index: Net-Patricia-1.010/libpatricia/patricia.h
  +--- Net-Patricia-1.010/libpatricia/patricia.h.orig   2000-09-29 21:28:26 
+0200
  ++++ Net-Patricia-1.010/libpatricia/patricia.h        2004-12-17 23:44:39 
+0100
  +@@ -15,10 +15,10 @@
  + #ifndef _PATRICIA_H
  + #define _PATRICIA_H
  + 
  +-/* typedef unsigned int u_int; */
  ++/* typedef unsigned int unsigned int; */
  + typedef void (*void_fn_t)();
  + /* { from defs.h */
  +-#define prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
  ++#define prefix_touchar(prefix) ((unsigned char *)&(prefix)->add.sin)
  + #define MAXLINE 1024
  + #define BIT_TEST(f, b)  ((f) & (b))
  + /* } */
  +@@ -32,15 +32,15 @@
  + /* { from mrt.h */
  + 
  + typedef struct _prefix4_t {
  +-    u_short family;         /* AF_INET | AF_INET6 */
  +-    u_short bitlen;         /* same as mask? */
  ++    unsigned short family;          /* AF_INET | AF_INET6 */
  ++    unsigned short bitlen;          /* same as mask? */
  +     int ref_count;          /* reference count */
  +     struct in_addr sin;
  + } prefix4_t;
  + 
  + typedef struct _prefix_t {
  +-    u_short family;         /* AF_INET | AF_INET6 */
  +-    u_short bitlen;         /* same as mask? */
  ++    unsigned short family;          /* AF_INET | AF_INET6 */
  ++    unsigned short bitlen;          /* same as mask? */
  +     int ref_count;          /* reference count */
  +     union {
  +             struct in_addr sin;
  +@@ -53,7 +53,7 @@
  + /* } */
  + 
  + typedef struct _patricia_node_t {
  +-   u_int bit;                       /* flag if this node used */
  ++   unsigned int bit;                        /* flag if this node used */
  +    prefix_t *prefix;                /* who we are in patricia tree */
  +    struct _patricia_node_t *l, *r;  /* left and right children */
  +    struct _patricia_node_t *parent;/* may be used */
  +@@ -63,7 +63,7 @@
  + 
  + typedef struct _patricia_tree_t {
  +    patricia_node_t  *head;
  +-   u_int            maxbits;        /* for IP, 32 bit addresses */
  ++   unsigned int             maxbits;        /* for IP, 32 bit addresses */
  +    int num_active_node;             /* for debug purpose */
  + } patricia_tree_t;
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-net/perl-net.spec
  ============================================================================
  $ cvs diff -u -r1.77 -r1.78 perl-net.spec
  --- openpkg-src/perl-net/perl-net.spec        3 Dec 2004 07:24:52 -0000       
1.77
  +++ openpkg-src/perl-net/perl-net.spec        17 Dec 2004 22:47:53 -0000      
1.78
  @@ -45,6 +45,7 @@
   %define       V_net_packet            1.28
   %define       V_net_xmpp              1.0
   %define       V_net_jabber            2.0
  +%define       V_net_patricia          1.010
   
   #   package information
   Name:         perl-net
  @@ -57,7 +58,7 @@
   Group:        Language
   License:      GPL/Artistic
   Version:      %{V_perl}
  -Release:      20041203
  +Release:      20041217
   
   #   package options
   %option       with_curl   no
  @@ -84,6 +85,7 @@
   Source17:     
http://www.cpan.org/authors/id/M/MA/MANU/Net-IP-%{V_net_ip}.tar.gz
   Source18:     
http://www.cpan.org/modules/by-module/Net/Net-XMPP-%{V_net_xmpp}.tar.gz
   Source19:     
http://www.cpan.org/modules/by-module/Net/Net-Jabber-%{V_net_jabber}.tar.gz
  +Source20:     
http://www.cpan.org/modules/by-module/Net/Net-Patricia-%{V_net_patricia}.tar.gz
   Patch0:       perl-net.patch
   
   #   build information
  @@ -141,6 +143,7 @@
   %endif
       - Net::XMPP (%{V_net_xmpp})
       - Net::Jabber (%{V_net_jabber})
  +    - Net::Patricia (%{V_net_patricia})
   
   %track
       prog perl-net:Curl-easy = {
  @@ -243,6 +246,11 @@
           url       = http://www.cpan.org/modules/by-module/Net/
           regex     = Net-Jabber-(__VER__)\.tar\.gz
       }
  +    prog perl-net:Net-Patricia = {
  +        version   = %{V_net_patricia}
  +        url       = http://www.cpan.org/modules/by-module/Net/
  +        regex     = Net-Patricia-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q -c
  @@ -265,6 +273,7 @@
       %setup -q -T -D -a 17
       %setup -q -T -D -a 18
       %setup -q -T -D -a 19
  +    %setup -q -T -D -a 20
       sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
   
   %build
  @@ -296,6 +305,7 @@
       %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
       %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
       %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  +    %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
       %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat 
perl-openpkg-files`
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to