1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00

- Update to 0.5.11

- Replace USE_GMAKE by USES= gmake
- Support STAGEDIR
- Adjust dependencies
This commit is contained in:
Olivier Duchateau 2014-01-31 10:07:24 +00:00
parent f6734d2fe1
commit 43fbc42df3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=341971
7 changed files with 205 additions and 261 deletions

View File

@ -1,30 +1,20 @@
# Created by: Manuel Rabade Garica <mig@mig-29.net>
# $FreeBSD$
# $MCom: ports/sysutils/xfce4-wavelan-plugin/Makefile,v 1.1 2006/10/02 20:43:59 ahze Exp $
PORTNAME= xfce4-wavelan-plugin
PORTVERSION= 0.5.4
PORTREVISION= 18
PORTVERSION= 0.5.11
CATEGORIES= sysutils xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR=/src/panel-plugins/${PORTNAME}/${PORTVERSION:R}
MASTER_SITE_SUBDIR=src/panel-plugins/${PORTNAME}/${PORTVERSION:R}
DIST_SUBDIR= xfce4
MAINTAINER= xfce@FreeBSD.org
COMMENT= Displays various information about a WaveLAN device
LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
USE_BZIP2= yes
GNU_CONFIGURE= yes
USES= gettext pkgconfig
USE_GMAKE= yes
USE_GNOME= gtk20 intltool intlhack
USE_XFCE= configenv libutil libgui panel
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e 's|--libs "libxfce4panel-1.0"|& "libxfcegui4-1.0"|g; \
s|--cflags "libxfce4panel-1.0"|& "libxfcegui4-1.0"|g' \
${WRKSRC}/configure
USES= gettext pkgconfig gmake
USE_GNOME= gtk20 glib20 intltool intlhack
USE_XFCE= configenv libutil libmenu panel
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (xfce4/xfce4-wavelan-plugin-0.5.4.tar.gz) = 5b8c5ea37561cc32f10b3aebac67cf14fc9216b748e194f3676f26d42a4f1c05
SIZE (xfce4/xfce4-wavelan-plugin-0.5.4.tar.gz) = 596378
SHA256 (xfce4/xfce4-wavelan-plugin-0.5.11.tar.bz2) = fe06c7ffc29c2d4ca7bc452b3356825354e276565de9b0a2d087ab55471755ae
SIZE (xfce4/xfce4-wavelan-plugin-0.5.11.tar.bz2) = 293840

View File

