diff options
author | Peter Volkov <pva@gentoo.org> | 2010-11-03 10:46:29 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2010-11-03 10:46:29 +0000 |
commit | 8df46f7459e54f3d1d3ea7fff93397d51d97f638 (patch) | |
tree | 2b0d500cdd37ad079e9dad918e58d25433103b94 /sys-kernel/linuxwacom-module | |
parent | x86 stable wrt bug #342897 (diff) | |
download | historical-8df46f7459e54f3d1d3ea7fff93397d51d97f638.tar.gz historical-8df46f7459e54f3d1d3ea7fff93397d51d97f638.tar.bz2 historical-8df46f7459e54f3d1d3ea7fff93397d51d97f638.zip |
Inital import. Work based on linuxwacom package that was removed from the tree, bug #335821, thank Julien Sanchez for help.
Package-Manager: portage-2.1.9.24/cvs/Linux x86_64
Diffstat (limited to 'sys-kernel/linuxwacom-module')
-rw-r--r-- | sys-kernel/linuxwacom-module/ChangeLog | 13 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/Manifest | 7 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/files/check_driver | 24 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/files/check_driver.1 | 22 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch | 30 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild | 101 | ||||
-rw-r--r-- | sys-kernel/linuxwacom-module/metadata.xml | 13 |
7 files changed, 210 insertions, 0 deletions
diff --git a/sys-kernel/linuxwacom-module/ChangeLog b/sys-kernel/linuxwacom-module/ChangeLog new file mode 100644 index 000000000000..022489e14f58 --- /dev/null +++ b/sys-kernel/linuxwacom-module/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for sys-kernel/linuxwacom-module +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linuxwacom-module/ChangeLog,v 1.1 2010/11/03 10:46:29 pva Exp $ + +*linuxwacom-module-0.8.8_p10 (03 Nov 2010) + + 03 Nov 2010; Peter Volkov <pva@gentoo.org> + +linuxwacom-module-0.8.8_p10.ebuild, + +files/linuxwacom-module-2.6.36.patch, +files/check_driver, + +files/check_driver.1, +metadata.xml: + Inital import. Work based on linuxwacom package that was removed from the + tree, bug #335821, thank Julien Sanchez for help. + diff --git a/sys-kernel/linuxwacom-module/Manifest b/sys-kernel/linuxwacom-module/Manifest new file mode 100644 index 000000000000..118c3bb76687 --- /dev/null +++ b/sys-kernel/linuxwacom-module/Manifest @@ -0,0 +1,7 @@ +AUX check_driver 499 RMD160 298507626fa8bb20df0d5d1404002133ef1e4c41 SHA1 12ae37807a03f36be2c5cc47e444475677b41693 SHA256 45331d948e1d37141a56258510d6ff708092f70181e83348eb66eef005878069 +AUX check_driver.1 750 RMD160 9ebe8e30ce2cb83ca3245ba29d19b06e81181651 SHA1 4d6fba491df26709b821184f9e011568eaaaebde SHA256 67bf1469f122830d9e99cbd8762e61f682c9a831577fde29af8ef1ab0440d024 +AUX linuxwacom-module-2.6.36.patch 738 RMD160 b2d254f0c52cf8418aa1975f6cc4b39e9e48ad4a SHA1 70940702e8a88e83b6db3557a28450c9ba0ca3e9 SHA256 4ad552f88e14661ea1602ec9733d90a7e6491576b65444c792267bf0f15908ea +DIST linuxwacom-0.8.8-10.tar.bz2 1055098 RMD160 c7a5f5cbf222c33831ca6d92c376cebd3413f773 SHA1 70da7a63c1b00d8153853e4ea38652e63cc4ec0e SHA256 042be61e2f7165ecf37e1805c499575ce6912a5986fae153921821c8f5ede55a +EBUILD linuxwacom-module-0.8.8_p10.ebuild 2762 RMD160 9fda51e98ef222bbf3433e4ace79b47a07dddd63 SHA1 10abfd84ed30249527e3dd3bf43e46ba2494f924 SHA256 b0fd2ef338a9fbe38d0332dce6e291b18a7e78a16229c5af8aa9c4ffc4db1346 +MISC ChangeLog 585 RMD160 3bd48d624a68dc242a82ba580ecf2b9990840242 SHA1 586a3e4acb88cd5b82c6a1c3654062da9ed91cf2 SHA256 ff6d8326c5f59bc39f146a8119e9b308f9aebccd40fb0d384fc7239048d58d1d +MISC metadata.xml 388 RMD160 4a735214a3c3c46d4fb985fd1b00a0ee14cfd0ef SHA1 e4c9336e1534775b3faf4a567b493745f74d6692 SHA256 7103019570157939311bd6af23f43258e2c9d3a8d27bfcf74c628ca2e59505e3 diff --git a/sys-kernel/linuxwacom-module/files/check_driver b/sys-kernel/linuxwacom-module/files/check_driver new file mode 100644 index 000000000000..6e49aa1f1691 --- /dev/null +++ b/sys-kernel/linuxwacom-module/files/check_driver @@ -0,0 +1,24 @@ +#!/bin/sh +# + +#logger check_driver called with: $1 - $2 - $3 - + +wanted=$1 +devpath=$2 +bustype=$3 + +device=$(readlink /sys/$devpath/device) +device=${device##*/} +driver=$(readlink /sys/$devpath/device/driver) +driver=${driver##*/} + +logger device $device is bound to the $driver driver + +if [ "$driver" != "$wanted" ]; then + logger must rebind + echo -n "$device" > /sys/$devpath/device/driver/unbind + echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind +else + logger no need to rebind +fi + diff --git a/sys-kernel/linuxwacom-module/files/check_driver.1 b/sys-kernel/linuxwacom-module/files/check_driver.1 new file mode 100644 index 000000000000..cf3a5f9e43e2 --- /dev/null +++ b/sys-kernel/linuxwacom-module/files/check_driver.1 @@ -0,0 +1,22 @@ +.TH wacom\-tools 1 "5 Nov 2004" "Debian GNU/Linux" "Debian" +.SH NAME +check_driver \- Linux 2.6(.16+) userspace device rebinding helper. + +.SH SYNOPSIS +.B check_driver driver devpath bustype + +.SH DESCRIPTION +This is a \fBRUN\fP script that may be invoked from a udev rule to ensure the +correct driver is bound to a particular device, in situations where a +basic driver may bind to it first but a more specialised one is available. + +.SH EXAMPLE +For the wacom device, a rule like this is used: + +KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}" + +.SH COPYRIGHT +2006, Ron Lee <ron@debian.org>. Created for the Debian GNU/Linux +distribution. It may be freely distributed elsewhere. + + diff --git a/sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch b/sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch new file mode 100644 index 000000000000..81f108fdf27f --- /dev/null +++ b/sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch @@ -0,0 +1,30 @@ +=== modified file 'src/2.6.30/wacom_wac.c' +--- src/2.6.30/wacom_wac.c 2010-10-29 07:30:39 +0000 ++++ src/2.6.30/wacom_wac.c 2010-10-29 07:31:29 +0000 +@@ -202,10 +202,10 @@ + y = get_unaligned_be16(&data[5 + (idx * 9)]) & 0x7ff; + + if (wacom->last_finger != finger) { +- if (x == input->abs[ABS_X]) ++ if (x == input->absinfo[ABS_X].value) + x++; + +- if (y == input->abs[ABS_Y]) ++ if (y == input->absinfo[ABS_X].value) + y++; + } + +@@ -843,10 +843,10 @@ + int y = le16_to_cpup((__le16 *)&data[4 + finger * 2]) & 0x7fff; + + if (wacom->last_finger != finger) { +- if (x == input->abs[ABS_X]) ++ if (x == input->absinfo[ABS_X].value) + x++; + +- if (y == input->abs[ABS_Y]) ++ if (y == input->absinfo[ABS_X].value) + y++; + } + + diff --git a/sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild b/sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild new file mode 100644 index 000000000000..b2ea64a970d4 --- /dev/null +++ b/sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild,v 1.1 2010/11/03 10:46:29 pva Exp $ + +EAPI="2" +inherit eutils toolchain-funcs linux-mod autotools + +# http://who-t.blogspot.com/2010/09/wacom-support-in-linux.html +MY_PN="linuxwacom" +DESCRIPTION="Kernel driver for Wacom tablets and drawing devices" +HOMEPAGE="http://linuxwacom.sourceforge.net/" +SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}-${PV/_p/-}.tar.bz2" + +IUSE="usb" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86" + +RDEPEND="sys-fs/udev + sys-libs/ncurses" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + usb? ( >=sys-kernel/linux-headers-2.6 )" +S=${WORKDIR}/${MY_PN}-${PV/_p/-} + +MODULE_NAMES="wacom(input:${S}/src:${S}/src)" +BUILD_TARGETS="all" + +wacom_check() { + einfo "Checking wacom module not built in kernel" + + if $(linux_chkconfig_present TABLET_USB_WACOM); then + eerror "Please, disable wacom module in the kernel:" + eerror + eerror " Device Drivers" + eerror " Input device support" + eerror " Tablets" + eerror " <> Wacom Intuos/Graphire tablet support (USB)" + eerror + eerror '(in the "USB support" page it is suggested to include also:' + eerror "EHCI , OHCI , USB Human Interface Device+HID input layer)" + eerror + eerror "Then recompile kernel." + die "Wacom statically built in kernel!" + fi +} + +pkg_setup() { + linux-mod_pkg_setup + wacom_check +} + +src_prepare() { + if [[ $(gcc-major-version) < 4 || $(gcc-minor-version) < 2 ]]; then + die "Versions of linuxwacom >= 0.7.9 require gcc >= 4.2 to compile." + fi + sed '/WCM_SRC_SUBDIRS=/s: wacomxi util xdrv::' -i configure.in || die + + kernel_is ge 2 6 36 && epatch "${FILESDIR}/linuxwacom-module-2.6.36.patch" + eautoreconf +} + +# TODO: Avoid build of hal (but actually upstream is working on separation of +# modules from linuxwacom so this is really low priority). +src_configure() { + unset ARCH + econf \ + --enable-wacom \ + --with-kernel=${KV_OUT_DIR} \ + --disable-dependency-tracking \ + --without-x \ + --disable-xserver64 \ + --without-xlib \ + --without-xorg-sdk \ + --without-tcl \ + --without-tk \ + $(printf -- "--disable-%s " libwacom{cfg,xi} {wac,xi}dump xsetwacom wacomxrrd) +} + +src_install() { + # Inelegant attempt to work around a nasty build system + cp src/*/wacom.{o,ko} src/ || die + linux-mod_src_install + + insinto /etc/udev/rules.d/ + doins src/util/60-wacom.rules || die + + exeinto /lib/udev/ + doexe "${FILESDIR}"/check_driver || die + doman "${FILESDIR}"/check_driver.1 + + dodoc AUTHORS ChangeLog +} + +pkg_postinst() { + linux-mod_pkg_postinst + ewarn "Please remove any HAL .FDI files you may" + ewarn "previously have installed for linuxwacom." +} diff --git a/sys-kernel/linuxwacom-module/metadata.xml b/sys-kernel/linuxwacom-module/metadata.xml new file mode 100644 index 000000000000..a0ccc42fdd37 --- /dev/null +++ b/sys-kernel/linuxwacom-module/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>pva@gentoo.org</email> + <name>Peter Volkov</name> +</maintainer> + <longdescription>kernel driver for wacom tablets</longdescription> + <use> + <flag name='modules'>Build kernel module</flag> + </use> +</pkgmetadata> |