summaryrefslogtreecommitdiff
blob: 6045ca80c00fc16c9cf9e748d3267a0a90758e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit x-modular autotools

DESCRIPTION="Input driver for Linux event touchscreens"
HOMEPAGE="http://www.conan.de/touchscreen/evtouch.html"
SRC_URI="http://www.conan.de/touchscreen/${P}.tar.bz2"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~arm ~x86"

RDEPEND="<x11-base/xorg-server-1.4"
DEPEND="${RDEPEND}
		|| ( >=sys-kernel/linux-headers-2.6 >=sys-kernel/mips-headers-2.6 )
        x11-proto/inputproto
        x11-proto/randrproto
        x11-proto/xproto"

# necessary to prevent x-modular.eclass' version from running
src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}"/${PN}-evcalibrate-path.patch

	eautoreconf
}

src_compile() {
	econf --enable-evcalibrate \
		--enable-udevinstall || die "configure failed"
	emake || die "emake failed"
}

src_install() {
	x-modular_src_install
	dodoc README README.calibration TODO
}

pkg_postinst() {
	einfo
	elog "To enable this driver, add the following to xorg.conf:"
	elog "Section \"InputDevice\""
	elog "    Identifier \"touchscreen\""
	elog "    Driver \"evtouch\""
	elog "    Option \"Device\" \"/dev/input/evtouch_event\""
	elog "    Option \"DeviceName\" \"touchscreen\""
	elog "    Option \"ReportingMode\" \"Raw\""
	elog "    Option \"Emulate3Buttons\""
	elog "    Option \"Emulate3Timeout\" \"50\""
	elog "    Option \"SendCoreEvents\" \"On\""
	elog "    Option \"Calibrate\" \"1\""
	elog "EndSection"
	elog
	elog "Then with X not running run: "
	elog "$ calibrate.sh"
	elog
	elog "Once you complete the calibration, you'll have: out.txt"
	elog "Merge the lines found in there into the InputDevice"
	elog "section you created earlier and remove the Calibrate"
	elog "line. Your touch screen should work now."
	elog
	elog "More info, read README.calibrate and check out:"
	elog "${HOMEPAGE}"
}