pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2004Q2]: pkgsrc Pullup ticket 38 to the pkgsrc-2004Q2 branch, ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fab74470689c
branches:  pkgsrc-2004Q2
changeset: 476698:fab74470689c
user:      agc <agc%pkgsrc.org@localhost>
date:      Tue Jul 06 22:07:12 2004 +0000

description:
Pullup ticket 38 to the pkgsrc-2004Q2 branch, requested by Juan Romero
Pardines:

        Module Name:    pkgsrc
        Committed By:   xtraeme
        Date:           Tue Jun 22 20:45:45 UTC 2004

        Modified Files:
                pkgsrc/wm/icewm: distinfo
        Added Files:
                pkgsrc/wm/icewm/patches: patch-ae patch-af

        Log Message:
        Apply patches from Iain Hibbert to make work the NetStatus app via
        PR pkg/26001.

        To use it, just add the following lines into your ~/.icewm/preferences:
        (change ppp0 for your interface)

        TaskBarShowNetStatus = 1
        NetworkStatusDevice = "ppp0"

diffstat:

 doc/CHANGES-pkgsrc-2004Q2 |   4 ++-
 wm/icewm/distinfo         |   4 ++-
 wm/icewm/patches/patch-ae |  24 +++++++++++++++++
 wm/icewm/patches/patch-af |  65 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 95 insertions(+), 2 deletions(-)

diffs (123 lines):

diff -r cab96b70c0ed -r fab74470689c doc/CHANGES-pkgsrc-2004Q2
--- a/doc/CHANGES-pkgsrc-2004Q2 Mon Jun 21 09:57:20 2004 +0000
+++ b/doc/CHANGES-pkgsrc-2004Q2 Tue Jul 06 22:07:12 2004 +0000
@@ -1,6 +1,8 @@
-$NetBSD: CHANGES-pkgsrc-2004Q2,v 1.1.2.2 2004/06/21 09:57:20 agc Exp $
+$NetBSD: CHANGES-pkgsrc-2004Q2,v 1.1.2.3 2004/07/06 22:07:38 agc Exp $
 
 Changes to the packages collection and infrastructure on the
 pkgsrc-2004Q2 branch:
 
 Created pkgsrc-2004Q2 branch [agc 2004-06-20 18:30 UTC]
+Pullup ticket 38, requested by Juan Romero Pardines [agc 2004-07-06]
+
diff -r cab96b70c0ed -r fab74470689c wm/icewm/distinfo
--- a/wm/icewm/distinfo Mon Jun 21 09:57:20 2004 +0000
+++ b/wm/icewm/distinfo Tue Jul 06 22:07:12 2004 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.16 2004/04/09 10:41:06 wiz Exp $
+$NetBSD: distinfo,v 1.16.2.1 2004/07/06 22:07:12 agc Exp $
 
 SHA1 (icewm-1.2.13.tar.gz) = ebfe807cbe3a9d931386833033eb9cb1792ea485
 Size (icewm-1.2.13.tar.gz) = 839636 bytes
 SHA1 (patch-ab) = 791868a4320a62ac81de487667f90cbdaeacd2a7
 SHA1 (patch-ad) = 4b4feeb255a035a77195bf6e6fe5ffda6d428754
+SHA1 (patch-ae) = b1db6d35fb2454c132c734b67483d8a9d22ed9df
+SHA1 (patch-af) = 8b074ce39a46873a09978e18904b252dfec0eecf
diff -r cab96b70c0ed -r fab74470689c wm/icewm/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm/patches/patch-ae Tue Jul 06 22:07:12 2004 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-ae,v 1.6.6.1 2004/07/06 22:07:12 agc Exp $
+
+Turn on HAVE_NET_STATUS for NetBSD
+ 
+--- src/apppstatus.h.orig      Sat Sep 27 08:54:45 2003
++++ src/apppstatus.h   Sun Jun 20 18:19:04 2004
+@@ -9,7 +9,7 @@
+ #define NETSTATUS_H
+ 
+ #ifdef CONFIG_APPLET_NET_STATUS
+-#if defined(linux) || defined(__FreeBSD__)
++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
+ 
+ #define HAVE_NET_STATUS 1
+ 
+@@ -61,7 +61,7 @@
+ };
+ 
+ 
+-#else // linux || __FreeBSD__
++#else // linux || __FreeBSD__ || __NetBSD__
+ #undef CONFIG_APPLET_NET_STATUS
+ #endif
+ #endif // CONFIG_APPLET_NET_STATUS
diff -r cab96b70c0ed -r fab74470689c wm/icewm/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm/patches/patch-af Tue Jul 06 22:07:12 2004 +0000
@@ -0,0 +1,65 @@
+$NetBSD: patch-af,v 1.7.6.1 2004/07/06 22:07:13 agc Exp $
+
+Add some code for NetBSD to
+   a) check if an interface is up, and
+   b) get the in/out character count for that interface
+
+--- src/apppstatus.cc.orig     Sat Sep 27 08:54:45 2003
++++ src/apppstatus.cc  Sun Jun 20 20:45:26 2004
+@@ -363,6 +363,26 @@
+         return isUpIsdn();
+ #endif
+ 
++#ifdef __NetBSD__
++    struct ifreq ifr;
++
++    if (fNetDev == 0)
++        return false;
++
++    int s = socket(AF_INET, SOCK_DGRAM, 0);
++
++    if( s != -1 ) {
++      strncpy(ifr.ifr_name, fNetDev, sizeof(ifr.ifr_name));
++      if( ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) != -1 ) {
++          if( ifr.ifr_flags & IFF_UP ) {
++              close(s);
++              return true;
++          }
++      }
++      close(s);
++    }
++    return false;
++#else
+     char buffer[32 * sizeof(struct ifreq)];
+     struct ifconf ifc;
+     struct ifreq *ifr;
+@@ -395,6 +415,7 @@
+ 
+     close(s);
+     return false;
++#endif // __NetBSD__
+ #endif // if 0
+ }
+ 
+@@ -522,6 +543,21 @@
+         }
+     }
+ #endif //FreeBSD
++#ifdef __NetBSD__
++    struct ifdatareq ifdr;
++    struct if_data * const ifi = &ifdr.ifdr_data;
++    int s;
++    
++    s = socket(AF_INET, SOCK_DGRAM, 0);
++    if( s != -1 ) {
++      strncpy(ifdr.ifdr_name, fNetDev, sizeof(ifdr.ifdr_name));
++      if (ioctl(s, SIOCGIFDATA, &ifdr) != -1) {
++          cur_ibytes = ifi->ifi_ibytes;
++          cur_obytes = ifi->ifi_obytes;
++      }
++      close(s);
++    }
++#endif //__NetBSD__
+ 
+     // correct the values and look for overflows
+     //msg("w/o corrections: ibytes: %lld, prev_ibytes; %lld, offset: %lld", cur_ibytes, prev_ibytes, offset_ibytes);



Home | Main Index | Thread Index | Old Index