[19999] trunk/dports/net/moodss

source_changes at macosforge.org source_changes at macosforge.org
Mon Oct 9 17:22:47 PDT 2006


Revision: 19999
          http://trac.macosforge.org/projects/macports/changeset/19999
Author:   markd at macports.org
Date:     2006-10-09 17:22:46 -0700 (Mon, 09 Oct 2006)

Log Message:
-----------
Update to version 21.3.

Modified Paths:
--------------
    trunk/dports/net/moodss/Portfile
    trunk/dports/net/moodss/files/patch-Makefile

Removed Paths:
-------------
    trunk/dports/net/moodss/files/snmptrap.tcl

Modified: trunk/dports/net/moodss/Portfile
===================================================================
--- trunk/dports/net/moodss/Portfile	2006-10-09 19:39:44 UTC (rev 19998)
+++ trunk/dports/net/moodss/Portfile	2006-10-10 00:22:46 UTC (rev 19999)
@@ -2,10 +2,9 @@
 PortSystem      1.0
 
 name                    moodss
-version                 21.2
-revision		7
+version                 21.3
 categories              net
-maintainers             markd at opendarwin.org
+maintainers             markd at macports.org
 
 description             Modular Object Oriented Dynamic Spreadsheet - A graphical \
 			monitoring application that supports external modules \
@@ -16,7 +15,7 @@
 homepage                http://moodss.sourceforge.net/
 platforms               darwin
 master_sites            sourceforge
-checksums               md5 8e48defc0f98a1346292d31ab9d226c2
+checksums               md5 8092a0d3146ebac3293ff2daa53d1986
 use_bzip2		yes
 
 depends_lib             port:tcl \
@@ -40,32 +39,34 @@
         depends_lib-append      port:r
 }
 
-use_configure		no
+use_configure	no
+build {}
 
-set moodssdir ${prefix}/share/moodss
-
 post-patch {
-# Set install paths for DarwinPorts
-	reinplace "s|__DESTROOT__|${destroot}|g" \
-                "${worksrcpath}/Makefile"
-	reinplace "s|__PREFIX__|${prefix}|g" \
-                "${worksrcpath}/Makefile"
-
 # Set the location of the moomps resource file to where the moomps port puts it
         reinplace "s|/etc/moomps/rc|${prefix}/etc/moomps/rc|g" \
                 "${worksrcpath}/global.tcl"
 
-# Set default Nagios plugin path for DP's nagios-plugins port
-#   When plugin path is set, '/<plugin_path>/check_' may be ommitted from Nagios check commands
-
+#   When Nagios plugin path is set, '/<plugin_path>/check_' may be ommitted from Nagios check commands
 	reinplace "s|/usr/lib/nagios/plugins/|${prefix}/libexec/nagios/|g" \
                 "${worksrcpath}/nagios/nagios.tcl"
+}
 
