diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-11-05 04:53:48 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-11-05 04:53:48 +0000 |
commit | e18151212d3326dbf04797c6d5300fb1211ee875 (patch) | |
tree | 1ca56d6a4227efdb653cc8e2b2cbedbbc8de3d88 /net/gnome-netstatus | |
parent | cc0f3248a2eb77d7e3df88333fd25eb8594223dc (diff) | |
download | ports-e18151212d3326dbf04797c6d5300fb1211ee875.tar.gz ports-e18151212d3326dbf04797c6d5300fb1211ee875.zip |
Notes
Diffstat (limited to 'net/gnome-netstatus')
-rw-r--r-- | net/gnome-netstatus/Makefile | 11 | ||||
-rw-r--r-- | net/gnome-netstatus/distinfo | 4 | ||||
-rw-r--r-- | net/gnome-netstatus/files/patch-src_netstatus-iface.c | 18 | ||||
-rw-r--r-- | net/gnome-netstatus/files/patch-src_netstatus-sysdeps.c | 264 | ||||
-rw-r--r-- | net/gnome-netstatus/pkg-plist | 22 |
5 files changed, 27 insertions, 292 deletions
diff --git a/net/gnome-netstatus/Makefile b/net/gnome-netstatus/Makefile index b455b8fb7edf..5c8a5647d921 100644 --- a/net/gnome-netstatus/Makefile +++ b/net/gnome-netstatus/Makefile @@ -3,14 +3,15 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ +# $MCom: ports/net/gnomenetstatus/Makefile,v 1.39 2005/10/08 19:41:39 marcus Exp $ # PORTNAME= gnomenetstatus -PORTVERSION= 2.10.0 +PORTVERSION= 2.12.0 PORTREVISION= 1 CATEGORIES= net gnome MASTER_SITES= ${MASTER_SITE_GNOME} -MASTER_SITE_SUBDIR= sources/gnome-netstatus/2.10 +MASTER_SITE_SUBDIR= sources/gnome-netstatus/2.12 DISTNAME= gnome-netstatus-${PORTVERSION} DIST_SUBDIR= gnome2 @@ -19,11 +20,13 @@ COMMENT= A GNOME applet that shows network status USE_X_PREFIX= yes INSTALLS_OMF= yes +INSTALLS_ICONS= yes USE_BZIP2= yes GNOME_DESKTOP_VERSION=2 -USE_GNOME= gnomehack intlhack gnomeprefix libgnome gnomepanel libglade2 +USE_GNOME= gnomehack intlhack gnomeprefix libgnome gnomepanel libglade2 \ + gnomedocutils USE_GMAKE= yes -USE_LIBTOOL_VER=15 +USE_AUTOTOOLS= libtool:15 CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" diff --git a/net/gnome-netstatus/distinfo b/net/gnome-netstatus/distinfo index 48e9fbf2c961..6b98eac7f423 100644 --- a/net/gnome-netstatus/distinfo +++ b/net/gnome-netstatus/distinfo @@ -1,2 +1,2 @@ -MD5 (gnome2/gnome-netstatus-2.10.0.tar.bz2) = b1a044cfbe3299e00d514d966d4766e8 -SIZE (gnome2/gnome-netstatus-2.10.0.tar.bz2) = 510277 +MD5 (gnome2/gnome-netstatus-2.12.0.tar.bz2) = a5f23731a3bf232969e82afef8792a36 +SIZE (gnome2/gnome-netstatus-2.12.0.tar.bz2) = 473226 diff --git a/net/gnome-netstatus/files/patch-src_netstatus-iface.c b/net/gnome-netstatus/files/patch-src_netstatus-iface.c deleted file mode 100644 index 64c9ad52f8c9..000000000000 --- a/net/gnome-netstatus/files/patch-src_netstatus-iface.c +++ /dev/null @@ -1,18 +0,0 @@ ---- src/netstatus-iface.c.orig Tue Nov 30 18:35:23 2004 -+++ src/netstatus-iface.c Tue Nov 30 18:35:43 2004 -@@ -33,6 +33,7 @@ - - #include <libgnome/gnome-i18n.h> - -+#include <sys/types.h> - #include <sys/ioctl.h> - #ifdef HAVE_SYS_SOCKIO_H - #include <sys/sockio.h> -@@ -41,6 +42,7 @@ - #include <sys/socket.h> - #include <net/if.h> - #include <net/if_arp.h> -+#include <netinet/in.h> - #include <arpa/inet.h> - #include <errno.h> - #include <unistd.h> diff --git a/net/gnome-netstatus/files/patch-src_netstatus-sysdeps.c b/net/gnome-netstatus/files/patch-src_netstatus-sysdeps.c index 00ba2cb1e7eb..bf655bd6a0a8 100644 --- a/net/gnome-netstatus/files/patch-src_netstatus-sysdeps.c +++ b/net/gnome-netstatus/files/patch-src_netstatus-sysdeps.c @@ -1,253 +1,11 @@ ---- src/netstatus-sysdeps.c.orig Fri Jul 30 04:21:30 2004 -+++ src/netstatus-sysdeps.c Mon Jun 27 14:14:19 2005 -@@ -35,6 +35,16 @@ - #include <glib.h> - #include <libgnome/gnome-i18n.h> - -+#ifdef __FreeBSD__ -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <sys/ioctl.h> -+#include <net/if.h> -+#include <net/if_var.h> -+#include <dev/an/if_aironet_ieee.h> -+#include <dev/wi/if_wavelan_ieee.h> -+#endif -+ - static inline gboolean - parse_stats (char *buf, - int prx_idx, -@@ -384,6 +394,174 @@ parse_header (char *buf, - } - } - -+static inline gboolean -+wireless_getval (const char *iface, -+ gpointer req, -+ unsigned long req_type, -+ char **error) -+{ -+ struct ifreq ifr; -+ int s; -+ -+ memset (&ifr, 0, sizeof (ifr)); -+ -+ strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name)); -+ ifr.ifr_data = (caddr_t) req; -+ -+ s = socket (AF_INET, SOCK_DGRAM, 0); -+ -+ if (s == -1) -+ { -+ *error = g_strdup_printf (_("Could not connect to interface, '%s'"), iface); -+ return FALSE; -+ } -+ -+ if (ioctl (s, req_type, &ifr) == -1) -+ { -+ *error = g_strdup_printf (_("Could not send ioctl to interface, '%s'"), iface); -+ close (s); -+ return FALSE; -+ } -+ -+ close (s); -+ return TRUE; -+} -+ -+static inline char* -+get_an_data (const char *iface, -+ int *signal_strength) -+{ -+ struct an_req areq; -+ struct an_ltv_status *sts; -+#ifdef AN_RID_RSSI_MAP -+ struct an_ltv_rssi_map an_rssimap; -+#endif -+ int level; -+ char *error = NULL; -+ gboolean rssimap_valid = FALSE; -+ -+#ifdef AN_RID_RSSI_MAP -+ an_rssimap.an_len = sizeof (an_rssimap); -+ an_rssimap.an_type = AN_RID_RSSI_MAP; -+ rssimap_valid = wireless_getval (iface, (gpointer) &an_rssimap, SIOCGAIRONET, &error); -+#endif -+ -+ areq.an_len = sizeof (areq); -+ areq.an_type = AN_RID_STATUS; -+ -+ if (!wireless_getval (iface, (gpointer) &areq, SIOCGAIRONET, &error)) -+ return error; -+ -+ sts = (struct an_ltv_status *)&areq; -+#ifdef AN_RID_RSSI_MAP -+ if (rssimap_valid) -+ level = (int) (an_rssimap.an_entries[sts->an_normalized_strength].an_rss_pct); -+ else -+ level = (int) (sts->an_normalized_strength); -+#else -+ level = (int) (sts->an_normalized_rssi); -+#endif -+ memcpy (signal_strength, &level, sizeof (signal_strength)); -+ -+ return error; -+} -+ -+static inline char* -+get_wi_data (const char *iface, -+ int *signal_strength) -+{ -+ struct wi_req wreq; -+ int level; -+ char *error = NULL; -+ -+ memset (&wreq, 0, sizeof (wreq)); -+ -+ wreq.wi_len = WI_MAX_DATALEN; -+ wreq.wi_type = WI_RID_COMMS_QUALITY; -+ -+ if (!wireless_getval (iface, (gpointer) &wreq, SIOCGWAVELAN, &error)) -+ return error; -+ -+ level = (int) (wreq.wi_val[1]); -+ -+#ifdef WI_RID_READ_APS -+ if (signal_strength <= 0) -+ { -+ /* we fail to get signal strength by usual means, try another way */ -+ static time_t last_scan; -+ static long int cached; -+ time_t now = time (NULL); -+ -+ /* XXX: this is long operation, and we will scan station not often then one in 5 secs */ -+ if (now > last_scan + 5) -+ { -+ struct wi_apinfo *w; -+ int nstations; -+ -+ bzero ((char *)&wreq, sizeof(wreq)); -+ wreq.wi_len = WI_MAX_DATALEN; -+ wreq.wi_type = WI_RID_READ_APS; -+ if (!wireless_getval (iface, (gpointer) &wreq, SIOCGWAVELAN, &error)) -+ return error; -+ nstations = *(int *)wreq.wi_val; -+ if (nstations > 0) -+ { -+ w = (struct wi_apinfo *)(((char *)&wreq.wi_val) + sizeof(int)); -+ signal_strength = (long int)w->signal; -+ } -+ -+ cached = signal_strength; -+ last_scan = now; -+ } -+ else -+ { -+ signal_strength = cached; -+ } -+ } -+#endif -+ -+ memcpy (signal_strength, &level, sizeof (signal_strength)); -+ -+ return error; -+} -+ -+char * -+netstatus_sysdeps_read_iface_wireless_details (const char *iface, -+ gboolean *is_wireless, -+ int *signal_strength) -+{ -+ char *error_message = NULL; -+ -+ g_return_val_if_fail (iface != NULL, NULL); -+ g_return_val_if_fail (is_wireless != NULL, NULL); -+ g_return_val_if_fail (signal_strength != NULL, NULL); -+ -+ if (is_wireless) -+ *is_wireless = FALSE; -+ if (signal_strength) -+ *signal_strength = 0; -+ -+ if (g_strncasecmp (iface, "an", 2) && g_strncasecmp (iface, "wi", 2) && -+ g_strncasecmp (iface, "ath", 3) && g_strncasecmp (iface, "ndis", 4) && -+ g_strncasecmp (iface, "ural", 4) && g_strncasecmp (iface, "ral", 3) && -+ g_strncasecmp (iface, "ipw", 3) && g_strncasecmp (iface, "iwi", 3) && -+ g_strncasecmp (iface, "acx", 3)) -+ return error_message; -+ -+ if (g_strncasecmp (iface, "an", 2) == 0) -+ { -+ error_message = get_an_data (iface, signal_strength); -+ *is_wireless = TRUE; -+ } -+ else -+ { -+ error_message = get_wi_data (iface, signal_strength); -+ *is_wireless = TRUE; -+ } -+ -+ return error_message; -+} -+ - char * - netstatus_sysdeps_read_iface_statistics (const char *iface, - gulong *in_packets, -@@ -413,11 +591,11 @@ netstatus_sysdeps_read_iface_statistics - if (!g_shell_parse_argv (command_line, NULL, &argv, &error)) - { - error_message = g_strdup_printf (_("Could not parse command line '%s': %s"), -- command_line, -- error->message); -+ command_line, -+ error->message); - g_error_free (error); - g_free (command_line); -- -+ - return error_message; - } - g_free (command_line); -@@ -456,8 +634,8 @@ netstatus_sysdeps_read_iface_statistics - g_io_channel_read_line (channel, &buf, NULL, NULL, NULL); - - if (!parse_stats (buf, -- prx_idx, ptx_idx, in_packets, out_packets, -- brx_idx, btx_idx, in_bytes, out_bytes)) -+ prx_idx, ptx_idx, in_packets, out_packets, -+ brx_idx, btx_idx, in_bytes, out_bytes)) - { - error_message = g_strdup_printf (_("Could not parse interface statistics from '%s'. " - "prx_idx = %d; ptx_idx = %d; brx_idx = %d; btx_idx = %d;"), -@@ -477,7 +655,7 @@ netstatus_sysdeps_read_iface_statistics - } - else - { -- error_message = g_strdup_printf ("Error running /usr/bin/netstat for '%s': %s", -+ error_message = g_strdup_printf ("Error running /usr/bin/netstat for '%s': %s", - iface, error->message); - g_error_free (error); - } -@@ -485,23 +663,6 @@ netstatus_sysdeps_read_iface_statistics - g_strfreev (argv); - - return error_message; --} -- --char * --netstatus_sysdeps_read_iface_wireless_details (const char *iface, -- gboolean *is_wireless, -- int *signal_strength) --{ -- g_return_val_if_fail (iface != NULL, NULL); -- g_return_val_if_fail (is_wireless != NULL, NULL); -- g_return_val_if_fail (signal_strength_wireless != NULL, NULL); -- -- if (is_wireless) -- *is_wireless = FALSE; -- if (signal_strength) -- *signal_strength = 0; -- -- return NULL; - } - - #endif /* !defined(__FreeBSD__) */ +--- src/netstatus-sysdeps.c.orig Mon Jun 27 14:29:53 2005 ++++ src/netstatus-sysdeps.c Mon Jun 27 14:30:18 2005 +@@ -548,6 +548,8 @@ netstatus_sysdeps_read_iface_wireless_de + g_strncasecmp (iface, "wi", 2) && + g_strncasecmp (iface, "ath", 3) && + g_strncasecmp (iface, "ndis", 4) && ++ g_strncasecmp (iface, "ural", 4) && ++ g_strncasecmp (iface, "ral", 3) && + g_strncasecmp (iface, "ipw", 3) && + g_strncasecmp (iface, "iwi", 3) && + g_strncasecmp (iface, "acx", 3)) diff --git a/net/gnome-netstatus/pkg-plist b/net/gnome-netstatus/pkg-plist index bf881c64c294..266c5b3ad9be 100644 --- a/net/gnome-netstatus/pkg-plist +++ b/net/gnome-netstatus/pkg-plist @@ -2,12 +2,6 @@ libdata/bonobo/servers/GNOME_NetstatusApplet_Factory.server libexec/gnome-netstatus-applet share/gnome/gnome-2.0/ui/GNOME_NetstatusApplet.xml share/gnome/gnome-netstatus/gnome-netstatus.glade -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-disconn.png -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-error.png -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-idle.png -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-rx.png -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-tx.png -share/gnome/help/gnome-netstatus/C/figures/gnome-netstatus-txrx.png share/gnome/help/gnome-netstatus/C/gnome-netstatus.xml share/gnome/help/gnome-netstatus/C/legal.xml share/gnome/help/gnome-netstatus/de/figures/gnome-netstatus-disconn.png @@ -18,14 +12,7 @@ share/gnome/help/gnome-netstatus/de/figures/gnome-netstatus-tx.png share/gnome/help/gnome-netstatus/de/figures/gnome-netstatus-txrx.png share/gnome/help/gnome-netstatus/de/gnome-netstatus.xml share/gnome/help/gnome-netstatus/de/legal.xml -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-disconn.png -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-error.png -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-idle.png -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-rx.png -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-tx.png -share/gnome/help/gnome-netstatus/es/figures/gnome-netstatus-txrx.png share/gnome/help/gnome-netstatus/es/gnome-netstatus.xml -share/gnome/help/gnome-netstatus/es/legal.xml share/gnome/help/gnome-netstatus/fr/figures/gnome-netstatus-disconn.png share/gnome/help/gnome-netstatus/fr/figures/gnome-netstatus-error.png share/gnome/help/gnome-netstatus/fr/figures/gnome-netstatus-idle.png @@ -66,6 +53,7 @@ share/gnome/help/gnome-netstatus/sv/figures/gnome-netstatus-tx.png share/gnome/help/gnome-netstatus/sv/figures/gnome-netstatus-txrx.png share/gnome/help/gnome-netstatus/sv/gnome-netstatus.xml share/gnome/help/gnome-netstatus/sv/legal.xml +share/gnome/help/gnome-netstatus/uk/gnome-netstatus.xml share/gnome/help/gnome-netstatus/zh_CN/figures/gnome-netstatus-disconn.png share/gnome/help/gnome-netstatus/zh_CN/figures/gnome-netstatus-error.png share/gnome/help/gnome-netstatus/zh_CN/figures/gnome-netstatus-idle.png @@ -98,6 +86,7 @@ share/gnome/omf/gnome-netstatus/gnome-netstatus-it.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-ja.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-ko.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-sv.omf +share/gnome/omf/gnome-netstatus/gnome-netstatus-uk.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_CN.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_HK.omf share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_TW.omf @@ -126,7 +115,9 @@ share/locale/el/LC_MESSAGES/gnome-netstatus.mo share/locale/en_CA/LC_MESSAGES/gnome-netstatus.mo share/locale/en_GB/LC_MESSAGES/gnome-netstatus.mo share/locale/es/LC_MESSAGES/gnome-netstatus.mo +share/locale/et/LC_MESSAGES/gnome-netstatus.mo share/locale/eu/LC_MESSAGES/gnome-netstatus.mo +share/locale/fa/LC_MESSAGES/gnome-netstatus.mo share/locale/fi/LC_MESSAGES/gnome-netstatus.mo share/locale/fr/LC_MESSAGES/gnome-netstatus.mo share/locale/ga/LC_MESSAGES/gnome-netstatus.mo @@ -153,6 +144,7 @@ share/locale/pt/LC_MESSAGES/gnome-netstatus.mo share/locale/pt_BR/LC_MESSAGES/gnome-netstatus.mo share/locale/ro/LC_MESSAGES/gnome-netstatus.mo share/locale/ru/LC_MESSAGES/gnome-netstatus.mo +share/locale/rw/LC_MESSAGES/gnome-netstatus.mo share/locale/sk/LC_MESSAGES/gnome-netstatus.mo share/locale/sq/LC_MESSAGES/gnome-netstatus.mo share/locale/sr/LC_MESSAGES/gnome-netstatus.mo @@ -164,6 +156,7 @@ share/locale/tr/LC_MESSAGES/gnome-netstatus.mo share/locale/uk/LC_MESSAGES/gnome-netstatus.mo share/locale/vi/LC_MESSAGES/gnome-netstatus.mo share/locale/wa/LC_MESSAGES/gnome-netstatus.mo +share/locale/xh/LC_MESSAGES/gnome-netstatus.mo share/locale/zh_CN/LC_MESSAGES/gnome-netstatus.mo share/locale/zh_TW/LC_MESSAGES/gnome-netstatus.mo @dirrm share/gnome/omf/gnome-netstatus @@ -173,6 +166,7 @@ share/locale/zh_TW/LC_MESSAGES/gnome-netstatus.mo @dirrm share/gnome/help/gnome-netstatus/zh_HK @dirrm share/gnome/help/gnome-netstatus/zh_CN/figures @dirrm share/gnome/help/gnome-netstatus/zh_CN +@dirrm share/gnome/help/gnome-netstatus/uk @dirrm share/gnome/help/gnome-netstatus/sv/figures @dirrm share/gnome/help/gnome-netstatus/sv @dirrm share/gnome/help/gnome-netstatus/ko/figures @@ -183,11 +177,9 @@ share/locale/zh_TW/LC_MESSAGES/gnome-netstatus.mo @dirrm share/gnome/help/gnome-netstatus/it @dirrm share/gnome/help/gnome-netstatus/fr/figures @dirrm share/gnome/help/gnome-netstatus/fr -@dirrm share/gnome/help/gnome-netstatus/es/figures @dirrm share/gnome/help/gnome-netstatus/es @dirrm share/gnome/help/gnome-netstatus/de/figures @dirrm share/gnome/help/gnome-netstatus/de -@dirrm share/gnome/help/gnome-netstatus/C/figures @dirrm share/gnome/help/gnome-netstatus/C @dirrm share/gnome/help/gnome-netstatus @dirrm share/gnome/gnome-netstatus |