[lirc: 6/6] Really fix libusb-based driver support this time

Jarod Wilson jwilson at fedoraproject.org
Tue Jun 7 04:19:46 UTC 2011


commit dda9eb6207c6510b3d048a7caf6f94789622a004
Author: Jarod Wilson <jarod at redhat.com>
Date:   Tue Jun 7 00:18:50 2011 -0400

    Really fix libusb-based driver support this time
    
    Signed-off-by: Jarod Wilson <jarod at redhat.com>

 lirc-0.9.0-libusb-config-is-no-more.patch |   95 +++++++++++++++++++++++++++++
 lirc.spec                                 |    9 +++-
 2 files changed, 103 insertions(+), 1 deletions(-)
---
diff --git a/lirc-0.9.0-libusb-config-is-no-more.patch b/lirc-0.9.0-libusb-config-is-no-more.patch
new file mode 100644
index 0000000..28b1e01
--- /dev/null
+++ b/lirc-0.9.0-libusb-config-is-no-more.patch
@@ -0,0 +1,95 @@
+diff --git a/configure.ac b/configure.ac
+index 6c07e0d..1a3347e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,11 +20,11 @@ AC_PROG_MAKE_SET
+ AC_PATH_PROG(mknod, mknod, /bin/mknod)
+ AC_PATH_PROG(mkfifo, mkfifo, /usr/bin/mkfifo)
+ AC_PATH_PROG(depmod, depmod, /sbin/depmod, $PATH:/sbin)
+-AC_PATH_PROG(LIBUSB_CONFIG, libusb-config)
+ AC_PROG_LN_S
+ AC_PROG_LIBTOOL
+ AM_PATH_PYTHON(,, [:])
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""])
++LIBUSB_CONFIG="pkg-config libusb"
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+@@ -310,15 +310,14 @@ AH_TEMPLATE([SYSCONFDIR],
+ AH_TEMPLATE([USE_SYSLOG],
+ 	[define if you want to log to syslog instead of logfile])
+ 
+-if test -n "${LIBUSB_CONFIG}"; then
+-  AC_DEFINE(HAVE_LIBUSB)
+-  possible_drivers="${possible_drivers} (atilibusb) (awlibusb) (dfclibusb) (commandir) (srm7500libusb)" 
+-fi
+-
+ AC_CHECK_LIB(caraca_client, caraca_init,
+   AC_DEFINE(HAVE_LIBCARACA)
+   possible_drivers="${possible_drivers} (caraca)"
+ )
++AC_CHECK_HEADER(usb.h,
++  AC_DEFINE(HAVE_LIBUSB)
++  possible_drivers="${possible_drivers} (atilibusb) (awlibusb) (dfclibusb) (commandir) (srm7500libusb)" 
++)
+ AC_CHECK_HEADER(ftdi.h,
+   AC_DEFINE(HAVE_FTDI)
+   possible_drivers="${possible_drivers} (ftdi)"
+@@ -1449,7 +1448,7 @@ Get it at:
+ Or install these packages from your distro:
+ 
+    libusb
+-   libusb-dev
++   libusb-devel
+ 
+ ])
+     ;;
+--- lirc-0.9.0/configure.orig	2011-06-07 00:08:14.850212313 -0400
++++ lirc-0.9.0/configure	2011-06-07 00:11:07.140109458 -0400
+@@ -865,7 +865,6 @@ build_cpu
+ build
+ LIBTOOL
+ LN_S
+-LIBUSB_CONFIG
+ depmod
+ mkfifo
+ mknod
+@@ -4160,37 +4159,7 @@ $as_echo "no" >&6; }
+ fi
+ 
+ 
+-# Extract the first word of "libusb-config", so it can be a program name with args.
+-set dummy libusb-config; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_LIBUSB_CONFIG+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $LIBUSB_CONFIG in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_LIBUSB_CONFIG="$LIBUSB_CONFIG" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_LIBUSB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-LIBUSB_CONFIG=$ac_cv_path_LIBUSB_CONFIG
++LIBUSB_CONFIG="pkg-config libusb"
+ if test -n "$LIBUSB_CONFIG"; then
+   { $as_echo "$as_me:$LINENO: result: $LIBUSB_CONFIG" >&5
+ $as_echo "$LIBUSB_CONFIG" >&6; }
diff --git a/lirc.spec b/lirc.spec
index bc3170e..16a0b93 100644
--- a/lirc.spec
+++ b/lirc.spec
@@ -24,7 +24,7 @@
 Name:           lirc
 Version:        0.9.0
 %if 0%{?released}
-Release:        5%{?dist}
+Release:        6%{?dist}
 %else
 Release:        0.1.%{pre}%{?dist}
 %endif
@@ -40,6 +40,7 @@ Source0:        http://www.lirc.org/software/snapshots/%{name}-%{version}-%{pre}
 %endif
 Source1:        %{name}.init
 Source2:        %{name}.sysconfig
+Patch0:         lirc-0.9.0-libusb-config-is-no-more.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  %{__perl}
@@ -137,6 +138,7 @@ of remote control configuration files.
 %else
 %setup -q -n %{name}-%{version}-%{pre}
 %endif
+%patch0 -p1
 
 chmod 644 contrib/*
 chmod +x contrib/hal
@@ -305,6 +307,11 @@ fi
 
 
 %changelog
+* Mon Jun 06 2011 Jarod Wilson <jarod at redhat.com> 0.9.0-6
+- And now take out the libusb1-devel bit, its actually the removal of
+  libusb-config from libusb-devel that broke things, so we need some
+  fixage upstream, backported here.
+
 * Tue May 31 2011 Jarod Wilson <jarod at redhat.com> 0.9.0-5
 - Add explict BR: libusb1-devel, as some userspace drivers require it, and
   its apparently not getting into the build root any longer


More information about the scm-commits mailing list