From b69a458687625783519365821596fe1f37787830d5c3b03a8e0af4023b083590 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 13 Feb 2012 10:05:55 +0000 Subject: [PATCH] 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 --- mtdev-implicit.diff | 45 +++++++++++++++++++++++++++++++++++++++++++++ mtdev.changes | 6 ++++++ mtdev.spec | 15 ++++++--------- 3 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 mtdev-implicit.diff diff --git a/mtdev-implicit.diff b/mtdev-implicit.diff new file mode 100644 index 0000000..88c8b8e --- /dev/null +++ b/mtdev-implicit.diff @@ -0,0 +1,45 @@ +From: Jan Engelhardt +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 + #include "match.h" + #include + +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 + #include <../src/common.h> + #include + #include +@@ -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; diff --git a/mtdev.changes b/mtdev.changes index dd9c210..c506810 100644 --- a/mtdev.changes +++ b/mtdev.changes @@ -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 diff --git a/mtdev.spec b/mtdev.spec index ede363f..2dfaf04 100644 --- a/mtdev.spec +++ b/mtdev.spec @@ -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