/[gentoo-x86]/net-wireless/ndiswrapper/ndiswrapper-1.58.ebuild
Gentoo

Contents of /net-wireless/ndiswrapper/ndiswrapper-1.58.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun May 19 16:54:31 2013 UTC (7 years, 2 months ago) by angelos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Fix compilation on linux 3.9 (bug #467956)

(Portage version: 2.2.0_alpha174/cvs/Linux x86_64, signed Manifest commit with key 84F20B43)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.58.ebuild,v 1.3 2013/04/16 16:53:48 ago Exp $
4
5 EAPI=4
6 inherit base linux-mod toolchain-funcs
7
8 DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
9 HOMEPAGE="http://ndiswrapper.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/stable/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 KEYWORDS="amd64 x86"
14 IUSE="debug usb"
15
16 DEPEND="sys-apps/pciutils"
17 RDEPEND="${DEPEND}
18 net-wireless/wireless-tools"
19
20 PATCHES=( "${FILESDIR}"/${PN}-1.56-cflags.patch "${FILESDIR}"/${P}-3.9.patch )
21 MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
22 BUILD_TARGETS="all"
23 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
24
25 pkg_pretend() {
26 CONFIG_CHECK="~WEXT_PRIV"
27 use usb && CONFIG_CHECK="${CONFIG_CHECK} ~USB"
28 ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
29 ERROR_WEXT_PRIV="Your kernel does not support WEXT_PRIV. To enable it you need to enable a wireless driver that enables it, for example PRISM54 or IPW2200"
30 linux-mod_pkg_setup
31 }
32
33 src_compile() {
34 local params
35
36 # Enable verbose debugging information
37 if use debug; then
38 params="DEBUG=3"
39 use usb && params="${params} USB_DEBUG=1"
40 fi
41
42 cd utils
43 emake CC=$(tc-getCC)
44
45 use usb || params="${params} DISABLE_USB=1"
46
47 BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
48 linux-mod_src_compile
49 }
50
51 src_install() {
52 dodoc AUTHORS ChangeLog INSTALL README
53 doman ndiswrapper.8
54
55 keepdir /etc/ndiswrapper
56
57 linux-mod_src_install
58
59 cd utils
60 emake DESTDIR="${D}" install
61 }
62
63 pkg_postinst() {
64 linux-mod_pkg_postinst
65
66 echo
67 elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
68 elog "to function. Download these to /root for example, then"
69 elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
70 elog "They will be copied to /etc/ndiswrapper/."
71 elog "Once done, please run 'update-modules'."
72 echo
73
74 elog "Please look at ${HOMEPAGE}"
75 elog "for the FAQ, HowTos, tips, configuration, and installation"
76 elog "information."
77 echo
78
79 for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
80 do
81 i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
82 if [[ -n "${i_desc}" ]] ; then
83 elog "Possible hardware: ${i_desc}"
84 fi
85 done
86
87 echo
88 elog "NDISwrapper devs need support (_hardware_, cash)."
89 elog "Don't hesitate if you can help."
90 elog "See ${HOMEPAGE} for details."
91 echo
92
93 if [[ ${ROOT} == "/" ]]; then
94
95 einfo "Attempting to automatically reinstall any Windows drivers"
96 einfo "you might already have."
97 echo
98
99 local driver
100 for driver in $(ls /etc/ndiswrapper) ; do
101 einfo "Driver: ${driver}"
102 mv "/etc/ndiswrapper/${driver}" "${T}"
103 ndiswrapper -i "${T}/${driver}/${driver}.inf"
104 done
105 fi
106 }

  ViewVC Help
Powered by ViewVC 1.1.20