summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild')
-rw-r--r--sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild104
1 files changed, 104 insertions, 0 deletions
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 0000000..092d27f
--- /dev/null
+++ b/sys-kernel/linuxwacom-module/linuxwacom-module-0.8.8_p10.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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() {
+ ebegin "Checking for wacom module"
+ linux_chkconfig_module TABLET_USB_WACOM
+ eend $?
+
+ if [[ $? -ne 0 ]] || ! [ -f "/lib/modules/${KV}/kernel/drivers/input/tablet/wacom.ko" ]; then
+ eerror "You need to have your kernel compiled with wacom as a module"
+ eerror "to let linuxwacom overwrite it."
+ eerror "Enable it in the kernel, found at:"
+ eerror
+ eerror " Device Drivers"
+ eerror " Input device support"
+ eerror " Tablets"
+ eerror " <M> 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. Otherwise, remove the module USE flag."
+ die "Wacom not compiled in kernel as a module!"
+ 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() {
+ ewarn "Please remove any HAL .FDI files you may"
+ ewarn "previously have installed for linuxwacom."
+}