summaryrefslogtreecommitdiffstats
path: root/security/wpa_supplicant
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-05-27 01:10:30 +0000
committerbrooks <brooks@FreeBSD.org>2005-05-27 01:10:30 +0000
commitb4c85e0abe2dfdb268e9fbb998a209bfafae12a9 (patch)
tree60084f555ec9e1b6e24fb2727c03b052d380fcd7 /security/wpa_supplicant
parent383931b1969024004d3fd41bfeb9c86d318b2d52 (diff)
downloadFreeBSD-ports-b4c85e0abe2dfdb268e9fbb998a209bfafae12a9.zip
FreeBSD-ports-b4c85e0abe2dfdb268e9fbb998a209bfafae12a9.tar.gz
Add a new variable WITH_STATIC_SUPPLICANT to cause wpa_supplicant to be
linked staticly. This allows it to be used from devd at startup. [1] Use LIB_DEPENDS instead of BUILD_DEPENDS for the libdnet depend since we need it to run too. [2] My changes differ from the submitted fixes. Submitted by: Darren Pilgrim <dmp at bitfreak dot org> [1] Pawel Worach <pawel dot worach at gmail dot com> [2]
Diffstat (limited to 'security/wpa_supplicant')
-rw-r--r--security/wpa_supplicant/Makefile23
-rw-r--r--security/wpa_supplicant/files/patch-Makefile14
2 files changed, 33 insertions, 4 deletions
diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile
index 9806ede..8046475 100644
--- a/security/wpa_supplicant/Makefile
+++ b/security/wpa_supplicant/Makefile
@@ -5,18 +5,27 @@
# $FreeBSD$
#
+# WITH_STATIC_SUPPLICANT - If you use wpa_supplicant with devd(8) to
+# start your wireless NIC at boot, it will not be able to resolve
+# the libdnet library dependency because devd is run before
+# ldconfig. Defining this variable will get around the problem by
+# static-linking the wpa_supplicant executable. A static-linked
+# version of the executable is about 1.25MB larger and you will be
+# required to rebuild this port whenever the net/libdnet port is
+# updated.
+
PORTNAME= wpa_supplicant
PORTVERSION= 0.3.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security net
MASTER_SITES= http://hostap.epitest.fi/releases/
MAINTAINER= brooks@FreeBSD.org
COMMENT= Supplicant (client) for WPA/802.1x protocols
-USE_REINPLACE= yes
+LIB_DEPENDS= dnet.1:${PORTSDIR}/net/libdnet
-BUILD_DEPENDS= ${LOCALBASE}/lib/libdnet.a:${PORTSDIR}/net/libdnet
+USE_REINPLACE= yes
PLIST_FILES= sbin/wpa_supplicant \
sbin/wpa_passphrase \
@@ -34,10 +43,16 @@ PLIST_DIRS+= %%DOCSDIR%%
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_GMAKE= yes
+.if defined(WITH_STATIC_SUPPLICANT)
+SUPPLICANT_STATIC= -static
+.else
+SUPPLICANT_STATIC=
+.endif
+MAKE_ENV+= SUPPLICANT_STATIC=${SUPPLICANT_STATIC}
+
post-patch:
@${CP} ${FILESDIR}/config.bsd ${WRKSRC}/.config
@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/.config
- @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/Makefile
post-install:
.if !defined(NOPORTDOCS)
diff --git a/security/wpa_supplicant/files/patch-Makefile b/security/wpa_supplicant/files/patch-Makefile
new file mode 100644
index 0000000..d8c59b2
--- /dev/null
+++ b/security/wpa_supplicant/files/patch-Makefile
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- Makefile.orig
++++ Makefile
+@@ -303,7 +303,7 @@
+ OBJS += wpa_supplicant.o wpa.o l2_packet.o drivers.o
+
+ wpa_supplicant: .config $(OBJS)
+- $(CC) -o wpa_supplicant $(OBJS) $(LIBS)
++ $(CC) ${SUPPLICANT_STATIC} -o wpa_supplicant $(OBJS) $(LIBS)
+
+ eapol_test: .config $(OBJS_t)
+ $(CC) -o eapol_test $(OBJS_t) $(LIBS)
OpenPOWER on IntegriCloud