summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johanson <latexer@gentoo.org>2004-02-08 00:22:35 +0000
committerPeter Johanson <latexer@gentoo.org>2004-02-08 00:22:35 +0000
commita63127944bca686cf1604991a4e9e708be273a54 (patch)
tree1cf7eb7078010cbb59e300b4a67a9a18e9099ed8 /net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.0-r3.ebuild
parentVersion bump, closes bugs #40438 and #38357. (Manifest recommit) (diff)
downloadgentoo-2-a63127944bca686cf1604991a4e9e708be273a54.tar.gz
gentoo-2-a63127944bca686cf1604991a4e9e708be273a54.tar.bz2
gentoo-2-a63127944bca686cf1604991a4e9e708be273a54.zip
New versions of 0.2.0 and 0.2.1_pre17 that use the new pcmcia.eclass to make life easier
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.ebuild129
1 files changed, 27 insertions, 102 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..45c5cdf8b1a4 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,30 +1,22 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# 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.2 2004/02/08 00:22:34 latexer 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="${IUSE} build 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
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"
@@ -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}
@@ -163,10 +88,10 @@ src_compile() {
#mv default.config config.in
if [ -n "`use pcmcia`" ]; then
- if [ "${kernelpcmcia}" = "no" ]
+ 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:' \