[csw-devel] SF.net SVN: gar:[14606] csw/mgar/pkg/ucarp/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Wed May 18 18:44:17 CEST 2011


Revision: 14606
          http://gar.svn.sourceforge.net/gar/?rev=14606&view=rev
Author:   dmichelsen
Date:     2011-05-18 16:44:17 +0000 (Wed, 18 May 2011)

Log Message:
-----------
ucarp: Make it compile

Modified Paths:
--------------
    csw/mgar/pkg/ucarp/trunk/Makefile
    csw/mgar/pkg/ucarp/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/ucarp/trunk/files/0001-Solaris-hacks.patch
    csw/mgar/pkg/ucarp/trunk/files/0002-Remove-double-invocation-of-SHELL.patch

Modified: csw/mgar/pkg/ucarp/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ucarp/trunk/Makefile	2011-05-18 15:43:23 UTC (rev 14605)
+++ csw/mgar/pkg/ucarp/trunk/Makefile	2011-05-18 16:44:17 UTC (rev 14606)
@@ -14,11 +14,15 @@
   Protocol (CARP, OpenBSD's alternative to the patents-bloated VRRP).
 endef
 
-VENDOR_URL   = http://www.ucarp.org/project/ucarp
 MASTER_SITES = http://download.pureftpd.org/pub/ucarp/
-DISTFILES    = $(NAME)-$(VERSION).tar.gz
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+DISTFILES += $(DISTNAME).tar.bz2
 
-CONFIGURE_ARGS = $(DIRPATHS)
+PATCHFILES += 0001-Solaris-hacks.patch
+PATCHFILES += 0002-Remove-double-invocation-of-SHELL.patch
 
+VENDOR_URL = http://www.ucarp.org/project/ucarp
+
+RUNTIME_DEP_PKGS_CSWucarp += CSWlibintl8
+RUNTIME_DEP_PKGS_CSWucarp += CSWlibpcap1
+
 include gar/category.mk

Modified: csw/mgar/pkg/ucarp/trunk/checksums
===================================================================
--- csw/mgar/pkg/ucarp/trunk/checksums	2011-05-18 15:43:23 UTC (rev 14605)
+++ csw/mgar/pkg/ucarp/trunk/checksums	2011-05-18 16:44:17 UTC (rev 14606)
@@ -1 +1 @@
-e3caa733316a32c09e5d3817617e9145  ucarp-1.5.2.tar.gz
+723636dbf79fc6abd329a71ec4ddf79d  ucarp-1.5.2.tar.bz2

Added: csw/mgar/pkg/ucarp/trunk/files/0001-Solaris-hacks.patch
===================================================================
--- csw/mgar/pkg/ucarp/trunk/files/0001-Solaris-hacks.patch	                        (rev 0)
+++ csw/mgar/pkg/ucarp/trunk/files/0001-Solaris-hacks.patch	2011-05-18 16:44:17 UTC (rev 14606)
@@ -0,0 +1,127 @@
+From 462481081513bb9513a7ec2690ad98f7d75084ba Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 18 May 2011 18:14:26 +0200
+Subject: [PATCH] Solaris hacks
+
+---
+ src/carp.c    |   70 ++++++++++++++++++++++++++++++++------------------------
+ src/ip_carp.h |    5 ++++
+ 2 files changed, 45 insertions(+), 30 deletions(-)
+
+diff --git a/src/carp.c b/src/carp.c
+index 0ac5aa7..d08ee56 100644
+--- a/src/carp.c
++++ b/src/carp.c
+@@ -48,6 +48,16 @@
+ # include <dmalloc.h>
+ #endif
+ 
++#define timersub(a,b,result) \
++  do {                                                                        \
++    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
++    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;                          \
++    if ((result)->tv_usec < 0) {                                              \
++      --(result)->tv_sec;                                                     \
++      (result)->tv_usec += 1000000;                                           \
++    }                                                                         \
++  } while (0)
++
+ static void carp_set_state(struct carp_softc *sc, int state)
+ {
+     if ((int) sc->sc_state == state) {
+@@ -247,27 +257,27 @@ static void carp_send_ad(struct carp_softc *sc)
+     sum = cksum(&ch, sizeof ch);
+     ch.carp_cksum = htons(sum);    
+     
+-    eh.ether_shost[0] = 0x00;
+-    eh.ether_shost[1] = 0x00;
+-    eh.ether_shost[2] = 0x5e;
+-    eh.ether_shost[3] = 0x00;
+-    eh.ether_shost[4] = 0x00;
+-    eh.ether_shost[5] = vhid;
++    eh.ether_shost.ether_addr_octet[0] = 0x00;
++    eh.ether_shost.ether_addr_octet[1] = 0x00;
++    eh.ether_shost.ether_addr_octet[2] = 0x5e;
++    eh.ether_shost.ether_addr_octet[3] = 0x00;
++    eh.ether_shost.ether_addr_octet[4] = 0x00;
++    eh.ether_shost.ether_addr_octet[5] = vhid;
+     
+     if (no_mcast) {
+-        eh.ether_dhost[0] = 0xff;
+-        eh.ether_dhost[1] = 0xff;
+-        eh.ether_dhost[2] = 0xff;
+-        eh.ether_dhost[3] = 0xff;
+-        eh.ether_dhost[4] = 0xff;
+-        eh.ether_dhost[5] = 0xff;        
++        eh.ether_dhost.ether_addr_octet[0] = 0xff;
++        eh.ether_dhost.ether_addr_octet[1] = 0xff;
++        eh.ether_dhost.ether_addr_octet[2] = 0xff;
++        eh.ether_dhost.ether_addr_octet[3] = 0xff;
++        eh.ether_dhost.ether_addr_octet[4] = 0xff;
++        eh.ether_dhost.ether_addr_octet[5] = 0xff;        
+     } else {
+-        eh.ether_dhost[0] = 0x01;
+-        eh.ether_dhost[1] = 0x00;
+-        eh.ether_dhost[2] = 0x5e;
+-        eh.ether_dhost[3] = 0x00;
+-        eh.ether_dhost[4] = 0x00;
+-        eh.ether_dhost[5] = 0x12;        
++        eh.ether_dhost.ether_addr_octet[0] = 0x01;
++        eh.ether_dhost.ether_addr_octet[1] = 0x00;
++        eh.ether_dhost.ether_addr_octet[2] = 0x5e;
++        eh.ether_dhost.ether_addr_octet[3] = 0x00;
++        eh.ether_dhost.ether_addr_octet[4] = 0x00;
++        eh.ether_dhost.ether_addr_octet[5] = 0x12;        
+     }    
+     eh.ether_type = htons(ETHERTYPE_IP);    
+     
+@@ -433,18 +443,18 @@ static void packethandler(unsigned char *dummy,
+     logfile(LOG_DEBUG, "Ethernet "
+              "[%02x:%02x:%02x:%02x:%02x:%02x]->[%02x:%02x:%02x:%02x:%02x:%02x] "
+              "type [%04x]",
+-            (unsigned int) etherhead.ether_shost[0],
+-            (unsigned int) etherhead.ether_shost[1],
+-            (unsigned int) etherhead.ether_shost[2],
+-            (unsigned int) etherhead.ether_shost[3],
+-            (unsigned int) etherhead.ether_shost[4],
+-            (unsigned int) etherhead.ether_shost[5],
+-            (unsigned int) etherhead.ether_dhost[0],
+-            (unsigned int) etherhead.ether_dhost[1],
+-            (unsigned int) etherhead.ether_dhost[2],
+-            (unsigned int) etherhead.ether_dhost[3],
+-            (unsigned int) etherhead.ether_dhost[4],
+-            (unsigned int) etherhead.ether_dhost[5],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[0],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[1],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[2],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[3],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[4],
++            (unsigned int) etherhead.ether_shost.ether_addr_octet[5],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[0],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[1],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[2],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[3],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[4],
++            (unsigned int) etherhead.ether_dhost.ether_addr_octet[5],
+             (unsigned int) ntohs(etherhead.ether_type));
+ #endif
+     sp += sizeof etherhead;
+diff --git a/src/ip_carp.h b/src/ip_carp.h
+index 9504a8e..e7e1f54 100644
+--- a/src/ip_carp.h
++++ b/src/ip_carp.h
+@@ -54,6 +54,11 @@
+ #ifndef __IP_CARP_H__
+ #define __IP_CARP_H__ 1
+ 
++#define u_int8_t uint8_t
++#define u_int16_t uint16_t
++#define u_int32_t uint32_t
++#define u_int64_t uint64_t
++
+ struct carp_header {
+ #ifdef WORDS_BIGENDIAN
+         u_int8_t        carp_version:4,
+-- 
+1.7.3.2
+

Added: csw/mgar/pkg/ucarp/trunk/files/0002-Remove-double-invocation-of-SHELL.patch
===================================================================
--- csw/mgar/pkg/ucarp/trunk/files/0002-Remove-double-invocation-of-SHELL.patch	                        (rev 0)
+++ csw/mgar/pkg/ucarp/trunk/files/0002-Remove-double-invocation-of-SHELL.patch	2011-05-18 16:44:17 UTC (rev 14606)
@@ -0,0 +1,25 @@
+From b836965f62ece383a84a12b94fc0f9659b617940 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 18 May 2011 18:37:55 +0200
+Subject: [PATCH] Remove double invocation of $SHELL
+
+---
+ po/Makefile.in.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/po/Makefile.in.in b/po/Makefile.in.in
+index fecf500..19f5a07 100644
+--- a/po/Makefile.in.in
++++ b/po/Makefile.in.in
+@@ -40,7 +40,7 @@ INSTALL_DATA = @INSTALL_DATA@
+ # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+ # versions, $(mkinstalldirs) and $(install_sh) are unused.
+ mkinstalldirs = $(SHELL) @install_sh@ -d
+-install_sh = $(SHELL) @install_sh@
++install_sh = @install_sh@
+ MKDIR_P = @MKDIR_P@
+ mkdir_p = @mkdir_p@
+ 
+-- 
+1.7.3.2
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list