Accepting request 104199 from home:jengelh:branches:X11:XOrg

- Remove redundant tags/sections from specfile
- Add patch to fix use of implicitly-defined functions

OBS-URL: https://build.opensuse.org/request/show/104199
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/mtdev?expand=0&rev=6
This commit is contained in:
Stefan Dirsch 2012-02-13 10:05:55 +00:00 committed by Git OBS Bridge
parent c75e46d16c
commit b69a458687
3 changed files with 57 additions and 9 deletions

45
mtdev-implicit.diff Normal file
View File

@ -0,0 +1,45 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2012-02-12 19:46:35.478843702 +0100
build: resolve compiler warnings due to use of impl.-decl. fns
match_four.c: In function 'set_dist':
match_four.c:79:4: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
mtdev-kernel.c: In function 'main':
mtdev-kernel.c:130:2: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
---
src/match_four.c | 1 +
test/mtdev-kernel.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
Index: mtdev-1.1.0/src/match_four.c
===================================================================
--- mtdev-1.1.0.orig/src/match_four.c
+++ mtdev-1.1.0/src/match_four.c
@@ -1,3 +1,4 @@
+#include <math.h>
#include "match.h"
#include <limits.h>
Index: mtdev-1.1.0/test/mtdev-kernel.c
===================================================================
--- mtdev-1.1.0.orig/test/mtdev-kernel.c
+++ mtdev-1.1.0/test/mtdev-kernel.c
@@ -26,6 +26,7 @@
*
****************************************************************************/
+#include <stdlib.h>
#include <../src/common.h>
#include <stdio.h>
#include <time.h>
@@ -127,7 +128,7 @@ int main(int argc, char *argv[])
return 1;
}
- eslot = atoi(argv[1]) + 1;
+ eslot = strtol(argv[1], NULL, 0) + 1;
if (eslot > SLOT_CNT) {
fprintf(stderr, "allowed slot range: 2 - %d\n", SLOT_MAX);
return 1;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Feb 12 18:48:05 UTC 2012 - jengelh@medozas.de
- Remove redundant tags/sections from specfile
- Add patch to fix use of implicitly-defined functions
-------------------------------------------------------------------
Fri Jan 13 15:17:11 UTC 2012 - sndirsch@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package mtdev
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 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
@ -19,13 +19,14 @@
Name: mtdev
BuildRequires: pkgconfig
Summary: Multitouch Protocol Translation Library
Version: 1.1.0
Release: 1
License: MIT
Group: System/Libraries
Version: 1.1.0
Release: 0
Source: http://bitmath.org/code/mtdev/mtdev-%{version}.tar.bz2
Patch1: U_mtdev_close-should-ignore-NULL-devices.patch
Patch2: U_Return-EINVAL-for-invalid-parameters-on-mtdev_init.patch
Patch3: mtdev-implicit.diff
Url: http://bitmath.org/code/mtdev/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -34,14 +35,12 @@ The mtdev is a stand-alone library which transforms all variants of kernel MT ev
%package -n libmtdev1
Summary: Multitouch Protocol Translation Library
License: MIT
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: libmtdev1 = %{version} glibc-devel
@ -53,10 +52,11 @@ This package contains the files needed to compile programs that use mtdev librar
%setup -q
%patch1 -p1
%patch2 -p1
%patch -P 3 -p1
%build
%configure --disable-static
%{__make}
make %{?_smp_mflags}
%install
%makeinstall
@ -66,9 +66,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%postun -n libmtdev1 -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc COPYING ChangeLog README