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 (-73 / +72 lines)
Lines 2-10 Link Here
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.4 2009/02/01 21:23:45 maekke Exp $
3
# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.4.ebuild,v 1.4 2009/02/01 21:23:45 maekke 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 12-67 Link Here
12
LICENSE="|| ( GPL-2 BSD )"
12
LICENSE="|| ( GPL-2 BSD )"
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="dev-libs/libnl
19
		dbus? ( sys-apps/dbus )
20
		kernel_linux? (
20
		kernel_linux? (
21
			gsm? ( sys-apps/pcsc-lite )
21
			gsm? ( sys-apps/pcsc-lite )
22
		 	madwifi? ( ||
22
			madwifi? ( ||
23
				( >net-wireless/madwifi-ng-tools-0.9.3
23
				( >net-wireless/madwifi-ng-tools-0.9.3
24
				net-wireless/madwifi-old )
24
				net-wireless/madwifi-old )
25
			)
25
			)
26
		)
26
		)
27
		!kernel_linux? ( net-libs/libpcap )
27
		!kernel_linux? ( net-libs/libpcap )
28
		qt4? (
28
		qt4? ( x11-libs/qt-gui:4 )
29
			|| ( ( x11-libs/qt-core:4
29
		!qt4? ( qt3? ( x11-libs/qt:3 ) )
30
					x11-libs/qt-gui:4 )
31
					<x11-libs/qt-4.4:4
32
			)
33
		)
34
		!qt4? ( qt3? ( =x11-libs/qt-3* ) )
35
		readline? ( sys-libs/ncurses sys-libs/readline )
30
		readline? ( sys-libs/ncurses sys-libs/readline )
36
		ssl? ( dev-libs/openssl )
37
		gnutls? ( net-libs/gnutls )
31
		gnutls? ( net-libs/gnutls )
38
		!ssl? ( !gnutls? ( dev-libs/libtommath ) )"
32
		!gnutls? ( ssl? ( dev-libs/openssl ) )
33
		!gnutls? ( !ssl? ( dev-libs/libtommath ) )"
