diff options
author | Alin Năstac <mrness@gentoo.org> | 2004-12-14 18:21:06 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2004-12-14 18:21:06 +0000 |
commit | 80621cd0ab44980196ac5b498173e6a30d726a00 (patch) | |
tree | cb3dc3b1091af30e1ebf0bffa3c5f9f4377e7bcb /net-dialup/slmodem | |
parent | fix undefined symbols for kernels >= 2.6.9 and add hotplug script (# (diff) | |
download | gentoo-2-80621cd0ab44980196ac5b498173e6a30d726a00.tar.gz gentoo-2-80621cd0ab44980196ac5b498173e6a30d726a00.tar.bz2 gentoo-2-80621cd0ab44980196ac5b498173e6a30d726a00.zip |
fix undefined symbols for kernels >= 2.6.9 and add hotplug script (#74073)
Diffstat (limited to 'net-dialup/slmodem')
-rw-r--r-- | net-dialup/slmodem/ChangeLog | 11 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.10-makefile-fixup.patch | 210 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch | 19 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slusb.hotplug | 13 | ||||
-rw-r--r-- | net-dialup/slmodem/slmodem-2.9.10-r2.ebuild | 2 |
5 files changed, 43 insertions, 212 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog index d224ca1fc964..34b0095c116b 100644 --- a/net-dialup/slmodem/ChangeLog +++ b/net-dialup/slmodem/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-dialup/slmodem # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.30 2004/12/14 18:15:29 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.31 2004/12/14 18:21:06 mrness Exp $ + +*slmodem-2.9.10-r2 (14 Dec 2004) + + 14 Dec 2004; Alin Nastac <mrness@gentoo.org> + -files/slmodem-2.9.10-makefile-fixup.patch, + +files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch, + +files/slusb.hotplug, +slmodem-2.9.10-r2.ebuild: + Solve undefined symbol error for slusb when is compiled against kernel + versions >= 2.69. See bug #74073. *slmodem-2.9.10-r2 (14 Dec 2004) diff --git a/net-dialup/slmodem/files/slmodem-2.9.10-makefile-fixup.patch b/net-dialup/slmodem/files/slmodem-2.9.10-makefile-fixup.patch deleted file mode 100644 index 203454637d23..000000000000 --- a/net-dialup/slmodem/files/slmodem-2.9.10-makefile-fixup.patch +++ /dev/null @@ -1,210 +0,0 @@ -diff -Nru slmodem-2.9.10.orig/Makefile slmodem-2.9.10/Makefile ---- slmodem-2.9.10.orig/Makefile 2004-08-08 16:27:51.000000000 +0300 -+++ slmodem-2.9.10/Makefile 2004-09-29 23:49:21.601948472 +0300 -@@ -13,7 +13,9 @@ - # - ########################################################################### - --KERNEL_DIR:=/lib/modules/$(shell uname -r)/build -+KERNEL_VER:=$(shell uname -r) -+KERNEL_DIR:=/lib/modules/$(KERNEL_VER)/build -+KERNEL_OUTPUT_DIR:=$(KERNEL_DIR) - - # tools - INSTALL:=install -@@ -29,21 +31,25 @@ - $(RM) -rf ${DESTDIR}/var/lib/slmodem - $(INSTALL) -d -D -m 755 ${DESTDIR}/var/lib/slmodem - -+install-test: -+ $(INSTALL) -D -m 755 modem/modem_test ${DESTDIR}/usr/sbin/modem_test -+ - uninstall: uninstall-drivers - $(RM) ${DESTDIR}/usr/sbin/slmodemd - $(RM) -rf ${DESTDIR}/var/lib/slmodem - - drivers: -- $(MAKE) -C drivers KERNEL_DIR=$(KERNEL_DIR) -+ $(MAKE) -C drivers - - install-drivers: drivers -- $(MAKE) install -C drivers KERNEL_DIR=$(KERNEL_DIR) -+ $(MAKE) install -C drivers -+ - uninstall-drivers: -- $(MAKE) uninstall -C drivers KERNEL_DIR=$(KERNEL_DIR) -+ $(MAKE) uninstall -C drivers - - # misc rules - sub-dirs:= modem drivers --.PHONY: $(sub-dirs) all old clean dep install -+.PHONY: $(sub-dirs) all old clean dep install install-drivers install-test uninstall-drivers - clean dep: %: %-sub-dirs - %-sub-dirs: - $(foreach dir,$(sub-dirs),$(MAKE) -C $(dir) $(patsubst %-sub-dirs,%,$@) && ) echo "done." -diff -Nru slmodem-2.9.10.orig/drivers/Makefile slmodem-2.9.10/drivers/Makefile ---- slmodem-2.9.10.orig/drivers/Makefile 2003-12-21 23:15:54.000000000 +0200 -+++ slmodem-2.9.10/drivers/Makefile 2004-09-29 23:50:09.901605808 +0300 -@@ -16,9 +16,17 @@ - #KBUILD_VERBOSE=1 - #export KBUILD_VERBOSE - --KERNEL_DIR:=/lib/modules/$(shell uname -r)/build -+ifndef KERNEL_VER -+KERNEL_VER:=$(shell uname -r) -+endif -+ifndef KERNEL_DIR -+KERNEL_DIR:=/lib/modules/$(KERNEL_VER)/build -+endif -+ifndef KERNEL_OUTPUT_DIR -+KERNEL_OUTPUT_DIR:=$(KERNEL_DIR) -+endif - --EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem -+EXTRA_CFLAGS+= -I$(obj) -I$(obj)/../modem - - obj-m := slamr.o slusb.o - -@@ -28,39 +36,35 @@ - ifndef KERNELRELEASE - ifndef KERNEL_VER - --all install uninstall: kernel-ver -- $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver) -+all install uninstall: -+ $(MAKE) $@ - - install: install-devices - uninstall: remove-devices - --kernel-ver:: -+kernel-ver: - $(CC) -I$(KERNEL_DIR)/include -o $@ $@.c - --dep: --clean: -- $(RM) kernel-ver $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~ -- - install-devices: - mkdir -p ${DESTDIR}/dev - $(foreach minor,0 1 2 3, \ - mknod -m 600 ${DESTDIR}/dev/slamr$(minor) c 212 $(minor) ; ) echo -n - $(foreach minor,0 1 2 3, \ - mknod -m 600 ${DESTDIR}/dev/slusb$(minor) c 213 $(minor) ; ) echo -n -+ - remove-devices: -- $(foreach minor,0 1 2 3, \ -- $(RM) ${DESTDIR}/dev/slamr$(minor) ; ) echo -n -- $(foreach minor,0 1 2 3, \ -- $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n -+ $(RM) ${DESTDIR}/dev/slamr[0-3] ; ) echo -n -+ $(RM) ${DESTDIR}/dev/slusb[0-3] ; ) echo -n - - else - ifeq ($(findstring 2.4,$(KERNEL_VER)),2.4) -+# 2.4 kernel - - slusb-objs:= old_st7554.o - obj:=. - module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/misc - --CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include -+EXTRA_CFLAGS+= -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include - - all: $(obj-m) - -@@ -69,13 +73,17 @@ - slamr.o slusb.o: - $(LD) -r -o $@ $^ - --install: uninstall-old -+install: install-modules -+ mkdir -p $(DESTDIR)/etc && \ -+ cp /etc/modules.conf $(DESTDIR)/etc/modules.conf.slamr && \ -+ echo 'alias char-major-212 slamr' >> $(DESTDIR)/etc/modules.conf && \ -+ echo 'alias char-major-213 slusb' >> $(DESTDIR)/etc/modules.conf -+# /sbin/depmod -a -+ -+install-modules: uninstall-old - install -D -m 644 slamr.o $(module-dir)/slamr.o - install -D -m 644 slusb.o $(module-dir)/slusb.o -- cp /etc/modules.conf /etc/modules.conf.slamr && \ -- echo 'alias char-major-212 slamr' >> /etc/modules.conf && \ -- echo 'alias char-major-213 slusb' >> /etc/modules.conf -- /sbin/depmod -a -+ - uninstall: - /sbin/modprobe -r slamr slusb - cp /etc/modules.conf /etc/modules.conf.slamr && \ -@@ -83,6 +91,7 @@ - $(RM) $(module-dir)/slamr.o - $(RM) $(module-dir)/slusb.o - /sbin/depmod -a -+ - uninstall-old: - $(RM) $(module-dir)/slmdm.o \ - $(module-dir)/slfax.o \ -@@ -94,15 +103,18 @@ - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< - - else -+# 2.6 Kernel -+ -+EXTRA_CFLAGS+=-I $(KERNEL_INCLUDE_DIR) -I . - - module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/extra - - all: -- $(MAKE) modules -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) -+ $(MAKE) modules -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) O=$(KERNEL_OUTPUT_DIR) - install: - install -D -m 644 slamr.ko $(module-dir)/slamr.ko - install -D -m 644 slusb.ko $(module-dir)/slusb.ko -- /sbin/depmod -a -+# /sbin/depmod -a - uninstall: - modprobe -r slamr ; echo -n - modprobe -r slusb ; echo -n -@@ -114,6 +126,12 @@ - endif - endif - -+dep: -+clean: -+ $(RM) kernel-ver $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~ -+ - $(obj)/amrlibs.o: - echo "$@ done" - -+ -+.PHONY: install install-modules uninstall-old install-devices remove-devices all -diff -Nru slmodem-2.9.10.orig/modem/Makefile slmodem-2.9.10/modem/Makefile ---- slmodem-2.9.10.orig/modem/Makefile 2003-11-20 14:50:47.000000000 +0200 -+++ slmodem-2.9.10/modem/Makefile 2004-09-29 23:49:21.602948320 +0300 -@@ -16,8 +16,7 @@ - CC:= gcc - RM:= rm -f - --CFLAGS:= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM -- -+EXTRA_CFLAGS+= -I. -DCONFIG_DEBUG_MODEM - - modem-objs:= \ - modem.o modem_datafile.o modem_at.o modem_timer.o \ -@@ -32,13 +31,13 @@ - modem_test: modem_test.o modem_cmdline.o $(modem-objs) $(dp-objs) dsplibs.o $(sysdep-objs) - - #SUPPORT_ALSA:=1 --ifdef SUPPORT_ALSA -+ifeq ($(SUPPORT_ALSA),1) - slmodemd: -lasound --CFLAGS+= -DSUPPORT_ALSA=1 -+EXTRA_CFLAGS+= -DSUPPORT_ALSA=1 - endif - - slmodemd modem_test: -- $(CC) -o $@ $^ -+ $(CC) $(EXTRA_CFLAGS) -o $@ $^ - - clean: - $(RM) slmodemd modem_test modem_main.o modem_cmdline.o modem_test.o $(modem-objs) $(dp-objs) $(sysdep-objs) diff --git a/net-dialup/slmodem/files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch b/net-dialup/slmodem/files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch new file mode 100644 index 000000000000..23ce7001b04d --- /dev/null +++ b/net-dialup/slmodem/files/slmodem-2.9.10-usb_endpoint_halted-gentoo.patch @@ -0,0 +1,19 @@ +diff -u slmodem-2.9.10.orig/drivers/st7554.c slmodem-2.9.10/drivers/st7554.c +--- slmodem-2.9.10.orig/drivers/st7554.c 2004-12-10 14:22:05.017025448 +0100 ++++ slmodem-2.9.10/drivers/st7554.c 2004-12-10 14:22:48.679387760 +0100 +@@ -1080,11 +1080,14 @@ + + #define SET_REG(s,reg,val) { ret = s->set_reg(s,reg,val); if (ret < 0) { USB_ERR("st7554: failed to set reg %x.\n", reg); ; return ret;} } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)) ++#define CLEAR_ENDPOINT(s,pipe) ++#else + #define CLEAR_ENDPOINT(s,pipe) { \ + if (usb_endpoint_halted(s->usbdev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) { \ + USB_DBG("st7554_init: pipe %d is halted. clear...\n", usb_pipeendpoint(pipe)); \ + if (!(ret=usb_clear_halt(s->usbdev, pipe))) return ret;}} +- ++#endif + + + static int st7554_init (struct st7554_state *s) diff --git a/net-dialup/slmodem/files/slusb.hotplug b/net-dialup/slmodem/files/slusb.hotplug new file mode 100644 index 000000000000..a8a056c45f45 --- /dev/null +++ b/net-dialup/slmodem/files/slusb.hotplug @@ -0,0 +1,13 @@ +#!/bin/sh + +RC_NOCOLOR="yes" +source /sbin/functions.sh +source /etc/conf.d/slmodem +if [ -z "${USBMOD}" ];then + MODULE="slusb" +else + MODULE=${USBMOD} +fi +source /etc/init.d/slmodem +source "${svclib}/sh/rc-services.sh" +start && source "${svclib}/sh/rc-services.sh" diff --git a/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild b/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild index 71bcc240fb1d..3f359a4dc41e 100644 --- a/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild +++ b/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild,v 1.1 2004/12/14 18:15:29 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.10-r2.ebuild,v 1.2 2004/12/14 18:21:06 mrness Exp $ inherit eutils linux-info |