summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2005-09-17 09:20:52 +0000
committerAlin Năstac <mrness@gentoo.org>2005-09-17 09:20:52 +0000
commitf3eb7c03c7fc416831c69950add07ce155544d75 (patch)
treeea9bd5b860517acc696331ad26a54328b6ba53cf /net-dialup
parentversion bump as per bug #106009. Added safe(r) removal code too (diff)
downloadgentoo-2-f3eb7c03c7fc416831c69950add07ce155544d75.tar.gz
gentoo-2-f3eb7c03c7fc416831c69950add07ce155544d75.tar.bz2
gentoo-2-f3eb7c03c7fc416831c69950add07ce155544d75.zip
add upstream fixes for kernel >= 2.6.11; remove obsolete version
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/hcfusbmodem/ChangeLog11
-rw-r--r--net-dialup/hcfusbmodem/Manifest16
-rw-r--r--net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.051
-rw-r--r--net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.06-r11
-rw-r--r--net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-USB_byteorder.patch40
-rw-r--r--net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-simple_class.patch118
-rw-r--r--net-dialup/hcfusbmodem/hcfusbmodem-1.06-r1.ebuild (renamed from net-dialup/hcfusbmodem/hcfusbmodem-1.05.ebuild)15
7 files changed, 187 insertions, 15 deletions
diff --git a/net-dialup/hcfusbmodem/ChangeLog b/net-dialup/hcfusbmodem/ChangeLog
index 80cdc6f78aa2..ec590861781b 100644
--- a/net-dialup/hcfusbmodem/ChangeLog
+++ b/net-dialup/hcfusbmodem/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-dialup/hcfusbmodem
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/hcfusbmodem/ChangeLog,v 1.14 2005/06/24 05:30:47 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/hcfusbmodem/ChangeLog,v 1.15 2005/09/17 09:20:52 mrness Exp $
+
+*hcfusbmodem-1.06-r1 (17 Sep 2005)
+
+ 17 Sep 2005; Alin Nastac <mrness@gentoo.org>
+ +files/hcfusbmodem-1.06-USB_byteorder.patch,
+ +files/hcfusbmodem-1.06-simple_class.patch, -hcfusbmodem-1.05.ebuild,
+ +hcfusbmodem-1.06-r1.ebuild:
+ Add upstream fixes for kernel ver >= 2.6.11.
+ Remove obsolete version.
*hcfusbmodem-1.06 (24 Jun 2005)
diff --git a/net-dialup/hcfusbmodem/Manifest b/net-dialup/hcfusbmodem/Manifest
index 481478125329..6e31920bd22e 100644
--- a/net-dialup/hcfusbmodem/Manifest
+++ b/net-dialup/hcfusbmodem/Manifest
@@ -1,16 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 29cee4788f670e07a114fd2158fc8125 hcfusbmodem-1.05.ebuild 763
MD5 ebc35641f7d0128e5bcc0fb0225a7300 hcfusbmodem-1.06.ebuild 763
MD5 addf72511501deb1fbdb0cef4aaf8741 ChangeLog 1818
+MD5 4fc1d87605895d8413681cacba37ab88 hcfusbmodem-1.06-r1.ebuild 986
MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
-MD5 b79164cb72d3158caa12b91d8449f9ae files/digest-hcfusbmodem-1.05 79
+MD5 2ea75e584ddedfbb0c19b75beadad4d7 files/digest-hcfusbmodem-1.06-r1 79
+MD5 3e9febdb259b7acf520e55bdba23ee3f files/hcfusbmodem-1.06-simple_class.patch 5208
+MD5 c1d8ec1dd9eeb532a9fcda19dc2f4191 files/hcfusbmodem-1.06-USB_byteorder.patch 1983
MD5 2ea75e584ddedfbb0c19b75beadad4d7 files/digest-hcfusbmodem-1.06 79
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCu5qTjiC39V7gKu0RAgxKAJ4pxfscgIICodi0BeaFmVFt7CxobgCeLq6W
-Mkw67R4TfjV7YjCvcvpWiTk=
-=Wgvn
------END PGP SIGNATURE-----
diff --git a/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.05 b/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.05
deleted file mode 100644
index 6adb4b3c36f8..000000000000
--- a/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.05
+++ /dev/null
@@ -1 +0,0 @@
-MD5 252bbf93dd0c2950a2e4c5abaaf1ccaf hcfusbmodem-1.05powerpcfull.tar.gz 597848
diff --git a/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.06-r1 b/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.06-r1
new file mode 100644
index 000000000000..645a5609ddd6
--- /dev/null
+++ b/net-dialup/hcfusbmodem/files/digest-hcfusbmodem-1.06-r1
@@ -0,0 +1 @@
+MD5 77a03fe1ca3f137ed403bb3d9f7ba212 hcfusbmodem-1.06powerpcfull.tar.gz 600498
diff --git a/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-USB_byteorder.patch b/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-USB_byteorder.patch
new file mode 100644
index 000000000000..d5e1587e2441
--- /dev/null
+++ b/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-USB_byteorder.patch
@@ -0,0 +1,40 @@
+diff -urN hcfusbmodem-1.06powerpcfull/modules/GPL/oscompat.h hcfusbmodem-1.06powerpcfull-USB_byteorder/modules/GPL/oscompat.h
+--- hcfusbmodem-1.06powerpcfull/modules/GPL/oscompat.h 2005-06-20 15:18:46.000000000 -0400
++++ hcfusbmodem-1.06powerpcfull-USB_byteorder/modules/GPL/oscompat.h 2005-08-16 13:09:36.000000000 -0400
+@@ -89,6 +89,7 @@
+ #include <linux/kernel.h>
+ #include <linux/string.h>
+ #include <linux/kdev_t.h>
++#include <linux/byteorder/swab.h>
+
+ #if LINUX_VERSION_CODE == KERNEL_VERSION(2,4,9)
+ /* get rid of non-standard min/max macros */
+@@ -543,4 +544,10 @@
+ #define PCI_SLOT_NAME(x) (x)->dev.bus_id
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++#define USB_BYTEORDER16(x) (__cpu_to_le16(x))
++#else
++#define USB_BYTEORDER16(x) (x)
++#endif
++
+ #endif /* __OSCOMPAT_H */
+diff -urN hcfusbmodem-1.06powerpcfull/modules/cnxthwusb_common.c hcfusbmodem-1.06powerpcfull-USB_byteorder/modules/cnxthwusb_common.c
+--- hcfusbmodem-1.06powerpcfull/modules/cnxthwusb_common.c 2004-12-14 02:50:07.000000000 -0500
++++ hcfusbmodem-1.06powerpcfull-USB_byteorder/modules/cnxthwusb_common.c 2005-08-16 11:59:22.000000000 -0400
+@@ -79,10 +79,10 @@
+
+ dbg("%s: pUsbDevice=%p ifnum=%d id=%p bConfigurationValue=%d", __FUNCTION__, pUsbDevice, ifnum, id, pUsbDevice->config[0].bConfigurationValue);
+
+- if (((pUsbDevice->descriptor.idVendor != USB_AAPL_VENDOR_ID) &&
+- (pUsbDevice->descriptor.idVendor != USB_CNXT_VENDOR_ID)) ||
+- ((pUsbDevice->descriptor.idProduct != USB_AAPL_PRODUCT_ID) &&
+- (pUsbDevice->descriptor.idProduct != USB_CNXT_PRODUCT_ID))) {
++ if (((pUsbDevice->descriptor.idVendor != USB_BYTEORDER16(USB_AAPL_VENDOR_ID)) &&
++ (pUsbDevice->descriptor.idVendor != USB_BYTEORDER16(USB_CNXT_VENDOR_ID))) ||
++ ((pUsbDevice->descriptor.idProduct != USB_BYTEORDER16(USB_AAPL_PRODUCT_ID)) &&
++ (pUsbDevice->descriptor.idProduct != USB_BYTEORDER16(USB_CNXT_PRODUCT_ID)))) {
+ err("Not the one we are interested about");
+ goto exit;
+ }
diff --git a/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-simple_class.patch b/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-simple_class.patch
new file mode 100644
index 000000000000..490b0ad26271
--- /dev/null
+++ b/net-dialup/hcfusbmodem/files/hcfusbmodem-1.06-simple_class.patch
@@ -0,0 +1,118 @@
+diff -urN hcfusbmodem-1.06powerpcfull/modules/GPL/oscompat.h hcfusbmodem-1.06powerpcfull-simple_class/modules/GPL/oscompat.h
+--- hcfusbmodem-1.06powerpcfull/modules/GPL/oscompat.h 2005-06-20 15:18:46.000000000 -0400
++++ hcfusbmodem-1.06powerpcfull-simple_class/modules/GPL/oscompat.h 2005-09-07 18:26:39.000000000 -0400
+@@ -543,4 +543,16 @@
+ #define PCI_SLOT_NAME(x) (x)->dev.bus_id
+ #endif
+
++#ifdef FOUND_CLASS_SIMPLE
++#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest)
++#define CLASS_DESTROY(class) class_simple_destroy(class)
++#define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev)
++#define CLASS_CREATE(owner, name) class_simple_create(owner, name)
++#else
++#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest)
++#define CLASS_DESTROY(class) class_destroy(class)
++#define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev)
++#define CLASS_CREATE(owner, name) class_create(owner, name)
++#endif
++
+ #endif /* __OSCOMPAT_H */
+diff -urN hcfusbmodem-1.06powerpcfull/modules/Makefile hcfusbmodem-1.06powerpcfull-simple_class/modules/Makefile
+--- hcfusbmodem-1.06powerpcfull/modules/Makefile 2005-06-20 15:25:00.000000000 -0400
++++ hcfusbmodem-1.06powerpcfull-simple_class/modules/Makefile 2005-09-07 18:26:39.000000000 -0400
+@@ -48,6 +48,16 @@
+ KMODS_DIR := /lib/modules/$(KERNELVER)
+ CNXT_MODS_DIR := $(KMODS_DIR)/extra
+
++# On SuSE 9.0 and up, CNXT_KERNELSRC points to an incomplete kernel source
++# directory and some include files are not available in this tree
++SUSE_OBJ_TREE := $(shell if grep -q '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" && [ -d "${CNXT_KERNELSRC}" ]; then echo "yes"; else echo "no"; fi)
++
++ifeq ($(SUSE_OBJ_TREE),yes)
++REAL_KERNELSRC := $(shell grep '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" | awk '{print $3}')
++else
++REAL_KERNELSRC := $(CNXT_KERNELSRC)
++endif
++
+ FOUND_PCI_DEV_SLOT_NAME := $(shell grep -q 'slot_name' ${CNXT_KERNELSRC}/include/linux/pci.h 2> /dev/null && echo -DFOUND_PCI_DEV_SLOT_NAME)
+ CFLAGS+= $(FOUND_PCI_DEV_SLOT_NAME)
+
+@@ -57,6 +67,9 @@
+ KO= ko
+ KBUILD_EXTMOD_SUPPORTED := $(shell egrep -q 'KBUILD_EXTMOD|KERNEL_SOURCE|KERNELSRC' ${CNXT_KERNELSRC}/Makefile 2>/dev/null && echo yes || echo no)
+
++FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${REAL_KERNELSRC}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE)
++CFLAGS+= $(FOUND_CLASS_SIMPLE)
++
+ else
+ KO= o
+ # Configure compiler (on some systems, kgcc must be used to compile kernel code)
+diff -urN hcfusbmodem-1.06powerpcfull/modules/osdiag.c hcfusbmodem-1.06powerpcfull-simple_class/modules/osdiag.c
+--- hcfusbmodem-1.06powerpcfull/modules/osdiag.c 2004-12-14 02:50:07.000000000 -0500
++++ hcfusbmodem-1.06powerpcfull-simple_class/modules/osdiag.c 2005-09-07 18:26:44.000000000 -0400
+@@ -30,7 +30,11 @@
+ static struct list_head diag_instance_list = LIST_HEAD_INIT(diag_instance_list);
+ static spinlock_t diag_lock = SPIN_LOCK_UNLOCKED;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
++#ifdef FOUND_CLASS_SIMPLE
+ static struct class_simple *diag_class;
++#else
++static struct class *diag_class;
++#endif
+ #endif
+
+ #define common_instance_header \
+@@ -659,7 +663,7 @@
+ #else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class)) {
+- class_simple_device_add(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum);
++ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum);
+ }
+ #endif
+
+@@ -764,7 +768,7 @@
+ }
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_device_remove(MKDEV(diagmajor, pDiag->hwInstNum));
++ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, pDiag->hwInstNum));
+ #endif
+ #endif
+
+@@ -834,14 +838,14 @@
+ devfs_remove(CNXTTARGET"diagdmp");
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_device_remove(MKDEV(diagmajor, CNXTDIAGDMPMINOR));
++ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR));
+ #endif
+ #endif
+ #endif /* DMP || DMP_RETAIL */
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_destroy(diag_class);
++ CLASS_DESTROY(diag_class);
+ #endif
+ if(diagmajor > 0)
+ unregister_chrdev(diagmajor, CNXTTARGET"diag");
+@@ -865,7 +869,7 @@
+ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+- diag_class = class_simple_create(THIS_MODULE, CNXTTARGET"diag");
++ diag_class = CLASS_CREATE(THIS_MODULE, CNXTTARGET"diag");
+ if (IS_ERR(diag_class)) {
+ printk(KERN_ERR "%s: cannot create simple class (%ld)\n", __FUNCTION__, PTR_ERR(diag_class));
+ if(diagmajor > 0)
+@@ -884,7 +888,7 @@
+ #else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class)) {
+- class_simple_device_add(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp");
++ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp");
+ }
+ #endif
+ devfs_mk_cdev(MKDEV(diagmajor, CNXTDIAGDMPMINOR), S_IFCHR | S_IRUSR | S_IWUSR, CNXTTARGET"diagdmp");
diff --git a/net-dialup/hcfusbmodem/hcfusbmodem-1.05.ebuild b/net-dialup/hcfusbmodem/hcfusbmodem-1.06-r1.ebuild
index c3ec14eb02f8..babc708695ea 100644
--- a/net-dialup/hcfusbmodem/hcfusbmodem-1.05.ebuild
+++ b/net-dialup/hcfusbmodem/hcfusbmodem-1.06-r1.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/hcfusbmodem/hcfusbmodem-1.05.ebuild,v 1.1 2005/03/06 00:32:11 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/hcfusbmodem/hcfusbmodem-1.06-r1.ebuild,v 1.1 2005/09/17 09:20:52 mrness Exp $
+
+inherit linux-info eutils
DESCRIPTION="hcfusbmodem - Modem driver for Connexant HSF chipset"
SRC_URI="http://www.linuxant.com/drivers/hcf/full/archive/${P}powerpcfull.tar.gz"
@@ -14,6 +16,17 @@ DEPEND="virtual/libc"
S="${WORKDIR}/${P}powerpcfull"
+src_unpack() {
+ unpack ${A}
+
+ if kernel_is ge 2 6 11 ; then
+ epatch ${FILESDIR}/${P}-USB_byteorder.patch
+ if kernel_is ge 2 6 13 ; then
+ epatch ${FILESDIR}/${P}-simple_class.patch
+ fi
+ fi
+}
+
src_compile() {
emake all || die
}