34
RDEPEND="${DEPEND}"
39
35
40
S="${WORKDIR}/${P}/${PN}"
36
S="${WORKDIR}/${P}/${PN}"
41
37
42
pkg_setup() {
38
pkg_setup() {
43
	if use qt3 && use qt4; then
39
	if use gnutls && use ssl ; then
44
		einfo "You have USE=\"qt3 qt4\" selected, defaulting to USE=\"qt4\""
40
		einfo "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"gnutls\""
45
	fi
41
	fi
46
42
47
	if use qt4 && has_version ">=x11-libs/qt-4.2.2" ; then
43
	if use qt3 && use qt4 ; then
48
		if ! built_with_use x11-libs/qt qt3support ; then
44
		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
45
	fi
53
}
46
}
54
47
55
src_unpack() {
48
src_prepare() {
56
	unpack ${A}
49
	# 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 \
50
	sed -i \
62
		-e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
51
		-e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
63
		../src/l2_packet/l2_packet_freebsd.c || die
52
		../src/l2_packet/l2_packet_freebsd.c || die
64
53
54
	# People seem to take the example configuration file too literally (bug #102361)
55
	sed -i \
56
		-e "s:^\(opensc_engine_path\):#\1:" \
57
		-e "s:^\(pkcs11_engine_path\):#\1:" \
58
		-e "s:^\(pkcs11_module_path\):#\1:" \
59
		wpa_supplicant.conf || die
60
61
	# Change configuration to match Gentoo locations (bug #143750)
62
	sed -i \
63
		-e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
64
		-e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
65
		wpa_supplicant.conf || die
66
}
67
68
src_configure() {
65
	# toolchain setup
69
	# toolchain setup
66
	echo "CC = $(tc-getCC)" > .config
70
	echo "CC = $(tc-getCC)" > .config
67
71
Lines 97-105 Link Here
97
101
98
	if use gsm ; then
102
	if use gsm ; then
99
		# smart card authentication
103
		# smart card authentication
100
		echo "CONFIG_EAP_SIM=y" >> .config
104
		echo "CONFIG_EAP_SIM=y"       >> .config
101
		echo "CONFIG_EAP_AKA=y" >> .config
105
		echo "CONFIG_EAP_AKA=y"       >> .config
102
		echo "CONFIG_PCSC=y"    >> .config
106
		echo "CONFIG_EAP_AKA_PRIME=y" >> .config
107
		echo "CONFIG_PCSC=y"          >> .config
103
	fi
108
	fi
104
109
105
	if use readline ; then
110
	if use readline ; then
Lines 109-121 Link Here
109
114
110
	# SSL authentication methods
115
	# SSL authentication methods
111
	if use gnutls ; then
116
	if use gnutls ; then
112
		echo "CONFIG_TLS=gnutls" >> .config
117
		echo "CONFIG_TLS=gnutls"     >> .config
113
		echo "CONFIG_GNUTLS_EXTRA=y" >> .config
118
		echo "CONFIG_GNUTLS_EXTRA=y" >> .config
114
	elif use ssl ; then
119
	elif use ssl ; then
115
		echo "CONFIG_TLS=openssl" >> .config
120
		echo "CONFIG_TLS=openssl"    >> .config
116
		echo "CONFIG_SMARTCARD=y" >> .config
121
		echo "CONFIG_SMARTCARD=y"    >> .config
117
	else
122
	else
118
		echo "CONFIG_TLS=internal" >> .config
123
		echo "CONFIG_TLS=internal"   >> .config
119
	fi
124
	fi
120
125
121
	if use kernel_linux ; then
126
	if use kernel_linux ; then
Lines 126-214 Link Here
126
		echo "CONFIG_DRIVER_HOSTAP=y"      >> .config
131
		echo "CONFIG_DRIVER_HOSTAP=y"      >> .config
127
		echo "CONFIG_DRIVER_IPW=y"         >> .config
132
		echo "CONFIG_DRIVER_IPW=y"         >> .config
128
		echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
133
		echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
129
		echo "CONFIG_DRIVER_PRISM54=y"     >> .config
134
		echo "CONFIG_DRIVER_NL80211=y"     >> .config
135
		#echo "CONFIG_DRIVER_PRISM54=y"    >> .config
136
		echo "CONFIG_DRIVER_RALINK=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
	echo "CONFIG_WPS=y" >> .config
148
	sed -i \
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
157
154
	# Change configuration to match Gentoo locations, #143750
158
	# Enable mitigation against certain attacks against TKIP
155
	sed -i \
159
	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
}
160
}
160
161
161
src_compile() {
162
src_compile() {
162
	emake || die "emake failed"
163
	emake || die "emake failed"
163
164
164
	if use qt4 ; then
165
	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
166
		cd "${S}"/wpa_gui-qt4
167
		emake || die "emake wpa_gui-qt4 failed"
167
		eqmake4 wpa_gui.pro
168
		emake || die "Qt4 wpa_gui compilation failed"
168
	elif use qt3 ; then
169
	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
170
		cd "${S}"/wpa_gui
172
		emake || die "emake wpa_gui failed"
171
		eqmake3 wpa_gui.pro
172
		emake || die "Qt3 wpa_gui compilation failed"
173
	fi
173
	fi
174
}
174
}
175
175
176
src_install() {
176
src_install() {
177
	dosbin wpa_supplicant
177
	dosbin wpa_supplicant || die
178
	dobin wpa_cli wpa_passphrase
178
	dobin wpa_cli wpa_passphrase || die
179
179
180
	# baselayout-1 compat
180
	# baselayout-1 compat
181
	dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant
181
	dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant || die
182
	dosym /usr/bin/wpa_cli /bin/wpa_cli
182
	dosym /usr/bin/wpa_cli /bin/wpa_cli || die
183
183
184
	exeinto /etc/wpa_supplicant/
184
	exeinto /etc/wpa_supplicant/
185
	newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
185
	newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
186
	insinto /etc/wpa_supplicant/
186
	insinto /etc/wpa_supplicant/
187
	newins "${FILESDIR}"/wpa_supplicant.conf wpa_supplicant.conf
187
	newins "${FILESDIR}"/wpa_supplicant.conf wpa_supplicant.conf
188
188
189
	dodoc ChangeLog eap_testing.txt README todo.txt
189
	dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
190
	newdoc wpa_supplicant.conf wpa_supplicant.conf
190
		wpa_supplicant.conf || die "dodoc failed"
191
191
192
	doman doc/docbook/*.8
192
	doman doc/docbook/*.{5,8} || die "doman failed"
193
	doman doc/docbook/*.5
194
193
195
	if use qt4 ; then
194
	if use qt4 ; then
196
		into /usr
195
		into /usr
197
		dobin wpa_gui-qt4/wpa_gui
196
		dobin wpa_gui-qt4/wpa_gui || die
198
	elif use qt3 ; then
197
	elif use qt3 ; then
199
		into /usr
198
		into /usr
200
		dobin wpa_gui/wpa_gui
199
		dobin wpa_gui/wpa_gui || die
201
	fi
200
	fi
202
201
203
	if use qt3 || use qt4; then
202
	if use qt3 || use qt4 ; then
204
		make_desktop_entry wpa_gui "WPA_Supplicant Administration GUI"
203
		make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
205
	fi
204
	fi
206
205
207
	if use dbus ; then
206
	if use dbus ; then
208
		insinto /etc/dbus-1/system.d
207
		insinto /etc/dbus-1/system.d
209
		newins dbus-wpa_supplicant.conf wpa_supplicant.conf
208
		newins dbus-wpa_supplicant.conf wpa_supplicant.conf || die
210
		insinto /usr/share/dbus-1/system-services
209
		insinto /usr/share/dbus-1/system-services
211
		newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service'
210
		newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service' || die
212
		keepdir /var/run/wpa_supplicant
211
		keepdir /var/run/wpa_supplicant
213
	fi
212
	fi
214
}
213
}
Lines 217-224 Link Here
217
	einfo "A default configuration file has been installed to"
216
	einfo "A default configuration file has been installed to"
218
	einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
217
	einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
219
	einfo
218
	einfo
220
	einfo "An example configuration file is available as"
219
	einfo "An example configuration file is available in"
221
	einfo "/usr/share/doc/${PF}/wpa_supplicant.conf.gz"
220
	einfo "/usr/share/doc/${PF}/"
222
221
223
	if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
222
	if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
224
		echo
223
		echo
Lines 226-235 Link Here
226
		ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
225
		ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
227
	fi
226
	fi
228
227
229
	if use madwifi; then
228
	if use madwifi ; then
230
		echo
229
		echo
231
		einfo "This package compiles against the headers installed by"
230
		einfo "This package compiles against the headers installed by"
232
		einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
231
		einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
233
		einfo "You should remerge ${PN} after upgrading these packages."
232
		einfo "You should re-emerge ${PN} after upgrading these packages."
234
	fi
233
	fi
235
}
234
}

Return to bug 246117