-# Copy a fixed snmptrap file
-        file copy -force ${filespath}/snmptrap.tcl ${worksrcpath}/snmptrap
+destroot {
+	system "make \
+			ROOTDIR=${destroot} \
+			TCLLIBDIR=${prefix}/lib \
+			BINDIR=${prefix}/bin \
+			LIBDIR=${prefix}/lib \
+			MANDIR=${prefix}/share/man \
+			DOCDIR=${prefix}/share/doc \
+			MOODSSLIBDIR=${prefix}/lib/moodss \
+		install"
 }
 
 post-activate {
+# User Instructions
+
 ui_msg "\n
 To enable the moodss ping module you must activate the ${prefix}/bin/nmicmpd
 daemon (a component of the dependent package Scotty).  To do this:

Modified: trunk/dports/net/moodss/files/patch-Makefile
===================================================================
--- trunk/dports/net/moodss/files/patch-Makefile	2006-10-09 19:39:44 UTC (rev 19998)
+++ trunk/dports/net/moodss/files/patch-Makefile	2006-10-10 00:22:46 UTC (rev 19999)
@@ -1,36 +1,5 @@
---- Makefile.org	2006-05-07 18:20:59.000000000 -0700
-+++ Makefile	2006-05-07 18:23:07.000000000 -0700
-@@ -7,7 +7,7 @@
- CC = gcc
- # dynamic libraries compilation options:
- CFLAGS = -O2
--TCLLIBDIR = /usr/lib
-+TCLLIBDIR = __PREFIX__/lib
- # optionally add Tcl includes path (use -Idirectory syntax):
- INCLUDES =
- # optionally include SQLite package (set to true or false):
-@@ -18,15 +18,15 @@
- 
- # only use as the temporary installation directory, such as from a rpm
- # specification file, otherwise change the directories below instead:
--ROOTDIR =
-+ROOTDIR = __DESTROOT__
- 
- # you may change the directories below:
- BASEDIR =
--BINDIR = $(BASEDIR)/usr/bin
--LIBDIR = $(BASEDIR)/usr/lib
--MANDIR = $(BASEDIR)/usr/share/man
--DOCDIR = $(BASEDIR)/usr/share/doc
--MOODSSLIBDIR = $(LIBDIR)/moodss
-+BINDIR = __PREFIX__/bin
-+LIBDIR = __PREFIX__/lib
-+MANDIR = __PREFIX__/share/man
-+DOCDIR = __PREFIX__/share/doc
-+MOODSSLIBDIR = __PREFIX__/lib/moodss
- # where the modules will be finally installed (useful in rpm specification):
- MODULESDIR = $(MOODSSLIBDIR)
- MOODSSDOCDIR = $(DOCDIR)/moodss-$(VERSION)
+--- Makefile.org	2006-10-03 17:47:19.000000000 -0700
++++ Makefile	2006-10-03 23:00:03.000000000 -0700
 @@ -36,11 +36,11 @@
  # uncomment the MODULES entries for your platform below,
  # while obviously commenting those entries for all the other platforms:
@@ -50,12 +19,12 @@
  
  packlibs/libfilesystem.so.1.1: packlibs/filesystem.c libtclstub.a
 -	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
-+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
++	$(CC) -dynamic -bundle -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
  
  packlibs/libnetwork.so.1.23: packlibs/network.c libtclstub.a
 -	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $? $(EXTRALIBS)
-+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $? $(EXTRALIBS)
++	$(CC) -dynamic -bundle -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $? $(EXTRALIBS)
  
  packlibs/liblogging.so.1.0: packlibs/logging.c libtclstub.a
 -	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
-+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
++	$(CC) -dynamic -bundle -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?

Deleted: trunk/dports/net/moodss/files/snmptrap.tcl
===================================================================
--- trunk/dports/net/moodss/files/snmptrap.tcl	2006-10-09 19:39:44 UTC (rev 19998)
+++ trunk/dports/net/moodss/files/snmptrap.tcl	2006-10-10 00:22:46 UTC (rev 19999)
@@ -1,177 +0,0 @@
-# copyright (C) 1997-2006 Jean-Luc Fontaine (mailto:jfontain at free.fr)
-# this program is free software: please read the COPYRIGHT file enclosed in this package or use the Help Copyright menu
-
-# $Id: snmptrap.tcl,v 1.2 2006/05/12 17:05:47 markd Exp $
-
-
-package provide snmptrap [lindex {$Revision: 1.2 $} 1]
-set version [package require Tnm]
-if {[package vcompare $version 2.1.10] < 0} {
-    error {Tnm version 2.1.10 or above is required}
-}
-set tnm3 [expr {[package vcompare $version 3] >= 0}]                                                            ;# tested on windows
-if {$tnm3} {                                                                                  ;# commands are in their own namespace
-    namespace import Tnm::*
-}
-
-namespace eval snmptrap {
-
-    variable numberOfRows 10                                                                                           ;# by default
-
-    array set data {
-        updates 0
-        0,label {} 0,type integer 0,message {row creation order}
-        1,label days 1,type integer 1,message {number of days of uptime for agent}
-        2,label time 2,type dictionary 2,message {uptime for agent (hours:minutes:seconds.hundredths)}
-        3,label type 3,type dictionary 3,message {trap type}
-        4,label identifiers 4,type dictionary 4,message {additional object identifiers} 4,anchor left
-        5,label values 5,type dictionary 5,message {additional object values} 5,anchor left
-        switches {--mibs 1 --rows 1 --trace 0 --version 1}
-        pollTimes -10
-    }
-    set file [open snmptrap.htm]
-    set data(helpText) [read $file]                                                           ;# initialize HTML help data from file
-    close $file
-    unset file
-
-    proc reportError {identifier message} {
-        if {[string length $identifier] > 0} {
-            set text "mib: [mib file $identifier]\n"
-        }
-        append text $message
-        error $text
-    }
-
-    proc printErrorAndExit {identifier message} {
-        puts -nonewline stderr {snmptrap module:}
-        if {[string length $identifier] > 0} {
-            puts -nonewline stderr " (mib: [mib file $identifier])"
-        }
-        puts stderr " $message"
-        exit 1
-    }
-
-    proc initialize {optionsName} {
-        upvar 1 $optionsName options
-        variable data
-        variable session
-        variable trace
-        variable numberOfRows
-
-        catch {set trace $options(--trace)}
-        if {[info exists options(--mibs)]} {                                               ;# comma separated list of MIB file names
-            foreach file [split $options(--mibs) ,] {
-                if {[catch {mib load $file} message]} {
-                    reportError {} $message
-                }
-            }
-        }
-        set arguments {}
-        set type trap                                                                                    ;# for default SNMP version
-        if {[info exists options(--version)]} {                                                     ;# default is 1 (SNMP version 1)
-            switch $options(--version) {
-                1 {}
-                2C {
-                    set type inform
-                    lappend arguments -version SNMPv2C
-                }
-                2U {
-                    set type inform
-                    lappend arguments -version SNMPv2U
-                }
-                default {
-                    reportError {} {version must be 1, 2C or 2U}
-                }
-            }
-        }
-        if {$::tnm3} {
-            set session [eval snmp listener $arguments]
-            set daemon nmtrapd
-            set error [catch {$session bind $type {::snmptrap::processTrap %E [list %V]}} message]
-        } else {
-            set session [eval snmp session $arguments]
-            set daemon straps
-            set error [catch {$session bind {} $type {::snmptrap::processTrap %E [list %V]}} message]
-        }
-        if {$error} {
-            append message "\n(check that Scotty $daemon daemon is running)."
-            reportError {} $message
-        }
-        catch {set numberOfRows $options(--rows)}
-    }
-
-    proc formattedObjects {list} {                                                                               ;# list of varbinds
-        set string {}
-        foreach object $list {
-            foreach {identifier type value} $object {}
-            append string " [mib name $identifier]($value)"
-        }
-        return $string
-    }
-
-    proc processTrap {status objects} {           ;# objects are a list of varbinds (see snmp manual page) belonging to the same row
-        variable session
-        variable trace
-        variable data
-        variable numberOfRows
-
-        if {[info exists trace]} {
-            puts "<<< trap($status):[formattedObjects $objects]"
-        }
-        if {[string compare $status noError]} {
-            flashMessage "error: $status"
-            return                                                                                                           ;# done
-        }
-        for {set row [expr {[llength [array names data *,0]] - 1}]} {$row >= 0} {incr row -1} {          ;# shift existing rows down
-            if {($numberOfRows > 0) && ($row >= ($numberOfRows - 1))} continue                      ;# possibly limit number of rows
-            set next [expr {$row + 1}]
-            array set data [list\
-                $next,0 $next $next,1 $data($row,1) $next,2 $data($row,2) $next,3 $data($row,3) $next,4 $data($row,4)\
-                $next,5 $data($row,5)\
-            ]
-        }
-        set data(0,0) 0
-        foreach {identifier type value} [lindex $objects 0] {}
-
-	if {$::tnm3} {
-  	  set days [expr {$value / 8640000}]; set value [expr {$value - ($days *8640000)}]
-	  set hours [expr {$value / 360000}]; set value [expr {$value - ($hours *360000)}]
-	  set minutes [expr {$value / 6000}]; set value [expr {$value - ($minutes *6000)}]
-	  set seconds [expr {$value / 100}]; set value [expr {$value - ($seconds *100)}]
-	  set data(0,1) $days; set data(0,2) $hours:$minutes:$seconds.$value
-	} else {
-		scan $value {%ud %s} data(0,1) data(0,2)
-	}
-
-        foreach {identifier type value} [lindex $objects 1] {}                                                          ;# trap type
-        if {[catch {set data(0,3) [mib name $value]} message]} {                                   ;# convert to trap readable value
-            append message "\n(check that MIB including this trap is loaded)."
-            printErrorAndExit $value $message
-        }
-        set identifiers {}
-        set values {}
-        foreach object [lrange $objects 2 end] {                                                   ;# now process additional objects
-            foreach {identifier type value} $object {}
-            if {[string length $identifiers] > 0} {                                                ;# display data in multiple lines
-                append identifiers \n
-                append values \n
-            }
-            if {[catch {regsub {\.0$} [mib name $identifier] {} identifier} message]} {                 ;# possibly strip identifier
-                printErrorAndExit {} $message                                                        ;# abort on invalid identifiers
-            }
-            append identifiers $identifier
-            append values $value
-        }
-        set data(0,4) $identifiers
-        set data(0,5) $values
-        incr data(updates)
-    }
-
-    proc terminate {} {
-        variable session
-
-        catch {$session destroy}                                                                ;# try to clean up and ignore errors
-    }
-
-}
-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20061009/b7a5bc5c/attachment.html


More information about the macports-changes mailing list