diff options
-rw-r--r-- | sys-apps/pcfclock/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/pcfclock/Manifest | 19 | ||||
-rw-r--r-- | sys-apps/pcfclock/files/digest-pcfclock-0.44-r3 | 3 | ||||
-rw-r--r-- | sys-apps/pcfclock/files/pcfclock-0.44-kernel-2.6.18.diff | 100 | ||||
-rw-r--r-- | sys-apps/pcfclock/pcfclock-0.44-r3.ebuild | 54 |
5 files changed, 180 insertions, 6 deletions
diff --git a/sys-apps/pcfclock/ChangeLog b/sys-apps/pcfclock/ChangeLog index 8f0696f1de09..3665face0a93 100644 --- a/sys-apps/pcfclock/ChangeLog +++ b/sys-apps/pcfclock/ChangeLog @@ -1,6 +1,12 @@ # 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.6 2006/08/02 19:10:26 sbriesen Exp $ +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/ChangeLog,v 1.7 2007/01/08 20:29:10 sbriesen Exp $ + +*pcfclock-0.44-r3 (08 Jan 2007) + + 08 Jan 2007; Stefan Briesenick <sbriesen@gentoo.org> + +files/pcfclock-0.44-kernel-2.6.18.diff, +pcfclock-0.44-r3.ebuild: + added patch for kernel 2.6.18 and later. *pcfclock-0.44-r2 (02 Aug 2006) diff --git a/sys-apps/pcfclock/Manifest b/sys-apps/pcfclock/Manifest index 7e27fb897b4c..a5026db21fa9 100644 --- a/sys-apps/pcfclock/Manifest +++ b/sys-apps/pcfclock/Manifest @@ -1,3 +1,7 @@ +AUX pcfclock-0.44-kernel-2.6.18.diff 3917 RMD160 0893c91db18386bdb52ebe825a40b732a32a1233 SHA1 c8ea6af864e8e702288169f8acf858edfd3b1f6c SHA256 041fb0653615e525d8595ba903bd5013dadd8f594338aeed430c1ed6e04383b4 +MD5 1d37b7b590331b32eea7312816b1c48a files/pcfclock-0.44-kernel-2.6.18.diff 3917 +RMD160 0893c91db18386bdb52ebe825a40b732a32a1233 files/pcfclock-0.44-kernel-2.6.18.diff 3917 +SHA256 041fb0653615e525d8595ba903bd5013dadd8f594338aeed430c1ed6e04383b4 files/pcfclock-0.44-kernel-2.6.18.diff 3917 AUX pcfclock-0.44-udev.patch 3147 RMD160 6ecb84fdc7e7b4695266690b37cd9b4289e33230 SHA1 e0524f315d235beb49ea6800155a01c6d3bbe73b SHA256 12f1900f72e18cfab6ea82c106178e9ee5021bc51d53d3cada203917de6bc5ca MD5 23390b16cef24c9792e2efbac8447609 files/pcfclock-0.44-udev.patch 3147 RMD160 6ecb84fdc7e7b4695266690b37cd9b4289e33230 files/pcfclock-0.44-udev.patch 3147 @@ -7,10 +11,14 @@ EBUILD pcfclock-0.44-r2.ebuild 1436 RMD160 c5b9d4ab5b1d5b46f0d033bedcc6305720a9c MD5 5bd1bf1585d1f1a62ead5d846c62a856 pcfclock-0.44-r2.ebuild 1436 RMD160 c5b9d4ab5b1d5b46f0d033bedcc6305720a9ceb5 pcfclock-0.44-r2.ebuild 1436 SHA256 8ab211e96536f0a67b894fcd34258839d8c9f248374c262ed900418c56d76049 pcfclock-0.44-r2.ebuild 1436 -MISC ChangeLog 1245 RMD160 ca466343c0a2e09895eeb65063cafa804a8a82cc SHA1 113cf398c7b402a3f1de562d1d8586affb34c5e6 SHA256 fa960240cf5639fe29677857ba9208dc807e7fcf077d999cc71d73e129800b1f -MD5 2963280151b90613a38fb5089b853517 ChangeLog 1245 -RMD160 ca466343c0a2e09895eeb65063cafa804a8a82cc ChangeLog 1245 -SHA256 fa960240cf5639fe29677857ba9208dc807e7fcf077d999cc71d73e129800b1f ChangeLog 1245 +EBUILD pcfclock-0.44-r3.ebuild 1445 RMD160 792b5524d4f3147904af011ff6b38a8a1050d367 SHA1 5ba065e14d5ac21259d7fa9fa09593411503f531 SHA256 b21cf1f64b23fc702c1602020fa8a93c522ed6325e2ee23f95a32f7d8c4c0070 +MD5 6180ef8a1b148da82471923cc3af0e6e pcfclock-0.44-r3.ebuild 1445 +RMD160 792b5524d4f3147904af011ff6b38a8a1050d367 pcfclock-0.44-r3.ebuild 1445 +SHA256 b21cf1f64b23fc702c1602020fa8a93c522ed6325e2ee23f95a32f7d8c4c0070 pcfclock-0.44-r3.ebuild 1445 +MISC ChangeLog 1446 RMD160 ce3d00e070a849226c716f9de9190c565a2f206d SHA1 67319385f415b2397008a96fedce05b5fdb25969 SHA256 4792c2753ad9268ce3270dbe5ff7dfe7c8fca551eea708399d762bb3d54a0d68 +MD5 bfc567c5671a16ca89d9f73935295d16 ChangeLog 1446 +RMD160 ce3d00e070a849226c716f9de9190c565a2f206d ChangeLog 1446 +SHA256 4792c2753ad9268ce3270dbe5ff7dfe7c8fca551eea708399d762bb3d54a0d68 ChangeLog 1446 MISC metadata.xml 643 RMD160 e390969f9a48f9e31c200e372c52aa5ab5595575 SHA1 b908bc35e779b4cb38025b24e66a1810f27ab72c SHA256 e4dc68c9a436c2229a171d320d03a94b0f4a355e174d3308d0ce0f71657d219b MD5 dfd8fb7bae22002954771c4bbf209e44 metadata.xml 643 RMD160 e390969f9a48f9e31c200e372c52aa5ab5595575 metadata.xml 643 @@ -18,3 +26,6 @@ SHA256 e4dc68c9a436c2229a171d320d03a94b0f4a355e174d3308d0ce0f71657d219b metadata MD5 8671ca789e9af67b5111e90c57351396 files/digest-pcfclock-0.44-r2 238 RMD160 7cb9a5864ce4a13c7e9640950c19559563bc3f24 files/digest-pcfclock-0.44-r2 238 SHA256 23b6f740c7dabf75300d7eb30c8f501b2248f5e2382f7d3a949798a0e8103247 files/digest-pcfclock-0.44-r2 238 +MD5 8671ca789e9af67b5111e90c57351396 files/digest-pcfclock-0.44-r3 238 +RMD160 7cb9a5864ce4a13c7e9640950c19559563bc3f24 files/digest-pcfclock-0.44-r3 238 +SHA256 23b6f740c7dabf75300d7eb30c8f501b2248f5e2382f7d3a949798a0e8103247 files/digest-pcfclock-0.44-r3 238 diff --git a/sys-apps/pcfclock/files/digest-pcfclock-0.44-r3 b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r3 new file mode 100644 index 000000000000..3e2aa335b8de --- /dev/null +++ b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r3 @@ -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-kernel-2.6.18.diff b/sys-apps/pcfclock/files/pcfclock-0.44-kernel-2.6.18.diff new file mode 100644 index 000000000000..2ac0c44b6362 --- /dev/null +++ b/sys-apps/pcfclock/files/pcfclock-0.44-kernel-2.6.18.diff @@ -0,0 +1,100 @@ +diff -Naur linux.orig/pcfclock.c linux/pcfclock.c +--- linux.orig/pcfclock.c 2004-05-17 18:26:12.000000000 +0200 ++++ linux/pcfclock.c 2007-01-08 21:16:44.000000000 +0100 +@@ -49,13 +49,18 @@ + #include <linux/major.h> + #include <linux/fs.h> + #include <linux/sched.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + #include <linux/devfs_fs_kernel.h> ++#endif + #include <linux/string.h> + #include <linux/delay.h> + #include <linux/parport.h> + #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 +98,26 @@ + + static struct pcfclock_struct pcfclock_table[PCFCLOCK_NO]; + ++#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) ++# define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev) ++static struct class *pcfclock_class; ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++# define CLASS_CREATE(owner, name) class_simple_create(owner, name) ++# define CLASS_DESTROY(class) class_simple_destroy(class) ++# define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest) ++# define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev) ++static struct class_simple *pcfclock_class; ++#endif ++ + /* + * 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 +@@ -401,7 +426,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,7 +471,10 @@ + return 1; + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ CLASS_DEVICE_CREATE(pcfclock_class, MKDEV(PCFCLOCK_MAJOR, n), NULL, "pcfclock%d", n); ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_mk_cdev(MKDEV(PCFCLOCK_MAJOR, n), S_IFCHR | S_IRUGO, "pcfclocks/%d", n); ++# endif + #else + sprintf(name, "%d", n); + devfs_register(devfs_handle, name, DEVFS_FL_DEFAULT, PCFCLOCK_MAJOR, n, S_IFCHR | S_IRUGO, +@@ -509,7 +541,10 @@ + printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR); + return -EIO; + } ++ pcfclock_class = CLASS_CREATE(THIS_MODULE, "pcfclock"); ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_mk_dir("pcfclocks"); ++# endif + #else + if (devfs_register_chrdev(PCFCLOCK_MAJOR, "pcfclock", &pcfclock_fops)) { + printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR); +@@ -563,10 +598,16 @@ + for (n = 0; n < PCFCLOCK_NO; n++) { + if (pcfclock_table[n].dev != NULL) { + parport_unregister_device(pcfclock_table[n].dev); ++ CLASS_DEVICE_DESTROY(pcfclock_class, MKDEV(PCFCLOCK_MAJOR, n)); ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_remove("pcfclocks/%d", n); ++# endif + } + } ++ CLASS_DESTROY(pcfclock_class); ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_remove("pcfclocks"); ++# endif + #else + devfs_unregister(devfs_handle); + devfs_unregister_chrdev(PCFCLOCK_MAJOR, "pcfclock"); diff --git a/sys-apps/pcfclock/pcfclock-0.44-r3.ebuild b/sys-apps/pcfclock/pcfclock-0.44-r3.ebuild new file mode 100644 index 000000000000..23d993971c88 --- /dev/null +++ b/sys-apps/pcfclock/pcfclock-0.44-r3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/pcfclock-0.44-r3.ebuild,v 1.1 2007/01/08 20:29:10 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}-kernel-2.6.18.diff" + 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 +} |