# ChangeLog for net-misc/zaptel
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.64 2005/09/19 19:45:56 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.65 2005/11/18 16:34:14 stkn Exp $
+
+*zaptel-1.2.0 (18 Nov 2005)
+
+ 18 Nov 2005; Stefan Knoblich <stkn@gentoo.org>
+ +files/zaptel-1.2.0-devfs26.diff, +files/zaptel-1.2.0-gentoo.diff,
+ +files/zaptel-1.2.0-ukcid.patch, -files/zaptel-1.2.0_beta1-gentoo.diff,
+ -zaptel-1.2.0_beta1.ebuild, +zaptel-1.2.0.ebuild:
+ Version bumped and removed old beta ebuild
19 Sep 2005; Stefan Knoblich <stkn@gentoo.org>
-files/zaptel-1.0.0-experimental-devfs26.diff,
+MD5 276ca202b6c1471af85d43ce0eb6b94f zaptel-1.0.7-r1.ebuild 6517
MD5 ac774e9b1e15c4e3060c325560be97d3 zaptel-1.0.6-r1.ebuild 6217
MD5 1ab383ffeab849e778401125f478fc6d zaptel-1.0.4-r1.ebuild 4417
-MD5 5c63aa4881f27d9421f5e005c6333687 zaptel-1.0.9_p2.ebuild 6637
-MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
-MD5 276ca202b6c1471af85d43ce0eb6b94f zaptel-1.0.7-r1.ebuild 6517
MD5 6263a968f86b50a23db0b3bcaf19b0ae zaptel-1.0.8.ebuild 6370
MD5 a9b97edfc9559f48e71f9f232590143f zaptel-1.0.9_p1-r1.ebuild 6641
-MD5 e85646b140faa58366e07dac6d933aea ChangeLog 11837
-MD5 7b71dc1e0aeb7f40043afe45ef467c74 zaptel-1.2.0_beta1.ebuild 9003
-MD5 f06df1defd75000b5fdfa7f81b4ef78b files/zaptel-bristuff-0.2.0-RC8l.patch 5551
-MD5 3bff3fd5d8dc52513ceeac546e1e11bf files/zaptel.udevd 358
-MD5 62b106ceaf6f69da6e1051c37b33f3f5 files/digest-zaptel-1.2.0_beta1 70
-MD5 144ec2aec65f20a934f7affe613c69aa files/zaptel-1.2.0_beta1-gentoo.diff 4867
-MD5 fae1145da422b8838c2a6ac3405dc4c4 files/zaptel.confd 371
-MD5 6fec683d2df451d8094093511d1138db files/zaptel.devfsd 204
-MD5 051e2ff3f1222e2b551a70e9cd1b31f0 files/digest-zaptel-1.0.4-r1 64
-MD5 8471d7eb15aebff9c72f67861cb1ad88 files/zaptel-1.0.7-gentoo.diff 4459
-MD5 f46e4409c0bb701f8a6214e793de72a2 files/digest-zaptel-1.0.8 212
-MD5 cce31b4380f9c62e91293dff1523d5e0 files/zaptel-bristuff-0.2.0-RC8g.patch 5551
-MD5 a1ef57fe463da11030f2e18d87535466 files/zaptel.rc6 972
-MD5 6029a1280d38d8c67577bc7a873fd336 files/zaptel-1.0.9-rtc.patch 4238
-MD5 0c81001d4c9efeeffeb1332580fb4cdc files/digest-zaptel-1.0.6-r1 212
+MD5 5c63aa4881f27d9421f5e005c6333687 zaptel-1.0.9_p2.ebuild 6637
+MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
+MD5 bad97189f62f40f054b4360e1a349b03 ChangeLog 12156
+MD5 950d9aa09bd89f187b3ebceb40cb41b6 zaptel-1.2.0.ebuild 9080
MD5 69d0c3831715ccac6422b13a99fc6557 files/digest-zaptel-1.0.9_p2 214
+MD5 6029a1280d38d8c67577bc7a873fd336 files/zaptel-1.0.9-rtc.patch 4238
MD5 3a4f554056143ac54f033cc3356821b5 files/digest-zaptel-1.0.9_p1-r1 214
-MD5 090668aabb8e77cfd0d83835f52bd105 files/zaptel-1.0.4-gcc34.patch 821
-MD5 d40a84eeea5866a3afbac2603e970e7b files/zaptel-1.0.4-experimental-devfs26.diff 5982
+MD5 d39ef748d551fb8b4a8a6db7a083201d files/digest-zaptel-1.2.0 64
+MD5 f46e4409c0bb701f8a6214e793de72a2 files/digest-zaptel-1.0.8 212
MD5 f5d81a19c52c5e88fefed12251674134 files/zaptel-bristuff-0.2.0-RC8n.patch 6064
-MD5 e72dc0fa3cbcd55182b6f05d8c731694 files/zaptel-1.0.8-gentoo.diff 4747
-MD5 9be11ef13f32ceaffef87920fe47a93e files/digest-zaptel-1.0.7-r1 212
-MD5 d893c36bffff825ab0e6d48e1ad0acea files/zaptel-bristuff-0.2.0-RC8h.patch 6064
+MD5 c0f95d699055c3b46e5d3078bfaa2afb files/zaptel-1.2.0-devfs26.diff 6046
MD5 e5a799243335f31a494bb4f90edbb9e4 files/zaptel-1.0.3-gentoo.diff 3456
+MD5 3bff3fd5d8dc52513ceeac546e1e11bf files/zaptel.udevd 358
+MD5 9be11ef13f32ceaffef87920fe47a93e files/digest-zaptel-1.0.7-r1 212
+MD5 cce31b4380f9c62e91293dff1523d5e0 files/zaptel-bristuff-0.2.0-RC8g.patch 5551
MD5 74863c2b19f217f2f23daa1cd617c4f9 files/zaptel-bristuff-0.2.0-RC7k.patch 6065
MD5 5fe59834ed82727b3297f9e39eb855be files/zaptel-1.0.9-gentoo.diff 4855
+MD5 e72dc0fa3cbcd55182b6f05d8c731694 files/zaptel-1.0.8-gentoo.diff 4747
+MD5 d40a84eeea5866a3afbac2603e970e7b files/zaptel-1.0.4-experimental-devfs26.diff 5982
+MD5 090668aabb8e77cfd0d83835f52bd105 files/zaptel-1.0.4-gcc34.patch 821
+MD5 0c81001d4c9efeeffeb1332580fb4cdc files/digest-zaptel-1.0.6-r1 212
+MD5 051e2ff3f1222e2b551a70e9cd1b31f0 files/digest-zaptel-1.0.4-r1 64
+MD5 f06df1defd75000b5fdfa7f81b4ef78b files/zaptel-bristuff-0.2.0-RC8l.patch 5551
+MD5 8471d7eb15aebff9c72f67861cb1ad88 files/zaptel-1.0.7-gentoo.diff 4459
+MD5 d893c36bffff825ab0e6d48e1ad0acea files/zaptel-bristuff-0.2.0-RC8h.patch 6064
+MD5 699723eb0b0ad059702af4fc4de7bf95 files/zaptel-1.2.0-ukcid.patch 3787
+MD5 e6c7407f2478a1836a087eec78ecd69d files/zaptel-1.2.0-gentoo.diff 4626
+MD5 a1ef57fe463da11030f2e18d87535466 files/zaptel.rc6 972
+MD5 fae1145da422b8838c2a6ac3405dc4c4 files/zaptel.confd 371
+MD5 6fec683d2df451d8094093511d1138db files/zaptel.devfsd 204
MD5 077231bb1ba50aedfd08476b9d4eb18b files/zaptel-1.0.9_p2-gentoo.diff 5179
--- /dev/null
+MD5 83d4aaab1594c5aa0dedc6b4f221fb48 zaptel-1.2.0.tar.gz 596257
+++ /dev/null
-MD5 528633610716bdb79f65e8d73a171b47 zaptel-1.2.0-beta1.tar.gz 571870
--- /dev/null
+--- zaptel-1.2.0-beta2/zaptel.c.orig 2005-10-04 20:34:36.000000000 +0000
++++ zaptel-1.2.0-beta2/zaptel.c 2005-11-07 21:08:39.000000000 +0000
+@@ -148,12 +148,14 @@
+
+ /* Here are a couple important little additions for devfs */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t zaptel_devfs_dir;
+ static devfs_handle_t channel;
+ static devfs_handle_t pseudo;
+ static devfs_handle_t ctl;
+ static devfs_handle_t timer;
+ #endif
++#endif
+
+ /* udev necessary data structures. Yeah! */
+ #ifdef CONFIG_ZAP_UDEV
+@@ -1123,6 +1125,7 @@
+ }
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t register_devfs_channel(struct zt_chan *chan, devfs_handle_t dir)
+ {
+ char path[100];
+@@ -1165,6 +1168,36 @@
+
+ return chan_dev;
+ }
++#else
++static dev_t register_devfs_channel(struct zt_chan *chan, dev_t dir)
++{
++#ifdef HAS_DEVFS_MK_SYMLINK
++ char link[100];
++ char path[100];
++#endif
++ dev_t chan_dev;
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++
++ /* create /dev/zap/span%d/%d channel device node */
++ if ((chan_dev = devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/span%d/%d", dir, chan->chanpos)) < 0) {
++ printk("zaptel: Something really bad happened. Unable to register devfs entry\n");
++ return 0;
++ }
++
++#ifdef HAS_DEVFS_MK_SYMLINK
++ /* link /dev/zap/span%d/%d -> /dev/zap/%d ?!? */
++ sprintf(path, "zap/span%d/%d", dir, chan->chanpos);
++ sprintf(link, "zap/%d", chan->channo);
++ devfs_mk_symlink(link, path);
++#else
++ /* register /dev/zap/%d channel node directly */
++ if(devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/%d", chan->channo) < 0) {
++ printk("zaptel: Unable to register compat devfs entry\n");
++ }
++#endif
++ return chan_dev;
++}
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ static int zt_chan_reg(struct zt_chan *chan)
+@@ -4429,6 +4462,7 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ char span_name[50];
+ sprintf(span_name, "span%d", span->spanno);
+@@ -4438,6 +4472,15 @@
+ chan->fhandle = register_devfs_channel(chan, chan->span->dhandle); /* Register our stuff with devfs */
+ }
+ }
++#else
++ {
++ devfs_mk_dir("zap/span%d", span->spanno);
++ for (x = 0; x < span->channels; x++) {
++ struct zt_chan *chan = &span->chans[x];
++ register_devfs_channel(chan, span->spanno); /* Register our stuff with devfs */
++ }
++ }
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -4485,11 +4528,22 @@
+ remove_proc_entry(tempfile, NULL);
+ #endif /* CONFIG_PROC_FS */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ for (x = 0; x < span->channels; x++) {
+ devfs_unregister(span->chans[x].fhandle);
+ devfs_unregister(span->chans[x].fhandle_symlink);
+ }
+ devfs_unregister(span->dhandle);
++#else
++ for (x = 0; x < span->channels; x++) {
++ /* remove symlink/compat device first */
++ devfs_remove("zap/%d", span->chans[x].channo);
++ /* remove channel device */
++ devfs_remove("zap/span%d/%d", span->spanno, span->chans[x].chanpos);
++ }
++ /* remove span dir */
++ devfs_remove("zap/span%d", span->spanno);
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -6510,6 +6564,7 @@
+ #endif /* CONFIG_ZAP_UDEV */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
+ devfs_register_chrdev(ZT_MAJOR, "zaptel", &zt_fops);
+@@ -6521,6 +6576,22 @@
+ ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, mode, &zt_fops, NULL);
+ }
+ #else
++ {
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops)) < 0) {
++ printk(KERN_ERR "Unable to register for device on %d, error: %d\n", ZT_MAJOR, res);
++ return res;
++ }
++
++ devfs_mk_dir("zap");
++
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 253), mode, "zap/timer");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 254), mode, "zap/channel");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 255), mode, "zap/pseudo");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 0), mode, "zap/ctl");
++ }
++#endif
++#else
+ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops))) {
+ printk(KERN_ERR "Unable to register tor device on %d\n", ZT_MAJOR);
+ return res;
+@@ -6551,6 +6622,7 @@
+ if (tone_zones[x])
+ kfree(tone_zones[x]);
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_unregister(timer);
+ devfs_unregister(channel);
+ devfs_unregister(pseudo);
+@@ -6566,6 +6638,16 @@
+ class_destroy(zap_class);
+ #endif /* CONFIG_ZAP_UDEV */
+ unregister_chrdev(ZT_MAJOR, "zaptel");
++
++ devfs_remove("zap/timer");
++ devfs_remove("zap/ctl");
++ devfs_remove("zap/pseudo");
++ devfs_remove("zap/channel");
++
++ devfs_remove("zap");
++#endif
++#else
++ unregister_chrdev(ZT_MAJOR, "zaptel");
+ #endif
+ #ifdef CONFIG_ZAPTEL_WATCHDOG
+ watchdog_cleanup();
+--- zaptel-1.2.0-beta2/zaptel.h.orig 2005-10-27 16:05:07.000000000 +0000
++++ zaptel-1.2.0-beta2/zaptel.h 2005-11-07 21:08:39.000000000 +0000
+@@ -52,18 +52,17 @@
+ #define zap_pci_module pci_register_driver
+ #else
+ #define zap_pci_module pci_module_init
++/* devfs_mk_symlink has been removed in 2.6.10 */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
++#define HAS_DEVFS_MK_SYMLINK
++#endif
+ #endif
+
+ #include "ecdis.h"
+ #include "fasthdlc.h"
+ #endif
+ #ifdef CONFIG_DEVFS_FS
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+ #include <linux/devfs_fs_kernel.h>
+-#else
+-#undef CONFIG_DEVFS_FS
+-//#warning "Zaptel doesn't support DEVFS in post 2.4 kernels. Disabling DEVFS in zaptel"
+-#endif
+ #endif /* CONFIG_DEVFS_FS */
+ #include <linux/ioctl.h>
+
+@@ -71,6 +70,8 @@
+ #define ELAST 500
+ #endif
+
++
++
+ /* Per-span configuration values */
+ #define ZT_CONFIG_TXLEVEL 7 /* bits 0-2 are tx level */
+
+@@ -1172,8 +1173,10 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t fhandle; /* File handle in devfs for the channel */
+ devfs_handle_t fhandle_symlink;
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+ };
+
+@@ -1309,7 +1312,9 @@
+ int lastalarms; /* Previous alarms */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t dhandle; /* Directory name */
++#endif
+ #endif
+ /* If the watchdog detects no received data, it will call the
+ watchdog routine */
---- zaptel/Makefile.orig 2005-08-15 18:18:49.000000000 +0200
-+++ zaptel/Makefile 2005-08-15 18:33:42.000000000 +0200
+--- zaptel-1.2.0-beta2/Makefile.orig 2005-10-16 16:07:49.000000000 +0000
++++ zaptel-1.2.0-beta2/Makefile 2005-11-07 21:01:42.000000000 +0000
@@ -21,7 +21,7 @@
endif
KINCLUDES:=$(KSRC)/include
endif
CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
-@@ -312,7 +292,7 @@
- docbook2man -o doc doc/ztmonitor.sgml
- gzip doc/ztmonitor.8
+@@ -296,7 +276,7 @@
+ @echo "**** If you are running udev, read README.udev"
+ endif
-install: all devices
+install: devices
install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
if [ -f sethdlc-new ]; then \
install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
-@@ -339,49 +319,27 @@
+@@ -323,39 +303,22 @@
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o; \
fi
install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
- [ `id -u` = 0 ] && /sbin/ldconfig || :
++ [ `id -u` = 0 ] && /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib || :
rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); fi
install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h
install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
-- install -m 644 doc/ztcfg.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- install -m 644 doc/ztmonitor.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- install -m 644 doc/zttool.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi
-- cat $(MODCONF).bak | grep -v "alias char-major-250" | \
-- grep -v "post-install torisa /sbin/ztcfg" | \
-- grep -v "post-install wcfxsusb /sbin/ztcfg" | \
-- grep -v "alias wctdm" | \
-- grep -v "post-install wctdm /sbin/ztcfg" > $(MODCONF) || true
-+ install -D -m 644 doc/ztcfg.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-+ install -D -m 644 doc/ztmonitor.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-+ install -D -m 644 doc/zttool.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
++ install -D -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
++ install -D -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
+ if [ ! -d `dirname $(MODCONF)` ]; then install -d -m 755 `dirname $(MODCONF)` ; fi
- if ! grep "options torisa" $(MODCONF); then \
- echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \
- fi
- if ! grep "alias char-major-196" $(MODCONF); then \
- echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \
- fi
-- for x in $(MODULES); do \
-- if ! grep -q "post-install $$x" $(MODCONF); then \
-- if ! grep -q "install $$x " $(MODCONF); then \
-- if [ "$$x" != "zaptel" ] ; then \
-- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \
-- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \
+ if [ -n "$(MODCONF)" ]; then \
+- if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi; \
+- cat $(MODCONF).bak | grep -v "alias char-major-250" | \
+- grep -v "post-install torisa /sbin/ztcfg" | \
+- grep -v "post-install wcfxsusb /sbin/ztcfg" | \
+- grep -v "alias wctdm" | \
+- grep -v "post-install wctdm /sbin/ztcfg" > $(MODCONF); \
+ if ! grep "options torisa" $(MODCONF); then \
+ echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \
+ fi; \
+ if ! grep "alias char-major-196" $(MODCONF); then \
+ echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \
+ fi; \
+- for x in $(MODULES); do \
+- if ! grep -q "post-install $$x" $(MODCONF); then \
+- if ! grep -q "install $$x " $(MODCONF); then \
+- if [ "$$x" != "zaptel" ] ; then \
+- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \
+- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \
+- fi; \
- fi; \
- fi; \
- fi; \
-- fi; \
-- done
- if ! grep "alias wcfxs" $(MODCONF); then \
- echo "alias wcfxs wctdm" >> $(MODCONF); \
- fi
- if ! grep "alias wct2xxp" $(MODCONF); then \
- echo "alias wct2xxp wct4xxp" >> $(MODCONF); \
+- done; \
+ if ! grep "ias wcfxs" $(MODCONF); then \
+ echo "alias wcfxs wctdm" >> $(MODCONF); \
+ fi; \
+@@ -363,10 +325,6 @@
+ echo "alias wct2xxp wct4xxp" >> $(MODCONF); \
+ fi; \
fi
- if [ -d /etc/modutils ]; then \
- /sbin/update-modules ; \
- fi
-- [ `id -u` = 0 ] && /sbin/depmod -a || :
+- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
[ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
install-udev:
---- zaptel/zconfig.h.orig 2005-08-16 21:33:25.000000000 +0200
-+++ zaptel/zconfig.h 2005-08-16 21:33:58.000000000 +0200
-@@ -133,5 +133,10 @@
- */
- /* #define EMFLASH */
-
-+/*
-+ * Enable RTC support
-+ */
-+/* #define USE_RTC */
-+
- #endif
--- /dev/null
+Index: zaptel.c
+===================================================================
+RCS file: /usr/cvsroot/zaptel/zaptel.c,v
+retrieving revision 1.95.2.1
+diff -u -r1.95.2.1 zaptel.c
+--- zaptel.c 6 Oct 2004 22:11:41 -0000 1.95.2.1
++++ zaptel.c 2 Nov 2004 10:59:16 -0000
+@@ -703,6 +703,20 @@
+ unsigned char *newbuf, *oldbuf;
+ unsigned long flags;
+ int x;
++
++ /* Allocate history buffer, or not. This probably shouldn't
++ * be here, but it's convenient */
++ if(!j)
++ {
++ if(ss->history) kfree(ss->history);
++ ss->history = NULL;
++ }
++ else
++ {
++ if(!ss->history) ss->history=kmalloc(ZT_HISTORY_BUF_LEN, GFP_KERNEL);
++ }
++ ss->historypos=0;
++
+ /* Check numbufs */
+ if (numbufs < 2)
+ numbufs = 2;
+@@ -3856,11 +3870,12 @@
+ {
+ struct zt_chan *chan = chans[unit];
+ unsigned long flags;
+- int j, rv;
++ int j, k1, k2, rv;
+ int ret;
+ int oldconf;
+ void *rxgain=NULL;
+ echo_can_state_t *ec, *tec;
++ struct zt_history hist;
+
+ if (!chan)
+ return -ENOSYS;
+@@ -4186,6 +4201,29 @@
+ return -EINVAL;
+ break;
+ #endif
++ case ZT_GET_HISTORY:
++ if (copy_from_user(&hist,(struct zt_history *) data,sizeof(hist)))
++ return -EIO;
++
++ if (!(chan->flags & ZT_FLAG_AUDIO)) return (-EINVAL);
++ if (!chan->history) return -EINVAL;
++ j=hist.len;
++ k1=ZT_HISTORY_BUF_LEN-chan->historypos;
++ k2=chan->historypos;
++ if(j>0 && k1>0)
++ {
++ if (copy_to_user(hist.buf,chan->history+chan->historypos,min(j,k1)))
++ return -EIO;
++ j-=min(j,k1);
++ }
++ if(j>0 && k2>0)
++ {
++ if (copy_to_user(hist.buf+k1,chan->history,min(j,k2)))
++ return -EIO;
++ j-=min(j,k2);
++ }
++ /* Probably should assert j==0 here */
++ break;
+ default:
+ return zt_chanandpseudo_ioctl(inode, file, cmd, data, unit);
+ }
+@@ -5371,6 +5409,15 @@
+ if (!(ms->flags & ZT_FLAG_PSEUDO)) {
+ memcpy(ms->putlin, putlin, ZT_CHUNKSIZE * sizeof(short));
+ memcpy(ms->putraw, rxb, ZT_CHUNKSIZE);
++ }
++
++ /* Store in the history buffer */
++ if(ms->history)
++ {
++ memcpy(ms->history+ms->historypos,rxb,ZT_CHUNKSIZE);
++ ms->historypos+=ZT_CHUNKSIZE;
++ if(ms->historypos >= ZT_HISTORY_BUF_LEN)
++ ms->historypos=0;
+ }
+
+ /* Take the rxc, twiddle it for conferencing if appropriate and put it
+Index: zaptel.h
+===================================================================
+RCS file: /usr/cvsroot/zaptel/zaptel.h,v
+retrieving revision 1.38
+diff -u -r1.38 zaptel.h
+--- zaptel.h 27 Sep 2004 19:50:03 -0000 1.38
++++ zaptel.h 2 Nov 2004 10:59:17 -0000
+@@ -137,6 +137,8 @@
+ #define ZT_MAX_NUM_BUFS 32
+ #define ZT_MAX_BUF_SPACE 32768
+
++#define ZT_HISTORY_BUF_LEN 16384 /* Count of ulaw samples */
++
+ #define ZT_DEFAULT_BLOCKSIZE 1024
+ #define ZT_DEFAULT_MTR_MRU 2048
+
+@@ -277,6 +279,11 @@
+ int reserved[4]; /* Reserved for future expansion -- always set to 0 */
+ } ZT_DIAL_PARAMS;
+
++typedef struct zt_history
++{
++ unsigned char *buf; /* Sample buffer */
++ int len; /* Length of buffer, in bytes */
++} ZT_HISTORY;
+
+ typedef struct zt_dynamic_span {
+ char driver[20]; /* Which low-level driver to use */
+@@ -584,6 +591,11 @@
+ #define ZT_TIMERPONG _IOW (ZT_CODE, 53, int)
+
+ /*
++ * Return history buffer
++ */
++#define ZT_GET_HISTORY _IOR(ZT_CODE, 54, struct zt_history)
++
++/*
+ * Set/get signalling freeze
+ */
+ #define ZT_SIGFREEZE _IOW (ZT_CODE, 54, int)
+@@ -989,6 +1001,10 @@
+ wait_queue_head_t writebufq; /* write wait queue */
+
+ int blocksize; /* Block size */
++
++
++ u_char *history; /* History buffer, for pre-ring caller ID (ZT_HISTORY_BUF_LEN) */
++ u_short historypos; /* Current position within buffer */
+
+ int eventinidx; /* out index in event buf (circular) */
+ int eventoutidx; /* in index in event buf (circular) */
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.0_beta1.ebuild,v 1.3 2005/09/17 01:01:47 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.0.ebuild,v 1.1 2005/11/18 16:34:14 stkn Exp $
inherit toolchain-funcs eutils linux-mod
#BRI_VERSION="0.2.0-RC8h"
#FLORZ_VERSION="0.2.0-RC8a_florz-6"
-IUSE="devfs26 rtc ecmark ecmark2 ecmark3 ecaggressive ecsteve ecsteve2 watchdog zapras zapnet"
+IUSE="devfs26 rtc ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 ukcid watchdog zapras zapnet"
MY_P="${P/_/-}"
SLOT="0"
LICENSE="GPL-2"
-KEYWORDS="~x86 ~ppc ~amd64"
+KEYWORDS="~amd64 ~ppc ~x86"
DEPEND="virtual/libc
virtual/linux-sources
# list of echo canceller use flags,
# first active in this list is selected (=order does matter)
-ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2"
+ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2"
### Begin: Helper functions
unpack ${A}
cd ${S}
- epatch ${FILESDIR}/${P}-gentoo.diff
+ epatch ${FILESDIR}/${PN}-1.2.0-gentoo.diff
if use devfs26; then
- epatch ${FILESDIR}/${PN}-1.0.4-experimental-devfs26.diff
+ epatch ${FILESDIR}/${PN}-1.2.0-devfs26.diff
# fix Makefile to not create device nodes for
# devfs enabled 2.6 kernels
Makefile
fi
+ use ukcid && \
+ epatch ${FILESDIR}/${PN}-1.2.0-ukcid.patch
+
# try to apply bristuff patch
# if use bri; then
# einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})"