diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2008-02-12 08:13:05 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2008-02-12 08:13:05 +0000 |
commit | 5ed3f823c94cc65429597fd3b47bc62db976fb79 (patch) | |
tree | 2d2c0aa5e784a99f203af0697ee0b75acdf8d8d6 /net-dialup/misdn | |
parent | Remove 2.6.23-r10 as tuxonice requires resync for >2.6.23.14 (bug #209755), a... (diff) | |
download | historical-5ed3f823c94cc65429597fd3b47bc62db976fb79.tar.gz historical-5ed3f823c94cc65429597fd3b47bc62db976fb79.tar.bz2 historical-5ed3f823c94cc65429597fd3b47bc62db976fb79.zip |
version bump + kernel 2.6.24 patches (solving bug #207891).
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'net-dialup/misdn')
-rw-r--r-- | net-dialup/misdn/ChangeLog | 10 | ||||
-rw-r--r-- | net-dialup/misdn/Manifest | 5 | ||||
-rw-r--r-- | net-dialup/misdn/files/misdn-2.6.24.diff | 331 | ||||
-rw-r--r-- | net-dialup/misdn/misdn-1.1.7.2.ebuild | 216 |
4 files changed, 559 insertions, 3 deletions
diff --git a/net-dialup/misdn/ChangeLog b/net-dialup/misdn/ChangeLog index 9506cdb3b96a..a7d8ab927ed3 100644 --- a/net-dialup/misdn/ChangeLog +++ b/net-dialup/misdn/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-dialup/misdn -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/misdn/ChangeLog,v 1.26 2007/11/12 19:14:08 genstef Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/misdn/ChangeLog,v 1.27 2008/02/12 08:13:04 sbriesen Exp $ + +*misdn-1.1.7.2 (12 Feb 2008) + + 12 Feb 2008; Stefan Briesenick <sbriesen@gentoo.org> + +files/misdn-2.6.24.diff, +misdn-1.1.7.2.ebuild: + version bump + kernel 2.6.24 patches (solving bug #207891). *misdn-1.1.7 (12 Nov 2007) diff --git a/net-dialup/misdn/Manifest b/net-dialup/misdn/Manifest index cd39ef647dce..5fe28bf69bef 100644 --- a/net-dialup/misdn/Manifest +++ b/net-dialup/misdn/Manifest @@ -1,6 +1,9 @@ AUX README.hfcmulti 2488 RMD160 6c4e62fdfd6ce872b0ec270271ce97954c6374f4 SHA1 94af469baeab0972539a9dc707d1a334dfe0b1b5 SHA256 29793879cd9a752fb1f71e9f9aebc8988024b5ec8cdb53d0d551fc75ade0377f AUX misdn-2.6.23.diff 1329 RMD160 d78ea95e4c1847ee865fef10e2b44346607c4fc8 SHA1 47c0661681a09d5ee54368bec58a81fda2b1d921 SHA256 a31e4b8f29f0bc9d032eb3f1d382274e36e105b679ddb9ff23128bf75e5b763e +AUX misdn-2.6.24.diff 11969 RMD160 f149723b72ead86cbc1f47f0956494f774de7ab0 SHA1 05d250a90a3662bad52f2d74e51ad00641dc4308 SHA256 bb62d30fec3eea7a80d42caec72d2b6915bc218956e47513ef540fb9e6f43725 DIST mISDN-1_1_7.tar.gz 471967 RMD160 158d297b83d7157dd5d7d6ae742f6f358c5512e0 SHA1 d4368bd71f7be2302a8144e4ae422284c6eccafc SHA256 d3228fafe17046150062f296549abbdccaa9f976e9275f0edd12d1a25ca93f2b +DIST mISDN-1_1_7_2.tar.gz 477593 RMD160 d7a3c358f2b67e0d84cbec02a877dac3a6f7bfa2 SHA1 95225e6376b896bfd23c44f5e440de10ca824f27 SHA256 24a63f063d9a3cbdaa2e7f5a3f9fb55988ba3f08cb5ccf19c3d7eb726eb806d9 +EBUILD misdn-1.1.7.2.ebuild 6019 RMD160 96df9bca4d33a02e9fa3ae60934de7fa8c2c9d99 SHA1 efe25e173fccd7d78548006e4918881d9c63e202 SHA256 0d98e66d332f56682c32e59ea4b18fa59b76692130a4193991194560284aeb49 EBUILD misdn-1.1.7.ebuild 5343 RMD160 a80d1c997cb10c56688d5b9396c86ed17a1257c1 SHA1 e37720c108b5a04fa6ebe51b065963e3d640f020 SHA256 7cede7de874abc8a0b59bd7166f1b1b0b8fdcacb4c15bec66f3a7c986fc73ed4 -MISC ChangeLog 4744 RMD160 4cc8a2a12ebe7722fc3713b6771c466f980f0303 SHA1 74d94743a564a1b3cae4891a000687edfeead837 SHA256 239b3d5675cdf3df3470ca65de7565aced1e5b0582ff678dbede893c944909ea +MISC ChangeLog 4944 RMD160 48a6031616a491040bca32c66866985d4b573088 SHA1 9e09a1da8606edacd77b4537da485bb007f30b0b SHA256 593429fc3ee0dc6f70a799761835dd13836e2713f3027c8897652cb8e4ba0f23 MISC metadata.xml 163 RMD160 df94c60cc0bb7abe5913b464a33966b142b2fe1e SHA1 d8332605fd22c32f15438bbdf24aa622c3d2738a SHA256 1137a0fd866641cf719b0c2e9e77ca9fa4541a42f2cc851fe4659cf2677acca3 diff --git a/net-dialup/misdn/files/misdn-2.6.24.diff b/net-dialup/misdn/files/misdn-2.6.24.diff new file mode 100644 index 000000000000..66c9f8265237 --- /dev/null +++ b/net-dialup/misdn/files/misdn-2.6.24.diff @@ -0,0 +1,331 @@ +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/app_plci.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/app_plci.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/app_plci.c 2008-01-18 10:24:49.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/app_plci.c 2008-02-05 23:06:46.000000000 +0100 +@@ -825,6 +825,7 @@ + cmsg->LLC = &p[qi->llc.off + 1]; + if (qi->hlc.off) + cmsg->HLC = &p[qi->hlc.off + 1]; ++#ifdef CAPIUTIL_VERSION + #if CAPIUTIL_VERSION > 1 + /* ETS 300 092 Annex B */ + if (qi->calling_nr.repeated) { +@@ -834,6 +835,7 @@ + int_error(); + } + #endif ++#endif + // all else set to default + } + if (mISDN_FsmEvent(&aplci->plci_m, EV_PI_CONNECT_IND, cmsg)) +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/avm_fritz.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/avm_fritz.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/avm_fritz.c 2008-01-18 10:24:49.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/avm_fritz.c 2008-02-05 23:06:46.000000000 +0100 +@@ -689,7 +689,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + avm_fritz_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++avm_fritz_interrupt(int intno, void *dev_id) ++#endif + { + fritzpnppci *fc = dev_id; + u_char val; +@@ -722,7 +726,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + avm_fritzv2_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++avm_fritzv2_interrupt(int intno, void *dev_id) ++#endif + { + fritzpnppci *fc = dev_id; + u_char val; +@@ -876,7 +884,7 @@ + static int init_card(fritzpnppci *fc) + { + int cnt = 3; +- u_int shared = SA_SHIRQ; ++ u_int shared = __IRQF_SHARED; + u_long flags; + u_char *id = "AVM Fritz!PCI"; + +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/core.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/core.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/core.c 2007-12-17 16:29:59.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/core.c 2008-02-05 23:06:46.000000000 +0100 +@@ -759,9 +759,11 @@ + int + mISDNInit(void) + { +- DECLARE_MUTEX_LOCKED(sem); ++ struct semaphore sem; + int err; + ++ init_MUTEX_LOCKED(&sem); ++ + printk(KERN_INFO "Modular ISDN Stack core version (%s) revision (%s)\n", mISDN_core_version, mISDN_core_revision); + core_debug = debug; + #ifdef MISDN_MEMDEBUG +@@ -801,7 +803,8 @@ + } + + void mISDN_cleanup(void) { +- DECLARE_MUTEX_LOCKED(sem); ++ struct semaphore sem; ++ init_MUTEX_LOCKED(&sem); + + free_mISDNdev(); + if (!list_empty(&mISDN_objectlist)) { +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/dsp_core.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/dsp_core.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/dsp_core.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/dsp_core.c 2008-02-05 23:10:32.000000000 +0100 +@@ -1005,8 +1005,10 @@ + /* fill mISDN object (dsp_obj) */ + memset(&dsp_obj, 0, sizeof(dsp_obj)); + #ifdef MODULE ++#ifdef SET_MODULE_OWNER + SET_MODULE_OWNER(&dsp_obj); + #endif ++#endif + spin_lock_init(&dsp_obj.lock); + dsp_obj.name = DSPName; + dsp_obj.BPROTO.protocol[3] = ISDN_PID_L3_B_DSP; +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_multi.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_multi.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_multi.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_multi.c 2008-02-05 23:06:46.000000000 +0100 +@@ -119,7 +119,7 @@ + #define bugtest \ + if (hc->irq) free_irq(hc->irq, hc); \ + hc->irq = 0; \ +- if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) { \ ++ if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, __IRQF_SHARED, "HFC-multi", hc)) { \ + printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n", hc->pci_dev->irq); \ + hc->irq = hc->pci_dev->irq; } + #endif +@@ -1930,7 +1930,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + hfcmulti_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++hfcmulti_interrupt(int intno, void *dev_id) ++#endif + { + #ifdef IRQCOUNT_DEBUG + static int iq1=0,iq2=0,iq3=0,iq4=0,iq5=0,iq6=0,iqcnt=0; +@@ -3294,7 +3298,7 @@ + disable_hwirq(hc); + spin_unlock_irqrestore(&hc->lock, flags); + +- if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, SA_SHIRQ, "HFC-multi", hc)) { ++ if (request_irq(hc->pci_dev->irq, hfcmulti_interrupt, __IRQF_SHARED, "HFC-multi", hc)) { + printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n", hc->pci_dev->irq); + return(-EIO); + } +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_pci.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_pci.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfc_pci.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfc_pci.c 2008-02-05 23:06:46.000000000 +0100 +@@ -1034,7 +1034,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + hfcpci_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++hfcpci_interrupt(int intno, void *dev_id) ++#endif + { + hfc_pci_t *hc = dev_id; + u_char exval; +@@ -1693,7 +1697,7 @@ + spin_lock_irqsave(&hc->lock, flags); + disable_hwirq(hc); + spin_unlock_irqrestore(&hc->lock, flags); +- if (request_irq(hc->irq, hfcpci_interrupt, SA_SHIRQ, "HFC PCI", hc)) { ++ if (request_irq(hc->irq, hfcpci_interrupt, __IRQF_SHARED, "HFC PCI", hc)) { + printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", hc->irq); + return(-EIO); + } +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_mini.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_mini.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_mini.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_mini.c 2008-02-05 23:06:46.000000000 +0100 +@@ -983,7 +983,11 @@ + /* Interrupt handler */ + /*********************/ + static irqreturn_t ++#ifdef OLD_IRQ_CALL + hfcsmini_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++hfcsmini_interrupt(int intno, void *dev_id) ++#endif + { + __u8 fifo_irq, misc_irq; + hfcsmini_hw *hw = dev_id; +@@ -1587,7 +1591,7 @@ + printk(KERN_WARNING "%s %s: requesting IRQ %d\n", + hw->card_name, __FUNCTION__, hw->irq); + +- if (request_irq(hw->irq, hfcsmini_interrupt, SA_SHIRQ, "HFC-S mini", hw)) { ++ if (request_irq(hw->irq, hfcsmini_interrupt, __IRQF_SHARED, "HFC-S mini", hw)) { + printk(KERN_WARNING "%s %s: couldn't get interrupt %d\n", + hw->card_name, __FUNCTION__, hw->irq); + +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_usb.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_usb.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/hfcs_usb.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/hfcs_usb.c 2008-02-05 23:06:46.000000000 +0100 +@@ -1109,17 +1109,13 @@ + { + int k; + +- spin_lock_init(&urb->lock); +- urb->dev = dev; +- urb->pipe = pipe; +- urb->complete = complete; ++ usb_fill_bulk_urb(urb, dev, pipe, buf, packet_size * num_packets, complete, context); ++ + urb->number_of_packets = num_packets; +- urb->transfer_buffer_length = packet_size * num_packets; +- urb->context = context; +- urb->transfer_buffer = buf; + urb->transfer_flags = URB_ISO_ASAP; + urb->actual_length = 0; + urb->interval = interval; ++ + for (k = 0; k < num_packets; k++) { + urb->iso_frame_desc[k].offset = packet_size * k; + urb->iso_frame_desc[k].length = packet_size; +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/netjet.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/netjet.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/netjet.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/netjet.c 2008-02-05 23:06:46.000000000 +0100 +@@ -1463,7 +1463,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + nj_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++nj_interrupt(int intno, void *dev_id) ++#endif + { + netjet_t *card = dev_id; + u_int8_t val, s1val, s0val; +@@ -1544,7 +1548,7 @@ + nj_disable_hwirq(card); + spin_unlock_irqrestore(&card->lock, flags); + +- if (request_irq(card->irq, nj_interrupt, SA_SHIRQ, "NETjet", card)) { ++ if (request_irq(card->irq, nj_interrupt, __IRQF_SHARED, "NETjet", card)) { + printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", + card->irq); + return (-EIO); +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/sedl_fax.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/sedl_fax.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/sedl_fax.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/sedl_fax.c 2008-02-05 23:06:46.000000000 +0100 +@@ -338,7 +338,7 @@ + { + int cnt = 3; + u_long flags; +- u_int shared = SA_SHIRQ; ++ u_int shared = __IRQF_SHARED; + void *irq_func = speedfax_pci_interrupt; + + if (sf->subtyp == SEDL_SPEEDFAX_ISA) { +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/stack.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/stack.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/stack.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/stack.c 2008-02-05 23:06:46.000000000 +0100 +@@ -786,9 +786,11 @@ + static int + delete_stack(mISDNstack_t *st) + { +- DECLARE_MUTEX_LOCKED(sem); ++ struct semaphore sem; + u_long flags; + ++ init_MUTEX_LOCKED(&sem); ++ + if (core_debug & DEBUG_CORE_FUNC) + printk(KERN_DEBUG "%s: st(%p:%08x)\n", __FUNCTION__, st, st->id); + mISDN_unregister_sysfs_st(st); +@@ -1198,7 +1200,8 @@ + hhe->addr = st->id; + + if (wait) { +- DECLARE_MUTEX_LOCKED(sem); ++ struct semaphore sem; ++ init_MUTEX_LOCKED(&sem); + + hhe->data[0] = &sem; + _queue_message(st, skb); +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/w6692.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/w6692.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/w6692.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/w6692.c 2008-02-05 23:06:46.000000000 +0100 +@@ -855,7 +855,11 @@ + } + + static irqreturn_t ++#ifdef OLD_IRQ_CALL + w6692_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++w6692_interrupt(int intno, void *dev_id) ++#endif + { + w6692pci *card = dev_id; + u_char ista; +@@ -994,7 +998,7 @@ + spin_lock_irqsave(&card->lock, flags); + disable_hwirq(card); + spin_unlock_irqrestore(&card->lock, flags); +- if (request_irq(card->irq, w6692_interrupt, SA_SHIRQ, "w6692", card)) { ++ if (request_irq(card->irq, w6692_interrupt, __IRQF_SHARED, "w6692", card)) { + printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n", card->irq); + return(-EIO); + } +diff -Naur mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/xhfc_su.c mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/xhfc_su.c +--- mISDN-1_1_7_2.orig/drivers/isdn/hardware/mISDN/xhfc_su.c 2008-01-18 10:24:50.000000000 +0100 ++++ mISDN-1_1_7_2/drivers/isdn/hardware/mISDN/xhfc_su.c 2008-02-05 23:06:46.000000000 +0100 +@@ -1103,7 +1103,11 @@ + /* Interrupt handler */ + /*********************/ + static irqreturn_t ++#ifdef OLD_IRQ_CALL + xhfc_interrupt(int intno, void *dev_id, struct pt_regs *regs) ++#else ++xhfc_interrupt(int intno, void *dev_id) ++#endif + { + xhfc_pi *pi = dev_id; + xhfc_t * xhfc = NULL; +@@ -2031,7 +2035,7 @@ + } + + /* init interrupt engine */ +- if (request_irq(pi->irq, xhfc_interrupt, SA_SHIRQ, "XHFC", pi)) { ++ if (request_irq(pi->irq, xhfc_interrupt, __IRQF_SHARED, "XHFC", pi)) { + printk(KERN_WARNING "%s %s: couldn't get interrupt %d\n", + pi->name, __FUNCTION__, pi->irq); + pi->irq = 0; +diff -Naur mISDN-1_1_7_2.orig/include/linux/isdn_compat.h mISDN-1_1_7_2/include/linux/isdn_compat.h +--- mISDN-1_1_7_2.orig/include/linux/isdn_compat.h 2008-01-18 10:25:33.000000000 +0100 ++++ mISDN-1_1_7_2/include/linux/isdn_compat.h 2008-02-05 23:06:46.000000000 +0100 +@@ -128,6 +128,17 @@ + #define MISDN_COMPAT_KMEMCACHE + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) ++#define OLD_IRQ_CALL ++#else ++#undef OLD_IRQ_CALL ++#endif ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) ++#define __IRQF_SHARED SA_SHIRQ ++#else ++#define __IRQF_SHARED IRQF_SHARED ++#endif + + + #endif /* __KERNEL__ */ diff --git a/net-dialup/misdn/misdn-1.1.7.2.ebuild b/net-dialup/misdn/misdn-1.1.7.2.ebuild new file mode 100644 index 000000000000..7a6263d9be32 --- /dev/null +++ b/net-dialup/misdn/misdn-1.1.7.2.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/misdn/misdn-1.1.7.2.ebuild,v 1.1 2008/02/12 08:13:04 sbriesen Exp $ + +inherit eutils linux-mod + +MY_P="mISDN-${PV//./_}" + +DESCRIPTION="mISDN is the new ISDN stack of the linux kernel 2.6" +HOMEPAGE="http://www.misdn.org/" +SRC_URI="http://www.misdn.org/downloads/releases/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc" + +DEPEND="" +RDEPEND="net-dialup/capi4k-utils + dev-libs/libxslt + sys-devel/bc" + +# list of echo canceller use flags, +# first active in this list is selected (=order does matter) +MISDN_EC_FLAGS=("ecmg2" "eckb1" "ecmark2") + +# list of card modules +MISDN_MODULES=("avmfritz" "hfcpci" "hfcmulti" "hfcsusb" "hfcsmini" "xhfc" "sedlfax" "w6692pci" "netjetpci") +MISDN_KCONFIG=("AVM_FRITZ" "HFCPCI" "HFCMULTI" "HFCUSB" "HFCMINI" "XHFC" "SPEEDFAX" "W6692" "NETJET") + +IUSE="ecaggressive ${MISDN_EC_FLAGS[*]}" +for i in ${MISDN_MODULES[@]}; do IUSE="${IUSE} misdn_cards_${i}"; done + +MY_S="${WORKDIR}/${MY_P}" +S="${MY_S}/drivers/isdn/hardware/mISDN" + + +### Begin: Helper functions + +select_echo_cancel() { + local i myEC=${MISDN_EC_FLAGS[0]} + for i in ${MISDN_EC_FLAGS[*]}; do + if use ${i}; then + myEC=$(echo "${i}" | sed -e "s:^ec\(.*\):\U\1\E:") + break; + fi + done + echo "${myEC}" | sed -e "s:^ec\(.*\):\U\1\E:" +} + +dsp_enable() { + local i + for i in "${@}"; do + sed -i -e "s:.*\(#include.*dsp_${i}\):\1:m" dsp.h + done +} + +dsp_disable() { + local i + for i in "${@}"; do + sed -i -e "s:.*\(#include.*dsp_${i}\)://\1:m" dsp.h + done +} + +### End: Helper functions + +#CONFIG_I4L_CAPI_LAYER -> I4LmISDN +#CONFIG_MISDN_MEMDEBUG -> memdbg +#CONFIG_MISDN_NETDEV -> netdev + +# def SYSFS_SUPPORT + +pkg_setup() { + local USERCARD CARD EC NUM=0 + + CONFIG_CHECK="ISDN_CAPI ISDN_CAPI_CAPI20 ISDN_CAPI_CAPIFS_BOOL" + kernel_is ge 2 6 24 && CONFIG_CHECK="${CONFIG_CHECK} PCI_LEGACY" + linux-mod_pkg_setup + + # base modules + BUILD_TARGETS="modules" + BUILD_PARAMS="-C ${KV_DIR} SUBDIRS=${S} MINCLUDES=${MY_S}/include CONFIG_MISDN_DRV=m" + MODULE_NAMES="mISDN_core(net:) mISDN_isac(net:) mISDN_l1(net:) mISDN_l2(net:) + mISDN_x25dte(net:) l3udss1(net:) mISDN_capi(net:) mISDN_dtmf(net:)" + + # extra modules + BUILD_PARAMS="${BUILD_PARAMS} CONFIG_MISDN_DSP=m CONFIG_MISDN_LOOP=m CONFIG_MISDN_DEBUGTOOL=m" + MODULE_NAMES="${MODULE_NAMES} mISDN_dsp(net:) mISDN_loop(net:) mISDN_debugtool(net:)" + + # check if multiple echo cancellers have been selected + EC_SELECTED=$(select_echo_cancel) + for EC in ${MISDN_EC_FLAGS}; do + use ${EC} && : $((NUM++)) + done + if [ ${NUM} -gt 1 ]; then + # multiple flags are active, only the first in the MISDN_EC_FLAGS + # list will be used, make sure the user knows about this + ewarn "Multiple echo canceller flags are active but only one will be used!" + ewarn "Selected: ${EC_SELECTED}" + else + elog "Selected echo canceller: ${EC_SELECTED}" + fi + + # Check existence of user selected cards + if [ -n "${MISDN_CARDS}" ]; then + for USERCARD in ${MISDN_CARDS}; do + for ((CARD=0; CARD < ${#MISDN_MODULES[*]}; CARD++)); do + if [ "${USERCARD}" = "${MISDN_MODULES[CARD]}" ]; then + MODULE_NAMES="${MODULE_NAMES} ${MISDN_MODULES[CARD]}(net:)" + BUILD_PARAMS="${BUILD_PARAMS} CONFIG_MISDN_${MISDN_KCONFIG[CARD]}=m" + continue 2 + fi + done + die "Module ${USERCARD} not present in ${P}" + done + else + elog "You can control the modules which are built with the variable" + elog "MISDN_CARDS which should contain a blank separated list" + elog "of a selection from the following cards:" + elog " ${MISDN_MODULES[*]}" + # enable everything + for ((CARD=0; CARD < ${#MISDN_MODULES[*]}; CARD++)); do + MODULE_NAMES="${MODULE_NAMES} ${MISDN_MODULES[CARD]}(net:)" + BUILD_PARAMS="${BUILD_PARAMS} CONFIG_MISDN_${MISDN_KCONFIG[CARD]}=m" + done + fi +} + +src_unpack() { + unpack ${A} + + # mostly backported from mISDN-git, so it should + # not be needed anymore next version ;-) + epatch "${FILESDIR}/misdn-2.6.24.diff" + + cd "${S}" + sed -i -e "s:^\(CFLAGS\):EXTRA_\1:g" "Makefile" + + sed -i -e "s:^\(USER=\).*:\1root:" \ + -e "s:^\(GROUP=\).*:\1uucp:" \ + "${MY_S}/misdn-init" + + sed -i -e "s:^\(DEVNODE_user=\).*:\1'root':" \ + -e "s:^\(DEVNODE_group=\).*:\1'uucp':" \ + -e "s:^\(DEVNODE_mode=\).*:\1'0660':" \ + "${MY_S}/config/mISDN" + + if use ecaggressive; then + sed -i -e "s:.*\(#define.*AGGRESSIVE_SUPPRESSOR\):\1:m" dsp.h + fi + + case "${EC_SELECTED}" in + MG2) + dsp_enable mg2ec + dsp_disable kb1ec mec2 + ;; + KB1) + dsp_enable kb1ec + dsp_disable mg2ec mec2 + ;; + MARK2) + dsp_enable mec2 + dsp_disable mg2ec kb1ec + ;; + esac +} + +src_install() { + linux-mod_src_install + + insinto /usr/include/linux + doins "${MY_S}/include/linux/"*.h + + dodir /etc/udev/rules.d + echo 'KERNEL=="obj-*", NAME="mISDN", GROUP="uucp", MODE="0660"' \ + > "${D}etc/udev/rules.d/53-${PN}.rules" + + insinto /etc/modules.d + newins "${MY_S}/mISDN.modprobe.d" ${PN} + dosbin "${MY_S}/misdn-init" + dodoc "${MY_S}/README.misdn-init" + +# insinto /etc +# doins "${MY_S}/config/mISDN.conf" + insinto /usr/lib/mISDN + doins "${MY_S}/config/"*.xsl + dosbin "${MY_S}/config/mISDN" + dodoc "${MY_S}/config/README.mISDN" + + dodoc Kconfig.v2.6 "${FILESDIR}/README.hfcmulti" +} + +pkg_preinst() { + # save old config, in case portage will remove it + if [ -e "${ROOT}etc/misdn-init.conf" ]; then + cp -pf "${ROOT}etc/misdn-init.conf" "${ROOT}etc/misdn-init.conf.pkginst" + fi +} + +pkg_postinst() { + linux-mod_pkg_postinst + + # restore old config, in case portage removed it + if [ -e "${ROOT}etc/misdn-init.conf.pkginst" ]; then + if [ -e "${ROOT}etc/misdn-init.conf" ]; then + rm -f "${ROOT}etc/misdn-init.conf.pkginst" + else + mv -f "${ROOT}etc/misdn-init.conf.pkginst" "${ROOT}etc/misdn-init.conf" + fi + fi + + ewarn + ewarn "This driver is still under heavy development" + ewarn "Please report ebuild related bugs / wishes to http://bugs.gentoo.org" + ewarn "Please report driver bugs to the mISDN mailing-list:" + ewarn " https://www.isdn4linux.de/mailman/listinfo/isdn4linux" +} |