Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 246117 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/net-wireless/wpa_supplicant/wpa_supplicant-0.6.4.ebuild (-68 / +68 lines)
Lines 1-10 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.4.ebuild,v 1.1 2008/08/19 13:03:50 rbu Exp $
3
# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.4.ebuild,v 1.1 2008/08/19 13:03:50 rbu Exp $
4
4
5
EAPI="1"
5
EAPI="2"
6
6
7
inherit eutils toolchain-funcs
7
inherit eutils toolchain-funcs qt3 qt4
8
8
9
DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
9
DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
10
HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
10
HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
Lines 13-67 Link Here
13
13
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
15
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
16
IUSE="dbus debug gnutls gsm madwifi qt3 qt4 readline ssl kernel_linux
16
IUSE="dbus debug gnutls gsm madwifi ps3 qt3 qt4 readline ssl kernel_linux kernel_FreeBSD"
17
	kernel_FreeBSD ps3"
18
17
19
RDEPEND="dbus? ( sys-apps/dbus )
18
DEPEND="dbus? ( sys-apps/dbus )
20
		kernel_linux? (
19
		kernel_linux? (
21
			gsm? ( sys-apps/pcsc-lite )
20
			gsm? ( sys-apps/pcsc-lite )
22
		 	madwifi? ( ||
21
			madwifi? ( ||
23
				( >net-wireless/madwifi-ng-tools-0.9.3
22
				( >net-wireless/madwifi-ng-tools-0.9.3
24
				net-wireless/madwifi-old )
23
				net-wireless/madwifi-old )
25
			)
24
			)
26
		)
25
		)
27
		!kernel_linux? ( net-libs/libpcap )
26
		!kernel_linux? ( net-libs/libpcap )
28
		qt4? (
27
		qt4? ( ||
29
			|| ( ( x11-libs/qt-core:4
28
			( x11-libs/qt-gui:4
30
					x11-libs/qt-gui:4 )
29
			<x11-libs/qt-4.4:4 )
31
					<x11-libs/qt-4.4:4
32
			)
33
		)
30
		)
34
		!qt4? ( qt3? ( =x11-libs/qt-3* ) )
31
		!qt4? ( qt3? ( x11-libs/qt:3 ) )
35
		readline? ( sys-libs/ncurses sys-libs/readline )
32
		readline? ( sys-libs/ncurses sys-libs/readline )
36
		ssl? ( dev-libs/openssl )
37
		gnutls? ( net-libs/gnutls )
33
		gnutls? ( net-libs/gnutls )
38
		!ssl? ( !gnutls? ( dev-libs/libtommath ) )"
34
		!gnutls? ( ssl? ( dev-libs/openssl ) )
35
		!gnutls? ( !ssl? ( dev-libs/libtommath ) )"
