summaryrefslogtreecommitdiff
path: root/net/wmwlmon
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2008-05-10 09:00:09 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2008-05-10 09:00:09 +0000
commit2fde66221deb2774fecf9fd36211b60c0b4cc0ed (patch)
tree761396e6ac35c7d412bf54870e42cd095833fceb /net/wmwlmon
parentUpgrade from 0.42 to 0.43 (diff)
- fix build with gcc 4.2 [1]
- fix build on 7 after wi_req removal (remove support for wi(4)) [2] - unBROKEN [1] - unDEPRECIATE [1] - use REINPALCE_CMD PR: ports/123408 [1], [2] by itetcu@ (me) based on [1] Submitted by: Luke Dean <luked@pobox.com> [1]
Notes
Notes: svn path=/head/; revision=212887
Diffstat (limited to 'net/wmwlmon')
-rw-r--r--net/wmwlmon/Makefile19
-rw-r--r--net/wmwlmon/files/extra-patch-wl.c20
-rw-r--r--net/wmwlmon/files/extra-patch-wmwlmon.110
-rw-r--r--net/wmwlmon/files/patch-bitmaps__wmwlmon_mask.xbm10
-rw-r--r--net/wmwlmon/files/patch-wl.c13
5 files changed, 62 insertions, 10 deletions
diff --git a/net/wmwlmon/Makefile b/net/wmwlmon/Makefile
index 13984f83d48a..2aeeba8a40ec 100644
--- a/net/wmwlmon/Makefile
+++ b/net/wmwlmon/Makefile
@@ -7,7 +7,7 @@
PORTNAME= wmwlmon
PORTVERSION= 0.9
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net windowmaker
MASTER_SITES= http://www.nazgul.ch/dev/ \
http://dougbarton.us/Downloads/
@@ -25,18 +25,17 @@ PLIST_FILES= bin/wmwlmon
.if ${OSVERSION} < 600100
IGNORE= needs WLAN infrastructure from 6.0-RELEASE or newer
-.elif ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
+.elif ${OSVERSION} > 700047
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-wl.c ${PATCHDIR}/extra-patch-wmwlmon.1
+pre-everything::
+ @${ECHO_CMD} "========================================================"
+ @${ECHO_CMD} "On FreeBSD > 700047 there is no wi(4) support"
+ @${ECHO_CMD} "========================================================"
.endif
-DEPRECATED= Does not work after removal of wi_req
-EXPIRATION_DATE= 2008-07-03
-
post-patch:
- ${CP} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.presed
- ${SED} -e 's#/usr/X11R6#${LOCALBASE}#g' \
- -e 's#/usr/local#${LOCALBASE}#g' \
- ${WRKSRC}/Makefile.presed > ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e 's#/usr/X11R6#${LOCALBASE}#g' \
+ -e 's#/usr/local#${LOCALBASE}#g' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/wmwlmon ${PREFIX}/bin
diff --git a/net/wmwlmon/files/extra-patch-wl.c b/net/wmwlmon/files/extra-patch-wl.c
new file mode 100644
index 000000000000..cae454c749b0
--- /dev/null
+++ b/net/wmwlmon/files/extra-patch-wl.c
@@ -0,0 +1,20 @@
+--- ./wl.c.orig 2006-05-10 06:57:57.000000000 +0300
++++ ./wl.c 2008-05-10 11:03:57.000000000 +0300
+@@ -283,6 +284,7 @@
+ int
+ get_wi_signal(const char *interface)
+ {
++#if __FreeBSD__ > 600100 && __FreeBSD__ < 700047 /* wi support is broken on 7 because of struct wi_req removal*/
+ int s;
+ struct ifreq ifr;
+ struct wi_req wreq;
+@@ -319,6 +321,9 @@
+ #ifdef __FreeBSD__
+ return (wreq.wi_val[1]);
+ #endif
++#else
++ return -1;
++#endif
+ }
+
+ /*
diff --git a/net/wmwlmon/files/extra-patch-wmwlmon.1 b/net/wmwlmon/files/extra-patch-wmwlmon.1
new file mode 100644
index 000000000000..14e2a6878ca4
--- /dev/null
+++ b/net/wmwlmon/files/extra-patch-wmwlmon.1
@@ -0,0 +1,10 @@
+--- ./wmwlmon.1.orig 2008-05-10 11:04:09.000000000 +0300
++++ ./wmwlmon.1 2008-05-10 11:04:42.000000000 +0300
+@@ -98,6 +98,6 @@
+ causing troubles, please report me, including a dmesg and a problem
+ explanation.
+ .Pp
+-Full supported devices known yet: ath(4), iwi(4), wi(4)
++Full supported devices known yet: ath(4), iwi(4)
+ .Pp
+ Partial supported devices known yet: ipw(4)
diff --git a/net/wmwlmon/files/patch-bitmaps__wmwlmon_mask.xbm b/net/wmwlmon/files/patch-bitmaps__wmwlmon_mask.xbm
new file mode 100644
index 000000000000..619476a5e73f
--- /dev/null
+++ b/net/wmwlmon/files/patch-bitmaps__wmwlmon_mask.xbm
@@ -0,0 +1,10 @@
+--- ./bitmaps/wmwlmon_mask.xbm.orig 2005-10-20 15:57:17.000000000 +0300
++++ ./bitmaps/wmwlmon_mask.xbm 2008-05-10 11:35:46.000000000 +0300
+@@ -1,6 +1,6 @@
+ #define wmwlmon_mask_width 64
+ #define wmwlmon_mask_height 64
+-static unsigned char wmwlmon_mask_bits[] = {
++static char wmwlmon_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
diff --git a/net/wmwlmon/files/patch-wl.c b/net/wmwlmon/files/patch-wl.c
new file mode 100644
index 000000000000..8239f4882043
--- /dev/null
+++ b/net/wmwlmon/files/patch-wl.c
@@ -0,0 +1,13 @@
+--- ./wl.c.orig 2006-05-10 06:57:57.000000000 +0300
++++ ./wl.c 2008-05-10 11:03:57.000000000 +0300
+@@ -261,7 +261,8 @@
+ uint8_t *vp;
+ sr = (struct ieee80211req_scan_result *)cp;
+ vp = (u_int8_t *)(sr + 1);
+- strlcpy(network_id, vp, sr->isr_ssid_len + 1);
++ memcpy(network_id, vp, sr->isr_ssid_len);
++ network_id[sizeof(network_id) - 1] = '\0';
+ if (!strcmp(network_id, network))
+ return (sr->isr_rssi);
+ cp += sr->isr_len;
+