Index: Makefile =================================================================== RCS file: /home/pcvs/ports/comms/lirc/Makefile,v retrieving revision 1.33 diff -u -p -u -r1.33 Makefile --- Makefile 4 Dec 2010 07:30:39 -0000 1.33 +++ Makefile 5 Feb 2011 20:41:23 -0000 @@ -6,18 +6,20 @@ # PORTNAME= lirc -PORTVERSION= 0.8.0 -PORTREVISION= 2 +PORTVERSION= 0.9.0p1 CATEGORIES= comms -MASTER_SITES= SF/${PORTNAME}/LIRC/${PORTVERSION} +MASTER_SITES= http://lirc.org/software/snapshots/ +DISTNAME= ${PORTNAME}-${PORTVERSION:S/p1/-pre1/} MAINTAINER= doconnor@gsoft.com.au COMMENT= Linux Infared Remote Control -USE_AUTOTOOLS= libtool +USE_AUTOTOOLS= libtool automake autoheader aclocal autoconf +ACLOCAL_ARGS= -I "${ACLOCAL_DIR}" -I ${LOCALBASE}/share/aclocal USE_BZIP2= yes USE_GMAKE= yes USE_XORG= x11 +USE_PYTHON= yes GNU_CONFIGURE= yes USE_LDCONFIG= yes @@ -26,7 +28,8 @@ CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -OPTIONS= IRMAN "Build with libirman support" On +OPTIONS= IRMAN "Build with libirman support" On \ + DEBUG "Build debug version" On USE_RC_SUBR= lircd.sh @@ -41,9 +44,13 @@ PLIST_SUB+= SMODE2="@comment " .if defined(WITH_IRMAN) BUILD_DEPENDS+= ${LOCALBASE}/lib/libirman.a:${PORTSDIR}/comms/libirman -CONFIGURE_ARGS+= --with-driver=irman --with-driver=dvico +CONFIGURE_ARGS+= --with-driver=userspace .else -CONFIGURE_ARGS+= --with-driver=any --with-driver=dvico +CONFIGURE_ARGS+= --with-driver=dvico +.endif + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --enable-debug .endif MAN1= ircat.1 irexec.1 irpty.1 irrecord.1 irsend.1 irw.1 \ Index: distinfo =================================================================== RCS file: /home/pcvs/ports/comms/lirc/distinfo,v retrieving revision 1.5 diff -u -p -u -r1.5 distinfo --- distinfo 19 Jan 2007 02:27:22 -0000 1.5 +++ distinfo 3 Feb 2011 19:02:39 -0000 @@ -1,3 +1,2 @@ -MD5 (lirc-0.8.0.tar.bz2) = 0bf28bf82c7766a462f90927b6bf3af1 -SHA256 (lirc-0.8.0.tar.bz2) = cc8d7fb41a045278680ea530cffaf05181977f41244b9f0ed64075cd7630b5d2 -SIZE (lirc-0.8.0.tar.bz2) = 514359 +SHA256 (lirc-0.9.0-pre1.tar.bz2) = 6724514d76077cc087bd4e12d880744442223e7e4ecfd0aa515c1610bc13b5f1 +SIZE (lirc-0.9.0-pre1.tar.bz2) = 837920 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/comms/lirc/pkg-plist,v retrieving revision 1.5 diff -u -p -u -r1.5 pkg-plist --- pkg-plist 19 Jan 2007 02:27:23 -0000 1.5 +++ pkg-plist 3 Feb 2011 18:59:53 -0000 @@ -8,12 +8,13 @@ bin/irxevent bin/lircrcd bin/mode2 %%SMODE2%%bin/smode2 +bin/pronto2lirc bin/xmode2 include/lirc/lirc_client.h lib/liblirc_client.a lib/liblirc_client.la lib/liblirc_client.so -lib/liblirc_client.so.1 +lib/liblirc_client.so.2 sbin/lircd sbin/lircmd @dirrm include/lirc Index: files/patch-configure =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-configure,v retrieving revision 1.3 diff -u -p -u -r1.3 patch-configure --- files/patch-configure 19 Jan 2007 02:27:23 -0000 1.3 +++ files/patch-configure 3 Feb 2011 18:59:53 -0000 @@ -1,27 +0,0 @@ ---- configure.orig Sat Jan 21 18:03:45 2006 -+++ configure Wed Nov 15 12:58:20 2006 -@@ -7816,6 +7816,7 @@ - - # use fifo instead of devnode (required on mac os x) - -+use_fifos="yes" - - if test "$use_fifos" = "yes"; then - USE_FIFOS_TRUE= -@@ -9378,6 +9379,8 @@ - { echo "configure: error: *** you need to have the ALSA libraries and drivers - from at least version 1.0.9 for this driver" 1>&2; exit 1; } - ;; -+ any) -+ ;; - *) - { echo "configure: error: *** it is not possible to install the specified driver - on this system" 1>&2; exit 1; } -@@ -9387,6 +9390,7 @@ - - - if test "$lirc_driver" = "none" || \ -+ test "$lirc_driver" = "any" || \ - test "$lirc_driver" = "alsa_usb" || \ - test "$lirc_driver" = "userspace" || \ - test "$lirc_driver" = "atilibusb" || \ Index: files/patch-daemons::Makefile.in =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-daemons::Makefile.in,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-daemons::Makefile.in --- files/patch-daemons::Makefile.in 10 Mar 2007 23:10:21 -0000 1.1 +++ files/patch-daemons::Makefile.in 3 Feb 2011 18:59:53 -0000 @@ -1,11 +1,11 @@ ---- daemons/Makefile.in.orig Sat Mar 10 17:14:33 2007 -+++ daemons/Makefile.in Sat Mar 10 17:14:45 2007 -@@ -919,8 +919,6 @@ +--- daemons/Makefile.in.orig ++++ daemons/Makefile.in +@@ -1108,8 +1108,6 @@ uninstall-am: uninstall-binPROGRAMS unin @SANDBOXED_FALSE@@USE_FIFOS_FALSE@uninstall-local: rmdev install-data-local: -- test "$(lircd_conf)" = "" || test -e $(DESTDIR)$(sysconfdir)/lircd.conf || ($(mkinstalldirs) $(DESTDIR)$(sysconfdir) && $(INSTALL_DATA) $(top_srcdir)/remotes/$(lircd_conf) $(DESTDIR)$(sysconfdir)/lircd.conf) -- test "$(lircmd_conf)" = "" || test -e $(DESTDIR)$(sysconfdir)/lircmd.conf || ($(mkinstalldirs) $(DESTDIR)$(sysconfdir) && $(INSTALL_DATA) $(top_srcdir)/remotes/$(lircmd_conf) $(DESTDIR)$(sysconfdir)/lircmd.conf) +- test "$(lircd_conf)" = "" || test -e $(DESTDIR)$(sysconfdir)/$(PACKAGE)/lircd.conf || ($(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lirc && $(INSTALL_DATA) $(top_srcdir)/remotes/$(lircd_conf) $(DESTDIR)$(sysconfdir)/$(PACKAGE)/lircd.conf) +- test "$(lircmd_conf)" = "" || test -e $(DESTDIR)$(sysconfdir)/$(PACKAGE)/lircmd.conf || ($(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lirc && $(INSTALL_DATA) $(top_srcdir)/remotes/$(lircmd_conf) $(DESTDIR)$(sysconfdir)/$(PACKAGE)/lircmd.conf) mkdev: - test -e $(DESTDIR)$(devdir)/lircd || ($(mkinstalldirs) $(DESTDIR)$(devdir) && @mknod@ $(DESTDIR)$(devdir)/lircd p) + test -e $(DESTDIR)$(varrundir)/$(PACKAGE)/lircd || ($(mkinstalldirs) $(DESTDIR)$(varrundir)/lirc && @mknod@ $(DESTDIR)$(varrundir)/$(PACKAGE)/lircd p) Index: files/patch-daemons::hw_hiddev.c =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-daemons::hw_hiddev.c,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-daemons::hw_hiddev.c --- files/patch-daemons::hw_hiddev.c 5 Mar 2007 05:04:25 -0000 1.1 +++ files/patch-daemons::hw_hiddev.c 5 Feb 2011 20:33:25 -0000 @@ -1,29 +1,42 @@ ---- daemons/hw_hiddev.c.orig Sun Jul 10 18:04:11 2005 -+++ daemons/hw_hiddev.c Thu Nov 23 14:41:52 2006 -@@ -19,14 +19,19 @@ +--- daemons/hw_hiddev.c.orig ++++ daemons/hw_hiddev.c +@@ -22,9 +22,17 @@ #include #include + #include ++#include -+#ifdef __FreeBSD__ ++#ifdef HAVE_USBHID_H +#include -+#else /* assume Linux */ ++#endif ++#ifdef HAVE_LINUX_TYPES_H #include ++#endif ++#ifdef HAVE_LINUX_HIDDEV_H #include +#endif #include "hardware.h" #include "ir_remote.h" - #include "lircd.h" - #include "receive.h" -- -+#include -+#include +@@ -135,6 +143,7 @@ struct hardware hw_sb0540 = { + }; + #endif + ++#ifdef HAVE_LINUX_HIDDEV_H + /* Apple Mac mini USB IR Receiver */ + struct hardware hw_macmini = { + "/dev/usb/hiddev0", /* "device" */ +@@ -152,6 +161,7 @@ struct hardware hw_macmini = { + NULL, /* readdata */ + "macmini" /* name */ + }; ++#endif - static int hiddev_init(); - static int hiddev_deinit(void); -@@ -103,7 +108,11 @@ + #ifdef HAVE_LINUX_HIDDEV_FLAG_UREF + /* Samsung USB IR Receiver */ +@@ -191,7 +201,11 @@ int hiddev_init() logprintf(LOG_INFO, "initializing '%s'", hw.device); - + if ((hw.fd = open(hw.device, O_RDONLY)) < 0) { - logprintf(LOG_ERR, "unable to open '%s'", hw.device); + logprintf(LOG_ERR, @@ -33,10 +46,10 @@ + errno ); return 0; } - -@@ -143,38 +152,117 @@ - } +@@ -235,8 +249,40 @@ int hiddev_decode(struct ir_remote *remo + return 1; + } +/* + * Read a record from the remote control, decode it and return a @@ -69,34 +82,42 @@ + struct hiddev_event + { + unsigned hid; -+ int16_t value; ++ int32_t value; + }; +#endif struct hiddev_event event; + struct hiddev_event asus_events[8]; int rd; - /* Remotec Mediamaster specific */ - static int wheel_count = 0; - static int x_movement = 0; -+ static int repeat_count = 0; - int y_movement=0; - int x_direction=0; - int y_direction=0; - - LOGPRINTF(1, "hiddev_rec"); - +@@ -253,9 +299,41 @@ char *hiddev_rec(struct ir_remote *remot + + last = end; + gettimeofday(&start, NULL); +#ifdef __FreeBSD__ -+ rd = read(hw.fd, inbuf, sizeof inbuf); -+ if (rd != sizeof inbuf) { -+ logprintf(LOG_ERR, -+ "Really read %d bytes from '%s', expected %d", -+ rd, -+ hw.device, -+ sizeof inbuf ); -+ return 0; ++ if (!strcmp(hw.name, "dvico")) { ++ rd = read(hw.fd, inbuf, sizeof inbuf); ++ if (rd != sizeof inbuf) { ++ logprintf(LOG_ERR, ++ "Really read %d bytes from '%s', expected %d", ++ rd, ++ hw.device, ++ sizeof inbuf ); ++ return 0; ++ } ++ event.hid = 0x10046; /* XXX not in FreeBSD */ ++ event.value = * (int16_t *) (&inbuf [1]); ++ } else { ++ rd = read(hw.fd, &event.value, sizeof event.value); ++ if (rd != sizeof event.value) { ++ logprintf(LOG_ERR, ++ "Really read %d bytes from '%s', expected %d", ++ rd, ++ hw.device, ++ sizeof event.value ); ++ return 0; ++ } ++ event.hid = 0x10046; /* XXX not in FreeBSD */ + } -+ event.hid = 0x10046; /* XXX not in FreeBSD */ -+ event.value = * (int16_t *) (&inbuf [1]); -+ rd = sizeof event; /* to make code happy */ ++ rd = sizeof event; /* to make code happy */ +#else rd = read(hw.fd, &event, sizeof event); +#endif @@ -107,54 +128,22 @@ + rd, + hw.device, + sizeof event ); + logperror(LOG_ERR, NULL); + hiddev_deinit(); return 0; - } +@@ -515,6 +593,7 @@ char *sb0540_rec(struct ir_remote *remot + } + #endif - LOGPRINTF(1, "hid 0x%X value 0x%X", event.hid, event.value); ++#ifdef HAVE_LINUX_HIDDEV_H + /* + * Apple Mac mini USB IR Receiver specific code. + * +@@ -566,6 +645,7 @@ char *macmini_rec(struct ir_remote *remo - pre_code = event.hid; -- main_code = event.value; -- -+ main_code = event.value & 0xffff; /* only 16 bits */ - /* - * This stuff is probably dvico specific. - * I don't have any other hid devices to test... - */ -- if (event.hid == 0x10046) { -- repeat_flag = (main_code & dvico_repeat_mask); -+ if (pre_code == 0x10046) { -+ if (main_code & dvico_repeat_mask) /* repeated press */ -+ repeat_count++; /* count them */ -+ else -+ repeat_count = 0; /* reset */ -+ repeat_flag = repeat_count > 2; /* real repeat flag */ - main_code = (main_code & ~dvico_repeat_mask); -- return decode_all(remotes); -+ /* -+ * Skip this if we're working around the premature -+ * repeat. -+ */ -+ if (repeat_flag || (repeat_count == 0)) -+ { -+ char *foo; -+ -+ foo = decode_all(remotes); -+ /* -+ * XXX Experimental code. Chop off the first 12 -+ * bytes of the hex code, which FreeBSD does not -+ * provide, and which I suspect nobody cares -+ * about. -+ * -+ * For some reason, we can get NULL back here, -+ * so we need to check for that before returning -+ * address 0xc. -+ */ -+ if (foo) -+ foo = &foo [12]; /* chop off the leading chars. */ -+ return foo; -+ } -+ else -+ return 0; /* no data */ - } - /* Remotec Mediamaster specific code */ - /* Y-Coordinate, + return decode_all(remotes); + } ++#endif + + /* + * Samsung/Cypress USB IR Receiver specific code Index: files/patch-daemons::lircd.c =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-daemons::lircd.c,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-daemons::lircd.c --- files/patch-daemons::lircd.c 5 Mar 2007 05:04:25 -0000 1.1 +++ files/patch-daemons::lircd.c 3 Feb 2011 19:10:28 -0000 @@ -1,18 +0,0 @@ ---- daemons/lircd.c.orig Sun Jul 10 18:04:12 2005 -+++ daemons/lircd.c Fri Nov 24 14:21:10 2006 -@@ -755,9 +755,12 @@ - strcpy(serv_addr.sun_path,lircdfile); - if(bind(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))==-1) - { -- fprintf(stderr,"%s: could not assign address to socket\n", -- progname); -- perror(progname); -+ fprintf(stderr, -+ "%s: could not assign address to socket %s: %s (%d)\n", -+ progname, -+ lircdfile, -+ strerror (errno), -+ errno ); - goto start_server_failed1; - } - Index: files/patch-daemons::serial.c =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-daemons::serial.c,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-daemons::serial.c --- files/patch-daemons::serial.c 19 Oct 2005 03:41:51 -0000 1.1 +++ files/patch-daemons::serial.c 3 Feb 2011 18:59:53 -0000 @@ -1,94 +0,0 @@ ---- daemons/serial.c.orig Mon Mar 7 20:03:48 2005 -+++ daemons/serial.c Sun Aug 21 21:44:26 2005 -@@ -29,6 +29,10 @@ - - #include "lircd.h" - -+#define LOCKDIR "/var/spool/lock" -+ -+static char *lockpath = NULL; -+ - int tty_reset(int fd) - { - struct termios options; -@@ -183,7 +187,7 @@ - int lock; - int len; - -- strcpy(filename,"/var/lock/LCK.."); -+ strcpy(filename,LOCKDIR "/LCK.."); - - last=strrchr(name,'/'); - if(last!=NULL) -@@ -373,63 +377,22 @@ - } - } - } -+ lockpath = strdup(filename); - return(1); - } - - int tty_delete_lock(void) - { -- DIR *dp; -- struct dirent *ep; -- int lock; -- int len; -- char id[20+1],*endptr; -- char filename[FILENAME_MAX+1]; -- long pid; -- int retval=1; -- -- dp=opendir("/var/lock/"); -- if(dp!=NULL) -- { -- while((ep=readdir(dp))) -- { -- strcpy(filename,"/var/lock/"); -- if(strlen(filename)+strlen(ep->d_name)>FILENAME_MAX) -- {retval=0;continue;} -- strcat(filename,ep->d_name); -- lock=open(filename,O_RDONLY); -- if(lock==-1) {retval=0;continue;} -- len=read(lock,id,20); -- close(lock); -- if(len<=0) {retval=0;continue;} -- id[len]=0; -- pid=strtol(id,&endptr,10); -- if(!*id || *endptr!='\n') -- { -- logprintf(LOG_WARNING,"invalid lockfile (%s) " -- "detected",filename); -- retval=0; -- continue; -- } -- if(pid==getpid()) -- { -- if(unlink(filename)==-1) -- { -- logprintf(LOG_ERR,"could not delete " -- "file \"%s\"",filename); -- logperror(LOG_ERR,NULL); -- retval=0; -- continue; -- } -- } -- } -- closedir(dp); -- } -- else -+ if(unlink(lockpath)==-1) - { -- logprintf(LOG_ERR,"could not open directory \"/var/lock/\""); -+ logprintf(LOG_ERR,"could not delete " -+ "file \"%s\"",lockpath); -+ logperror(LOG_ERR,NULL); -+ free(lockpath); - return(0); - } -- return(retval); -+ free(lockpath); -+ return(1); - } - - int tty_set(int fd,int rts,int dtr) Index: files/patch-drivers::lirc.h =================================================================== RCS file: /home/pcvs/ports/comms/lirc/files/patch-drivers::lirc.h,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-drivers::lirc.h --- files/patch-drivers::lirc.h 19 Oct 2005 03:41:51 -0000 1.1 +++ files/patch-drivers::lirc.h 3 Feb 2011 19:12:51 -0000 @@ -1,10 +1,21 @@ ---- drivers/lirc.h.orig Sun Aug 21 21:45:04 2005 -+++ drivers/lirc.h Sun Aug 21 21:45:11 2005 -@@ -8,6 +8,7 @@ +--- drivers/lirc.h.orig ++++ drivers/lirc.h +@@ -9,12 +9,17 @@ + #if defined(__linux__) + #include #include - #else - #include -+#include - typedef u_int32_t __u32; +-#elif defined(_NetBSD_) ++#elif defined(_NetBSD_) || defined(__FreeBSD__) + #include + #elif defined(_CYGWIN_) + #define __USE_LINUX_IOCTL_DEFS + #include #endif ++#ifndef __linux__ ++#include ++#define __u32 uint32_t ++#define __u64 uint64_t ++#endif + #define PULSE_BIT 0x01000000 + #define PULSE_MASK 0x00FFFFFF Index: files/patch-configure.ac @@ -0,0 +1,107 @@ +--- configure.ac.orig ++++ configure.ac +@@ -96,6 +96,14 @@ case "${host_os}" in + devdir_default="/usr/lirc/dev/" + use_fifos="yes" + ;; ++ freebsd*) ++ dnl PortAudio for UNIX OSS ++ portaudio_lib_other="-lm -lpthread ${forkpty}" ++ ++ dnl default devdir ++ devdir_default="/dev" ++ use_fifos="yes" ++ ;; + *) + dnl Unix OSS configuration + +@@ -328,65 +336,10 @@ if test -n "${LIBUSB_CONFIG}"; then + 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(ftdi.h, +- AC_DEFINE(HAVE_FTDI) +- possible_drivers="${possible_drivers} (ftdi)" +-) +-AC_CHECK_HEADER(iguanaIR.h, +- AC_DEFINE(HAVE_IGUANAIR) +- possible_drivers="${possible_drivers} (iguanaIR)" +-) + AC_CHECK_LIB(irman, ir_strerror, + AC_DEFINE(HAVE_LIBIRMAN) + possible_drivers="${possible_drivers} (irman)" + ) +-AC_CHECK_LIB(irman_sw, ir_strerror, +- AC_DEFINE(HAVE_LIBIRMAN_SW) +- possible_drivers="${possible_drivers} (irman_sw)" +-) +-dnl audio driver requires PortAudio library installed and some linker flags +-AC_CHECK_HEADERS(portaudio.h,[ +- AC_CHECK_LIB(portaudio, Pa_Initialize,[ +- AC_DEFINE(HAVE_LIBPORTAUDIO) +- possible_drivers="${possible_drivers} (audio)" +- ],,${portaudio_lib_other} +- )] +-) +-dnl audio_alsa driver requires ALSA library installed and some linker flags +-have_alsa=no +-AC_CHECK_HEADERS(alsa/asoundlib.h,[ +- AC_CHECK_LIB(asound, snd_pcm_open,[ +- AC_DEFINE(HAVE_LIBALSA) +- have_alsa=yes +- possible_drivers="${possible_drivers} (audio_alsa)" +- ],, +- )] +-) +-dnl alsa_usb driver requires an ALSA that knows about our hwdep device +-if test "$have_alsa" = "yes"; then +- AC_MSG_CHECKING(for ALSA SB RC hwdep support) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +-#include +-]], [[ +- if (snd_hwdep_info_get_iface(NULL) == SND_HWDEP_IFACE_SB_RC) {} +-]])],[ +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_ALSA_SB_RC) +- possible_drivers="${possible_drivers} (alsa_usb)" +- ],[ +- AC_MSG_RESULT(no) +- ]) +-fi +-dnl creative_infracd driver requires linux scsi api +-AC_CHECK_HEADERS(scsi/sg.h,[ +- AC_DEFINE(HAVE_SCSI) +- possible_drivers="${possible_drivers} (creative_infracd)" +- ] +-) + dnl dev_input driver requires linux input device api + AC_CHECK_HEADERS(linux/input.h,[ + AC_DEFINE(HAVE_LINUX_DEVINPUT) +@@ -416,17 +369,18 @@ AC_CHECK_HEADERS([linux/hiddev.h],[ + #endif + ] + ) ++dnl FreeBSD usbhid.h - patched daemons/hw_hiddev.c needs testing ++AC_CHECK_HEADERS([usbhid.h],[ ++ dnl possible_drivers="${possible_drivers} (asusdh) (bw6130) (dvico) (macmini)" ++ possible_drivers="${possible_drivers} (bw6130) (dvico)" ++ ], [], [] ++) + dnl dsp driver requires linux soundcard api + AC_CHECK_HEADERS(sys/soundcard.h,[ + AC_DEFINE(HAVE_SOUNDCARD) + possible_drivers="${possible_drivers} (dsp)" + ] + ) +-dnl i2cuser driver requires the Linux I2C API +-AC_CHECK_HEADERS(linux/i2c-dev.h,[ +- possible_drivers="${possible_drivers} (i2cuser)" +- ] +-) + + dnl here we see what driver the user wants. + Index: files/patch-daemons::hw-types.c @@ -0,0 +1,20 @@ +--- daemons/hw-types.c.orig ++++ daemons/hw-types.c +@@ -105,7 +105,7 @@ struct hardware *hw_list[] = { + &hw_awlibusb, + #endif + &hw_bte, +-#ifdef HAVE_LINUX_HIDDEV_H ++#if defined(HAVE_LINUX_HIDDEV_H) || defined(HAVE_USBHID_H) + &hw_bw6130, + #endif + #ifdef HAVE_LIBUSB +@@ -125,7 +125,7 @@ struct hardware *hw_list[] = { + #ifdef HAVE_SOUNDCARD + &hw_dsp, + #endif +-#ifdef HAVE_LINUX_HIDDEV_H ++#if defined(HAVE_LINUX_HIDDEV_H) || defined(HAVE_USBHID_H) + &hw_dvico, + #endif + &hw_ea65, Index: files/patch-daemons::lircmd.c @@ -0,0 +1,23 @@ +--- daemons/lircmd.c.orig ++++ daemons/lircmd.c +@@ -277,9 +277,9 @@ setup_error: + return -1; + } + ++#ifdef __linux__ + void write_uinput(__u16 type, __u16 code, __s32 value) + { +-#ifdef __linux__ + struct input_event event; + + memset(&event, 0, sizeof(event)); +@@ -299,8 +299,8 @@ void write_uinput(__u16 type, __u16 code + syslog(LOG_ERR, "%m"); + } + } +-#endif + } ++#endif + + void msend(int dx, int dy, int dz, int rep, int buttp, int buttr) + { Index: files/patch-tools::irsend.c @@ -0,0 +1,12 @@ +--- tools/irsend.c.orig ++++ tools/irsend.c +@@ -40,6 +40,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + + #define PACKET_SIZE 256 + /* three seconds */