summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2006-08-02 19:10:26 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2006-08-02 19:10:26 +0000
commit04210bd53c7e818c0c80152dea92abbba2d3e63d (patch)
tree39e2a621f5b6f896542f2749695e29a2172d7279 /sys-apps/pcfclock
parentStable on hppa and sparc (diff)
downloadgentoo-2-04210bd53c7e818c0c80152dea92abbba2d3e63d.tar.gz
gentoo-2-04210bd53c7e818c0c80152dea92abbba2d3e63d.tar.bz2
gentoo-2-04210bd53c7e818c0c80152dea92abbba2d3e63d.zip
added kernel 2.6.17 fixes, solving bug #123472.
(Portage version: 2.1.1_pre4-r1)
Diffstat (limited to 'sys-apps/pcfclock')
-rw-r--r--sys-apps/pcfclock/ChangeLog9
-rw-r--r--sys-apps/pcfclock/files/digest-pcfclock-0.44-r23
-rw-r--r--sys-apps/pcfclock/files/pcfclock-0.44-udev.patch40
-rw-r--r--sys-apps/pcfclock/pcfclock-0.44-r2.ebuild53
4 files changed, 98 insertions, 7 deletions
diff --git a/sys-apps/pcfclock/ChangeLog b/sys-apps/pcfclock/ChangeLog
index 437b1723c8dc..8f0696f1de09 100644
--- a/sys-apps/pcfclock/ChangeLog
+++ b/sys-apps/pcfclock/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/pcfclock
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/ChangeLog,v 1.5 2006/01/11 00:54:47 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/ChangeLog,v 1.6 2006/08/02 19:10:26 sbriesen Exp $
+
+*pcfclock-0.44-r2 (02 Aug 2006)
+
+ 02 Aug 2006; Stefan Briesenick <sbriesen@gentoo.org>
+ files/pcfclock-0.44-udev.patch, -pcfclock-0.44-r1.ebuild,
+ +pcfclock-0.44-r2.ebuild:
+ added kernel 2.6.17 fixes, solving bug #123472.
11 Jan 2006; Stefan Briesenick <sbriesen@gentoo.org>
+files/pcfclock-0.44-udev.patch, -files/pcfclock-0.44-udev-gentoo.patch,
diff --git a/sys-apps/pcfclock/files/digest-pcfclock-0.44-r2 b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r2
new file mode 100644
index 000000000000..3e2aa335b8de
--- /dev/null
+++ b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r2
@@ -0,0 +1,3 @@
+MD5 35f436caf4e6adb077b72bb49d5af3bb pcfclock-0.44.tar.gz 89914
+RMD160 e6bf6bafcf985d3742767118abc83c0fbf81252f pcfclock-0.44.tar.gz 89914
+SHA256 1285c9536ad04c74bbdd92e22fd6a6661feeb3c9175eccb9b1e02c2f06adbda8 pcfclock-0.44.tar.gz 89914
diff --git a/sys-apps/pcfclock/files/pcfclock-0.44-udev.patch b/sys-apps/pcfclock/files/pcfclock-0.44-udev.patch
index 5c02c1929321..d7058cfe3cbc 100644
--- a/sys-apps/pcfclock/files/pcfclock-0.44-udev.patch
+++ b/sys-apps/pcfclock/files/pcfclock-0.44-udev.patch
@@ -1,10 +1,26 @@
--- linux/pcfclock.c.orig 2004-05-17 18:26:12.000000000 +0200
-+++ linux/pcfclock.c 2005-11-05 22:07:57.000000000 +0100
-@@ -93,6 +93,20 @@
++++ linux/pcfclock.c 2006-08-02 20:54:39.000000000 +0200
+@@ -56,6 +56,9 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ #include <linux/device.h>
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++#include <linux/moduleparam.h>
++#endif
+
+ #include <asm/uaccess.h>
+ #include <asm/semaphore.h>
+@@ -93,6 +96,26 @@
static struct pcfclock_struct pcfclock_table[PCFCLOCK_NO];
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++# define CLASS_CREATE(owner, name) class_create(owner, name)
++# define CLASS_DESTROY(class) class_destroy(class)
++# define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, NULL, dev, device, fmt, rest)
++# define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev)
++static struct class *pcfclock_class;
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+# define CLASS_CREATE(owner, name) class_create(owner, name)
+# define CLASS_DESTROY(class) class_destroy(class)
+# define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest)
@@ -21,7 +37,19 @@
/*
* The radio clock transmits data only to the PC when requested. While the
* time signal is received for the first time no communication between the PC
-@@ -442,6 +456,7 @@
+@@ -401,7 +424,11 @@
+ static int parport_nr[PCFCLOCK_NO] = {[0 ... PCFCLOCK_NO - 1] = PCFCLOCK_PARPORT_UNSPEC };
+ static char *parport[PCFCLOCK_NO] = { NULL, };
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++module_param_array(parport, charp, NULL, 0);
++#else
+ MODULE_PARM(parport, "1-" __MODULE_STRING(PCFCLOCK_NO) "s");
++#endif
+
+ #ifndef MODULE
+ static int __init
+@@ -442,6 +469,7 @@
return 1;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -29,7 +57,7 @@
devfs_mk_cdev(MKDEV(PCFCLOCK_MAJOR, n), S_IFCHR | S_IRUGO, "pcfclocks/%d", n);
#else
sprintf(name, "%d", n);
-@@ -509,6 +524,7 @@
+@@ -509,6 +537,7 @@
printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR);
return -EIO;
}
@@ -37,7 +65,7 @@
devfs_mk_dir("pcfclocks");
#else
if (devfs_register_chrdev(PCFCLOCK_MAJOR, "pcfclock", &pcfclock_fops)) {
-@@ -563,9 +579,11 @@
+@@ -563,9 +592,11 @@
for (n = 0; n < PCFCLOCK_NO; n++) {
if (pcfclock_table[n].dev != NULL) {
parport_unregister_device(pcfclock_table[n].dev);
diff --git a/sys-apps/pcfclock/pcfclock-0.44-r2.ebuild b/sys-apps/pcfclock/pcfclock-0.44-r2.ebuild
new file mode 100644
index 000000000000..9682d0358f26
--- /dev/null
+++ b/sys-apps/pcfclock/pcfclock-0.44-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/pcfclock-0.44-r2.ebuild,v 1.1 2006/08/02 19:10:26 sbriesen Exp $
+
+inherit eutils linux-mod
+
+DESCRIPTION="driver for the parallel port radio clock sold by Conrad Electronic"
+HOMEPAGE="http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html"
+SRC_URI="http://www-stud.ims.uni-stuttgart.de/~voegelas/pcfclock/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+
+pkg_setup() {
+ CONFIG_CHECK="PARPORT"
+ linux-mod_pkg_setup
+ BUILD_TARGETS="all"
+ ECONF_PARAMS="--with-linux=${KERNEL_DIR}"
+ MODULE_NAMES="pcfclock(::${S}/linux)"
+ MODULESD_PCFCLOCK_ENABLED="yes"
+ MODULESD_PCFCLOCK_EXAMPLES=( "pcfclock parport=0,none,none" )
+ MODULESD_PCFCLOCK_ALIASES=(
+ "char-major-181 pcfclock"
+ "/dev/pcfclock0 char-major-181"
+ "/dev/pcfclock1 char-major-181"
+ "/dev/pcfclock2 char-major-181"
+ )
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-udev.patch"
+ convert_to_m "linux/Makefile.in"
+}
+
+src_install() {
+ linux-mod_src_install
+ dosbin pcfdate/pcfdate
+ doman {linux,pcfdate}/*.[48]
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+
+ # Add configuration for udev
+ if [ -e ${ROOT}dev/.udev ]; then
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="pcfclock*", NAME="%k", MODE="0444"' \
+ > "${D}/etc/udev/rules.d/55-${PN}.rules"
+ fi
+}