aboutsummaryrefslogtreecommitdiff
path: root/net/gnomenetstatus
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-11-07 22:24:32 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-11-07 22:24:32 +0000
commit58406bee8938178fc317574c4236434b0dd11a25 (patch)
treeb4fa34eca69e23769c548b4436cbf65d765e5fe2 /net/gnomenetstatus
parent98eb5c95a29c8dd1a76435744e5316092835f696 (diff)
downloadports-58406bee8938178fc317574c4236434b0dd11a25.tar.gz
ports-58406bee8938178fc317574c4236434b0dd11a25.zip
Notes
Diffstat (limited to 'net/gnomenetstatus')
-rw-r--r--net/gnomenetstatus/Makefile10
-rw-r--r--net/gnomenetstatus/distinfo4
-rw-r--r--net/gnomenetstatus/files/patch-configure10
-rw-r--r--net/gnomenetstatus/files/patch-icons_Makefile.in6
-rw-r--r--net/gnomenetstatus/files/patch-src_netstatus-sysdeps.c207
-rw-r--r--net/gnomenetstatus/pkg-plist14
6 files changed, 229 insertions, 22 deletions
diff --git a/net/gnomenetstatus/Makefile b/net/gnomenetstatus/Makefile
index 719af263702c..0827ba51d92c 100644
--- a/net/gnomenetstatus/Makefile
+++ b/net/gnomenetstatus/Makefile
@@ -6,10 +6,11 @@
#
PORTNAME= gnomenetstatus
-PORTVERSION= 2.6.2.1
+PORTVERSION= 2.8.0
+PORTREVISION= 1
CATEGORIES= net gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
-MASTER_SITE_SUBDIR= sources/gnome-netstatus/2.6
+MASTER_SITE_SUBDIR= sources/gnome-netstatus/2.8
DISTNAME= gnome-netstatus-${PORTVERSION}
DIST_SUBDIR= gnome2
@@ -18,10 +19,13 @@ COMMENT= A GNOME applet that shows network status
USE_X_PREFIX= yes
USE_BZIP2= yes
+GNOME_DESKTOP_VERSION=2
USE_GNOME= gnomehack intlhack gnomeprefix libgnome gnomepanel libglade2
USE_GMAKE= yes
-USE_LIBTOOL_VER=13
+USE_LIBTOOL_VER=15
CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
+GCONF_SCHEMAS= netstatus.schemas
+
.include <bsd.port.mk>
diff --git a/net/gnomenetstatus/distinfo b/net/gnomenetstatus/distinfo
index 80285c4d8eca..1ad8a9f94236 100644
--- a/net/gnomenetstatus/distinfo
+++ b/net/gnomenetstatus/distinfo
@@ -1,2 +1,2 @@
-MD5 (gnome2/gnome-netstatus-2.6.2.1.tar.bz2) = 7f0584bcf3eea67282cd748b2edf4096
-SIZE (gnome2/gnome-netstatus-2.6.2.1.tar.bz2) = 434086
+MD5 (gnome2/gnome-netstatus-2.8.0.tar.bz2) = fadc8a26ff7142e1372740d2edc435b1
+SIZE (gnome2/gnome-netstatus-2.8.0.tar.bz2) = 492599
diff --git a/net/gnomenetstatus/files/patch-configure b/net/gnomenetstatus/files/patch-configure
deleted file mode 100644
index f195f07b43c6..000000000000
--- a/net/gnomenetstatus/files/patch-configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.orig Wed Dec 11 18:31:51 2002
-+++ configure Thu Dec 12 12:07:17 2002
-@@ -7414,6 +7414,7 @@
-
- # This can be used to rebuild libtool when needed
- LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
-
- # Always use our own libtool.
- LIBTOOL='$(SHELL) $(top_builddir)/libtool'
diff --git a/net/gnomenetstatus/files/patch-icons_Makefile.in b/net/gnomenetstatus/files/patch-icons_Makefile.in
index 33fd6338d46f..322be3dd67c5 100644
--- a/net/gnomenetstatus/files/patch-icons_Makefile.in
+++ b/net/gnomenetstatus/files/patch-icons_Makefile.in
@@ -1,11 +1,11 @@
---- icons/Makefile.in.orig Tue Apr 20 01:06:15 2004
-+++ icons/Makefile.in Tue Apr 20 01:06:49 2004
+--- icons/Makefile.in.orig Wed Jun 9 14:26:05 2004
++++ icons/Makefile.in Wed Jun 9 14:26:34 2004
@@ -137,7 +137,7 @@
iconsize = 48x48
category = apps
-iconsdir = $(datadir)/icons/hicolor/$(iconsize)/$(category)
+iconsdir = $(prefix)/share/icons/hicolor/$(iconsize)/$(category)
- icons_DATA = gnome-netstatus-disconn.png gnome-netstatus-idle.png gnome-netstatus-rx.png gnome-netstatus-tx.png gnome-netstatus-txrx.png gnome-netstatus-error.png
+ icons_DATA = gnome-netstatus-disconn.png gnome-netstatus-idle.png gnome-netstatus-rx.png gnome-netstatus-tx.png gnome-netstatus-txrx.png gnome-netstatus-error.png gnome-netstatus-0-24.png gnome-netstatus-25-49.png gnome-netstatus-50-74.png gnome-netstatus-75-100.png
diff --git a/net/gnomenetstatus/files/patch-src_netstatus-sysdeps.c b/net/gnomenetstatus/files/patch-src_netstatus-sysdeps.c
new file mode 100644
index 000000000000..a13a23161769
--- /dev/null
+++ b/net/gnomenetstatus/files/patch-src_netstatus-sysdeps.c
@@ -0,0 +1,207 @@
+--- src/netstatus-sysdeps.c.orig Fri Jul 30 04:19:31 2004
++++ src/netstatus-sysdeps.c Tue Sep 21 00:27:19 2004
+@@ -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,163 @@
+ }
+ }
+
++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))
++ 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,
+@@ -485,23 +652,6 @@
+ 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__) */
diff --git a/net/gnomenetstatus/pkg-plist b/net/gnomenetstatus/pkg-plist
index d4ed9ddf3ed4..870993198a33 100644
--- a/net/gnomenetstatus/pkg-plist
+++ b/net/gnomenetstatus/pkg-plist
@@ -1,6 +1,3 @@
-@unexec env GCONF_CONFIG_SOURCE=xml::%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-uninstall-rule %D/etc/gconf/schemas/netstatus.schemas > /dev/null || /usr/bin/true
-etc/gconf/schemas/netstatus.schemas
-@exec env GCONF_CONFIG_SOURCE=xml::%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-install-rule %D/etc/gconf/schemas/netstatus.schemas > /dev/null || /usr/bin/true
libdata/bonobo/servers/GNOME_NetstatusApplet_Factory.server
libexec/gnome-netstatus-applet
share/gnome/gnome-2.0/ui/GNOME_NetstatusApplet.xml
@@ -116,6 +113,10 @@ share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_HK.omf
share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_TW.omf
@exec scrollkeeper-install -q %D/share/gnome/omf/gnome-netstatus/gnome-netstatus-zh_TW.omf 2>/dev/null || /usr/bin/true
share/gnome/pixmaps/gnome-netstatus-tx.png
+share/icons/hicolor/48x48/apps/gnome-netstatus-0-24.png
+share/icons/hicolor/48x48/apps/gnome-netstatus-25-49.png
+share/icons/hicolor/48x48/apps/gnome-netstatus-50-74.png
+share/icons/hicolor/48x48/apps/gnome-netstatus-75-100.png
share/icons/hicolor/48x48/apps/gnome-netstatus-disconn.png
share/icons/hicolor/48x48/apps/gnome-netstatus-error.png
share/icons/hicolor/48x48/apps/gnome-netstatus-idle.png
@@ -126,6 +127,7 @@ share/locale/ar/LC_MESSAGES/gnome-netstatus.mo
share/locale/az/LC_MESSAGES/gnome-netstatus.mo
share/locale/bg/LC_MESSAGES/gnome-netstatus.mo
share/locale/bn/LC_MESSAGES/gnome-netstatus.mo
+share/locale/bs/LC_MESSAGES/gnome-netstatus.mo
share/locale/ca/LC_MESSAGES/gnome-netstatus.mo
share/locale/cs/LC_MESSAGES/gnome-netstatus.mo
share/locale/cy/LC_MESSAGES/gnome-netstatus.mo
@@ -135,9 +137,11 @@ 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/eu/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
+share/locale/gu/LC_MESSAGES/gnome-netstatus.mo
share/locale/hi/LC_MESSAGES/gnome-netstatus.mo
share/locale/hr/LC_MESSAGES/gnome-netstatus.mo
share/locale/hu/LC_MESSAGES/gnome-netstatus.mo
@@ -146,9 +150,9 @@ share/locale/it/LC_MESSAGES/gnome-netstatus.mo
share/locale/ja/LC_MESSAGES/gnome-netstatus.mo
share/locale/ko/LC_MESSAGES/gnome-netstatus.mo
share/locale/lt/LC_MESSAGES/gnome-netstatus.mo
-share/locale/mi/LC_MESSAGES/gnome-netstatus.mo
share/locale/mn/LC_MESSAGES/gnome-netstatus.mo
share/locale/ms/LC_MESSAGES/gnome-netstatus.mo
+share/locale/nb/LC_MESSAGES/gnome-netstatus.mo
share/locale/nl/LC_MESSAGES/gnome-netstatus.mo
share/locale/nn/LC_MESSAGES/gnome-netstatus.mo
share/locale/no/LC_MESSAGES/gnome-netstatus.mo
@@ -163,12 +167,14 @@ share/locale/sq/LC_MESSAGES/gnome-netstatus.mo
share/locale/sr/LC_MESSAGES/gnome-netstatus.mo
share/locale/sr@Latn/LC_MESSAGES/gnome-netstatus.mo
share/locale/sv/LC_MESSAGES/gnome-netstatus.mo
+share/locale/ta/LC_MESSAGES/gnome-netstatus.mo
share/locale/th/LC_MESSAGES/gnome-netstatus.mo
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/zh_CN/LC_MESSAGES/gnome-netstatus.mo
+share/locale/zh_TW/LC_MESSAGES/gnome-netstatus.mo
@dirrm share/gnome/omf/gnome-netstatus
@dirrm share/gnome/help/gnome-netstatus/zh_TW/figures
@dirrm share/gnome/help/gnome-netstatus/zh_TW