@ -0,0 +1,151 @@
--- ./panel-plugin/wi_bsd.c.orig 2012-04-09 16:45:20.000000000 +0000
+++ ./panel-plugin/wi_bsd.c 2014-01-31 09:31:51.000000000 +0000
@@ -52,10 +52,6 @@
#include <sys/types.h>
#include <sys/sysctl.h>
#include <net80211/ieee80211_ioctl.h>
-#else
-#include <net/if_var.h>
-#include <net/ethernet.h>
-#include <dev/wi/if_wavelan_ieee.h>
#endif
#else
#ifdef __NetBSD__
@@ -111,8 +107,6 @@
static int _wi_vendor(const struct wi_device *, char *, size_t);
#if __FreeBSD_kernel_version > 700000
static int _wi_getval(const struct wi_device *, struct ieee80211req_scan_result *);
-#else
-static int _wi_getval(const struct wi_device *, struct wi_req *);
#endif
#endif
static int _wi_netname(const struct wi_device *, char *, size_t);
@@ -319,46 +313,6 @@
snprintf(mib, sizeof(mib), "dev.%s.%d.%%desc", dev_name, dev_number);
if(sysctlbyname(mib, buffer, &len, NULL, 0) == -1)
return (WI_NOSUCHDEV);
-#else
-#define WI_RID_STA_IDENTITY_LUCENT 0x1
-#define WI_RID_STA_IDENTITY_PRISMII 0x2
-#define WI_RID_STA_IDENTITY_SAMSUNG 0x3
-#define WI_RID_STA_IDENTITY_DLINK 0x6
- const char* vendor = "Unknown";
- struct wi_req wr;
- int result;
-
- bzero((void*)&wr, sizeof(wr));
- wr.wi_len = WI_MAX_DATALEN;
- wr.wi_type = WI_RID_STA_IDENTITY;
-
- if ((result = _wi_getval(device, &wr)) != WI_OK){
- /* For the Atheros, IDENTITY does not work. */
- if (strcmp(device->interface, "ath") != 0)
- return(result);
- }
- else if (wr.wi_len < 4)
- return(WI_NOSUCHDEV);
-
- switch (wr.wi_val[1]) {
- case WI_RID_STA_IDENTITY_LUCENT:
- vendor = "Lucent";
- break;
-
- case WI_RID_STA_IDENTITY_PRISMII:
- vendor = "generic PRISM II";
- break;
-
- case WI_RID_STA_IDENTITY_SAMSUNG:
- vendor = "Samsung";
- break;
- case WI_RID_STA_IDENTITY_DLINK:
- vendor = "D-Link";
- break;
- }
-
- snprintf(buffer, len, "%s (ID %d, version %d.%d)", vendor,
- wr.wi_val[0], wr.wi_val[2], wr.wi_val[3]);
#endif
return(WI_OK);
@@ -393,21 +347,6 @@
return(WI_OK);
}
-#else
-static int
-_wi_getval(const struct wi_device *device, struct wi_req *wr)
-{
- struct ifreq ifr;
-
- bzero((void*)&ifr, sizeof(ifr));
- strlcpy(ifr.ifr_name, device->interface, sizeof(ifr.ifr_name));
- ifr.ifr_data = (void*)wr;
-
- if (ioctl(device->socket, SIOCGWAVELAN, &ifr) < 0)
- return(WI_NOSUCHDEV);
-
- return(WI_OK);
-}
#endif
static int
_wi_netname(const struct wi_device *device, char *buffer, size_t len)
@@ -423,18 +362,6 @@
ireq.i_len = len;
if (ioctl(device->socket, SIOCG80211, &ireq) < 0)
return WI_NOSUCHDEV;
-#else
- struct wi_req wr;
- int result;
-
- bzero((void *)&wr, sizeof(wr));
- wr.wi_len = WI_MAX_DATALEN;
- wr.wi_type = WI_RID_CURRENT_SSID;
-
- if ((result = _wi_getval(device, &wr)) != WI_OK)
- return(result);
-
- strlcpy(buffer, (char *)&wr.wi_val[1], MIN(len, le16toh(wr.wi_val[0]) + 1));
#endif
return(WI_OK);
@@ -452,21 +379,6 @@
return (result);
*quality = req.isr_rssi;
-#else
- struct wi_req wr;
- int result;
-
- bzero((void *)&wr, sizeof(wr));
- wr.wi_len = WI_MAX_DATALEN;
- wr.wi_type = WI_RID_COMMS_QUALITY;
-
- if ((result = _wi_getval(device, &wr)) != WI_OK)
- return(result);
-
- /* according to various implementation (conky, ifconfig) :
- wi_val[0] = quality, wi_val[1] = signal, wi_val[2] = noise
- but my ral only shows a value for signal, and it seems it's a dB value */
- *quality = le16toh(wr.wi_val[1]);
#endif
return(WI_OK);
@@ -488,18 +400,6 @@
high = req.isr_rates[i] & IEEE80211_RATE_VAL;
*rate = high / 2;
-#else
- struct wi_req wr;
- int result;
-
- bzero((void *)&wr, sizeof(wr));
- wr.wi_len = WI_MAX_DATALEN;
- wr.wi_type = WI_RID_CUR_TX_RATE;
-
- if ((result = _wi_getval(device, &wr)) != WI_OK)
- return(result);
-
- *rate = le16toh(wr.wi_val[0]);
#endif
return(WI_OK);

View File