36
RDEPEND="${DEPEND}"
39
37
40
S="${WORKDIR}/${P}/${PN}"
38
S="${WORKDIR}/${P}/${PN}"
41
39
42
pkg_setup() {
40
pkg_setup() {
43
	if use qt3 && use qt4; then
41
	if use gnutls && use ssl ; then
44
		einfo "You have USE=\"qt3 qt4\" selected, defaulting to USE=\"qt4\""
42
		einfo "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"gnutls\""
45
	fi
43
	fi
46
44
47
	if use qt4 && has_version ">=x11-libs/qt-4.2.2" ; then
45
	if use qt3 && use qt4 ; then
48
		if ! built_with_use x11-libs/qt qt3support ; then
46
		einfo "You have both 'qt3' and 'qt4' USE flags enabled: defaulting to USE=\"qt4\""
49
			eerror ">=qt4.2.2 requires qt3support"
50
			die "rebuild >=x11-libs/qt-4.2.2 with the qt3support USE flag"
51
		fi
52
	fi
47
	fi
53
}
48
}
54
49
55
src_unpack() {
50
src_prepare() {
56
	unpack ${A}
51
	# net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
57
58
	cd "${S}"
59
60
	# net/bpf.h needed for net-libs/libpcap on Gentoo FreeBSD
61
	sed -i \
52
	sed -i \
62
		-e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
53
		-e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
63
		../src/l2_packet/l2_packet_freebsd.c || die
54
		../src/l2_packet/l2_packet_freebsd.c || die
64
55
56
	# People seem to take the example configuration file too literally (bug #102361)
57
	sed -i \
58
		-e "s:^\(opensc_engine_path\):#\1:" \
59
		-e "s:^\(pkcs11_engine_path\):#\1:" \
60
		-e "s:^\(pkcs11_module_path\):#\1:" \
61
		wpa_supplicant.conf || die
62
63
	# Change configuration to match Gentoo locations (bug #143750)
64
	sed -i \
65
		-e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
66
		-e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
67
		wpa_supplicant.conf || die
68
}
69
70
src_configure() {
65
	# toolchain setup
71
	# toolchain setup
66
	echo "CC = $(tc-getCC)" > .config
72
	echo "CC = $(tc-getCC)" > .config
67
73
Lines 97-105 Link Here
97
103
98
	if use gsm ; then
104
	if use gsm ; then
99
		# smart card authentication
105
		# smart card authentication
100
		echo "CONFIG_EAP_SIM=y" >> .config
106
		echo "CONFIG_EAP_SIM=y"       >> .config
101
		echo "CONFIG_EAP_AKA=y" >> .config
107
		echo "CONFIG_EAP_AKA=y"       >> .config
102
		echo "CONFIG_PCSC=y"    >> .config
108
		echo "CONFIG_EAP_AKA_PRIME=y" >> .config
109
		echo "CONFIG_PCSC=y"          >> .config
103
	fi
110
	fi
104
111
105
	if use readline ; then
112
	if use readline ; then
Lines 126-214 Link Here
126
		echo "CONFIG_DRIVER_HOSTAP=y"      >> .config
133
		echo "CONFIG_DRIVER_HOSTAP=y"      >> .config
127
		echo "CONFIG_DRIVER_IPW=y"         >> .config
134
		echo "CONFIG_DRIVER_IPW=y"         >> .config
128
		echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
135
		echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
129
		echo "CONFIG_DRIVER_PRISM54=y"     >> .config
136
		#echo "CONFIG_DRIVER_PRISM54=y"    >> .config
130
		echo "CONFIG_DRIVER_WEXT=y"        >> .config
137
		echo "CONFIG_DRIVER_WEXT=y"        >> .config
131
		echo "CONFIG_DRIVER_WIRED=y"       >> .config
138
		echo "CONFIG_DRIVER_WIRED=y"       >> .config
132
139
133
		if use madwifi ; then
140
		if use madwifi ; then
134
			# Add include path for madwifi-driver headers
141
			# Add include path for madwifi-driver headers
135
			echo "CFLAGS += -I/usr/include/madwifi" >> .config
142
			echo "CFLAGS += -I/usr/include/madwifi" >> .config
136
			echo "CONFIG_DRIVER_MADWIFI=y"                 >> .config
143
			echo "CONFIG_DRIVER_MADWIFI=y"          >> .config
137
		fi
144
		fi
145
138
		if use ps3 ; then
146
		if use ps3 ; then
139
			echo "CONFIG_DRIVER_PS3=y" >> .config
147
			echo "CONFIG_DRIVER_PS3=y" >> .config
140
		fi
148
		fi
149
141
	elif use kernel_FreeBSD ; then
150
	elif use kernel_FreeBSD ; then
142
		# FreeBSD specific driver
151
		# FreeBSD specific driver
143
		echo "CONFIG_DRIVER_BSD=y" >> .config
152
		echo "CONFIG_DRIVER_BSD=y" >> .config
144
	fi
153
	fi
145
154
146
	# people seem to take the example configuration file too literally
155
	# Wi-Fi Protected Setup (WPS)
147
	# bug #102361
156
	# FIXME - doesn't build
148
	sed -i \
157
	#echo "CONFIG_WPS=y" >> .config
149
		-e "s:^\(opensc_engine_path\):#\1:" \
150
		-e "s:^\(pkcs11_engine_path\):#\1:" \
151
		-e "s:^\(pkcs11_module_path\):#\1:" \
152
		wpa_supplicant.conf || die
153
158
154
	# Change configuration to match Gentoo locations, #143750
159
	# Enable mitigation against certain attacks against TKIP
155
	sed -i \
160
	echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config
156
		-e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
157
		-e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
158
		wpa_supplicant.conf || die
159
}
161
}
160
162
161
src_compile() {
163
src_compile() {
162
	emake || die "emake failed"
164
	emake || die "emake failed"
163
165
164
	if use qt4 ; then
166
	if use qt4 ; then
165
		qmake -o "${S}"/wpa_gui-qt4/Makefile "${S}"/wpa_gui-qt4/wpa_gui.pro
166
		cd "${S}"/wpa_gui-qt4
167
		cd "${S}"/wpa_gui-qt4
167
		emake || die "emake wpa_gui-qt4 failed"
168
		eqmake4 wpa_gui.pro
169
		emake || die "Qt4 wpa_gui compilation failed"
168
	elif use qt3 ; then
170
	elif use qt3 ; then
169
		[[ -d "${QTDIR}"/etc/settings ]] && addwrite "${QTDIR}"/etc/settings
170
		"${QTDIR}"/bin/qmake -o "${S}"/wpa_gui/Makefile "${S}"/wpa_gui/wpa_gui.pro
171
		cd "${S}"/wpa_gui
171
		cd "${S}"/wpa_gui
172
		emake || die "emake wpa_gui failed"
172
		eqmake3 wpa_gui.pro
173
		emake || die "Qt3 wpa_gui compilation failed"
173
	fi
174
	fi
174
}
175
}
175
176
176
src_install() {
177
src_install() {
177
	dosbin wpa_supplicant
178
	dosbin wpa_supplicant || die
178
	dobin wpa_cli wpa_passphrase
179
	dobin wpa_cli wpa_passphrase || die
179
180
180
	# baselayout-1 compat
181
	# baselayout-1 compat
181
	dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant
182
	dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant || die
182
	dosym /usr/bin/wpa_cli /bin/wpa_cli
183
	dosym /usr/bin/wpa_cli /bin/wpa_cli || die
183
184
184
	exeinto /etc/wpa_supplicant/
185
	exeinto /etc/wpa_supplicant/
185
	newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
186
	newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
186
	insinto /etc/wpa_supplicant/
187
	insinto /etc/wpa_supplicant/
187
	newins "${FILESDIR}"/wpa_supplicant.conf wpa_supplicant.conf
188
	newins "${FILESDIR}"/wpa_supplicant.conf wpa_supplicant.conf
188
189
189
	dodoc ChangeLog eap_testing.txt README todo.txt
190
	dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
190
	newdoc wpa_supplicant.conf wpa_supplicant.conf
191
		wpa_supplicant.conf || die "dodoc failed"
191
192
192
	doman doc/docbook/*.8
193
	doman doc/docbook/*.{5,8} || die "doman failed"
193
	doman doc/docbook/*.5
194
194
195
	if use qt4 ; then
195
	if use qt4 ; then
196
		into /usr
196
		into /usr
197
		dobin wpa_gui-qt4/wpa_gui
197
		dobin wpa_gui-qt4/wpa_gui || die
198
	elif use qt3 ; then
198
	elif use qt3 ; then
199
		into /usr
199
		into /usr
200
		dobin wpa_gui/wpa_gui
200
		dobin wpa_gui/wpa_gui || die
201
	fi
201
	fi
202
202
203
	if use qt3 || use qt4; then
203
	if use qt3 || use qt4 ; then
204
		make_desktop_entry wpa_gui "WPA_Supplicant Administration GUI"
204
		make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
205
	fi
205
	fi
206
206
207
	if use dbus ; then
207
	if use dbus ; then
208
		insinto /etc/dbus-1/system.d
208
		insinto /etc/dbus-1/system.d
209
		newins dbus-wpa_supplicant.conf wpa_supplicant.conf
209
		newins dbus-wpa_supplicant.conf wpa_supplicant.conf || die
210
		insinto /usr/share/dbus-1/system-services
210
		insinto /usr/share/dbus-1/system-services
211
		newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service'
211
		newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service' || die
212
		keepdir /var/run/wpa_supplicant
212
		keepdir /var/run/wpa_supplicant
213
	fi
213
	fi
214
}
214
}
Lines 217-224 Link Here
217
	einfo "A default configuration file has been installed to"
217
	einfo "A default configuration file has been installed to"
218
	einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
218
	einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
219
	einfo
219
	einfo
220
	einfo "An example configuration file is available as"
220
	einfo "An example configuration file is available in"
221
	einfo "/usr/share/doc/${PF}/wpa_supplicant.conf.gz"
221
	einfo "/usr/share/doc/${PF}/"
222
222
223
	if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
223
	if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
224
		echo
224
		echo
Lines 226-235 Link Here
226
		ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
226
		ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
227
	fi
227
	fi
228
228
229
	if use madwifi; then
229
	if use madwifi ; then
230
		echo
230
		echo
231
		einfo "This package compiles against the headers installed by"
231
		einfo "This package compiles against the headers installed by"
232
		einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
232
		einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
233
		einfo "You should remerge ${PN} after upgrading these packages."
233
		einfo "You should re-emerge ${PN} after upgrading these packages."
234
	fi
234
	fi
235
}
235
}

Return to bug 246117