summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-11-29 08:29:52 +0100
committerMartin Väth <martin@mvath.de>2015-11-29 08:29:52 +0100
commit08d759cd0d30319dad072e50db3a50f77be89acf (patch)
tree6de0b848ddfbf7abd05fb47b8bdd1c2edcdab701 /net-dialup
parentapp-shells/zshrc-mv: Version bump (diff)
downloadmv-08d759cd0d30319dad072e50db3a50f77be89acf.tar.gz
mv-08d759cd0d30319dad072e50db3a50f77be89acf.tar.bz2
mv-08d759cd0d30319dad072e50db3a50f77be89acf.zip
Bump to EAPI=6
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/accounting/Manifest2
-rw-r--r--net-dialup/martian-modem/Manifest2
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch69
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch86
-rw-r--r--net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch22
-rw-r--r--net-dialup/martian-modem/martian-modem-20100123-r2.ebuild35
6 files changed, 176 insertions, 40 deletions
diff --git a/net-dialup/accounting/Manifest b/net-dialup/accounting/Manifest
index e92258e4..b317201b 100644
--- a/net-dialup/accounting/Manifest
+++ b/net-dialup/accounting/Manifest
@@ -1 +1 @@
-DIST smpppd-1.60.45-3.1.src.rpm 175561 SHA256 2203eaf1e358219cd208ccb2bb104dd39408eb9b12411991b596ccc45a0b2f14 SHA512 7393891861de4dbb74f720f4db2f8a668081f643ec019a5764ae4ef03b2f088e89c566f1b6f5f2fea49b286830cb8d13d9629ef3a40ed30c94300a6d1c3b42c0 WHIRLPOOL 714c71822afd4ecfbe7f9b7653ac585fa298cf3acc44d709bcb3b80e0a62a0fbad2c62338123af727c9f6fe969a8de3e16f8cadf821f588c5b38d8a1d8bd1904
+DIST smpppd-1.60.45-3.1.src.rpm 175561 SHA256 2203eaf1e358219cd208ccb2bb104dd39408eb9b12411991b596ccc45a0b2f14
diff --git a/net-dialup/martian-modem/Manifest b/net-dialup/martian-modem/Manifest
index 5774fade..2f318285 100644
--- a/net-dialup/martian-modem/Manifest
+++ b/net-dialup/martian-modem/Manifest
@@ -1 +1 @@
-DIST martian-full-20100123.tar.gz 275365 SHA256 bf3ad369dc90e3ef7952e6bb7873b3121ce79a855060a1b4b4e3a1d8e7d08ac3 SHA512 bcd51103792bd1d477ab81f8bbb591f3eb5341920e6b0b35e8ba066a50b8a6ddf076c0bc0d21cf686c8137f8164221635b3c296185283f6e20ce2d04709f69ec WHIRLPOOL b38fb4ea1e7282cf51547c4d6ab3423350dabe717ebe89efa20cc92148347d7e1b2fcc32085d3edc677768f7286715087034bace7f51415ce31a24d840c85c59
+DIST martian-full-20100123.tar.gz 275365 SHA256 bf3ad369dc90e3ef7952e6bb7873b3121ce79a855060a1b4b4e3a1d8e7d08ac3
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch
new file mode 100644
index 00000000..63528783
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch
@@ -0,0 +1,69 @@
+--- 1/kmodule/martian.c
++++ 1/kmodule/martian.c
+@@ -184,8 +184,12 @@
+ static int martian_open (struct inode *inode, struct file *filp)
+ {
+ // allow single open
+- struct proc_dir_entry *entry = PDE (inode);
+- struct martian *mdev = (struct martian *) entry->data;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ struct martian *mdev = (struct martian *) PDE_DATA (inode);
++ #else
++ struct proc_dir_entry *entry = PDE (inode);
++ struct martian *mdev = (struct martian *) entry->data;
++ #endif
+
+ if (test_and_set_bit (MARTIAN_STATE_OPEN, &mdev->state)) {
+ // already opened
+@@ -736,20 +740,37 @@
+ // create proc entry for this device
+ name[ strlen(name) - 1 ] = '0' + dev_idx;
+
+- mdev->entry = create_proc_entry (name, 0400, NULL);
+- if (! mdev->entry) {
+- MERROR ("martian: failed to create /proc/%s\n", name);
+- ret = -ENOMEM;
+- goto err_free_irq;
+- }
+-
+- martian_init_mcb(mdev);
+-
+- // set an index
+- mdev->index = dev_idx;
+-
+- mdev->entry->proc_fops = & martian_fops;
+- mdev->entry->data = mdev;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ // initialize data before 3.10-style proc create call
++ martian_init_mcb(mdev);
++
++ // set an index
++ mdev->index = dev_idx;
++
++ mdev->entry = proc_create_data (name, 0400, NULL, & martian_fops, mdev);
++ if (! mdev->entry) {
++ MERROR ("martian: failed to create /proc/%s\n", name);
++ ret = -ENOMEM;
++ goto err_free_irq;
++ }
++
++ #else
++
++ mdev->entry = create_proc_entry (name, 0400, NULL);
++ if (! mdev->entry) {
++ MERROR ("martian: failed to create /proc/%s\n", name);
++ ret = -ENOMEM;
++ goto err_free_irq;
++ }
++
++ martian_init_mcb(mdev);
++
++ // set an index
++ mdev->index = dev_idx;
++
++ mdev->entry->proc_fops = & martian_fops;
++ mdev->entry->data = mdev;
++ #endif
+
+ pr_info("martian: added device %x:%x "
+ "BaseAddress = 0x%x, CommAddres = 0x%x, irq = %d%s\n",
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch
new file mode 100644
index 00000000..bdbd699c
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch
@@ -0,0 +1,86 @@
+--- 1/kmodule/martian.c
++++ 1/kmodule/martian.c
+@@ -592,7 +592,7 @@
+
+ static int dev_idx = 0;
+
+-static void __devinit
++static void
+ martian_configure_isr (struct martian *mdev)
+ {
+ struct martian_common *mcb = mdev->common;
+@@ -614,7 +614,7 @@
+ mcb->dp_bamil_rd7 = 0xff;
+ }
+
+-static void __devinit
++static void
+ martian_configure_params (struct martian *mdev)
+ {
+ mdev->params.dsp_mars = mdev->metrics.dsp_mars;
+@@ -792,7 +792,7 @@
+
+ /***** PCI Driver Interface *****/
+
+-static int __devinit
++static int
+ martian_device_gatherinfo (const struct pci_dev *dev, const struct pci_device_id *ent, struct martian_metrics *metrics)
+ {
+ int bar;
+@@ -997,7 +997,7 @@
+ return 0;
+ }
+
+-static int __devinit
++static int
+ mars_device_probe (struct pci_dev *dev, const struct pci_device_id *ent)
+ {
+ int ret;
+@@ -1036,7 +1036,7 @@
+ }
+
+
+-static void __devexit mars_remove (struct pci_dev *dev)
++static void mars_remove (struct pci_dev *dev)
+ {
+ martian_del (pci_get_drvdata (dev));
+ pci_disable_device (dev);
+@@ -1048,7 +1048,7 @@
+ struct pci_driver martian_driver = {
+ .name = "martian",
+ .probe = mars_device_probe,
+- .remove = __devexit_p (mars_remove),
++ .remove = mars_remove,
+ .id_table = martian_ids
+ };
+
+@@ -1062,7 +1062,7 @@
+
+ #define SERIAL_DRIVER "serial"
+
+-static void __devinit detach_from_serial_class (unsigned int class, unsigned int mask)
++static void detach_from_serial_class (unsigned int class, unsigned int mask)
+ {
+ struct pci_dev *dev = NULL;
+ const struct pci_device_id *entry;
+@@ -1083,7 +1083,7 @@
+ }
+ }
+
+-static void __devinit detach_from_serial(void)
++static void detach_from_serial(void)
+ {
+ detach_from_serial_class (PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00);
+ detach_from_serial_class (PCI_CLASS_COMMUNICATION_MODEM << 8, 0xffff00);
+diff -urN martian-full-20100123.orig/kmodule/martian_ids.c martian-full-20100123/kmodule/martian_ids.c
+--- 1/kmodule/martian_ids.c
++++ 1/kmodule/martian_ids.c
+@@ -8,7 +8,7 @@
+ .subvendor = (_subvendor), \
+ .subdevice = PCI_ANY_ID
+
+-__devinitdata static struct pci_device_id martian_ids[] = {
++static struct pci_device_id martian_ids[] = {
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x440) },
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x441) },
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x442) },
diff --git a/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch b/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch
deleted file mode 100644
index eb138df8..00000000
--- a/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- kmodule/martian.c
-+++ kmodule/martian.c
-@@ -46,6 +46,19 @@
- #include "../martian.h"
- #include "marsio.h"
-
-+#ifndef __devinit
-+#define __devinit
-+#endif
-+#ifndef __devexit
-+#define __devexit
-+#endif
-+#ifndef __devexit_p
-+#define __devexit_p
-+#endif
-+#ifndef __devinitdata
-+#define __devinitdata
-+#endif
-+
- /***** Driver globals *****/
-
- struct proc_dir_entry *martians_proc_dir = NULL;
diff --git a/net-dialup/martian-modem/martian-modem-20100123-r2.ebuild b/net-dialup/martian-modem/martian-modem-20100123-r2.ebuild
index 915fb342..0c6dbe0a 100644
--- a/net-dialup/martian-modem/martian-modem-20100123-r2.ebuild
+++ b/net-dialup/martian-modem/martian-modem-20100123-r2.ebuild
@@ -2,8 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
-inherit eutils linux-mod readme.gentoo
+EAPI=6
+inherit linux-mod readme.gentoo
MY_P="martian-full-${PV}"
DESCRIPTION="ltmodem alternative driver providing support for Agere Systems winmodems"
@@ -46,20 +46,11 @@ MODULE_NAMES="martian_dev(ltmodem::kmodule)"
CONFIG_CHECK="SERIAL_8250"
SERIAL_8250_ERROR="This driver requires you to compile your kernel with serial core (CONFIG_SERIAL_8250) support."
-pkg_setup() {
- linux-mod_pkg_setup
-
- if kernel_is 2 4; then
- eerror "This driver works only with 2.6 kernels!"
- die "unsupported kernel detected"
- fi
-}
-
src_prepare() {
# Exclude Makefile kernel version check, we used kernel_is above.
# TODO: More exactly, martian-modem-full-20100123 is for >kernel-2.6.20!
- epatch "${FILESDIR}/${P}-makefile.patch"
- epatch "${FILESDIR}/${P}-grsecurity.patch"
+ eapply "${FILESDIR}/${P}-makefile.patch"
+ eapply -p0 "${FILESDIR}/${P}-grsecurity.patch"
# fix compile on amd64
sed -i -e "/^HOST.*$/s:uname -i:uname -m:" modem/Makefile || die "sed failed"
@@ -68,9 +59,20 @@ src_prepare() {
BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='${KV_PATCH}'"
if kernel_is ge 3 8
- then epatch "${FILESDIR}/${PN}-kernel-3.8.patch"
+ then
+ # Per Gentoo Bug #543702, CONFIG_HOTPLUG is going away as an option. As of
+ # Linux Kernel 3.8, the __dev* markings need to be removed. This patch removes
+ # the use of __devinit, __devexit_p, and __devexit as the type cast simply isn't
+ # needed any longer.
+ eapply "${FILESDIR}/${P}-linux-3.8.patch"
+ # Per Gentoo Bug #543702, "proc_dir_entry" and "create_proc_entry" Linux
+ # Kernel header definition was moved and only accessible internally as of
+ # Linux Kernel 3.10. This patch originates from Paul McClay (2014.05.28)
+ # and posted to Ubuntu Launchpad.
+ # It contains version checking code, hence can be applied unconditionally
+ eapply "${FILESDIR}/${P}-linux-3.10.patch"
fi
- epatch_user
+ eapply_user
}
src_install() {
@@ -80,6 +82,7 @@ src_install() {
dosbin modem/martian_modem
newconfd "${FILESDIR}/${PN}.conf.d" ${PN}
newinitd "${FILESDIR}/${PN}.init.d" ${PN}
+ readme.gentoo_create_doc
}
pkg_postinst() {
@@ -89,5 +92,5 @@ pkg_postinst() {
elog "You have SMP (symmetric multi processor) support enabled in kernel."
elog "You should run martian-modem with --smp enabled in MARTIAN_OPTS."
fi
- readme.gentoo_pkg_postinst
+ readme.gentoo_print_elog
}