- Update to 0.6.0
- Sort USES - Regenerate patches with 'make makepatch'
This commit is contained in:
parent
d4b7eee3e7
commit
a174b25315
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434830
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= xfce4-wavelan-plugin
|
||||
PORTVERSION= 0.5.12
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.6.0
|
||||
CATEGORIES= sysutils xfce
|
||||
MASTER_SITES= XFCE/src/panel-plugins/${PORTNAME}/${PORTVERSION:R}
|
||||
DIST_SUBDIR= xfce4
|
||||
@ -14,8 +13,9 @@ COMMENT= Displays various information about a WaveLAN device
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= gettext pkgconfig gmake libtool xfce tar:bzip2
|
||||
USE_GNOME= gtk20 glib20 intltool intlhack
|
||||
USES= gettext gmake libtool pkgconfig tar:bzip2 xfce:gtk3
|
||||
USE_GNOME= gtk30 glib20 intltool cairo gdkpixbuf2
|
||||
USE_XFCE= panel
|
||||
INSTALL_TARGET= install-strip
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (xfce4/xfce4-wavelan-plugin-0.5.12.tar.bz2) = 67dce45739f063b95e2bc2232c625277685887b1f84088316d919671b5500ac4
|
||||
SIZE (xfce4/xfce4-wavelan-plugin-0.5.12.tar.bz2) = 302148
|
||||
TIMESTAMP = 1488044086
|
||||
SHA256 (xfce4/xfce4-wavelan-plugin-0.6.0.tar.bz2) = 4d5bd6654cfd077f3432b08d296f7bd052e765e51b77c629886a9542f4e5ecdc
|
||||
SIZE (xfce4/xfce4-wavelan-plugin-0.6.0.tar.bz2) = 303220
|
||||
|
@ -1,35 +1,34 @@
|
||||
--- ./panel-plugin/wavelan.c.orig 2012-06-29 20:07:10.000000000 +0000
|
||||
+++ ./panel-plugin/wavelan.c 2014-05-20 21:45:00.000000000 +0000
|
||||
@@ -98,11 +98,11 @@
|
||||
--- panel-plugin/wavelan.c.orig 2016-10-29 06:46:02 UTC
|
||||
+++ panel-plugin/wavelan.c
|
||||
@@ -99,11 +99,11 @@ wavelan_set_state(t_wavelan *wavelan, gi
|
||||
|
||||
if (wavelan->signal_colors) {
|
||||
/* set color */
|
||||
- if (state > 70)
|
||||
+ if (state > 75)
|
||||
gdk_color_parse(signal_color_strong, &color);
|
||||
gdk_rgba_parse(&color, signal_color_strong);
|
||||
- else if (state > 55)
|
||||
+ else if (state > 50)
|
||||
gdk_color_parse(signal_color_good, &color);
|
||||
gdk_rgba_parse(&color, signal_color_good);
|
||||
- else if (state > 40)
|
||||
+ else if (state > 25)
|
||||
gdk_color_parse(signal_color_weak, &color);
|
||||
gdk_rgba_parse(&color, signal_color_weak);
|
||||
else
|
||||
gdk_color_parse(signal_color_bad, &color);
|
||||
@@ -163,7 +163,16 @@
|
||||
gdk_rgba_parse(&color, signal_color_bad);
|
||||
@@ -183,7 +183,15 @@ wavelan_timer(gpointer data)
|
||||
}
|
||||
}
|
||||
else {
|
||||
- wavelan_set_state(wavelan, stats.ws_quality);
|
||||
+ /*
|
||||
+ * Usual formula is: qual = 4 * (signal - noise)
|
||||
+ * where noise is typically about -96dBm, but we don't have
|
||||
+ * the actual noise value here, so approximate one.
|
||||
+ */
|
||||
+ if (strcmp(stats.ws_qunit, "dBm") == 0)
|
||||
+ /*
|
||||
+ * Usual formula is:
|
||||
+ * qual = 4 * (signal - noise)
|
||||
+ * where noise is typically about -96dBm, but we don't have
|
||||
+ * the actual noise value here, so approximate one.
|
||||
+ */
|
||||
+ wavelan_set_state(wavelan, 4 * (stats.ws_quality - (-96)));
|
||||
+ else
|
||||
+ wavelan_set_state(wavelan, stats.ws_quality);
|
||||
|
||||
if (strlen(stats.ws_netname) > 0)
|
||||
tip = g_strdup_printf("%s: %d%s at %dMb/s", stats.ws_netname, stats.ws_quality, stats.ws_qunit, stats.ws_rate);
|
||||
/* Translators: net_name: quality quality_unit at rate Mb/s*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- ./panel-plugin/wi_bsd.c.orig 2012-04-09 16:45:20.000000000 +0000
|
||||
+++ ./panel-plugin/wi_bsd.c 2014-05-20 21:29:11.000000000 +0000
|
||||
--- panel-plugin/wi_bsd.c.orig 2016-05-01 15:53:40 UTC
|
||||
+++ panel-plugin/wi_bsd.c
|
||||
@@ -3,6 +3,8 @@
|
||||
* (OpenBSD support)
|
||||
* 2008 Pietro Cerutti <gahr@gahr.ch>
|
||||
@ -48,7 +48,7 @@
|
||||
#ifdef __NetBSD__
|
||||
#include <net80211/ieee80211.h>
|
||||
#include <net80211/ieee80211_ioctl.h>
|
||||
@@ -107,13 +98,9 @@
|
||||
@@ -107,13 +98,9 @@ struct wi_device
|
||||
};
|
||||
|
||||
static int _wi_carrier(const struct wi_device *);
|
||||
@ -63,16 +63,16 @@
|
||||
#endif
|
||||
static int _wi_netname(const struct wi_device *, char *, size_t);
|
||||
static int _wi_quality(const struct wi_device *, int *);
|
||||
@@ -160,7 +147,7 @@
|
||||
|
||||
@@ -164,7 +151,7 @@ wi_query(struct wi_device *device, struc
|
||||
strlcpy(stats->ws_qunit, "dBm", 4);
|
||||
#endif
|
||||
/* check vendor (independent of carrier state) */
|
||||
-#if defined(__FreeBSD_kernel__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if ((result = _wi_vendor(device, stats->ws_vendor, WI_MAXSTRLEN)) != WI_OK)
|
||||
return(result);
|
||||
#endif
|
||||
@@ -294,12 +281,10 @@
|
||||
@@ -305,12 +292,10 @@ _wi_rate(const struct wi_device *device,
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
/*
|
||||
* We use sysctl to get a device description
|
||||
*/
|
||||
@@ -316,59 +301,30 @@
|
||||
@@ -327,59 +312,30 @@ _wi_vendor(const struct wi_device *devic
|
||||
dev_number = (int)strtol(c, NULL, 10);
|
||||
*c = '\0';
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
static int
|
||||
_wi_getval(const struct wi_device *device, struct ieee80211req_scan_result *scan)
|
||||
{
|
||||
@@ -393,7 +349,9 @@
|
||||
@@ -404,7 +360,9 @@ _wi_getval(const struct wi_device *devic
|
||||
|
||||
return(WI_OK);
|
||||
}
|
||||
@ -174,7 +174,7 @@
|
||||
static int
|
||||
_wi_getval(const struct wi_device *device, struct wi_req *wr)
|
||||
{
|
||||
@@ -409,10 +367,11 @@
|
||||
@@ -420,10 +378,11 @@ _wi_getval(const struct wi_device *devic
|
||||
return(WI_OK);
|
||||
}
|
||||
#endif
|
||||
@ -187,7 +187,7 @@
|
||||
struct ieee80211req ireq;
|
||||
|
||||
memset(&ireq, 0, sizeof(ireq));
|
||||
@@ -423,7 +382,7 @@
|
||||
@@ -434,7 +393,7 @@ _wi_netname(const struct wi_device *devi
|
||||
ireq.i_len = len;
|
||||
if (ioctl(device->socket, SIOCG80211, &ireq) < 0)
|
||||
return WI_NOSUCHDEV;
|
||||
@ -196,7 +196,7 @@
|
||||
struct wi_req wr;
|
||||
int result;
|
||||
|
||||
@@ -443,7 +402,7 @@
|
||||
@@ -454,7 +413,7 @@ _wi_netname(const struct wi_device *devi
|
||||
static int
|
||||
_wi_quality(const struct wi_device *device, int *quality)
|
||||
{
|
||||
@ -205,7 +205,7 @@
|
||||
struct ieee80211req_scan_result req;
|
||||
int result;
|
||||
bzero(&req, sizeof(req));
|
||||
@@ -451,8 +410,16 @@
|
||||
@@ -462,8 +421,16 @@ _wi_quality(const struct wi_device *devi
|
||||
if((result = _wi_getval(device, &req)) != WI_OK)
|
||||
return (result);
|
||||
|
||||
@ -224,7 +224,7 @@
|
||||
struct wi_req wr;
|
||||
int result;
|
||||
|
||||
@@ -475,7 +442,7 @@
|
||||
@@ -486,7 +453,7 @@ _wi_quality(const struct wi_device *devi
|
||||
static int
|
||||
_wi_rate(const struct wi_device *device, int *rate)
|
||||
{
|
||||
@ -233,7 +233,7 @@
|
||||
struct ieee80211req_scan_result req;
|
||||
int result, i, high;
|
||||
bzero(&req, sizeof(req));
|
||||
@@ -488,7 +455,7 @@
|
||||
@@ -499,7 +466,7 @@ _wi_rate(const struct wi_device *device,
|
||||
high = req.isr_rates[i] & IEEE80211_RATE_VAL;
|
||||
|
||||
*rate = high / 2;
|
||||
@ -242,7 +242,7 @@
|
||||
struct wi_req wr;
|
||||
int result;
|
||||
|
||||
@@ -505,5 +472,4 @@
|
||||
@@ -516,5 +483,4 @@ _wi_rate(const struct wi_device *device,
|
||||
return(WI_OK);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user