Ticket #41498: patch-lirc_2013Nov30_1.diff

File patch-lirc_2013Nov30_1.diff, 5.6 KB (added by ctreleaven (Craig Treleaven), 11 years ago)

Needs testing

  • Portfile

    diff -ur -x .DS_Store -N /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/sysutils/lirc/Portfile ./Portfile
    old new  
    33PortSystem 1.0
    44
    55name            lirc
    6 version         0.8.3
    7 revision        2
     6version         0.9.0
    87categories      sysutils net
    98license         GPL-2+
    109maintainers     ecronin openmaintainer
     
    1716homepage        http://www.lirc.org
    1817master_sites    sourceforge
    1918use_bzip2       yes
    20 checksums       md5 8e78eeded7b31e5ad02e328970437c0f \
    21                 sha1 4b5aec19fa9ee15bafaeb1f87c154a0d4e045dcc \
    22                 rmd160 8948efc3e9dc34426ea32a3c63da63c0efa7dce2
     19checksums           md5     b232aef26f23fe33ea8305d276637086 \
     20                    sha1    8456bf7101d4f2d31d61c5073357a4981b458581 \
     21                    rmd160  d8f1cf3a03573be36787e87adc71beba3e678a37
    2322livecheck.distname  LIRC
    2423
     24patchfiles          patch-osx_patches.diff
     25
    2526configure.args  --with-driver=udp --with-devdir=${prefix}/var/run \
    2627                --sysconfdir=${prefix}/etc --localstatedir=${prefix}/var \
    2728                --mandir=${prefix}/share/man
    2829
     30# Build fails with clang
     31# see bug report at: https://sourceforge.net/apps/mantisbt/lirc/view.php?id=1
     32compiler.blacklist-append *clang*
     33
    2934variant iguanaIR \
    3035    description {Use IguanaIR USB device} {
    31     configure.args-delete   --with-driver=udp
    32     configure.args-append   --with-driver=iguanaIR
    33     depends_lib-append  port:iguanaIR
    34     patchfiles-append \
    35         patch-daemons-hw_iguanaIR.c.diff \
    36         patch-drivers-lirc.h.diff
     36    configure.args-replace    --with-driver=udp --with-driver=iguanaIR
     37    depends_lib-append        port:iguanaIR
     38    patchfiles-append         patch-drivers-lirc.h.diff
    3739}
    3840
    3941post-destroot {
     
    6163
    6264notes "
    6365After installing you must configure an IR device for lirc to use. Most\
    64 hardware devices are not supported on Mac OS X (known exceptions: IguanaIR)\;\
    65 network sources (remote lircd, HD Homerun, etc) are fully supported.
     66hardware devices are not supported on Mac OS X (known exceptions: IguanaIR).\
     67Network sources (remote lircd, HD Homerun, etc) are fully supported.
    6668
    6769Please edit ${prefix}/etc/LaunchDaemons/org.macports.${name}/${name}.wrapper\
    6870and specify a valid driver or remote lircd to connect to. Examples for\
  • files/patch-daemons-hw_iguanaIR.c.diff

    diff -ur -x .DS_Store -N /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/sysutils/lirc/files/patch-daemons-hw_iguanaIR.c.diff ./files/patch-daemons-hw_iguanaIR.c.diff
    old new  
    1 --- daemons/hw_iguanaIR.c.org   2008-04-06 03:37:11.000000000 -0500
    2 +++ daemons/hw_iguanaIR.c       2010-01-21 10:04:29.000000000 -0600
    3 @@ -18,7 +18,11 @@
    4  #include <stdio.h>
    5  #include <stdint.h>
    6  #include <errno.h>
    7 +#ifdef __APPLE__
    8 +#include <sys/wait.h>
    9 +#else
    10  #include <wait.h>
    11 +#endif
    12  
    13  #include "lircd.h"
    14  #include "ir_remote_types.h"
  • files/patch-drivers-lirc.h.diff

    diff -ur -x .DS_Store -N /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/sysutils/lirc/files/patch-drivers-lirc.h.diff ./files/patch-drivers-lirc.h.diff
    old new  
    11--- drivers/lirc.h.org  2008-01-12 15:57:57.000000000 -0600
    22+++ drivers/lirc.h      2010-01-21 10:03:23.000000000 -0600
    3 @@ -8,7 +8,7 @@
     3@@ -9,7 +9,7 @@
     4 #if defined(__linux__)
     5 #include <linux/types.h>
    46 #include <linux/ioctl.h>
    5  #else
    6  #include <sys/types.h>
    7 -#if defined(__NetBSD__)
    8 +#if defined(__NetBSD__) || defined(__APPLE__)
     7-#elif defined(_NetBSD_)
     8+#elif defined(_NetBSD_) || defined(__APPLE__)
    99 #include <sys/ioctl.h>
    10  #endif
    11  typedef u_int32_t __u32;
     10 #elif defined(_CYGWIN_)
     11 #define __USE_LINUX_IOCTL_DEFS
  • files/patch-osx_patches.diff

    diff -ur -x .DS_Store -N /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/sysutils/lirc/files/patch-osx_patches.diff ./files/patch-osx_patches.diff
    old new  
     1Extracted from https://sourceforge.net/u/rico9999/lirc/ci/f7c2830bbd60692feedf0dc8924b795027eaf3af/
     2
     3--- daemons/ir_remote_types.h
     4+++ daemons/ir_remote_types.h
     5@@ -14,7 +14,20 @@
     6 #ifndef IR_REMOTE_TYPES_H
     7 #define IR_REMOTE_TYPES_H
     8 
     9+#if defined(__linux__)
     10 #include <sys/types.h>
     11+#else
     12+#include <stdint.h>
     13+typedef int8_t   __s8;
     14+typedef uint8_t  __u8;
     15+typedef int16_t  __s16;
     16+typedef uint16_t __u16;
     17+typedef int32_t  __s32;
     18+typedef uint32_t __u32;
     19+typedef int64_t  __s64;
     20+typedef uint64_t __u64;
     21+#endif
     22+
     23 #include <sys/time.h>
     24 #include <unistd.h>
     25 #include <string.h>
     26
     27--- daemons/lircmd.c
     28+++ daemons/lircmd.c
     29@@ -35,6 +35,16 @@
     30 #if defined(__linux__)
     31 #include <linux/input.h>
     32 #include <linux/uinput.h>
     33+#else
     34+#include <stdint.h>
     35+typedef int8_t   __s8;
     36+typedef uint8_t  __u8;
     37+typedef int16_t  __s16;
     38+typedef uint16_t __u16;
     39+typedef int32_t  __s32;
     40+typedef uint32_t __u32;
     41+typedef int64_t  __s64;
     42+typedef uint64_t __u64;
     43 #endif
     44 
     45 #define CLICK_DELAY 50000      /* usecs */