kernel-mod -> linux-mod; remove timeout from usb module for kernels >= 2.6.9
authorAlin Năstac <mrness@gentoo.org>
Tue, 14 Dec 2004 21:20:19 +0000 (21:20 +0000)
committerAlin Năstac <mrness@gentoo.org>
Tue, 14 Dec 2004 21:20:19 +0000 (21:20 +0000)
net-dialup/bewan-adsl/ChangeLog
net-dialup/bewan-adsl/Manifest
net-dialup/bewan-adsl/bewan-adsl-0.8.7.ebuild
net-dialup/bewan-adsl/files/bewan-adsl-kill-timeout.patch [new file with mode: 0644]

index da13de0352f76408de1974ea9630398627203b82..fabd88e4bef8847a1670efd78dfa1d2becc9c62c 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-dialup/bewan-adsl
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/bewan-adsl/ChangeLog,v 1.3 2004/12/05 21:20:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/bewan-adsl/ChangeLog,v 1.4 2004/12/14 21:20:09 mrness Exp $
+
+  14 Dec 2004; Alin Nastac <mrness@gentoo.org>
+  +files/bewan-adsl-kill-timeout.patch, bewan-adsl-0.8.7.ebuild:
+  Replace kernel-mod inheritance with linux-mod and solve compilation problems
+  for kernel versions >= 2.6.9. See bug #74397.
 
   05 Dec 2004; Alin Nastac <mrness@gentoo.org> bewan-adsl-0.8.7.ebuild:
   Replace kernel-mod eclass with linux-info.
index 9713e9139db431baf7d3833f8ccaed2a6bf0c0f4..5ab3d177b5ac2e0aecab8783bc8ce2b7e52ad8f6 100644 (file)
@@ -1,14 +1,15 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 f26aaa54937a2f7ed249781871aa77b0 ChangeLog 707
-MD5 6e5abb4866a60538bc36d09b12d0c0f2 bewan-adsl-0.8.7.ebuild 2227
+MD5 354bbd631742846e2b856921c4ca5165 ChangeLog 947
+MD5 ee9027e27ff203a68109c02d09fc8dc6 bewan-adsl-0.8.7.ebuild 2353
 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
 MD5 96c16fb5ea4312bc3e4b2300e0a7ce69 files/digest-bewan-adsl-0.8.7 59
+MD5 0572b020603885cca9caf29f664e2f44 files/bewan-adsl-kill-timeout.patch 1093
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (GNU/Linux)
 
-iD8DBQFBs31Ajtv59x0+BrURAs03AJkB3W5ciXTXCh5oBDSsBd7y3CRrEgCgjxqy
-Fck7GT6szq4bWDmNIyoNAVc=
-=jf0x
+iD8DBQFBv1kejtv59x0+BrURAn/TAKDve9ZvvnM3I3V9zWZSgrp+5vxjCACfYhsj
+bozMLZZCkAIJ0qiStNDc9Dc=
+=qNuM
 -----END PGP SIGNATURE-----
index 4416e50308f696a65da9457680d81d32069311d6..7a39b5172b9309071bbe87befc787796a6450b0a 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/bewan-adsl/bewan-adsl-0.8.7.ebuild,v 1.3 2004/12/05 21:17:16 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/bewan-adsl/bewan-adsl-0.8.7.ebuild,v 1.4 2004/12/14 21:20:09 mrness Exp $
 
-inherit eutils linux-info
+inherit eutils linux-mod
 
 DESCRIPTION="Bewan ADSL PCI&USB st driver"
 SRC_URI="http://www.bewan.com/bewan/drivers/bast-${PV}.tgz"
@@ -11,55 +11,61 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="x86"
 IUSE="usb doc"
+DEPEND="virtual/linux-sources"
 
 S="${WORKDIR}/unicorn"
 
