View | Details | Raw Unified | Return to bug 211214 | Differences between
and this patch

Collapse All | Expand All

(-)net/wpa_gui/Makefile (-5 / +22 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	wpa_gui
4
PORTNAME=	wpa_gui
5
PORTVERSION=	2.5
5
PORTVERSION=	2.5
6
PORTREVISION=	1
6
CATEGORIES=	net
7
CATEGORIES=	net
7
MASTER_SITES=	http://w1.fi/releases/ \
8
MASTER_SITES=	http://w1.fi/releases/ \
8
		http://partmedia.users.sourceforge.net/dist/:icons \
9
		http://partmedia.users.sourceforge.net/dist/:icons \
Lines 18-36 Link Here
18
19
19
WRKSRC_SUBDIR=	wpa_supplicant/wpa_gui-qt4
20
WRKSRC_SUBDIR=	wpa_supplicant/wpa_gui-qt4
20
21
21
PLIST_FILES=	sbin/wpa_gui \
22
PLIST_FILES=	"@mode 4555" \
23
		sbin/wpa_gui \
24
		"@mode" \
22
		share/applications/wpa_gui.desktop \
25
		share/applications/wpa_gui.desktop \
23
		share/icons/hicolor/16x16/apps/wpa_gui.png \
26
		share/icons/hicolor/16x16/apps/wpa_gui.png \
24
		share/icons/hicolor/scalable/apps/wpa_gui.svg
27
		share/icons/hicolor/scalable/apps/wpa_gui.svgz \
28
		man/man8/wpa_gui.8.gz
25
29
26
USE_QT4=	gui moc_build rcc_build uic_build
30
SUB_FILES=	pkg-message
31
SUB_LIST=	LOCALBASE=${LOCALBASE}
32
33
USE_QT4=	corelib gui moc_build rcc_build uic_build
27
USES=		qmake
34
USES=		qmake
35
INSTALLS_ICONS=	yes
28
36
37
OPTIONS_DEFINE=	DEBUG
38
29
post-patch:
39
post-patch:
30
	@${REINPLACE_CMD} -e \
40
	@${REINPLACE_CMD} -e \
31
		'/^Exec/s|=.*|=${PREFIX}/sbin/wpa_gui|' \
41
		'/^Exec/s|=.*|=${PREFIX}/sbin/wpa_gui|' \
32
		${WRKSRC}/wpa_gui.desktop
42
		${WRKSRC}/wpa_gui.desktop
33
43
44
post-patch-DEBUG-on:
45
	@${REINPLACE_CMD} -e \
46
		's| release| debug|' \
47
		${WRKSRC}/wpa_gui.pro
48
34
do-install:
49
do-install:
35
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
50
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
36
	${INSTALL_DATA} ${WRKSRC}/wpa_gui.desktop ${STAGEDIR}${PREFIX}/share/applications
51
	${INSTALL_DATA} ${WRKSRC}/wpa_gui.desktop ${STAGEDIR}${PREFIX}/share/applications
Lines 38-44 Link Here
38
	${INSTALL_DATA} ${WRKDIR}/icons/hicolor/16x16/apps/wpa_gui.png \
53
	${INSTALL_DATA} ${WRKDIR}/icons/hicolor/16x16/apps/wpa_gui.png \
39
		${STAGEDIR}${PREFIX}/share/icons/hicolor/16x16/apps
54
		${STAGEDIR}${PREFIX}/share/icons/hicolor/16x16/apps
40
	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
55
	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
41
	${INSTALL_DATA} ${WRKSRC}/icons/wpa_gui.svg \
56
	@${GZIP_CMD} < ${WRKSRC}/icons/wpa_gui.svg \
42
		${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
57
		> ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/wpa_gui.svgz
58
	@${GZIP_CMD} < ${WRKSRC}/../doc/docbook/wpa_gui.8 \
59
		> ${STAGEDIR}${PREFIX}/man/man8/wpa_gui.8.gz
43
60
44
.include <bsd.port.mk>
61
.include <bsd.port.mk>
(-)net/wpa_gui/files/patch-wpa_ctrl.c (+23 lines)
Line 0 Link Here
1
--- ../../src/common/wpa_ctrl.c.orig	2016-07-18 19:31:51.725862000 -0700
2
+++ ../../src/common/wpa_ctrl.c
3
@@ -477,6 +477,10 @@
4
 	char *cmd_buf = NULL;
5
 	size_t _cmd_len;
6
 
7
+#ifndef QT_NO_DEBUG
8
+	fprintf(stderr, "CMD-SEND: %*s\n", cmd_len, cmd);
9
+#endif // QT_NO_DEBUG
10
+
11
 #ifdef CONFIG_CTRL_IFACE_UDP
12
 	if (ctrl->cookie) {
13
 		char *pos;
14
@@ -554,6 +558,9 @@
15
 				continue;
16
 			}
17
 			*reply_len = res;
18
+#ifndef QT_NO_DEBUG
19
+			fprintf(stderr, "CMD-RECV: %*s\n", *reply_len, reply);
20
+#endif // QT_NO_DEBUG
21
 			break;
22
 		} else {
23
 			return -2;
(-)net/wpa_gui/files/patch-wpagui.cpp (+12 lines)
Line 0 Link Here
1
--- wpagui.cpp.orig	2015-09-27 19:02:05 UTC
2
+++ wpagui.cpp
3
@@ -302,7 +302,8 @@ int WpaGui::openCtrlConnection(const cha
4
 #endif /* _DIRENT_HAVE_D_TYPE */
5
 
6
 				if (strcmp(dent->d_name, ".") == 0 ||
7
-				    strcmp(dent->d_name, "..") == 0)
8
+				    strcmp(dent->d_name, "..") == 0 ||
9
+				    (strlen(dent->d_name) > strlen(".pid") && !strcmp(dent->d_name + strlen(dent->d_name) - strlen(".pid"), ".pid")))
10
 					continue;
11
 				debug("Selected interface '%s'",
12
 				      dent->d_name);
(-)net/wpa_gui/files/pkg-message.in (+13 lines)
Line 0 Link Here
1
======================================================================
2
You installed wpa_gui: Qt frontend for wpa_supplicant.
3
4
It expects the running wpa_supplicant from the port
5
security/wpa_supplicant. In order to use wpa_gui you need:
6
* to have the functioning wifi network interface
7
* to install the wpa_supplicant port security/wpa_supplicant
8
* to run the wpa_supplicant:
9
  # sysrc wpa_supplicant_enable="YES"
10
  # sysrc wpa_supplicant_program="%%PREFIX%%/sbin/wpa_supplicant"
11
  and possibly
12
  # service wpa_supplicant start wlan0
13
======================================================================

Return to bug 211214