From f35e0a081e032244c74515a4757637d525dc3176 Mon Sep 17 00:00:00 2001 From: Robert Buchholz Date: Fri, 8 Feb 2008 21:49:01 +0000 Subject: Install "check_driver" to support multiple input devices via udev (bug 209263). Enable compilation for +files/check_driver, + +files/check_driver.1, +linuxwacom-0.7.8_p3-r1.ebuild: + Install "check_driver" to support multiple input devices via udev (bug 209263). + Enable compilation for linuxwacom-0.7.8_p3.ebuild: Stable on ppc64 diff --git a/x11-drivers/linuxwacom/files/check_driver b/x11-drivers/linuxwacom/files/check_driver new file mode 100644 index 000000000000..6e49aa1f1691 --- /dev/null +++ b/x11-drivers/linuxwacom/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/x11-drivers/linuxwacom/files/check_driver.1 b/x11-drivers/linuxwacom/files/check_driver.1 new file mode 100644 index 000000000000..cf3a5f9e43e2 --- /dev/null +++ b/x11-drivers/linuxwacom/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 . Created for the Debian GNU/Linux +distribution. It may be freely distributed elsewhere. + + diff --git a/x11-drivers/linuxwacom/linuxwacom-0.7.8_p3-r1.ebuild b/x11-drivers/linuxwacom/linuxwacom-0.7.8_p3-r1.ebuild new file mode 100644 index 000000000000..2382a3c5e420 --- /dev/null +++ b/x11-drivers/linuxwacom/linuxwacom-0.7.8_p3-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/linuxwacom/linuxwacom-0.7.8_p3-r1.ebuild,v 1.1 2008/02/08 21:49:01 rbu Exp $ + +inherit eutils autotools toolchain-funcs + +DESCRIPTION="Input driver for Wacom tablets and drawing devices" +HOMEPAGE="http://linuxwacom.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P/_p/-}.tar.bz2" + +IUSE="gtk tcl tk usb" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND="|| ( ( x11-proto/inputproto + x11-base/xorg-server ) + virtual/x11 ) + media-libs/libpixman + gtk? ( >=x11-libs/gtk+-2 ) + tcl? ( dev-lang/tcl ) + tk? ( dev-lang/tk ) + sys-fs/udev + sys-libs/ncurses" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + usb? ( >=sys-kernel/linux-headers-2.6 )" +S=${WORKDIR}/${P/_p/-} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix multilib-strict error for Tcl/Tk library install + sed -i -e "s:WCM_EXECDIR/lib:WCM_EXECDIR/$(get_libdir):" configure.in + + # Remove warning parameters for gcc < 4, bug 205139 + if [[ $(gcc-major-version) -lt 4 ]]; then + sed -i -e "s:-Wno-variadic-macros::" src/xdrv/Makefile.am + fi + + epatch "${FILESDIR}"/${P%_p*}-pDev.patch + + eautoreconf +} + +src_compile() { + if use gtk; then + myconf="--with-gtk=2.0" + else + myconf="--with-gtk=no" + fi + + econf ${myconf} \ + $(use_with tcl tcl) \ + $(use_with tk tk) \ + --enable-wacomdrv --enable-wacdump \ + --enable-xsetwacom --enable-dlloader || die "econf failed" + + unset ARCH + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed." + + insinto /etc/udev/rules.d/ + newins "${FILESDIR}"/xserver-xorg-input-wacom.udev 60-wacom.rules + + exeinto /lib/udev/ + doexe "${FILESDIR}"/check_driver + doman "${FILESDIR}"/check_driver.1 + + dohtml -r docs/* + dodoc AUTHORS ChangeLog NEWS README +} -- cgit v1.2.3-65-gdbad