summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-10-17 12:27:50 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-10-18 01:31:11 +0200
commit506d5f781f5ee93e3c9b8ca51a7fb65f40d4a8b8 (patch)
tree4e83627b58dc8824fbdb42243e1cc117f7bcbb2b /meta-oe/recipes-graphics
parent1ab4e30380da2444cfc66fe5283beb83168964a7 (diff)
downloadmeta-openembedded-506d5f781f5ee93e3c9b8ca51a7fb65f40d4a8b8.tar.gz
xf86-input-tslib: fix build with newer xserver
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch196
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb3
2 files changed, 198 insertions, 1 deletions
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch
new file mode 100644
index 000000000..6a6d5b92c
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch
@@ -0,0 +1,196 @@
1Upstream-Status: Pending
2
3Taken from debian:
4http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627075
5
6Index: xf86-input-tslib-trunk/src/tslib.c
7===================================================================
8--- xf86-input-tslib-trunk/src/tslib.c (revision 48)
9+++ xf86-input-tslib-trunk/src/tslib.c (working copy)
10@@ -69,6 +69,13 @@
11 #define DEFAULT_HEIGHT 240
12 #define DEFAULT_WIDTH 320
13
14+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
15+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL)
16+#else
17+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options))
18+#endif
19+
20+
21 enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 };
22
23 enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 };
24@@ -106,7 +113,7 @@
25 }
26
27 static Bool
28-ConvertProc( LocalDevicePtr local,
29+ConvertProc( InputInfoPtr local,
30 int first,
31 int num,
32 int v0,
33@@ -135,7 +142,7 @@
34 return t;
35 }
36
37-static void ReadInput (LocalDevicePtr local)
38+static void ReadInput (InputInfoPtr local)
39 {
40 struct ts_priv *priv = (struct ts_priv *) (local->private);
41 struct ts_sample samp;
42@@ -382,7 +389,11 @@
43 axiswidth - 1, /* max val */
44 axiswidth, /* resolution */
45 0, /* min_res */
46- axiswidth); /* max_res */
47+ axiswidth /* max_res */
48+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
49+ ,Absolute
50+#endif
51+ );
52
53 InitValuatorAxisStruct(device, 1,
54 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
55@@ -392,7 +403,11 @@
56 axisheight - 1, /* max val */
57 axisheight, /* resolution */
58 0, /* min_res */
59- axisheight); /* max_res */
60+ axisheight /* max_res */
61+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
62+ ,Absolute
63+#endif
64+ );
65
66 if (InitProximityClassDeviceStruct (device) == FALSE) {
67 ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
68@@ -434,7 +449,7 @@
69 ErrorF("%s\n", __FUNCTION__);
70 xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
71 ts_close(priv->ts);
72- xfree(pInfo->private);
73+ free(pInfo->private);
74 pInfo->private = NULL;
75 xf86DeleteInput(pInfo, 0);
76 }
77@@ -444,47 +459,57 @@
78 *
79 * called when the module subsection is found in XF86Config
80 */
81+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
82+static int
83+xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
84+#else
85 static InputInfoPtr
86 xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
87+#endif
88 {
89 struct ts_priv *priv;
90 char *s;
91+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
92 InputInfoPtr pInfo;
93+#endif
94
95- priv = xcalloc (1, sizeof (struct ts_priv));
96+ priv = calloc (1, sizeof (struct ts_priv));
97 if (!priv)
98- return NULL;
99+ return BadValue;
100
101+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
102 if (!(pInfo = xf86AllocateInput(drv, 0))) {
103- xfree(priv);
104- return NULL;
105+ free(priv);
106+ return BadValue;
107 }
108
109 /* Initialise the InputInfoRec. */
110 pInfo->name = dev->identifier;
111- pInfo->type_name = XI_TOUCHSCREEN;
112 pInfo->flags =
113 XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE |
114 XI86_SEND_DRAG_EVENTS;
115- pInfo->device_control = xf86TslibControlProc;
116- pInfo->read_input = ReadInput;
117 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
118 pInfo->motion_history_proc = xf86GetMotionEvents;
119 pInfo->history_size = 0;
120 #endif
121- pInfo->control_proc = NULL;
122+ pInfo->conf_idev = dev;
123 pInfo->close_proc = NULL;
124- pInfo->switch_mode = NULL;
125 pInfo->conversion_proc = ConvertProc;
126 pInfo->reverse_conversion_proc = NULL;
127- pInfo->dev = NULL;
128 pInfo->private_flags = 0;
129 pInfo->always_core_feedback = 0;
130- pInfo->conf_idev = dev;
131+#endif
132+
133+ pInfo->type_name = XI_TOUCHSCREEN;
134+ pInfo->control_proc = NULL;
135+ pInfo->read_input = ReadInput;
136+ pInfo->device_control = xf86TslibControlProc;
137+ pInfo->switch_mode = NULL;
138 pInfo->private = priv;
139+ pInfo->dev = NULL;
140
141 /* Collect the options, and process the common options. */
142- xf86CollectInputOptions(pInfo, NULL, NULL);
143+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
144 xf86ProcessCommonOptions(pInfo, pInfo->options);
145
146 priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 );
147@@ -510,23 +535,31 @@
148 priv->rotate = TSLIB_ROTATE_NONE;
149 }
150
151+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
152 s = xf86CheckStrOption(dev->commonOptions, "path", NULL);
153+#else
154+ s = xf86CheckStrOption(pInfo->options, "path", NULL);
155+#endif
156 if (!s)
157+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
158 s = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
159+#else
160+ s = xf86CheckStrOption(pInfo->options, "Device", NULL);
161+#endif
162
163 priv->ts = ts_open(s, 1);
164- xfree(s);
165+ free(s);
166
167 if (!priv->ts) {
168 ErrorF("ts_open failed (device=%s)\n",s);
169 xf86DeleteInput(pInfo, 0);
170- return NULL;
171+ return BadValue;
172 }
173
174 if (ts_config(priv->ts)) {
175 ErrorF("ts_config failed\n");
176 xf86DeleteInput(pInfo, 0);
177- return NULL;
178+ return BadValue;
179 }
180
181 pInfo->fd = ts_fd(priv->ts);
182@@ -536,11 +569,13 @@
183 priv->state = BUTTON_EMULATION_OFF;
184 }
185
186+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
187 /* Mark the device configured */
188 pInfo->flags |= XI86_CONFIGURED;
189+#endif
190
191 /* Return the configured device */
192- return (pInfo);
193+ return Success;
194 }
195
196 _X_EXPORT InputDriverRec TSLIB = {
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb
index 9ce509361..de0eb6f40 100644
--- a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb
@@ -8,13 +8,14 @@ RSUGGESTS_${PN} += "hal"
8LIC_FILES_CHKSUM = "file://src/tslib.c;endline=28;md5=bd62eaef222dcf5cd59e490a12bd795e \ 8LIC_FILES_CHKSUM = "file://src/tslib.c;endline=28;md5=bd62eaef222dcf5cd59e490a12bd795e \
9 file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94" 9 file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94"
10 10
11PR = "${INC_PR}.0" 11PR = "${INC_PR}.1"
12 12
13SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2;name=archive \ 13SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2;name=archive \
14 file://double-free-crash.patch \ 14 file://double-free-crash.patch \
15 file://10-x11-input-tslib.fdi \ 15 file://10-x11-input-tslib.fdi \
16 file://xserver-174-XGetPointerControl.patch \ 16 file://xserver-174-XGetPointerControl.patch \
17 file://99-xf86-input-tslib.rules \ 17 file://99-xf86-input-tslib.rules \
18 file://xf86-input-tslib-port-ABI-12-r48.patch \
18" 19"
19SRC_URI[md5sum] = "b7a4d2f11637ee3fcf432e044b1d017f" 20SRC_URI[md5sum] = "b7a4d2f11637ee3fcf432e044b1d017f"
20SRC_URI[sha256sum] = "5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105" 21SRC_URI[sha256sum] = "5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105"