Accepting request 99521 from home:tiwai
necessary by x11-input-mtrack OBS-URL: https://build.opensuse.org/request/show/99521 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/mtdev?expand=0&rev=1
This commit is contained in:
commit
599c672a75
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
48
0001-mtdev_close-should-ignore-NULL-devices.patch
Normal file
48
0001-mtdev_close-should-ignore-NULL-devices.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From 61684cf0466200631b6a44af1c662eb760ad3f5d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
Date: Tue, 19 Apr 2011 11:41:04 +0200
|
||||||
|
Subject: [PATCH 1/2] mtdev_close should ignore NULL devices.
|
||||||
|
|
||||||
|
Saves us one goto label in mtdev_init.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
||||||
|
---
|
||||||
|
src/core.c | 12 +++++++-----
|
||||||
|
1 files changed, 7 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core.c b/src/core.c
|
||||||
|
index 1f7c1fe..07bc828 100644
|
||||||
|
--- a/src/core.c
|
||||||
|
+++ b/src/core.c
|
||||||
|
@@ -365,11 +365,11 @@ int mtdev_open(struct mtdev *dev, int fd)
|
||||||
|
goto error;
|
||||||
|
ret = mtdev_configure(dev, fd);
|
||||||
|
if (ret)
|
||||||
|
- goto mtdev;
|
||||||
|
+ goto error;
|
||||||
|
return 0;
|
||||||
|
- mtdev:
|
||||||
|
- mtdev_close(dev);
|
||||||
|
+
|
||||||
|
error:
|
||||||
|
+ mtdev_close(dev);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -411,8 +411,10 @@ void mtdev_close_delete(struct mtdev *dev)
|
||||||
|
|
||||||
|
void mtdev_close(struct mtdev *dev)
|
||||||
|
{
|
||||||
|
- free(dev->state);
|
||||||
|
- memset(dev, 0, sizeof(struct mtdev));
|
||||||
|
+ if (dev) {
|
||||||
|
+ free(dev->state);
|
||||||
|
+ memset(dev, 0, sizeof(struct mtdev));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void mtdev_delete(struct mtdev *dev)
|
||||||
|
--
|
||||||
|
1.7.6
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 3aa3de4c19b80caaf93812fafff20acd5f5a4d12 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
Date: Tue, 19 Apr 2011 11:45:45 +0200
|
||||||
|
Subject: [PATCH 2/2] Return EINVAL for invalid parameters on mtdev_init.
|
||||||
|
|
||||||
|
[rydberg@euromail.se: minor cleanup]
|
||||||
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
||||||
|
---
|
||||||
|
src/core.c | 5 ++++-
|
||||||
|
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core.c b/src/core.c
|
||||||
|
index 07bc828..87ef420 100644
|
||||||
|
--- a/src/core.c
|
||||||
|
+++ b/src/core.c
|
||||||
|
@@ -359,7 +359,10 @@ int mtdev_init(struct mtdev *dev)
|
||||||
|
|
||||||
|
int mtdev_open(struct mtdev *dev, int fd)
|
||||||
|
{
|
||||||
|
- int ret;
|
||||||
|
+ int ret = -EINVAL;
|
||||||
|
+
|
||||||
|
+ if (!dev || fd < 0)
|
||||||
|
+ goto error;
|
||||||
|
ret = mtdev_init(dev);
|
||||||
|
if (ret)
|
||||||
|
goto error;
|
||||||
|
--
|
||||||
|
1.7.6
|
||||||
|
|
3
mtdev-1.1.0.tar.bz2
Normal file
3
mtdev-1.1.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4cdd9f72ea04536788ddf2ddef7279abb44b7b4a466e6bd01bdd975cf236aa50
|
||||||
|
size 246508
|
5
mtdev.changes
Normal file
5
mtdev.changes
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 11 15:52:10 CEST 2011 - tiwai@suse.de
|
||||||
|
|
||||||
|
- initial version: 1.1.0
|
||||||
|
|
87
mtdev.spec
Normal file
87
mtdev.spec
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#
|
||||||
|
# spec file for package mtdev
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: mtdev
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
Summary: Multitouch Protocol Translation Library
|
||||||
|
Version: 1.1.0
|
||||||
|
Release: 1
|
||||||
|
License: MIT License (or similar)
|
||||||
|
Group: System/Libraries
|
||||||
|
Source: http://bitmath.org/code/mtdev/mtdev-%{version}.tar.bz2
|
||||||
|
Patch1: 0001-mtdev_close-should-ignore-NULL-devices.patch
|
||||||
|
Patch2: 0002-Return-EINVAL-for-invalid-parameters-on-mtdev_init.patch
|
||||||
|
Url: http://bitmath.org/code/mtdev/
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
|
%description
|
||||||
|
The mtdev is a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol. The events put into mtdev may be from any MT device, specifically type A without contact tracking, type A with contact tracking, or type B with contact tracking. See the kernel documentation for further details.
|
||||||
|
|
||||||
|
%package -n libmtdev1
|
||||||
|
Summary: Multitouch Protocol Translation Library
|
||||||
|
License: MIT License (or similar)
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n libmtdev1
|
||||||
|
The mtdev is a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol. The events put into mtdev may be from any MT device, specifically type A without contact tracking, type A with contact tracking, or type B with contact tracking. See the kernel documentation for further details.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
License: MIT
|
||||||
|
Summary: Development package for mtdev library
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{name} = %{version} glibc-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the files needed to compile programs that use mtdev library.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --disable-static
|
||||||
|
%{__make}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%makeinstall
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||||
|
|
||||||
|
%post -n libmtdev1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libmtdev1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%doc COPYING ChangeLog README
|
||||||
|
%{_bindir}/*
|
||||||
|
|
||||||
|
%files -n libmtdev1
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{_libdir}/lib*.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{_libdir}/lib*.so
|
||||||
|
%{_includedir}/*
|
||||||
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user