summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild')
-rw-r--r--net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild143
1 files changed, 34 insertions, 109 deletions
diff --git a/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild b/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild
index 746c047937de..4ba72999fdcc 100644
--- a/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild
+++ b/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild
@@ -1,33 +1,25 @@
-# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild,v 1.1 2004/02/01 23:33:51 latexer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild,v 1.1.1.1 2005/11/30 09:45:33 chriswhite Exp $
-inherit eutils
+inherit pcmcia
-IUSE="apm build nocardbus pcmcia pnp trusted usb"
-
-PCMCIA_CS="pcmcia-cs-3.2.5"
-PATCH_3_2_6="pcmcia-cs-3.2.5-3.2.6.diff.gz"
-PATCH_3_2_7="pcmcia-cs-3.2.5-3.2.7.diff.gz"
-PCMCIA_DIR="${WORKDIR}/${PCMCIA_CS}"
+IUSE="build pcmcia usb"
DESCRIPTION="The linux-wlan Project"
-SRC_URI="ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/${P}.tar.gz
- mirror://gentoo/${PN}-gentoo-init.gz
- pcmcia? ( mirror://sourceforge/pcmcia-cs/${PCMCIA_CS}.tar.gz \
- http://dev.gentoo.org/~latexer/files/patches/${PCMCIA_CS}-module-init-tools.diff.gz \
- http://dev.gentoo.org/~latexer/files/patches/${PATCH_3_2_6} \
- http://dev.gentoo.org/~latexer/files/patches/${PATCH_3_2_7} )"
+SRC_URI="${SRC_URI}
+ ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/${P}.tar.gz
+ mirror://gentoo/${PN}-gentoo-init.gz"
HOMEPAGE="http://linux-wlan.org"
-DEPEND="sys-kernel/linux-headers
- dev-libs/openssl
+DEPEND="virtual/os-headers"
+RDEPEND="dev-libs/openssl
sys-apps/baselayout
- >=sys-apps/sed-4.0*
- pcmcia? ( >=sys-apps/pcmcia-cs-3.2.5 )"
+ >=sys-apps/sed-4.0"
+
SLOT="0"
LICENSE="MPL-1.1"
-KEYWORDS="~x86"
+KEYWORDS="x86"
# Note: To use this ebuild, you should have the usr/src/linux symlink to
# the kernel directory that linux-wlan-ng should use for configuration.
@@ -36,32 +28,25 @@ KEYWORDS="~x86"
# unpack/configure it in WORKDIR. No need to compile it though.
src_unpack() {
+ check_KV
+
+ okvminor="${KV#*.}" ; okvminor="${okvminor%%.*}"
+ if [ "${okvminor}" -gt 4 ]; then
+ eerror "This version of linux-wlan-ng will NOT work with 2.6 kernels"
+ eerror "Please use >=linux-wlan-ng-0.2.1_pre17 for 2.6 kernels."
+ eerror "For now, you will need to disable sandbox to get this to merge."
+ eerror "See bug #32737 for info on work being done to fix this."
+ die "This version of linux-wlan-ng does not support 2.6 kernels"
+ fi
unpack ${P}.tar.gz
unpack ${PN}-gentoo-init.gz
- # install a gentoo style init script
-
- cp ${PN}-gentoo-init ${S}/etc/rc.wlan
-
- check_KV
-
- if [ -n "`use pcmcia`" ]; then
- if egrep '^CONFIG_PCMCIA=[ym]' /usr/src/linux/.config >&/dev/null; then
- einfo "Kernel PCMCIA is enabled. Skipping external pcmcia-cs sources."
- else
- unpack ${PCMCIA_CS}.tar.gz
- cd ${PCMCIA_DIR}
- # Fix for module-init-tools only systems
- epatch ${DISTDIR}/${PCMCIA_CS}-module-init-tools.diff.gz
- if [ -z "`has_version >=sys-apps/pcmcia-cs-3.2.7`" ]; then
- epatch ${DISTDIR}/${PATCH_3_2_7}
- elif [ -z "`has_version >=sys-apps/pcmcia-cs-3.2.6`" ]; then
- epatch ${DISTDIR}/${PATCH_3_2_6}
- fi
- fi
- fi
+ # Use pcmcia.eclass to figure out what to do about pcmcia
+ pcmcia_src_unpack
+ # install a gentoo style init script
+ cp ${WORKDIR}/${PN}-gentoo-init ${S}/etc/rc.wlan
# Lots of sedding to do to get the man pages and a few other
# things to end up in the right place.
@@ -89,69 +74,9 @@ src_unpack() {
}
src_compile() {
+ # Configure the pcmcia-cs sources if we actually are going to use them
+ pcmcia_configure
- #
- # configure pcmcia-cs - we need this for wlan to compile
- # use same USE flags that the pcmcia-cs ebuild does.
- # no need to actually compile pcmcia-cs...
- # * This is actually only used if pcmcia_cs is NOT compiled into
- # the kernel tree.
- #
-
- local myarch kernelpcmcia
-
- if egrep '^CONFIG_PCMCIA=[ym]' /usr/src/linux/.config >&/dev/null; then
- kernelpcmcia="yes"
- else
- kernelpcmcia="no"
- fi
-
- if [ -n "`use pcmcia`" ]; then
- if [ "${kernelpcmcia}" = "no" ]; then
- # Set myarch since pcmcia-cs expects i386, not x86
- case "${ARCH}" in
- x86) myarch="i386" ;;
- *) myarch="${ARCH}" ;;
- esac
-
- cd ${PCMCIA_DIR}
- local myconf
- if [ -n "`use trusted`" ] ; then
- myconf="--trust"
- else
- myconf="--notrust"
- fi
-
- if [ -n "`use apm`" ] ; then
- myconf="$myconf --apm"
- else
- myconf="$myconf --noapm"
- fi
-
- if [ -n "`use pnp`" ] ; then
- myconf="$myconf --pnp"
- else
- myconf="$myconf --nopnp"
- fi
-
- if [ -n "`use nocardbus`" ] ; then
- myconf="$myconf --nocardbus"
- else
- myconf="$myconf --cardbus"
- fi
-
- #use $CFLAGS for user tools, but standard kernel optimizations for
- #the kernel modules (for compatibility)
- ./Configure -n \
- --target=${D} \
- --srctree \
- --kernel=/usr/src/linux \
- --arch="${myarch}" \
- --uflags="${CFLAGS}" \
- --kflags="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer" \
- $myconf || die "failed configuring pcmcia-cs"
- fi
- fi
# now lets build wlan-ng
cd ${S}
@@ -162,11 +87,11 @@ src_compile() {
config.in
#mv default.config config.in
- if [ -n "`use pcmcia`" ]; then
- if [ "${kernelpcmcia}" = "no" ]
+ if use pcmcia; then
+ if [ -n "${PCMCIA_SOURCE_DIR}" ]
then
- export PCMCIA_CS=${PCMCIA_CS}
- sed -i -e 's:PCMCIA_SRC=:PCMCIA_SRC=${WORKDIR}/${PCMCIA_CS}:' \
+ export PCMCIA_SOURCE_DIR=${PCMCIA_SOURCE_DIR}
+ sed -i -e 's:PCMCIA_SRC=:PCMCIA_SRC=${PCMCIA_SOURCE_DIR}:' \
config.in
fi
sed -i -e 's:PRISM2_PLX=n:PRISM2_PLX=y:' \
@@ -177,7 +102,7 @@ src_compile() {
fi
#mv default.config config.in
- if [ -n "`use usb`" ]; then
+ if use usb; then
sed -i -e 's:PRISM2_USB=n:PRISM2_USB=y:' \
config.in
#mv default.config config.in
@@ -202,7 +127,7 @@ src_install () {
dodir etc/wlan
mv ${D}/etc/conf.d/shared ${D}/etc/wlan/
- if [ -z "`use build`" ]; then
+ if ! use build; then
dodir /usr/share/man/man1
newman ${S}/man/nwepgen.man nwepgen.1