[libhid] Fix FTBFS (rhbz#1094307)

Hans de Goede jwrdegoede at fedoraproject.org
Mon May 5 14:07:52 UTC 2014


commit 1a29df7fb2eb4b5f46f8b6cad9f00522391e7775
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon May 5 16:08:12 2014 +0200

    Fix FTBFS (rhbz#1094307)

 libhid-0.2.17-fix_python.patch |    9 +++++++++
 libhid.spec                    |   11 ++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/libhid-0.2.17-fix_python.patch b/libhid-0.2.17-fix_python.patch
index e0e010a..d7d4420 100644
--- a/libhid-0.2.17-fix_python.patch
+++ b/libhid-0.2.17-fix_python.patch
@@ -1,6 +1,15 @@
 diff -up libhid-0.2.17/swig/Makefile.am.orig libhid-0.2.17/swig/Makefile.am
 --- libhid-0.2.17/swig/Makefile.am.orig	2013-01-20 23:18:01.309944623 -0600
 +++ libhid-0.2.17/swig/Makefile.am	2013-01-20 23:18:18.407037572 -0600
+@@ -9,7 +9,7 @@ SWIG_INC = -I$(top_srcdir)/include
+ 
+ # swig produces crap code :)
+ ### Remove "-Werror" from CFLAGS for the wrapper:
+-override CFLAGS := $(subst -Werror,,$(CFLAGS))
++override CFLAGS := $(echo $(CFLAGS) | sed -r 's/-Werror\s|-Werror$//g')
+ 
+ dist_noinst_DATA = hid.i
+ 
 @@ -19,8 +19,8 @@ nodist__hid_la_SOURCES = hid_wrap.c
  _hid_la_LIBADD = ../src/libhid.la
  _hid_la_LDFLAGS = -module $(PYTHON_LDFLAGS)
diff --git a/libhid.spec b/libhid.spec
index bbdddd4..bcf4960 100644
--- a/libhid.spec
+++ b/libhid.spec
@@ -5,7 +5,7 @@
 
 Name:		libhid
 Version:	0.2.17
-Release:	14%{?dist}
+Release:	15%{?dist}
 Summary:	User space USB HID access library
 Group:		System Environment/Libraries
 License:	GPLv2
@@ -62,10 +62,8 @@ access to USB HID devices.
 %setup -q
 %patch0 -p1 -b .fix_manpage
 %patch3 -p1 -b .fix_python
-%if 0%{?fedora} > 13
-# Allow build against swig-2.0
-sed -i 's|AC_PROG_SWIG(1.3)|AC_PROG_SWIG(2.0)|' configure.ac
-%endif
+# Allow build against swig-3.0
+sed -i 's|AC_PROG_SWIG(1.3)|AC_PROG_SWIG(3.0)|' configure.ac
 autoreconf -i
 %patch1 -p1 -b .fix_compiler_flags
 %patch2 -p1
@@ -104,6 +102,9 @@ rm -rf $RPM_BUILD_ROOT%{python_sitearch}/*/*.la
 %{python_sitearch}/*
 
 %changelog
+* Mon May  5 2014 Hans de Goede <hdegoede at redhat.com> - 0.2.17-15
+- Fix FTBFS (rhbz#1094307)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.17-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list