[libhid] Fix FTBFS (rhbz#716191)
Hans de Goede
jwrdegoede at fedoraproject.org
Fri Aug 3 13:59:22 UTC 2012
commit 1584db91be1044a7800288e263760ce603fe9790
Author: Hans de Goede <hdegoede at redhat.com>
Date: Fri Aug 3 16:04:24 2012 +0200
Fix FTBFS (rhbz#716191)
libhid-0.2.17-buildfix.patch | 37 +++++++++++++++++++++++++++++++++++++
libhid.spec | 18 ++++++++----------
2 files changed, 45 insertions(+), 10 deletions(-)
---
diff --git a/libhid-0.2.17-buildfix.patch b/libhid-0.2.17-buildfix.patch
new file mode 100644
index 0000000..e3fe243
--- /dev/null
+++ b/libhid-0.2.17-buildfix.patch
@@ -0,0 +1,37 @@
+diff -up libhid-0.2.17/test/lshid.c~ libhid-0.2.17/test/lshid.c
+--- libhid-0.2.17/test/lshid.c~ 2010-02-17 12:53:00.000000000 +0100
++++ libhid-0.2.17/test/lshid.c 2012-08-01 20:00:46.137677766 +0200
+@@ -29,7 +29,7 @@ char *hid_id[32]; /* FIXME: 32 devices M
+
+ struct usb_dev_handle;
+
+-bool device_iterator (struct usb_dev_handle const* usbdev, void* custom, unsigned int len)
++bool device_iterator (struct usb_dev_handle const* usbdev, void* custom, unsigned int len __attribute__((__unused__)))
+ {
+ bool ret = false;
+ int i;
+diff -up libhid-0.2.17/swig/Makefile~ libhid-0.2.17/swig/Makefile
+--- libhid-0.2.17/swig/Makefile.in~ 2012-08-02 07:42:24.000000000 +0200
++++ libhid-0.2.17/swig/Makefile.in 2012-08-02 07:50:37.165242900 +0200
+@@ -411,10 +411,6 @@ install-nodist_pkgpythonPYTHON: $(nodist
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \
+ done || exit $$?; \
+- if test -n "$$dlist"; then \
+- $(am__py_compile) --destdir "$(DESTDIR)" \
+- --basedir "$(pkgpythondir)" $$dlist; \
+- else :; fi
+
+ uninstall-nodist_pkgpythonPYTHON:
+ @$(NORMAL_UNINSTALL)
+@@ -446,10 +442,6 @@ install-pkgpythonPYTHON: $(pkgpython_PYT
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \
+ done || exit $$?; \
+- if test -n "$$dlist"; then \
+- $(am__py_compile) --destdir "$(DESTDIR)" \
+- --basedir "$(pkgpythondir)" $$dlist; \
+- else :; fi
+
+ uninstall-pkgpythonPYTHON:
+ @$(NORMAL_UNINSTALL)
diff --git a/libhid.spec b/libhid.spec
index c746d7c..552e8ac 100644
--- a/libhid.spec
+++ b/libhid.spec
@@ -5,7 +5,7 @@
Name: libhid
Version: 0.2.17
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: User space USB HID access library
Group: System Environment/Libraries
License: GPLv2
@@ -20,8 +20,8 @@ Source0: %{name}-%{version}.tar.gz
Patch0: libhid-0.2.17-fix_manpage.patch
# Stop the configure script to mess the flags
Patch1: libhid-0.2.17-fix_compiler_flags.patch
-
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+# Fix FTBFS rhbz#716191
+Patch2: libhid-0.2.17-buildfix.patch
BuildRequires: libusb1-devel, libtool, pkgconfig, swig, python-devel, docbook2X, docbook-style-xsl
ExcludeArch: s390 s390x
@@ -65,6 +65,8 @@ sed -i 's|AC_PROG_SWIG(1.3)|AC_PROG_SWIG(2.0)|' configure.ac
%endif
autoreconf -i
%patch1 -p1 -b .fix_compiler_flags
+%patch2 -p1
+
%build
# Fix swig and disable doxygen for now
@@ -74,19 +76,14 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{python_sitearch}/*/*.la
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
# Excluded INSTALL and COPYING as they are symlinks to nothing
%doc README.licence
%{_libdir}/*.so.*
@@ -94,14 +91,12 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/*
%files devel
-%defattr(-,root,root,-)
%doc AUTHORS README ChangeLog
%{_libdir}/pkgconfig/libhid.pc
%{_includedir}/*
%{_libdir}/*.so
%files python
-%defattr(-,root,root,-)
%doc swig/README
%{python_sitelib}/*
# Ensure libraries are installed for multilib architectures
@@ -110,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Thu Aug 2 2012 Hans de Goede <hdegoede at redhat.com> - 0.2.17-11
+- Fix FTBFS (rhbz#716191)
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.17-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list