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

Return to bug 246117