[54391] trunk/dports/net

ryandesign at macports.org ryandesign at macports.org
Sun Jul 26 04:59:17 PDT 2009


Revision: 54391
          http://trac.macports.org/changeset/54391
Author:   ryandesign at macports.org
Date:     2009-07-26 04:59:17 -0700 (Sun, 26 Jul 2009)
Log Message:
-----------
quagga: new port, version 0.99.14; see #20424

Added Paths:
-----------
    trunk/dports/net/quagga/
    trunk/dports/net/quagga/Portfile
    trunk/dports/net/quagga/files/
    trunk/dports/net/quagga/files/quagga-patch1.diff
    trunk/dports/net/quagga/files/quagga-patch2.diff
    trunk/dports/net/quagga/files/quagga-patch3.diff

Added: trunk/dports/net/quagga/Portfile
===================================================================
--- trunk/dports/net/quagga/Portfile	                        (rev 0)
+++ trunk/dports/net/quagga/Portfile	2009-07-26 11:59:17 UTC (rev 54391)
@@ -0,0 +1,80 @@
+# $Id$
+
+PortSystem 1.0
+
+name            quagga
+version         0.99.14
+categories      net
+platforms       darwin
+maintainers     nzbox.com:mike openmaintainer
+description     Collection of Routing daemons for OSPF BGP and RIP
+long_description    Quagga is a routing software suite, providing implementations \
+                of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix \
+                platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
+                Quagga is a fork of GNU Zebra which was developed by Kunihiro \
+                Ishiguro. The Quagga tree aims to build a more involved community \
+                around Quagga than the current centralised model of GNU Zebra. \
+                This port installs the binaries, but does not include startup \
+                items, it should be considered experimental.
+
+homepage        http://quagga.net/about.php
+master_sites    http://quagga.net/download/
+
+checksums       md5     3a075fd5e26ec6d52f4a51b14a2d3c2c \
+                sha1    5c182a70987957b968b92251ab81b886647292a4 \
+                rmd160  48ab35063c91c1e8e180f791ec2db65a9b10c53c
+
+patchfiles      quagga-patch1.diff \
+                quagga-patch2.diff \
+                quagga-patch3.diff
+
+depends_lib     port:readline
+
+configure.args  --localstatedir=${prefix}/var/run/quagga \
+                --sysconfdir=${prefix}/etc/quagga \
+                --mandir=${prefix}/share/man \
+                --enable-vty-group=staff
+
+pre-destroot {
+    addgroup quagga
+    set gid [existsgroup quagga]
+    adduser quagga gid=${gid} realname=Quagga home=${prefix}/var/quagga
+}
+
+post-destroot {
+    xinstall -o quagga -g quagga -m 755 -d \
+        ${destroot}${prefix}/var/run/quagga ${destroot}${prefix}/etc/quagga \
+        ${destroot}${prefix}/var/quagga/logs
+}
+
+post-activate {
+    # Make sure initial conf files are present and setup correctly
+    foreach f { bgpd.conf ospf6d.conf ospfd.conf ripd.conf ripngd.conf zebra.conf } {
+        if {![file exists ${prefix}/etc/quagga/${f}]} {
+            file copy ${prefix}/etc/quagga/${f}.sample \
+                ${prefix}/etc/quagga/${f}
+        }
+    }
+
+    ui_msg "******************************************************"
+    ui_msg "* The routing protocol daemons are in ${prefix}/sbin"
+    ui_msg "* bgpd ospfd ospf6d ripd ripng isisd zebra"
+    ui_msg "* These have not been well tested on Mac OS X (yet)"
+    ui_msg "* The man files for the above are in section 8"
+    ui_msg "* The sample configs in ${prefix}/etc/quagga"
+    ui_msg "* sudo cp <daemon>.conf.sample <daemon>.conf"
+    ui_msg "* and edit as needed."
+    ui_msg "* No Startup Items have been made (yet)"
+    ui_msg "* As an example to start one of the daemons use"
+    ui_msg "* sudo ospfd -d"
+    ui_msg "* These drop root privileges and run as quagga/quagga"
+    ui_msg "* To manage these daemons use"
+    ui_msg "* telnet localhost:2604"
+    ui_msg "* For more info see http://quagga.net/about.php"
+    ui_msg "* To stop one of the daemons use e.g."
+    ui_msg "* sudo kill `cat ${prefix}/var/run/quagga/ospfd.pid`"
+    ui_msg "******************************************************"
+}
+
+destroot.keepdirs   ${destroot}${prefix}/var/run/quagga \
+                    ${destroot}${prefix}/var/quagga/logs