@ -1,14 +0,0 @@
--- panel-plugin/wavelan.c.orig 2007-01-10 21:23:05.000000000 +0100
+++ panel-plugin/wavelan.c 2008-01-28 23:16:14.000000000 +0100
@@ -219,9 +219,9 @@
wavelan_set_state(wavelan, STATE_LINK0);
if (strlen(stats.ws_netname) > 0)
- tip = g_strdup_printf("%d%% (%s)", stats.ws_quality, stats.ws_netname);
+ tip = g_strdup_printf("%s\n%s: %d%% at %dMB/s", stats.ws_vendor, stats.ws_netname, stats.ws_quality, stats.ws_rate);
else
- tip = g_strdup_printf("%d%%", stats.ws_quality);
+ tip = g_strdup_printf("%s\n%d%% at %dMB/s", stats.ws_vendor, stats.ws_quality, stats.ws_rate);
}
}
else {

View File

@ -1,222 +0,0 @@
--- panel-plugin/wi_bsd.c.orig 2006-12-21 16:33:39.000000000 -0500
+++ panel-plugin/wi_bsd.c 2009-10-29 09:51:21.000000000 -0400
@@ -1,6 +1,8 @@
/* $Id: wi_bsd.c 562 2004-12-03 18:29:41Z benny $ */
/*-
* Copyright (c) 2003 Benedikt Meurer <benny@xfce.org>
+ * 2008 Pietro Cerutti <gahr@gahr.ch>
+ * (FreeBSD > 700000 adaptation)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,16 +38,19 @@
#include <net/if.h>
#include <net/if_media.h>
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#include <sys/endian.h>
+#if __FreeBSD_version >= 700000
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <net80211/ieee80211_ioctl.h>
+#else
#include <net/if_var.h>
#include <net/ethernet.h>
-
#include <dev/wi/if_wavelan_ieee.h>
-#if __FreeBSD_version >= 500033
-#include <sys/endian.h>
#endif
#else
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
#ifdef __NetBSD__
#include <net80211/ieee80211.h>
#include <net80211/ieee80211_ioctl.h>
@@ -95,7 +100,11 @@
};
static int _wi_carrier(const struct wi_device *);
+#if defined(__FreeBSD__) && __FreeBSD_version > 700000
+static int _wi_getval(const struct wi_device *, struct ieee80211req_scan_result *);
+#else
static int _wi_getval(const struct wi_device *, struct wi_req *);
+#endif
static int _wi_vendor(const struct wi_device *, char *, size_t);
static int _wi_netname(const struct wi_device *, char *, size_t);
static int _wi_quality(const struct wi_device *, int *);
@@ -193,24 +202,76 @@
return((ifmr.ifm_status & IFM_ACTIVE) != 0 ? WI_OK : WI_NOCARRIER);
}
+#if defined(__FreeBSD__) && __FreeBSD_version >= 700000
static int
-_wi_getval(const struct wi_device *device, struct wi_req *wr)
+_wi_getval(const struct wi_device *device, struct ieee80211req_scan_result *scan)
{
- struct ifreq ifr;
+ char buffer[24 * 1024];
+ const uint8_t *bp;
+ struct ieee80211req ireq;
+ size_t len;
+ bzero(&ireq, sizeof(ireq));
+ strlcpy(ireq.i_name, device->interface, sizeof(ireq.i_name));
+
+ ireq.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ ireq.i_data = buffer;
+ ireq.i_len = sizeof(buffer);
+
+ if(ioctl(device->socket, SIOCG80211, &ireq) < 0)
+ return(WI_NOSUCHDEV);
- bzero((void*)&ifr, sizeof(ifr));
- strlcpy(ifr.ifr_name, device->interface, sizeof(ifr.ifr_name));
- ifr.ifr_data = (void*)wr;
+ if(ireq.i_len < sizeof(struct ieee80211req_scan_result))
+ return(WI_NOSUCHDEV);
- if (ioctl(device->socket, SIOCGWAVELAN, &ifr) < 0)
- return(WI_NOSUCHDEV);
+ memcpy(scan, buffer, sizeof(struct ieee80211req_scan_result));
- return(WI_OK);
+ return(WI_OK);
}
+#else
+static int
+_wi_getval(const struct wi_device *device, struct wi_req *wr)
+{
+ struct ifreq ifr;
+
+ bzero((void*)&ifr, sizeof(ifr));
+ strlcpy(ifr.ifr_name, device->interface, sizeof(ifr.ifr_name));
+ ifr.ifr_data = (void*)wr;
+
+ if (ioctl(device->socket, SIOCGWAVELAN, &ifr) < 0)
+ return(WI_NOSUCHDEV);
+
+ return (WI_OK);
+}
+#endif
static int
_wi_vendor(const struct wi_device *device, char *buffer, size_t len)
{
+#if defined(__FreeBSD__) && __FreeBSD_version >= 700000
+ /*
+ * We use sysctl to get a device description
+ */
+ char mib[WI_MAXSTRLEN];
+ char dev_name[WI_MAXSTRLEN];
+ char *c = dev_name;
+ int dev_number;
+
+ /*
+ * Dirty hack to split the device name into name and number
+ */
+ strncpy(dev_name, device->interface, WI_MAXSTRLEN);
+ while(!isdigit(*c)) c++;
+ dev_number = (int)strtol(c, NULL, 10);
+ *c = '\0';
+
+ snprintf(mib, sizeof(mib), "dev.%s.%d.%%desc", dev_name, dev_number);
+ if(sysctlbyname(mib, buffer, &len, NULL, 0) == -1) {
+ /* check for wlan device instead */
+ snprintf(mib, sizeof(mib), "net.%s.%d.%%parent", dev_name, dev_number);
+ if(sysctlbyname(mib, buffer, &len, NULL, 0) == -1)
+ return (WI_NOSUCHDEV);
+ }
+#else
#define WI_RID_STA_IDENTITY_LUCENT 0x1
#define WI_RID_STA_IDENTITY_PRISMII 0x2
#define WI_RID_STA_IDENTITY_SAMSUNG 0x3
@@ -250,6 +311,7 @@
snprintf(buffer, len, "%s (ID %d, version %d.%d)", vendor,
wr.wi_val[0], wr.wi_val[2], wr.wi_val[3]);
+#endif
return(WI_OK);
}
@@ -257,6 +319,18 @@
static int
_wi_netname(const struct wi_device *device, char *buffer, size_t len)
{
+#if defined(__FreeBSD__) && __FreeBSD_version >= 700000
+ struct ieee80211req ireq;
+
+ memset(&ireq, 0, sizeof(ireq));
+ strncpy(ireq.i_name, device->interface, sizeof(ireq.i_name));
+ ireq.i_type = IEEE80211_IOC_SSID;
+ ireq.i_val = -1;
+ ireq.i_data = buffer;
+ ireq.i_len = len;
+ if (ioctl(device->socket, SIOCG80211, &ireq) < 0)
+ return WI_NOSUCHDEV;
+#else
struct wi_req wr;
int result;
@@ -268,6 +342,7 @@
return(result);
strlcpy(buffer, (char *)&wr.wi_val[1], MIN(len, le16toh(wr.wi_val[0]) + 1));
+#endif
return(WI_OK);
}
@@ -275,6 +350,16 @@
static int
_wi_quality(const struct wi_device *device, int *quality)
{
+#if defined(__FreeBSD__) && __FreeBSD_version >= 700000
+ struct ieee80211req_scan_result req;
+ int result;
+ bzero(&req, sizeof(req));
+
+ if((result = _wi_getval(device, &req)) != WI_OK)
+ return (result);
+
+ *quality = req.isr_rssi * 2;
+#else
struct wi_req wr;
int result;
@@ -289,6 +374,7 @@
*quality = le16toh(wr.wi_val[1]);
else
*quality = le16toh(wr.wi_val[0]);
+#endif
return(WI_OK);
}
@@ -296,6 +382,20 @@
static int
_wi_rate(const struct wi_device *device, int *rate)
{
+#if defined(__FreeBSD__) && __FreeBSD_version >= 700000
+ struct ieee80211req_scan_result req;
+ int result, i, high;
+ bzero(&req, sizeof(req));
+
+ if((result = _wi_getval(device, &req)) != WI_OK)
+ return (result);
+
+ for(i=0, high=-1; i<req.isr_nrates; i++)
+ if((req.isr_rates[i] & IEEE80211_RATE_VAL) > high)
+ high = req.isr_rates[i] & IEEE80211_RATE_VAL;
+
+ *rate = high / 2;
+#else
struct wi_req wr;
int result;
@@ -307,6 +407,7 @@
return(result);
*rate = le16toh(wr.wi_val[0]);
+#endif
return(WI_OK);
}

