xorg-server 1.12 mass rebuild [release 0.0.6-4mamba;Tue Mar 05 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 19:47:40 +01:00
parent bba00bf124
commit 6f4bd4ae66
3 changed files with 254 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# xorg-drv-input-tslib # xorg-drv-input-tslib
X.org input driver for use of tslib based touchscreen devices.

View File

@ -0,0 +1,194 @@
Index: xf86-input-tslib-trunk/src/tslib.c
===================================================================
--- xf86-input-tslib-trunk/src/tslib.c (revision 48)
+++ xf86-input-tslib-trunk/src/tslib.c (working copy)
@@ -69,6 +69,13 @@
#define DEFAULT_HEIGHT 240
#define DEFAULT_WIDTH 320
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL)
+#else
+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options))
+#endif
+
+
enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 };
enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 };
@@ -106,7 +113,7 @@
}
static Bool
-ConvertProc( LocalDevicePtr local,
+ConvertProc( InputInfoPtr local,
int first,
int num,
int v0,
@@ -135,7 +142,7 @@
return t;
}
-static void ReadInput (LocalDevicePtr local)
+static void ReadInput (InputInfoPtr local)
{
struct ts_priv *priv = (struct ts_priv *) (local->private);
struct ts_sample samp;
@@ -382,7 +389,11 @@
axiswidth - 1, /* max val */
axiswidth, /* resolution */
0, /* min_res */
- axiswidth); /* max_res */
+ axiswidth /* max_res */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ ,Absolute
+#endif
+ );
InitValuatorAxisStruct(device, 1,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
@@ -392,7 +403,11 @@
axisheight - 1, /* max val */
axisheight, /* resolution */
0, /* min_res */
- axisheight); /* max_res */
+ axisheight /* max_res */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ ,Absolute
+#endif
+ );
if (InitProximityClassDeviceStruct (device) == FALSE) {
ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
@@ -434,6 +449,7 @@
ErrorF("%s\n", __FUNCTION__);
xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
ts_close(priv->ts);
- xfree(pInfo->private);
+ free(pInfo->private);
+ pInfo->private = NULL;
xf86DeleteInput(pInfo, 0);
}
@@ -444,47 +459,57 @@
*
* called when the module subsection is found in XF86Config
*/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+static int
+xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+#else
static InputInfoPtr
xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
+#endif
{
struct ts_priv *priv;
char *s;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
InputInfoPtr pInfo;
+#endif
- priv = xcalloc (1, sizeof (struct ts_priv));
+ priv = calloc (1, sizeof (struct ts_priv));
if (!priv)
- return NULL;
+ return BadValue;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
if (!(pInfo = xf86AllocateInput(drv, 0))) {
- xfree(priv);
- return NULL;
+ free(priv);
+ return BadValue;
}
/* Initialise the InputInfoRec. */
pInfo->name = dev->identifier;
- pInfo->type_name = XI_TOUCHSCREEN;
pInfo->flags =
XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE |
XI86_SEND_DRAG_EVENTS;
- pInfo->device_control = xf86TslibControlProc;
- pInfo->read_input = ReadInput;
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
pInfo->motion_history_proc = xf86GetMotionEvents;
pInfo->history_size = 0;
#endif
- pInfo->control_proc = NULL;
+ pInfo->conf_idev = dev;
pInfo->close_proc = NULL;
- pInfo->switch_mode = NULL;
pInfo->conversion_proc = ConvertProc;
pInfo->reverse_conversion_proc = NULL;
- pInfo->dev = NULL;
pInfo->private_flags = 0;
pInfo->always_core_feedback = 0;
- pInfo->conf_idev = dev;
+#endif
+
+ pInfo->type_name = XI_TOUCHSCREEN;
+ pInfo->control_proc = NULL;
+ pInfo->read_input = ReadInput;
+ pInfo->device_control = xf86TslibControlProc;
+ pInfo->switch_mode = NULL;
pInfo->private = priv;
+ pInfo->dev = NULL;
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 );
@@ -536,11 +569,13 @@
priv->state = BUTTON_EMULATION_OFF;
}
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
/* Mark the device configured */
pInfo->flags |= XI86_CONFIGURED;
+#endif
/* Return the configured device */
- return (pInfo);
+ return Success;
}
_X_EXPORT InputDriverRec TSLIB = {
--- xf86-input-tslib-trunk/src/tslib.c (revision 48)
+++ xf86-input-tslib-trunk/src/tslib.c (working copy)
@@ -535,23 +535,32 @@
priv->rotate = TSLIB_ROTATE_NONE;
}
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
s = xf86CheckStrOption(dev->commonOptions, "path", NULL);
+#else
+ s = xf86CheckStrOption(pInfo->options, "path", NULL);
+#endif
+
if (!s)
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
s = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
+#else
+ s = xf86CheckStrOption(pInfo->options, "Device", NULL);
+#endif
priv->ts = ts_open(s, 1);
- xfree(s);
+ free(s);
if (!priv->ts) {
ErrorF("ts_open failed (device=%s)\n",s);
xf86DeleteInput(pInfo, 0);
- return NULL;
+ return BadValue;
}
if (ts_config(priv->ts)) {
ErrorF("ts_config failed\n");
xf86DeleteInput(pInfo, 0);
- return NULL;
+ return BadValue;
}
pInfo->fd = ts_fd(priv->ts);

58
xorg-drv-input-tslib.spec Normal file
View File

@ -0,0 +1,58 @@
Name: xorg-drv-input-tslib
Version: 0.0.6
Release: 4mamba
Summary: X.org input driver for use of tslib based touchscreen devices
Group: System/X11
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.pengutronix.de/software/xf86-input-tslib/index_en.html
Source: http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-%{version}.tar.bz2
Patch0: %{name}-0.0.6-xorg-server-1.10.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libts-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libts-devel
BuildRequires: xorg-server-devel
BuildRequires: xorg-proto-devel
%description
X.org input driver for use of tslib based touchscreen devices.
%prep
%setup -q -n xf86-input-tslib-%{version}
%patch0 -p1
%build
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_libdir}/xorg/modules/input/tslib_drv.la
%{_libdir}/xorg/modules/input/tslib_drv.so
%{_mandir}/man4/tslib.4*
%doc COPYING ChangeLog
%changelog
* Tue Mar 05 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.0.6-4mamba
- xorg-server 1.12 mass rebuild
* Mon Aug 15 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.0.6-3mamba
- rebuilt with xorg 1.10 (added patch)
* Sun Jan 30 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.0.6-2mamba
- rebuilt with libts 1.0.0.git20110130
* Tue Jan 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.0.6-1mamba
- package created by autospec