debug USE flag now works for beta2
authorRoy Marples <uberlord@gentoo.org>
Sat, 5 Nov 2005 18:25:25 +0000 (18:25 +0000)
committerRoy Marples <uberlord@gentoo.org>
Sat, 5 Nov 2005 18:25:25 +0000 (18:25 +0000)
  beta2 now builds against the ieee80211 stack in portage

Package-Manager: portage-2.0.51.22-r3

net-wireless/rt2x00/ChangeLog
net-wireless/rt2x00/Manifest
net-wireless/rt2x00/files/digest-rt2x00-2.0.0_beta2-r1 [new file with mode: 0644]
net-wireless/rt2x00/files/rt2x00-2.0.0-beta2.patch [new file with mode: 0644]
net-wireless/rt2x00/rt2x00-2.0.0_beta2-r1.ebuild [new file with mode: 0644]

index d98c62e3311791ecce4ebbc3f6d761cf07d9866a..b300db7ee34c78cf2d33992da4b36e21bb3d2968 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for net-wireless/rt2x00
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/rt2x00/ChangeLog,v 1.2 2005/11/04 22:05:07 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/rt2x00/ChangeLog,v 1.3 2005/11/05 18:25:25 uberlord Exp $
+
+*rt2x00-2.0.0_beta2-r1 (05 Nov 2005)
+
+  05 Nov 2005; Roy Marples <uberlord@gentoo.org>
+  +files/rt2x00-2.0.0-beta2.patch, +rt2x00-2.0.0_beta2-r1.ebuild:
+  debug USE flag now works for beta2
+  beta2 now builds against the ieee80211 stack in portage
 
 *rt2x00-9999 (04 Nov 2005)
 
index 1105a73b4cea4e23ca7c403162b4c6b1d87c6512..2f6f8fd4c661232cabee947744641e2c1f15b57a 100644 (file)
@@ -1,6 +1,9 @@
-MD5 9b55812039998cca61b41a07321c8fb9 ChangeLog 539
-MD5 34597afc54fc451cbf184d01b9853eed rt2x00-2.0.0_beta2.ebuild 2547
 MD5 9bcb2994a5d621eb5d27aaccb9ee9e9c rt2x00-9999.ebuild 2717
 MD5 d881dd1c4bfd4e45a852f320b5a973c7 metadata.xml 315
+MD5 1c330c72bbe2c8e4e88d1be1b4698226 ChangeLog 788
+MD5 34597afc54fc451cbf184d01b9853eed rt2x00-2.0.0_beta2.ebuild 2547
+MD5 4609e4272c6c3c852317df46a84e1cbd rt2x00-2.0.0_beta2-r1.ebuild 2837
+MD5 f84ccb94a3aa44174c09b91028354a40 files/digest-rt2x00-2.0.0_beta2-r1 67
 MD5 f84ccb94a3aa44174c09b91028354a40 files/digest-rt2x00-2.0.0_beta2 67
 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-rt2x00-9999 0
