[packages/hidapi] - added sh patch (remove bashisms from configure), completed dependencies
qboosh
qboosh at pld-linux.org
Sun May 20 18:13:09 CEST 2018
commit 98a878eb87700309cc1fdaf85489630292856814
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 20 18:13:59 2018 +0200
- added sh patch (remove bashisms from configure), completed dependencies
hidapi-sh.patch | 37 +++++++++++++++++++++++++++++++++++++
hidapi.spec | 25 ++++++++++++++++++-------
2 files changed, 55 insertions(+), 7 deletions(-)
---
diff --git a/hidapi.spec b/hidapi.spec
index 4268095..6e5987d 100644
--- a/hidapi.spec
+++ b/hidapi.spec
@@ -14,11 +14,18 @@ License: GPL v3 or BSD or HIDAPI
Group: Libraries
Source0: https://github.com/signal11/hidapi/archive/%{commit}/%{name}-%{version}.tar.gz
# Source0-md5: dfbec50a01bf8c45cce003293648013e
-URL: https://github.com/signal11/hidapi/
+Patch0: %{name}-sh.patch
+URL: http://www.signal11.us/oss/hidapi/
+BuildRequires: autoconf >= 2.63
+BuildRequires: automake
%{?with_apidocs:BuildRequires: doxygen}
-BuildRequires: libtool
-BuildRequires: libusb-devel >= 1.0
+BuildRequires: libtool >= 2:2
+BuildRequires: libusb-devel >= 1.0.9
+# HIDRAW interface
+BuildRequires: linux-libc-headers >= 7:2.6.39
BuildRequires: pkgconfig
+BuildRequires: udev-devel
+Requires: libusb >= 1.0.9
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -36,7 +43,7 @@ Summary: Header file for HIDAPI library
Summary(pl.UTF-8): Plik nagłówkowy biblioteki HIDAPI
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: libusb-devel >= 1.0
+Requires: libusb-devel >= 1.0.9
%description devel
Header file for HIDAPI library.
@@ -72,14 +79,15 @@ Dokumentacja API biblioteki HIDAPI.
%prep
%setup -q -n %{name}-%{commit}
+%patch0 -p1
-cp linux/README.txt README-linux.txt
+cp -p linux/README.txt README-linux.txt
%build
-%{__aclocal}
+%{__libtoolize}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
-%{__libtoolize}
%{__automake}
%configure \
--disable-silent-rules
@@ -97,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/hidapi
+
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/hidapi-sh.patch b/hidapi-sh.patch
new file mode 100644
index 0000000..c8e1b9c
--- /dev/null
+++ b/hidapi-sh.patch
@@ -0,0 +1,37 @@
+--- hidapi-a6a622ffb680c55da0de787ff93b80280498330f/configure.ac.orig 2016-09-20 05:40:12.000000000 +0200
++++ hidapi-a6a622ffb680c55da0de787ff93b80280498330f/configure.ac 2018-05-20 17:24:50.587037139 +0200
+@@ -63,14 +63,14 @@
+
+ # HIDAPI/hidraw libs
+ PKG_CHECK_MODULES([libudev], [libudev], true, [hidapi_lib_error libudev])
+- LIBS_HIDRAW_PR+=" $libudev_LIBS"
+- CFLAGS_HIDRAW+=" $libudev_CFLAGS"
++ LIBS_HIDRAW_PR="$LIBS_HIDRAW_PR $libudev_LIBS"
++ CFLAGS_HIDRAW="$CFLAGS_HIDRAW $libudev_CFLAGS"
+
+ # HIDAPI/libusb libs
+- AC_CHECK_LIB([rt], [clock_gettime], [LIBS_LIBUSB_PRIVATE+=" -lrt"], [hidapi_lib_error librt])
++ AC_CHECK_LIB([rt], [clock_gettime], [LIBS_LIBUSB_PRIVATE="$LIBS_LIBUSB_PRIVATE -lrt"], [hidapi_lib_error librt])
+ PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9], true, [hidapi_lib_error libusb-1.0])
+- LIBS_LIBUSB_PRIVATE+=" $libusb_LIBS"
+- CFLAGS_LIBUSB+=" $libusb_CFLAGS"
++ LIBS_LIBUSB_PRIVATE="$LIBS_LIBUSB_PRIVATE $libusb_LIBS"
++ CFLAGS_LIBUSB="$CFLAGS_LIBUSB $libusb_CFLAGS"
+ ;;
+ *-darwin*)
+ AC_MSG_RESULT([ (Mac OS X back-end)])
+@@ -180,10 +180,10 @@
+ if test "x$foxconfig" = "xfalse"; then
+ hidapi_prog_error fox-config "FOX Toolkit"
+ fi
+- LIBS_TESTGUI+=`$foxconfig --libs`
+- LIBS_TESTGUI+=" -framework Cocoa -L/usr/X11R6/lib"
+- CFLAGS_TESTGUI+=`$foxconfig --cflags`
+- OBJCFLAGS+=" -x objective-c++"
++ LIBS_TESTGUI="$LIBS_TESTGUI`$foxconfig --libs`"
++ LIBS_TESTGUI="$LIBS_TESTGUI -framework Cocoa -L/usr/X11R6/lib"
++ CFLAGS_TESTGUI="$CFLAGS_TESTGUI`$foxconfig --cflags`"
++ OBJCFLAGS="$OBJCFLAGS -x objective-c++"
+ elif test "x$os" = xwindows; then
+ # On Windows, just set the paths for Fox toolkit
+ if test "x$win_implementation" = xmingw; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hidapi.git/commitdiff/98a878eb87700309cc1fdaf85489630292856814
More information about the pld-cvs-commit
mailing list