summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Bornkessel <hd_brummy@gentoo.org>2005-12-13 20:59:06 +0000
committerJörg Bornkessel <hd_brummy@gentoo.org>2005-12-13 20:59:06 +0000
commit5ba2245f346688908fef99687a5e01101cef7b68 (patch)
tree63a8e01341103f462205f66a48a9eae4425b7438 /media-plugins/vdr-powermate/files
parentmodular X deps (diff)
downloadgentoo-2-5ba2245f346688908fef99687a5e01101cef7b68.tar.gz
gentoo-2-5ba2245f346688908fef99687a5e01101cef7b68.tar.bz2
gentoo-2-5ba2245f346688908fef99687a5e01101cef7b68.zip
initial import of ebuild from gentoo.de, written by myself
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'media-plugins/vdr-powermate/files')
-rw-r--r--media-plugins/vdr-powermate/files/confd8
-rw-r--r--media-plugins/vdr-powermate/files/digest-vdr-powermate-0.0.21
-rwxr-xr-xmedia-plugins/vdr-powermate/files/rc-addon.sh49
-rw-r--r--media-plugins/vdr-powermate/files/vdr-powermate-0.0.2-1.3.18.diff51
4 files changed, 109 insertions, 0 deletions
diff --git a/media-plugins/vdr-powermate/files/confd b/media-plugins/vdr-powermate/files/confd
new file mode 100644
index 000000000000..79645161caee
--- /dev/null
+++ b/media-plugins/vdr-powermate/files/confd
@@ -0,0 +1,8 @@
+# /etc/conf.d/vdr.powermate:
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-powermate/files/confd,v 1.1 2005/12/13 20:59:06 hd_brummy Exp $
+
+# Set to powermat device (/dev/input/event?)
+# Only needed to change if autodetect fails.
+# allowed values: /dev/input/eventX (with X a number)
+# default value: auto
+#POWERMATE_DEVICE="auto"
diff --git a/media-plugins/vdr-powermate/files/digest-vdr-powermate-0.0.2 b/media-plugins/vdr-powermate/files/digest-vdr-powermate-0.0.2
new file mode 100644
index 000000000000..a5c61cf1de2c
--- /dev/null
+++ b/media-plugins/vdr-powermate/files/digest-vdr-powermate-0.0.2
@@ -0,0 +1 @@
+MD5 8ddc65853c160c4f46acf4662a0a074f vdr-powermate-0.0.2.tgz 13126
diff --git a/media-plugins/vdr-powermate/files/rc-addon.sh b/media-plugins/vdr-powermate/files/rc-addon.sh
new file mode 100755
index 000000000000..eb431626ed89
--- /dev/null
+++ b/media-plugins/vdr-powermate/files/rc-addon.sh
@@ -0,0 +1,49 @@
+# plugin-startup-skript for powermate-plugin
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-powermate/files/rc-addon.sh,v 1.1 2005/12/13 20:59:06 hd_brummy Exp $
+
+# try to autodetect device for powermate
+
+detect_powermate() {
+ POWERMATE_DEVICE=""
+
+ local devfile
+ local base
+ local sysfile
+ local linkdest
+
+ for devfile in /dev/input/event*; do
+ # check if devile is device
+ [[ -c "${devfile}" ]] || continue
+
+ # and for corresponding sysfs-entry
+ base=${devfile/\/dev\/input\//}
+ sysfile=/sys/class/input/${base}/device/driver
+ [[ -L "${sysfile}" ]] || continue
+
+ # if driver-link contains powermate
+ linkdest=$(readlink ${sysfile})
+ [[ "${linkdest}" != "${linkdest/powermate/}" ]] || continue
+
+ # the we are done
+ POWERMATE_DEVICE="${devfile}"
+ break
+ done
+}
+
+plugin_pre_vdr_start() {
+ if [[ "${POWERMATE_DEVICE:-auto}" == "auto" ]]; then
+ detect_powermate
+ fi
+
+ if [[ -c "${POWERMATE_DEVICE}" ]]; then
+ chown vdr:vdr "${POWERMATE_DEVICE}"
+ add_plugin_param "--device=${POWERMATE_DEVICE}"
+ else
+ ewarn "No powermate-device found."
+ fi
+}
+
+# for compatibility
+if [[ ${SCRIPT_API:-1} -lt 2 ]]; then
+ plugin_pre_vdr_start
+fi
diff --git a/media-plugins/vdr-powermate/files/vdr-powermate-0.0.2-1.3.18.diff b/media-plugins/vdr-powermate/files/vdr-powermate-0.0.2-1.3.18.diff
new file mode 100644
index 000000000000..73f77ad3eb55
--- /dev/null
+++ b/media-plugins/vdr-powermate/files/vdr-powermate-0.0.2-1.3.18.diff
@@ -0,0 +1,51 @@
+--- powermate-0.0.2/powermate.c
++++ powermate-0.0.2/powermate.c
+@@ -32,7 +32,9 @@
+ : context(kContextNormal),
+ menu(false),
+ pushed(false),
++#if VDRVERSNUM < 10318
+ lastPush(0),
++#endif
+ offset(0),
+ click(false),
+ turn(false)
+@@ -125,8 +127,12 @@
+ }
+ if (click && !pushed)
+ {
++#if VDRVERSNUM < 10318
+ int current = time_ms();
+ if (current - lastPush > PowerMateSetup.doubleClickTime)
++#else
++ if (doubleClickTimeOut.TimedOut())
++#endif
+ {
+ //printf("CLICK\n");
+ ProcessEvent(kEventClick);
+@@ -207,7 +213,11 @@
+ pushed = true;
+ turn = false;
+ offset = 0;
++#if VDRVERSNUM < 10318
+ lastPush = time_ms();
++#else
++ doubleClickTimeOut.Set(PowerMateSetup.doubleClickTime);
++#endif
+ }
+ else
+ {
+--- powermate-0.0.2/powermate.h
++++ powermate-0.0.2/powermate.h
+@@ -25,7 +25,11 @@
+ bool menu;
+
+ bool pushed;
++#if VDRVERSNUM < 10318
+ int lastPush;
++#else
++ cTimeMs doubleClickTimeOut;
++#endif
+ int offset;
+ bool click;
+ bool turn;