--- hostap-driver-0.4.9.ebuild.orig 2006-07-13 00:40:28.000000000 +0200 +++ hostap-driver-0.4.9.ebuild 2006-07-13 00:52:26.000000000 +0200 @@ -13,7 +13,8 @@ IUSE="pcmcia" SLOT="0" -RDEPEND=">=net-wireless/wireless-tools-25" +RDEPEND=">=net-wireless/wireless-tools-25 + pcmcia? ( virtual/pcmcia )" BUILD_TARGETS="all" MODULESD_HOSTAP_DOCS="README" @@ -25,6 +26,34 @@ ERROR_HOSTAP="${P} requires the in-kernel version of the hostap driver to be disabled (CONFIG_HOSTAP)" ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)." +pcmcia_src_unpack() { + local pcmcia_tbz="${ROOT}/usr/src/pcmcia-cs/pcmcia-cs-build-env.tbz2" + local PCMCIA_SOURCE_DIR="${WORKDIR}/pcmcia-cs/" + + # if the kernel has pcmcia support built in, then we just ignore all this. + if linux_chkconfig_present PCMCIA; then + einfo "Kernel based PCMCIA support has been detected." + else + if kernel_is 2 6; then + einfo "We have detected that you are running a 2.6 kernel" + einfo "but you are not using the built-in PCMCIA support." + einfo "We will assume you know what you are doing, but please" + einfo "consider using the built in PCMCIA support instead." + epause 10 + fi + + ebegin "Decompressing pcmcia-cs sources" + mkdir -p ${PCMCIA_SOURCE_DIR} + tar -xjf ${pcmcia_tbz} -C ${PCMCIA_SOURCE_DIR} + eend $? + + if [[ -f ${PCMCIA_SOURCE_DIR}/pcmcia-cs-version ]]; then + PCMCIA_VERSION=$(cat ${PCMCIA_SOURCE_DIR}/pcmcia-cs-version) + einfo "Found pcmcia-cs-${PCMCIA_VERSION}" + fi + fi +} + pkg_setup() { linux-mod_pkg_setup