Property changes on: trunk/dports/net/quagga/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/net/quagga/files/quagga-patch1.diff
===================================================================
--- trunk/dports/net/quagga/files/quagga-patch1.diff	                        (rev 0)
+++ trunk/dports/net/quagga/files/quagga-patch1.diff	2009-07-26 11:59:17 UTC (rev 54391)
@@ -0,0 +1,102 @@
+-- sourced from http://marc.info/?l=quagga-dev&m=122470854730992&w=2
+-- zebra/*_null.c - Removed #pragma weak to be compatibile with gcc 4.0.1 from Apple xcode.
+
+--- zebra/ioctl_null.c
++++ zebra/ioctl_null.c
+@@ -19,19 +19,16 @@ int if_unset_prefix (struct interface *a, struct connected *b)
+ }
+ 
+ int if_prefix_add_ipv6 (struct interface *a, struct connected *b) { return 0; }
+-#pragma weak if_prefix_delete_ipv6 = if_prefix_add_ipv6
+-
++int if_prefix_delete_ipv6 (struct interface *a, struct connected *b) { return 0; }
+ int if_ioctl (u_long a, caddr_t b) { return 0; }
+-
+ int if_set_flags (struct interface *a, uint64_t b) { return 0; }
+-#pragma weak if_unset_flags = if_set_flags
+-
++int if_unset_flags (struct interface *a, uint64_t b) { return 0; }
+ void if_get_flags (struct interface *a) { return; }
+-#pragma weak if_get_metric = if_get_flags
+-#pragma weak if_get_mtu = if_get_flags
++void if_get_metric(struct interface *a) { return; }
++void if_get_mtu(struct interface *a) { return; }
+ 
+ #ifdef SOLARIS_IPV6
+-#pragma weak if_ioctl_ipv6 = if_ioctl
++int if_ioctl_ipv6 (u_long a, caddr_t b) { return 0; }
+ struct connected *if_lookup_linklocal(struct interface *a) { return 0; }
+ 
+ #define AF_IOCTL(af, request, buffer) \
+
+--- zebra/kernel_null.c
++++ zebra/kernel_null.c
+@@ -9,9 +9,11 @@
+ #include "zebra/connected.h"
+ 
+ int kernel_add_ipv4 (struct prefix *a, struct rib *b) { return 0; }
+-#pragma weak kernel_delete_ipv4 = kernel_add_ipv4
++int kernel_delete_ipv4  (struct prefix *a, struct rib *b) { return 0; }
++
+ int kernel_add_ipv6 (struct prefix *a, struct rib *b) { return 0; }
+-#pragma weak kernel_delete_ipv6 = kernel_add_ipv6
++int kernel_delete_ipv6 (struct prefix *a, struct rib *b) { return 0; }
++
+ int kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
+                             unsigned int index, int flags, int table)
+ { return 0; }
+@@ -37,4 +39,4 @@ int kernel_address_delete_ipv4 (struct interface *a, struct connected *b)
+ }
+ 
+ void kernel_init (void) { return; }
+-#pragma weak route_read = kernel_init
++void route_read  (void) { return; }
+diff --git a/zebra/misc_null.c b/zebra/misc_null.c
+index 7359430..8dba0ab 100644
+--- zebra/misc_null.c
++++ zebra/misc_null.c
+@@ -6,6 +6,6 @@
+ #include "zebra/interface.h"
+ 
+ void ifstat_update_proc (void) { return; }
+-#pragma weak rtadv_config_write = ifstat_update_proc
+-#pragma weak irdp_config_write = ifstat_update_proc
+-#pragma weak ifstat_update_sysctl = ifstat_update_proc
++void rtadv_config_write (struct vty *vty, struct interface *ifp) { return; }
++void irdp_config_write  (struct vty *vty, struct interface *ifp) { return; }
++void ifstat_update_sysctl(void) { return; }
+diff --git a/zebra/redistribute_null.c b/zebra/redistribute_null.c
+index e57a73b..7072894 100644
+--- zebra/redistribute_null.c
++++ zebra/redistribute_null.c
+@@ -6,21 +6,21 @@
+ 
+ void zebra_redistribute_add (int a, struct zserv *b, int c)
+ { return; }
+-#pragma weak zebra_redistribute_delete = zebra_redistribute_add
+-#pragma weak zebra_redistribute_default_add = zebra_redistribute_add
+-#pragma weak zebra_redistribute_default_delete = zebra_redistribute_add
++void zebra_redistribute_delete  (int a, struct zserv *b, int c) { return; }
++void zebra_redistribute_default_add (int a, struct zserv *b, int c) { return; }
++void zebra_redistribute_default_delete (int a, struct zserv *b, int c) { return; }
+ 
+ void redistribute_add (struct prefix *a, struct rib *b)
+ { return; }
+-#pragma weak redistribute_delete = redistribute_add
++void redistribute_delete (struct prefix *a, struct rib *b) { return; }
+ 
+ void zebra_interface_up_update (struct interface *a)
+ { return; }
+-#pragma weak zebra_interface_down_update = zebra_interface_up_update
+-#pragma weak zebra_interface_add_update = zebra_interface_up_update
+-#pragma weak zebra_interface_delete_update = zebra_interface_up_update
++void zebra_interface_down_update  (struct interface *a) { return; }
++void zebra_interface_add_update (struct interface *a) { return; }
++void zebra_interface_delete_update (struct interface *a) { return; }
+ 
+ void zebra_interface_address_add_update (struct interface *a,
+ 					 	struct connected *b)
+ { return; }
+-#pragma weak zebra_interface_address_delete_update = zebra_interface_address_add_update
++void zebra_interface_address_delete_update(struct interface *a, struct connected *b) { return; }
+

Added: trunk/dports/net/quagga/files/quagga-patch2.diff
===================================================================
--- trunk/dports/net/quagga/files/quagga-patch2.diff	                        (rev 0)
+++ trunk/dports/net/quagga/files/quagga-patch2.diff	2009-07-26 11:59:17 UTC (rev 54391)
@@ -0,0 +1,70 @@
+ -  sourced from http://marc.info/?l=quagga-dev&m=122470855231006&w=2
+ - configure.ac - pam module - we are searching for pam_misc.h also in pam/ - default location in OSX
+ - vtysh/vtysh_user.c - Added #ifdef and #include for pam on OSX.
+ - configure.ac - bsd linkdetect hack - On OSX we assume that bsdlinkdetect is not supported.
+ -  OSX have tested ifm_status value but don't have ifi_link_state value in if_data struct.
+
+--- configure.ac
++++ configure.ac
+@@ -530,6 +530,9 @@ case "$host" in
+       AC_CHECK_LIB(nsl, main)
+       CURSES=-lcurses
+   ;;
++  *-darwin*)
++      opsys=darwin
++  ;;
+   *-linux*)
+       opsys=gnu-linux
+       AC_DEFINE(GNU_LINUX,,GNU Linux)
+@@ -604,6 +604,12 @@ if test "$with_libpam" = "yes"; then
+      pam_conv_func="misc_conv"
+     ],
+     [], QUAGGA_INCLUDES)
++  AC_CHECK_HEADER([pam/pam_misc.h],
++    [AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
++     AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
++     pam_conv_func="misc_conv"
++    ],
++    [], QUAGGA_INCLUDES)
+   AC_CHECK_HEADER([security/openpam.h],
+     [AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
+      AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
+@@ -917,6 +917,7 @@ AC_MSG_RESULT(no))
+ dnl ---------------------------------------------------------------
+ dnl figure out how to check link-state
+ dnl ---------------------------------------------------------------
++if test "$opsys" != "darwin"; then
+ AC_CHECK_HEADER([net/if.h],
+   [AC_CHECK_HEADER( [net/if_media.h],
+     [m4_define([LINK_DETECT_INCLUDES],
+@@ -929,6 +929,7 @@ AC_CHECK_HEADER([net/if.h],
+     [],
+     QUAGGA_INCLUDES)], 
+   [], QUAGGA_INCLUDES )
++fi
+ 
+ dnl ------------------------
+ dnl TCP_MD5SIG socket option
+
+--- vtysh/vtysh_user.c
++++ vtysh/vtysh_user.c
+@@ -25,10 +25,18 @@
+ #include <pwd.h>
+ 
+ #ifdef USE_PAM
++#ifdef __APPLE__
++#include <pam/pam_appl.h>
++#else
+ #include <security/pam_appl.h>
++#endif
+ #ifdef HAVE_PAM_MISC_H
++#ifdef __APPLE__
++#include <pam/pam_misc.h>
++#else
+ #include <security/pam_misc.h>
+ #endif
++#endif
+ #ifdef HAVE_OPENPAM_H
+ #include <security/openpam.h>
+ #endif
+

Added: trunk/dports/net/quagga/files/quagga-patch3.diff
===================================================================
--- trunk/dports/net/quagga/files/quagga-patch3.diff	                        (rev 0)
+++ trunk/dports/net/quagga/files/quagga-patch3.diff	2009-07-26 11:59:17 UTC (rev 54391)
@@ -0,0 +1,32 @@
+- sourced from http://marc.info/?l=quagga-dev&m=122470857431036&w=2
+- update-autotools.sh - Use GNU libtool, libtoolize on Darwin.
+
+--- update-autotools
++++ update-autotools
+@@ -11,8 +11,17 @@ rm -rf autom4te.cache
+ echo "This $0 script is deprecated, and will be removed at some stage."
+ echo "Please use the 'autoreconf' command included with autoconf."
+ 
++OS=`uname -s`
++if [ "$OS" = "Darwin" ]; then
++   LIBTOOLIZE='glibtoolize'
++   LIBTOOL='glibtool'
++else
++   LIBTOOLIZE='libtoolize'
++   LIBTOOL='libtool'
++fi
++
+ echo "TOOLS VERIONS:"
+-for tool in autoheader autoconf libtool libtoolize aclocal automake; do
++for tool in autoheader autoconf $LIBTOOL $LIBTOOLIZE aclocal automake; do
+   $tool --version | head -1
+ done
+ 
+@@ -23,6 +32,6 @@ autoheader
+ echo "AUTOCONF:"
+ autoconf
+ echo "LIBTOOLIZE:"
+-libtoolize -c
++$LIBTOOLIZE -c
+ echo "AUTOMAKE"
+ automake --gnu --add-missing --copy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090726/dc55468c/attachment-0001.html>


More information about the macports-changes mailing list