-src_compile() {
+PCI_S="${S}/unicorn_pci"
+USB_S="${S}/unicorn_usb"
+BUILD_PARAMS="KERNEL_SOURCES=${KV_DIR} KVERS=${KV_FULL}"
+BUILD_TARGETS="modules"
+CONFIG_CHECK="ATM"
+ATM_ERROR="This driver requires you to build your kernel with support for Asynchronous Transfer Mode (ATM)"
+
+pkg_setup() {
+       MODULE_NAMES="unicorn_pci_atm(extra:${PCI_S}) unicorn_pci_eth(extra:${PCI_S})"
+       useq usb && MODULE_NAMES="${MODULE_NAMES} unicorn_usb_atm(extra:${USB_S})"
+
+       linux-mod_pkg_setup
+}
+
+src_unpack() {
+       unpack ${A}
+
+       #As of Linux 2.6.9, timeout is no longer in the URB structure, see:
+       #http://linux.bkbits.net:8080/linux-2.6/cset@1.1832.8.20
+       if [ ${KV_MINOR} -ge 6 ] && [ ${KV_PATCH} -ge 9 ]; then
+               epatch ${FILESDIR}/bewan-adsl-kill-timeout.patch
+       fi
+
+       # Fix up broken Makefiles
+       convert_to_m ${PCI_S}/Makefile
+       useq usb && convert_to_m ${USB_S}/Makefile
+}
 
+src_compile() {
        einfo "Build common library"
        cd ${S}/libm
        emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" || die
        unset ARCH #unset ARCH because interfere with 2.6 kernel makefiles
 
-       einfo "Build PCI driver"
-       cd ${S}/unicorn_pci
-       emake || die "Failed to build PCI driver"
-
-       if use usb; then
-               einfo "Build USB driver"
-               cd ${S}/unicorn_usb
-               emake || die "Failed to build USB driver"
-       fi
-
-       #Build tools
+       einfo "Building tools"
        cd ${S}/tools
        emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+
+       linux-mod_src_compile
 }
 
 src_install() {
-       if kernel_is 2 6 ; then
-               KV_OBJ="ko"
-       else
-               KV_OBJ="o"
-       fi
+       linux-mod_src_install
 
        cd ${S}
-       insinto "/lib/modules/${KV}/kernel/drivers/atm"
-       doins unicorn_pci/unicorn_pci_atm.${KV_OBJ} && \
-               doins unicorn_pci/unicorn_pci_eth.${KV_OBJ} || \
-               die "PCI driver not found! Install aborted."
-       if use usb; then
-               doins unicorn_usb/unicorn_usb_atm.${KV_OBJ} && \
-                       doins unicorn_usb/unicorn_usb_eth.${KV_OBJ} || \
-                       die "USB driver not found! Install aborted."
-       fi
-
        #Install tools
        dodir /usr/bin
        cd ${S}/tools && einstall DESTDIR=${D} prefix=/usr || \
                die "Cannot install tools"
 
-       if use doc; then
+       if useq doc; then
                #Install documantation  
                cd ${S}
                dodoc README
@@ -73,15 +79,11 @@ src_install() {
 }
 
 pkg_postinst() {
-       einfo "To load the driver do 'insmod unicorn_atm' and 'insmod unicorn_pci' "
+       einfo "To load the driver do 'modprobe unicorn_atm' and 'modprobe unicorn_pci' "
        einfo "and then do what you want with it (configure your pppd)"
        einfo "OR"
        einfo "it's time to look at the README file, the scripts directory gives you"
        einfo "two comprehensive ways to load the driver, configure pppd and launch it."
-       einfo ""
 
-       einfo "Checking kernel module dependencies"
-       test -r "${ROOT}/usr/src/linux/System.map" && \
-               depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
+       linux-mod_pkg_postinst
 }
-
diff --git a/net-dialup/bewan-adsl/files/bewan-adsl-kill-timeout.patch b/net-dialup/bewan-adsl/files/bewan-adsl-kill-timeout.patch
new file mode 100644 (file)
index 0000000..fb45305
--- /dev/null
@@ -0,0 +1,21 @@
+--- unicorn/unicorn_usb/unicorn_usbdrv.c.orig  2004-12-14 23:03:58.498415040 +0000
++++ unicorn/unicorn_usb/unicorn_usbdrv.c       2004-12-14 23:04:49.927596616 +0000
+@@ -119,8 +119,8 @@ static void dump_urb(struct urb *urb)
+ 
+       printk(KERN_DEBUG "hcpriv=%p,dev=%p,pipe=%x,status=%d,transfer_flags=%d\n",
+              urb->hcpriv,urb->dev,urb->pipe,urb->status,urb->transfer_flags);
+-      printk(KERN_DEBUG "bandwidth=%d,start_frame=%u,interval=%d,error_count=%d,timeout=%d\n",
+-          urb->bandwidth,urb->start_frame,urb->interval,urb->error_count,urb->timeout);
++      printk(KERN_DEBUG "bandwidth=%d,start_frame=%u,interval=%d,error_count=%d\n",
++          urb->bandwidth,urb->start_frame,urb->interval,urb->error_count);
+       // buffers
+       printk(KERN_DEBUG "transfer_buffer=%p,transfer_buffer_length=%d,actual_length=%d\n",
+              urb->transfer_buffer,urb->transfer_buffer_length,urb->actual_length);
+@@ -149,7 +149,6 @@ static void fill_isoc_urb(struct urb *ur
+       urb->transfer_flags=USB_ISO_ASAP;
+       urb->start_frame = -1;
+       urb->interval = 1;
+-      urb->timeout = 0;
+       urb->complete=complete;
+       urb->context=context;
+       {