+MD5 8f60581425bcdcef4e28a376b29a3dfa files/rt2x00-2.0.0-beta2.patch 3064
diff --git a/net-wireless/rt2x00/files/digest-rt2x00-2.0.0_beta2-r1 b/net-wireless/rt2x00/files/digest-rt2x00-2.0.0_beta2-r1
new file mode 100644 (file)
index 0000000..c7afd3f
--- /dev/null
@@ -0,0 +1 @@
+MD5 4bf731328df460934110569551635c99 rt2x00-2.0.0-b2.tar.gz 130690
diff --git a/net-wireless/rt2x00/files/rt2x00-2.0.0-beta2.patch b/net-wireless/rt2x00/files/rt2x00-2.0.0-beta2.patch
new file mode 100644 (file)
index 0000000..587c60e
--- /dev/null
@@ -0,0 +1,107 @@
+--- Makefile   2005-10-22 03:11:18.000000000 +0100
++++ Makefile   2005-11-04 13:10:41.000000000 +0000
+@@ -19,8 +19,6 @@
+ #     Module: Makefile 
+ #     Abstract: Makefile for rt2x00 kernel module 
+ 
+-all: default
+-
+ obj-m += rt2x00core.o
+ obj-m += rt2400pci.o
+ obj-m += rt2500pci.o
+@@ -38,22 +36,49 @@
+       KERNEL_OUTPUT :=
+ endif
+ 
++ifdef KBUILD_EXTMOD
++      IEEE80211_DIR := $(KBUILD_EXTMOD)/ieee80211
++else
++      IEEE80211_DIR := ieee80211
++endif
++
++MAKEFLAGS += --no-print-directory
++CFLAGS := -I$(IEEE80211_DIR) -include $(IEEE80211_DIR)/net/ieee80211_compat.h $(CFLAGS)
++CPPFLAGS := -I$(IEEE80211_DIR) -include $(IEEE80211_DIR)/net/ieee80211_compat.h $(CPPFLAGS)
++
++all: debug
+ default: debug
++nodebug: ieee80211-nodebug update-symbols rt2x00-nodebug
++debug: ieee80211-debug update-symbols rt2x00-debug
++install: ieee80211-install rt2x00-install
++clean: ieee80211-clean rt2x00-clean
++
++update-symbols:
++      @mkdir -p .tmp_versions
++      @cp $(IEEE80211_DIR)/.tmp_versions/*.mod .tmp_versions
++
++ieee80211-nodebug:
++      @$(MAKE) -C $(IEEE80211_DIR) nodebug
++
++ieee80211-debug:
++      @$(MAKE) -C $(IEEE80211_DIR) debug
++
++ieee80211-install:
++      @$(MAKE) -C $(IEEE80211_DIR) install
++
++ieee80211-clean:
++      @$(MAKE) -C $(IEEE80211_DIR) clean
++
++rt2x00-nodebug:
++      @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) modules
+ 
+-nodebug:
+-      @$(MAKE) -C $(KERNEL_SOURCES) \
+-      EXTRA_CFLAGS="-DEXPORT_SYMTAB" SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) \
+-      modules
+-
+-debug:
+-      @$(MAKE) -C $(KERNEL_SOURCES) \
+-      EXTRA_CFLAGS="-DEXPORT_SYMTAB -DCONFIG_RT2X00_DEBUG" SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) \
+-      modules
++rt2x00-debug:
++      @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) EXTRA_CFLAGS="-DCONFIG_RT2X00_DEBUG" $(KERNEL_OUTPUT) modules
+ 
+-install:
+-      @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) modules_install
++rt2x00-install:
++      @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) INSTALL_MOD_DIR=rt2x00 $(KERNEL_OUTPUT) modules_install
+       /sbin/depmod -a
+ 
+-clean:
++rt2x00-clean:
+       @rm -f *.o *.ko .*.cmd .*.flags *.mod.c .*.o.d *~
+-      @rm -fr .tmp_versions
++      @rm -fr .tmp_versions
+\ No newline at end of file
++++ ieee80211_compat.h 2005-11-03 11:45:28.000000000 +0000
+@@ -0,0 +1,30 @@
++/*
++ * RT2X00 Compatability fixes for specific kernels.
++ */
++#ifndef IEEE_COMPAT_H
++#define IEEE_COMPAT_H
++
++#include <linux/kernel.h>
++#include <linux/version.h>
++#include <linux/etherdevice.h>
++
++#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 13)
++typedef unsigned __nocast gfp_t;
++
++static inline int is_broadcast_ether_addr(const u8 *addr)
++{
++        return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
++}
++#endif /* LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 13) */
++
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 14)
++static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b)
++{
++      const u16 *a = (const u16 *) _a;
++      const u16 *b = (const u16 *) _b;
++
++      BUILD_BUG_ON(ETH_ALEN != 6);
++      return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
++}
++#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 14) */
++#endif /* IEEE_COMPAT_H */
diff --git a/net-wireless/rt2x00/rt2x00-2.0.0_beta2-r1.ebuild b/net-wireless/rt2x00/rt2x00-2.0.0_beta2-r1.ebuild
new file mode 100644 (file)
index 0000000..82251bc
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/rt2x00/rt2x00-2.0.0_beta2-r1.ebuild,v 1.1 2005/11/05 18:25:25 uberlord Exp $
+
+inherit linux-mod eutils
+
+IEEE80211_VERSION="1.1.6"
+
+MY_P="${P/_beta/-b}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Driver for the RaLink RT2x00 wireless chipsets"
+HOMEPAGE="http://rt2x00.serialmonkey.com"
+SRC_URI="mirror://sourceforge/rt2400/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+DEPEND="
+       >=net-wireless/ieee80211-${IEEE80211_VERSION}
+       sys-apps/sed
+"
+RDEPEND="
+       >=net-wireless/ieee80211-${IEEE80211_VERSION}
+       net-wireless/wireless-tools
+"
+
+MODULE_NAMES="
+       rt2x00core(net/wireless:) rt2400pci(net/wireless:)
+       rt2500pci(net/wireless:) rt2500usb(net/wireless:)
+"
+
+CONFIG_CHECK="NET_RADIO BROKEN_ON_SMP !PREEMPT !4KSTACKS"
+ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
+ERROR_BROKEN_ON_SMP="${P} does not currently support SMP Processors and Kernels"
+ERROR_PREEMPT="${P} does not currently support pre-emption"
+ERROR_4KSTACKS="${P} does not currently support 4K Stacks"
+
+pkg_setup() {
+       kernel_is lt 2 6 13 && die "${P} requires at least kernel 2.6.13"
+
+       linux-mod_pkg_setup
+
+       if [[ ! -f /lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} ]]; then
+               eerror
+               eerror "Looks like you forgot to remerge net-wireless/ieee80211 after"
+               eerror "upgrading your kernel."
+               eerror
+               eerror "Hint: use sys-kernel/module-rebuild for keeping track of which"
+               eerror "modules needs to be remerged after a kernel upgrade."
+               eerror
+               die "/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} not found"
+       fi
+
+       BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+       if use debug ; then
+               BUILD_TARGETS="rt2x00-debug"
+       else
+               BUILD_TARGETS="rt2x00-nodebug"
+       fi
+}
+
+src_install() {
+       linux-mod_src_install
+       dodoc CHANGELOG COPYING README THANKS
+}
+
+src_unpack() {
+       unpack "${A}"
+       cd "${S}"
+       # Fix Makefile so the debug flag works and enable compliation
+       # against the ieee80211 stack in portage
+       epatch "${FILESDIR}/rt2x00-2.0.0-beta2.patch"
+       sed -i 's,^\(CFLAGS\|CPPFLAGS\) := .*,\1 := -include ieee80211_compat.h $(\1) -I/usr/include,g' Makefile
+}
+
+src_compile() {
+       linux-mod_src_compile
+
+       einfo
+       einfo "You may safely ignore any warnings from above compilation about"
+       einfo "undefined references to the ieee80211 subsystem."
+       einfo
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+
+       ewarn
+       ewarn "This is a BETA driver. If you have any issues, test the cvs ebuild"
+       ewarn "as your issue may have already been fixed."
+       ewarn "Please report any bugs to the rt2x00 forums :-"
+       ewarn "http://rt2x00.serialmonkey.com/phpBB2/viewforum.php?f=5"
+       ewarn
+       ewarn "Any bugs reported to Gentoo will be marked INVALID"
+       ewarn
+}