aboutsummaryrefslogtreecommitdiff
path: root/net/netspeed_applet
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2006-05-03 01:19:50 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2006-05-03 01:19:50 +0000
commita3812d35be28da760a38da46740f6d0cc2b8b806 (patch)
tree978dccfad544594ee6472c6d2c8b82bda6f13388 /net/netspeed_applet
parent427a0a5e94b33bcaaaf7dc1dbdf7a7d0899e96e5 (diff)
downloadports-a3812d35be28da760a38da46740f6d0cc2b8b806.tar.gz
ports-a3812d35be28da760a38da46740f6d0cc2b8b806.zip
Notes
Diffstat (limited to 'net/netspeed_applet')
-rw-r--r--net/netspeed_applet/Makefile4
-rw-r--r--net/netspeed_applet/distinfo6
-rw-r--r--net/netspeed_applet/files/patch-src__backend.c29
-rw-r--r--net/netspeed_applet/files/patch-src__backend.h24
-rw-r--r--net/netspeed_applet/files/patch-src_backend.c56
-rw-r--r--net/netspeed_applet/files/patch-src_netspeed.c66
-rw-r--r--net/netspeed_applet/pkg-plist29
7 files changed, 119 insertions, 95 deletions
diff --git a/net/netspeed_applet/Makefile b/net/netspeed_applet/Makefile
index 5a4eb24559a1..b919267ac149 100644
--- a/net/netspeed_applet/Makefile
+++ b/net/netspeed_applet/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= netspeed_applet
-PORTVERSION= 0.12.1
-PORTREVISION= 3
+PORTVERSION= 0.13
CATEGORIES= net gnome
MASTER_SITES= http://www.wh-hms.uni-ulm.de/~mfcn/shared/netspeed/
@@ -23,6 +22,5 @@ USE_GNOME= gnomehier intlhack gnomeprefix gnomehack gnomepanel
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --enable-libgtop
.include <bsd.port.mk>
diff --git a/net/netspeed_applet/distinfo b/net/netspeed_applet/distinfo
index f149e32f61f7..57877ac1cef3 100644
--- a/net/netspeed_applet/distinfo
+++ b/net/netspeed_applet/distinfo
@@ -1,3 +1,3 @@
-MD5 (netspeed_applet-0.12.1.tar.gz) = 7a651eab80c1a10654595fcfd4832463
-SHA256 (netspeed_applet-0.12.1.tar.gz) = b503bd3291045f0b90922e534c755be57a8d7e9f8fcf32fb4376b775a8a1686d
-SIZE (netspeed_applet-0.12.1.tar.gz) = 581819
+MD5 (netspeed_applet-0.13.tar.gz) = b5c5332993ed779c3653433c6f3b6a9a
+SHA256 (netspeed_applet-0.13.tar.gz) = 86041c571b0cd3113c3a428ba8d01498ed8fb81613b3e6ccf6c7c8e722530853
+SIZE (netspeed_applet-0.13.tar.gz) = 647081
diff --git a/net/netspeed_applet/files/patch-src__backend.c b/net/netspeed_applet/files/patch-src__backend.c
deleted file mode 100644
index c7933235a296..000000000000
--- a/net/netspeed_applet/files/patch-src__backend.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/backend.c.orig Thu Apr 21 11:12:12 2005
-+++ src/backend.c Thu Apr 21 11:23:38 2005
-@@ -158,6 +158,7 @@
- } else devinfo.ip = NULL;
-
- /* Get the hardware/physical adress/ MAC */
-+#ifndef __FreeBSD__
- if (ioctl(fd, SIOCGIFHWADDR, &request) == 0) {
- unsigned char hwaddr[6];
- struct sockaddr *hwaddress = &request.ifr_hwaddr;
-@@ -170,11 +171,17 @@
- #else
- hwaddr[5], hwaddr[4], hwaddr[3], hwaddr[2], hwaddr[1], hwaddr[0]);
- #endif
-- } else devinfo.hwaddr = NULL;
-+ } else
-+#endif
-+ devinfo.hwaddr = NULL;
-
- /* Get the subnetmask */
- if (ioctl(fd, SIOCGIFNETMASK, &request) == 0) {
-+#ifndef __FreeBSD__
- struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_netmask;
-+#else
-+ struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_addr;
-+#endif
- devinfo.netmask = g_strdup_printf("%s", inet_ntoa(address->sin_addr));
- } else devinfo.netmask = NULL;
-
diff --git a/net/netspeed_applet/files/patch-src__backend.h b/net/netspeed_applet/files/patch-src__backend.h
deleted file mode 100644
index 176efc3e79b1..000000000000
--- a/net/netspeed_applet/files/patch-src__backend.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/backend.h.orig Wed Dec 1 13:43:47 2004
-+++ src/backend.h Fri Apr 22 01:28:34 2005
-@@ -20,18 +20,20 @@
- #ifndef _BACKEND_H
- #define _BACKEND_H
-
-+#include "config.h"
- #include <stdlib.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
- #include <ctype.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <net/if.h>
- #include <sys/ioctl.h>
- #include <glib.h>
--#ifdef USE_GLIBTOP
-+#ifdef USE_LIBGTOP
- #include <glibtop/netload.h>
- #endif
-
diff --git a/net/netspeed_applet/files/patch-src_backend.c b/net/netspeed_applet/files/patch-src_backend.c
new file mode 100644
index 000000000000..041a6d941efd
--- /dev/null
+++ b/net/netspeed_applet/files/patch-src_backend.c
@@ -0,0 +1,56 @@
+--- src/backend.c.orig Wed May 3 02:41:00 2006
++++ src/backend.c Wed May 3 03:03:09 2006
+@@ -20,6 +20,7 @@
+ #include <config.h>
+ #include <glibtop/netlist.h>
+ #include <glibtop/netload.h>
++#include <net/if_media.h>
+ #include "backend.h"
+
+ /* Check for all available devices. This really should be
+@@ -131,7 +132,7 @@
+
+ g_strlcpy(request.ifr_name, devinfo->name, sizeof request.ifr_name);
+
+- if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
++ if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ goto out;
+
+ if (ioctl(fd, SIOCGIFFLAGS, &request) == -1)
+@@ -148,16 +149,20 @@
+ }
+ }
+
++ if (devinfo->type == DEV_UNKNOWN) {
++ struct ifmediareq ifmr;
+
+- if (ioctl(fd, SIOCGIWNAME, &request) >= 0) {
+- devinfo->type = DEV_WIRELESS;
+- }
++ memset(&ifmr, 0, sizeof(ifmr));
++ g_strlcpy(ifmr.ifm_name, devinfo->name, sizeof(ifmr.ifm_name));
+
+- if (ioctl(fd, SIOCGIWENCODE, &request) >= 0) {
+- g_assert_not_reached();
++ if (ioctl(fd, SIOCGIFMEDIA, &ifmr) >= 0) {
++ switch (IFM_TYPE(ifmr.ifm_current)) {
++ case IFM_ETHER: devinfo->type = DEV_ETHERNET; break;
++ case IFM_IEEE80211: devinfo->type = DEV_WIRELESS; break;
++ }
++ }
+ }
+
+-
+ out:
+ if(fd != -1)
+ close(fd);
+@@ -210,9 +215,6 @@
+ else {
+ devinfo.type = DEV_PPP;
+ }
+- }
+- else if (g_str_has_prefix(device, "eth")) {
+- devinfo.type = DEV_ETHERNET;
+ }
+
+ get_additional_info(&devinfo);
diff --git a/net/netspeed_applet/files/patch-src_netspeed.c b/net/netspeed_applet/files/patch-src_netspeed.c
index d19ecd4969a1..580d2bdd79f9 100644
--- a/net/netspeed_applet/files/patch-src_netspeed.c
+++ b/net/netspeed_applet/files/patch-src_netspeed.c
@@ -1,36 +1,40 @@
---- src/netspeed.c.orig Sat Apr 15 03:17:56 2006
-+++ src/netspeed.c Sat Apr 15 03:27:09 2006
-@@ -164,11 +164,17 @@ change_icons(NetspeedApplet *applet)
- {
- if (strstr(device, "ppp"))
- type = gdk_pixbuf_new_from_xpm_data(ICON_PPP);
-- else if (!strcmp(device, "lo"))
-+ else if (strstr(device, "tun"))
-+ type = gdk_pixbuf_new_from_xpm_data(ICON_PPP);
-+ else if (strstr(device, "lo"))
- type = gdk_pixbuf_new_from_xpm_data(ICON_LO);
-- else if (strstr(device, "lip"))
-+ else if (strstr(device, "plip"))
- type = gdk_pixbuf_new_from_xpm_data(ICON_PLIP);
-- else if (strstr(device, "wlan"))
-+ else if (strstr(device, "ath") || strstr(device, "an") ||
-+ strstr(device, "awi") || strstr(device, "iwi") ||
-+ strstr(device, "ipw") || strstr(device, "ndis") ||
-+ strstr(device, "ral") || strstr(device, "ural") ||
-+ strstr(device, "wi") || strstr(device, "wl"))
- type = gdk_pixbuf_new_from_xpm_data(ICON_WLAN);
- else
- type = gdk_pixbuf_new_from_xpm_data(ICON_ETH);
-@@ -386,7 +392,7 @@ search_for_up_if(NetspeedApplet *applet)
-
+--- src/netspeed.c.orig Mon May 1 19:36:46 2006
++++ src/netspeed.c Mon May 1 19:42:28 2006
+@@ -23,6 +23,7 @@
+ #include <panel-applet.h>
+ #include <panel-applet-gconf.h>
+ #include <gconf/gconf-client.h>
++#include <glibtop.h>
+ #include "backend.h"
+ #include "netspeed.h"
+
+@@ -391,7 +392,7 @@
+
devices = get_available_devices();
for (tmp = devices; tmp; tmp = g_list_next(tmp)) {
-- if (!g_str_equal(tmp->data, "lo")) {
-+ if (!g_str_equal(tmp->data, "lo0")) {
- info = get_device_info(tmp->data);
- if (info.running) {
- free_device_info(&applet->devinfo);
-@@ -1387,13 +1393,13 @@ netspeed_applet_factory(PanelApplet *app
+- if (strcmp(tmp->data, "lo") == 0) continue;
++ if (strcmp(tmp->data, "lo0") == 0) continue;
+ if (strncmp(tmp->data, "dummy", strlen("dummy")) == 0) continue;
+ info = get_device_info(tmp->data);
+ if (info.running) {
+@@ -1344,6 +1345,16 @@
+ if (strcmp (iid, "OAFIID:GNOME_NetspeedApplet"))
+ return FALSE;
+
++ /*
++ * Work around a design flaw in libgtop: force an initialisation
++ * of the server, otherwise glibtop_get_netlist() will find that
++ * the server is not needed and glibtop_get_netload() (which needs
++ * the server) will fail.
++ *
++ * Jean-Yves Lefort <jylefort@FreeBSD.org> 20060501
++ */
++ glibtop_init();
++
+ icon_theme = gtk_icon_theme_get_default();
+ gtk_icon_theme_append_search_path(icon_theme, DATADIR"/pixmaps/"PACKAGE);
+
+@@ -1432,13 +1443,13 @@
GList *ptr, *devices = get_available_devices();
ptr = devices;
while (ptr) {
diff --git a/net/netspeed_applet/pkg-plist b/net/netspeed_applet/pkg-plist
index deb68962e61a..5c47ebd8f824 100644
--- a/net/netspeed_applet/pkg-plist
+++ b/net/netspeed_applet/pkg-plist
@@ -1,13 +1,14 @@
libdata/bonobo/servers/GNOME_NetspeedApplet.server
libexec/netspeed_applet2
share/gnome/help/netspeed_applet/C/figures/details.png
-share/gnome/help/netspeed_applet/C/figures/eth_48.png
share/gnome/help/netspeed_applet/C/figures/eth_sum_48.png
-share/gnome/help/netspeed_applet/C/figures/netspeed_applet_24.png
-share/gnome/help/netspeed_applet/C/figures/netspeed_applet_48.png
-share/gnome/help/netspeed_applet/C/figures/netspeed_applet_48_sum.png
-share/gnome/help/netspeed_applet/C/figures/phone_24.png
+share/gnome/help/netspeed_applet/C/figures/ethernet.png
+share/gnome/help/netspeed_applet/C/figures/loopback.png
+share/gnome/help/netspeed_applet/C/figures/netspeed_applet.png
+share/gnome/help/netspeed_applet/C/figures/plip.png
+share/gnome/help/netspeed_applet/C/figures/ppp.png
share/gnome/help/netspeed_applet/C/figures/settings.png
+share/gnome/help/netspeed_applet/C/figures/wavelan.png
share/gnome/help/netspeed_applet/C/legal.xml
share/gnome/help/netspeed_applet/C/netspeed_applet.xml
share/gnome/help/netspeed_applet/cs/figures/details.png
@@ -30,6 +31,17 @@ share/gnome/help/netspeed_applet/de/figures/phone_24.png
share/gnome/help/netspeed_applet/de/figures/settings.png
share/gnome/help/netspeed_applet/de/legal.xml
share/gnome/help/netspeed_applet/de/netspeed_applet.xml
+share/gnome/help/netspeed_applet/es/figures/details.png
+share/gnome/help/netspeed_applet/es/figures/eth_sum_48.png
+share/gnome/help/netspeed_applet/es/figures/ethernet.png
+share/gnome/help/netspeed_applet/es/figures/loopback.png
+share/gnome/help/netspeed_applet/es/figures/netspeed_applet.png
+share/gnome/help/netspeed_applet/es/figures/plip.png
+share/gnome/help/netspeed_applet/es/figures/ppp.png
+share/gnome/help/netspeed_applet/es/figures/settings.png
+share/gnome/help/netspeed_applet/es/figures/wavelan.png
+share/gnome/help/netspeed_applet/es/legal.xml
+share/gnome/help/netspeed_applet/es/netspeed_applet.xml
share/gnome/help/netspeed_applet/ru/figures/details.png
share/gnome/help/netspeed_applet/ru/figures/eth_48.png
share/gnome/help/netspeed_applet/ru/figures/eth_sum_48.png
@@ -43,8 +55,12 @@ share/gnome/help/netspeed_applet/ru/netspeed_applet.xml
share/gnome/omf/netspeed_applet/netspeed_applet-C.omf
share/gnome/omf/netspeed_applet/netspeed_applet-cs.omf
share/gnome/omf/netspeed_applet/netspeed_applet-de.omf
+share/gnome/omf/netspeed_applet/netspeed_applet-es.omf
share/gnome/omf/netspeed_applet/netspeed_applet-ru.omf
share/gnome/pixmaps/netspeed_applet.png
+share/gnome/pixmaps/netspeed_applet/gnome-dev-loopback.png
+share/gnome/pixmaps/netspeed_applet/gnome-dev-plip.png
+share/gnome/pixmaps/netspeed_applet/gnome-dev-ppp.png
share/locale/cs/LC_MESSAGES/netspeed_applet.mo
share/locale/de/LC_MESSAGES/netspeed_applet.mo
share/locale/es/LC_MESSAGES/netspeed_applet.mo
@@ -60,9 +76,12 @@ share/locale/ru/LC_MESSAGES/netspeed_applet.mo
share/locale/sv/LC_MESSAGES/netspeed_applet.mo
share/locale/tr/LC_MESSAGES/netspeed_applet.mo
share/locale/zh_CN/LC_MESSAGES/netspeed_applet.mo
+@dirrm share/gnome/pixmaps/netspeed_applet
@dirrm share/gnome/omf/netspeed_applet
@dirrm share/gnome/help/netspeed_applet/ru/figures
@dirrm share/gnome/help/netspeed_applet/ru
+@dirrm share/gnome/help/netspeed_applet/es/figures
+@dirrm share/gnome/help/netspeed_applet/es
@dirrm share/gnome/help/netspeed_applet/de/figures
@dirrm share/gnome/help/netspeed_applet/de
@dirrm share/gnome/help/netspeed_applet/cs/figures