Re: LIRC on OS X via MacPorts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: LIRC on OS X via MacPorts

Nicolas Girardin
Hi!

What a coincidence, I was thinking about creating a Homebrew recipe for lirc, that I'd like to use for one of my project, and was surprised to find none.

It would be great to join forces to create a stable OSX build for macports + homebrew!

Should we create a new branch somewhere?

Best,

Nicolas

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|

Re: LIRC on OS X via MacPorts

Alec Leamas


On 11/10/16 12:43, Nicolas Girardin wrote:

> Hi!
>
> What a coincidence, I was thinking about creating a Homebrew recipe for
> lirc, that I'd like to use for one of my project, and was surprised to
> find none.
>
> It would be great to join forces to create a stable OSX build for
> macports + homebrew!
>
> Should we create a new branch somewhere?
>

This should IMHO be avoided if possible. It should be perfectly possible
to do this with patches acceptable upstream.

The compilation fixes are already in place. What's needed now is patches
replacing poll() with select() in all situations where character devices
are involved. I would happily accept such patches which was for MacOS
only, using  #ifdef __APPLE__ or so.

I would recommend starting from the release-0_9_4 branch if you are
interested in this.

Of course, a temporary branch might be useful. I just think we should
avoid forking.


Cheers!

--alec

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|

Re: LIRC on OS X via MacPorts

Craig Treleaven
In reply to this post by Nicolas Girardin
On Oct 11, 2016, at 6:43 AM, Nicolas Girardin <[hidden email]> wrote:
What a coincidence, I was thinking about creating a Homebrew recipe for lirc, that I'd like to use for one of my project, and was surprised to find none.

It would be great to join forces to create a stable OSX build for macports + homebrew!

Should we create a new branch somewhere?

Which device do you want to use?

I’m not a C/C++ developer.  With Alec’s help, the only substantive patches needed to get Lirc to compile (using autoconf) under MacPorts were:

diff -u daemons/lircd.cpp.orig daemons/lircd.cpp
--- daemons/lircd.cpp.orig 2016-10-02 11:44:28.000000000 -0400
+++ daemons/lircd.cpp 2016-10-02 11:45:08.000000000 -0400
@@ -89,9 +89,9 @@
  if (timebase.numer == 0)
  mach_timebase_info(&timebase);
  time = mach_absolute_time();
- tv.>tv_nsec = ((double) time *
+ t->tv_nsec = ((double) time *
     (double) timebase.numer)/((double) timebase.denom);
- tv.>tv_sec = ((double)time *
+ t->tv_sec = ((double)time *
    (double)timebase.numer)/((double)timebase.denom * 1e9);
  return 0;
 }


--- configure.ac.orig 2016-10-02 20:21:02.000000000 -0400
+++ configure.ac 2016-10-02 20:21:32.000000000 -0400
@@ -346,6 +346,7 @@
 AC_COMPILE_IFELSE([
   AC_LANG_SOURCE([
     #include <grp.h>
+    #include <unistd.h>
     int main(int argc, char**argv)
     {
         int groups[[4]];

I also set an environment variable pointing to PYTHON.  The dependencies are listed but I also had to add vte:


Hope this helps,

Craig

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|

Re: LIRC on OS X via MacPorts

Nicolas Girardin
Hi Alec and Craig,

Thank you for the answer!

Alec: Yes, by branch I meant a temp branch for all thing mac related.

Craig: I'm not a C++ guys neither, I'm trying to get an old media center remote running (HP TSGI-IR01, works fine under linux).

I'm gonna try to get it to compile and run locally.

Thanks! 

Nico

On Tue, Oct 11, 2016 at 4:25 PM Craig Treleaven <[hidden email]> wrote:
On Oct 11, 2016, at 6:43 AM, Nicolas Girardin <[hidden email]> wrote:
What a coincidence, I was thinking about creating a Homebrew recipe for lirc, that I'd like to use for one of my project, and was surprised to find none.

It would be great to join forces to create a stable OSX build for macports + homebrew!

Should we create a new branch somewhere?

Which device do you want to use?

I’m not a C/C++ developer.  With Alec’s help, the only substantive patches needed to get Lirc to compile (using autoconf) under MacPorts were:

diff -u daemons/lircd.cpp.orig daemons/lircd.cpp
--- daemons/lircd.cpp.orig 2016-10-02 11:44:28.000000000 -0400
+++ daemons/lircd.cpp 2016-10-02 11:45:08.000000000 -0400
@@ -89,9 +89,9 @@
  if (timebase.numer == 0)
  mach_timebase_info(&timebase);
  time = mach_absolute_time();
- tv.>tv_nsec = ((double) time *
+ t->tv_nsec = ((double) time *
     (double) timebase.numer)/((double) timebase.denom);
- tv.>tv_sec = ((double)time *
+ t->tv_sec = ((double)time *
    (double)timebase.numer)/((double)timebase.denom * 1e9);
  return 0;
 }


--- configure.ac.orig 2016-10-02 20:21:02.000000000 -0400
+++ configure.ac 2016-10-02 20:21:32.000000000 -0400
@@ -346,6 +346,7 @@
 AC_COMPILE_IFELSE([
   AC_LANG_SOURCE([
     #include <grp.h>
+    #include <unistd.h>
     int main(int argc, char**argv)
     {
         int groups[[4]];

I also set an environment variable pointing to PYTHON.  The dependencies are listed but I also had to add vte:


Hope this helps,

Craig

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot