summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dialup/martian-modem
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dialup/martian-modem')
-rw-r--r--net-dialup/martian-modem/Manifest1
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch70
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch87
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch34
-rw-r--r--net-dialup/martian-modem/files/martian-modem.conf.d45
-rw-r--r--net-dialup/martian-modem/files/martian-modem.init.d50
-rw-r--r--net-dialup/martian-modem/martian-modem-20100123-r1.ebuild91
-rw-r--r--net-dialup/martian-modem/metadata.xml14
8 files changed, 392 insertions, 0 deletions
diff --git a/net-dialup/martian-modem/Manifest b/net-dialup/martian-modem/Manifest
new file mode 100644
index 000000000000..5774fade3a4a
--- /dev/null
+++ b/net-dialup/martian-modem/Manifest
@@ -0,0 +1 @@
+DIST martian-full-20100123.tar.gz 275365 SHA256 bf3ad369dc90e3ef7952e6bb7873b3121ce79a855060a1b4b4e3a1d8e7d08ac3 SHA512 bcd51103792bd1d477ab81f8bbb591f3eb5341920e6b0b35e8ba066a50b8a6ddf076c0bc0d21cf686c8137f8164221635b3c296185283f6e20ce2d04709f69ec WHIRLPOOL b38fb4ea1e7282cf51547c4d6ab3423350dabe717ebe89efa20cc92148347d7e1b2fcc32085d3edc677768f7286715087034bace7f51415ce31a24d840c85c59
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 000000000000..27daed03792e
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch
@@ -0,0 +1,70 @@
+diff -urN martian-full-20100123.orig/kmodule/martian.c martian-full-20100123/kmodule/martian.c
+--- martian-full-20100123.orig/kmodule/martian.c 2015-03-21 16:21:21.228514759 -0400
++++ martian-full-20100123/kmodule/martian.c 2015-03-21 16:29:23.402126727 -0400
+@@ -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 000000000000..077936857047
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch
@@ -0,0 +1,87 @@
+diff -urN martian-full-20100123.orig/kmodule/martian.c martian-full-20100123/kmodule/martian.c
+--- martian-full-20100123.orig/kmodule/martian.c 2015-03-21 16:15:55.498819336 -0400
++++ martian-full-20100123/kmodule/martian.c 2015-03-21 16:17:03.769752308 -0400
+@@ -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
+--- martian-full-20100123.orig/kmodule/martian_ids.c 2015-03-21 16:15:48.461826345 -0400
++++ martian-full-20100123/kmodule/martian_ids.c 2015-03-21 16:17:17.167739363 -0400
+@@ -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-20100123-makefile.patch b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
new file mode 100644
index 000000000000..e6ce7ca7e52e
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
@@ -0,0 +1,34 @@
+--- martian-full-20100123/Makefile 2008-07-02 15:42:48.000000000 -0800
++++ martian-full-20100123.new/Makefile 2012-10-08 12:14:33.284275312 -0800
+@@ -1,10 +1,10 @@
+
+-KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
+-SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
+-# support begins at SUBLEVEL 20
+-after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
++#KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
++#SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
++## support begins at SUBLEVEL 20
++#after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
+
+-ifdef after20
++#ifdef after20
+ all:
+ $(MAKE) -C kmodule/ modules
+ $(MAKE) -C modem/ all
+@@ -14,11 +14,11 @@
+ $(MAKE) -C kmodule/ install
+ $(MAKE) -C modem/ install
+
+-else
+-20less:
+- @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
++#else
++#20less:
++# @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
+
+-endif
++#endif
+
+ clean:
+ $(MAKE) -C kmodule/ clean
diff --git a/net-dialup/martian-modem/files/martian-modem.conf.d b/net-dialup/martian-modem/files/martian-modem.conf.d
new file mode 100644
index 000000000000..73bcce3baf71
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.conf.d
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+### Configuration for martian-modem initscript
+#
+### DEVICE
+# Device that will martian-modem daemon create to act as modem device.
+# Default is /dev/ttySM0.
+#DEVICE="/dev/ttySM0"
+#
+#
+### USER/GROUP
+# User and group that will have access to the modem device.
+# Default values are nobody/dialout.
+# Note: the daemon itself needs to be run as root!
+#USER="nobody"
+#GROUP="dialout"
+#
+#
+### MARTIAN_OPTS
+# Other options to be passed to the daemon, see description below.
+# Defaults to empty.
+# --realtime - raise priority of threads to realtime.
+# --smp - true smp (symmetric multiprocessing) mode.
+# --country=<country> - two-letter code for the country.
+# Run `/usr/sbin/martian_modem --info countries` for list.
+# --no-cdclose - keep working with client when carrier lost.
+# --hide-pty - save pty from others as soon its open. Client
+# should notify it's here writing to device. For callback feature.
+#MARTIAN_OPTS=""
+#
+#
+### LOGGING
+# Should we log to syslog [YES/NO]
+# Default to YES. If you do not want this, say NO here to use LOGFILE instead.
+#USE_SYSLOG="YES"
+# Alternatively, you can log to a separate file. The default location is below.
+#LOGFILE="/var/log/martian-modem.log"
+#
+#
+### DEBUG
+# How verbose should the log be [1-5]
+# Default debug_level=1; debug_level=3 is suitable for normal debugging.
+#DEBUG_LEVEL=1
diff --git a/net-dialup/martian-modem/files/martian-modem.init.d b/net-dialup/martian-modem/files/martian-modem.init.d
new file mode 100644
index 000000000000..8830b98827c3
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.init.d
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+daemon=/usr/sbin/martian_modem
+description="Initscript to run the userspace daemon for winmodems supported by martian-modem driver"
+
+: ${device:=${DEVICE:-/dev/ttySM0}}
+: ${logfile:=${LOGFILE:-/var/log/martian-modem.log}}
+: ${user:=${USER:-nobody}}
+: ${group:=${GROUP:-dialout}}
+: ${debug_level:=${DEBUG_LEVEL:-1}}
+: ${use_syslog:=${USE_SYSLOG:-YES}}
+pidfile=/var/run/${SVCNAME}.pid
+
+depend() {
+ need localmount
+ [ "${use_syslog}" = "YES" ] && use syslog
+}
+
+start() {
+ if [ -e /proc/modules ] ; then
+ local modem=
+ for modem in /dev/modem /dev/ttySM[0-9]* ; do
+ [ -e "${modem}" ] && break
+ done
+ fi
+ if [ ! -e "${modem}" ] ; then
+ modprobe martian-dev || eerror $? "Error loading martian-dev module"
+ fi
+
+ if ! yesno "${use_syslog}" ; then
+ martian_opts="${MARTIAN_OPTS} --log=${logfile}"
+ else
+ martian_opts="${MARTIAN_OPTS} --syslog"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
+ --pidfile ${pidfile} --make-pidfile --background \
+ -- ${martian_opts} --debug=${debug_level} ${device}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}
diff --git a/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild b/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild
new file mode 100644
index 000000000000..8c6bc7c7179c
--- /dev/null
+++ b/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-mod eutils
+
+MY_P="martian-full-${PV}"
+DESCRIPTION="ltmodem alternative driver providing support for Agere Systems winmodems"
+HOMEPAGE="http://packages.debian.org/sid/martian-modem-source http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian"
+#SRC_URI="mirror://debian/pool/non-free/m/martian-modem/${MY_P}.tar.gz"
+#SRC_URI="http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+SRC_URI="http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 AgereSystems-WinModem"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE=""
+
+DEPEND="!net-dialup/ltmodem"
+RDEPEND="${DEPEND}"
+
+# Do NOT remove this. Stripping results in broken communication
+# with core state communication channel (also see QA_* stuff below)
+RESTRICT="strip"
+
+# contains proprietary precompiled 32 bit ltmdmobj.o
+QA_PREBUILT="usr/sbin/martian_modem"
+
+S="${WORKDIR}/${P/modem/full}"
+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."
+
+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"
+
+ # 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.
+ if kernel_is -ge 3 8; then
+ epatch "${FILESDIR}/${P}-linux-3.8.patch"
+ fi
+
+ # 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.
+ if kernel_is -ge 3 10; then
+ epatch "${FILESDIR}/${P}-linux-3.10.patch"
+ fi
+
+ # fix compile on amd64
+ sed -i -e "/^HOST.*$/s:uname -i:uname -m:" modem/Makefile || die "sed failed"
+
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='${KV_PATCH}'"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # userspace daemon and initscripts stuff
+ dosbin modem/martian_modem
+ newconfd "${FILESDIR}/${PN}.conf.d" ${PN}
+ newinitd "${FILESDIR}/${PN}.init.d" ${PN}
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if linux_chkconfig_present SMP ; then
+ elog "You have SMP (symmetric multi processor) support enabled in kernel."
+ elog "You should run martian-modem with --smp enabled in MARTIAN_OPTS."
+ fi
+ if ! has_version net-dialup/martian-modem; then
+ elog "See /etc/conf.d/${PN} for configuration options."
+ elog "After you have finished the configuration, you need to run /etc/init.d/${PN} start"
+ elog
+ fi
+ if [ "$(rc-config list default | grep martian-modem)" = "" ]; then
+ elog "To run the userspace daemon automatically on every boot, just add it to a runlevel:"
+ elog "rc-update add ${PN} default"
+ elog
+ fi
+ if has_version net-dialup/wvdial; then
+ elog "If using net-dialup/wvdial, you need \"Carrier Check = no\" line."
+ fi
+}
diff --git a/net-dialup/martian-modem/metadata.xml b/net-dialup/martian-modem/metadata.xml
new file mode 100644
index 000000000000..bb68c349bea5
--- /dev/null
+++ b/net-dialup/martian-modem/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>rogerx.oss@gmail.com</email>
+ <name>Roger</name>
+ <description>Please assign bugs</description>
+</maintainer>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <description>proxy-maintainer, please CC on bugs</description>
+</maintainer>
+</pkgmetadata>