View File

@ -1,4 +1,4 @@
WaveLAN plugin for the XFce4 panel.
WaveLAN plugin for the Xfce4 panel.
Displays various information about a WaveLAN device:

View File

@ -1,15 +1,54 @@
libexec/xfce4/panel-plugins/xfce4-wavelan-plugin
lib/xfce4/panel/plugins/libwavelan.la
lib/xfce4/panel/plugins/libwavelan.so
share/locale/ar/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ast/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/be/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ca/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/cs/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/da/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/de/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/el/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/en_GB/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/es/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/eu/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/fr/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/gl/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/hr/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/hu/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/id/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/it/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ja/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/kk/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ko/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/lt/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/lv/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/nb/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/nl/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/pl/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/pt/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/pt_BR/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ru/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/sk/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/sq/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/sv/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/tr/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ug/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/uk/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ur/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/ur_PK/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/vi/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/xfce4/panel-plugins/wavelan.desktop
@dirrmtry share/xfce4/panel-plugins
@dirrmtry share/xfce4
@dirrmtry libexec/xfce4/panel-plugins
@dirrmtry libexec/xfce4
share/locale/zh_CN/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/locale/zh_TW/LC_MESSAGES/xfce4-wavelan-plugin.mo
share/xfce4/panel/plugins/wavelan.desktop
@dirrmtry share/xfce4/panel/plugins
@dirrmtry share/locale/ur_PK/LC_MESSAGES
@dirrmtry share/locale/ur_PK
@dirrmtry share/locale/ur/LC_MESSAGES
@dirrmtry share/locale/ur
@dirrmtry share/locale/ug/LC_MESSAGES
@dirrmtry share/locale/ug
@dirrmtry share/locale/kk/LC_MESSAGES
@dirrmtry share/locale/kk
@dirrmtry share/locale/ast/LC_MESSAGES
@dirrmtry share/locale/ast
@dirrmtry lib/xfce4/panel/plugins