[mythtv-users] LIRC and MacOS X

Eric Cronin ecronin at gizmolabs.org
Mon Apr 7 22:43:13 UTC 2008


On Apr 1, 2008, at 9:11 AM, Sam Jacobs wrote:
> Hi,
>
> On Thu, Mar 27, 2008 at 8:10 PM, Craig Treleaven  
> <ctreleaven at cogeco.ca> wrote:
>> Hi:
>>
>> I'd like (1) to test LIRC on the Mac (2) but I'm having trouble
>> building a version of the frontend with Lirc support.  The problem is
>> that MacPorts (3) installed Lirc under /opt/local/ and
>> osx-packager.pl expects it to be somewhere else.
>>
>> If I understand src/myth-svn/mythtv/configure correctly (which is
>> doubtful), it ensures that the Lirc client, libraries and header
>> files are all present before compiling in Lirc support.  How do I
>> tell it to try /opt/local/ ?
>>
>>
>> Craig
>
> Just thought I should let you know, since you were kind enough to post
> in my thread, that last night I managed to build MythFrontend.app with
> lirc support! I don't know whether you've had a chance to test your
> build, but my build works - so it certainly is possible to make it
> work.
>
> Sam


Missed the original post, but the trick to getting the MacPorts  
install of LIRC to be seen is to edit osx-packager.pl and add /opt/ 
local to all the paths it sets up.  A diff for a somewhat recent  
version of HEAD is below.

Thanks,
Eric


--- /Users/ecronin/osx-packager-HEAD.pl	2008-02-05 15:22:18.000000000  
-0500
+++ osx-packager-HEAD.pl	2008-02-05 15:25:48.000000000 -0500
@@ -551,6 +566,8 @@
    'mythplugins'
    =>  [
          '--prefix=' . $PREFIX,
+        '--extra-cflags=-I/opt/local/include',
+        '--extra-ldflags=-L/opt/local/lib',
          '--enable-opengl',
          '--disable-mythbrowser',
          '--disable-transcode',
@@ -568,6 +585,8 @@
    'mythtv'
    =>  [
          '--prefix=' . $PREFIX,
+        '--extra-cflags=-I/opt/local/include',
+        '--extra-ldflags=-L/opt/local/lib',
          # To "cross compile" something for a lesser Mac:
          #'--tune=G3',
          #'--disable-altivec',
@@ -588,16 +607,16 @@
  our $svnpath = dirname $svn;

  # Clean the environment
-$ENV{'PATH'} = "$PREFIX/bin:/sw/bin:/bin:/usr/bin:$svnpath";
+$ENV{'PATH'} = "$PREFIX/bin:/opt/local/bin:/bin:/usr/bin:$svnpath";
  $ENV{'DYLD_LIBRARY_PATH'} = "$PREFIX/lib";
-$ENV{'LD_LIBRARY_PATH'} = "/usr/local/lib";
+$ENV{'LD_LIBRARY_PATH'} = "/opt/local/lib:/usr/local/lib";
  $ENV{'PKG_CONFIG_PATH'} = "$PREFIX/lib/pkgconfig:";
  delete $ENV{'CC'};
  delete $ENV{'CXX'};
  delete $ENV{'CPP'};
  delete $ENV{'CXXCPP'};
-$ENV{'CFLAGS'} = $ENV{'CXXFLAGS'} = $ENV{'CPPFLAGS'} = "-I$PREFIX/ 
include";
-$ENV{'LDFLAGS'} = "-Z -F/System/Library/Frameworks -L/usr/lib -L 
$PREFIX/lib";
+$ENV{'CFLAGS'} = $ENV{'CXXFLAGS'} = $ENV{'CPPFLAGS'} = "-I$PREFIX/ 
include -I/opt/local/include";
+$ENV{'LDFLAGS'} = "-Z -F/System/Library/Frameworks -L/usr/lib -L 
$PREFIX/lib -L/opt/local/lib";
  $ENV{'PREFIX'} = $PREFIX;

  # set up Qt environment
@@ -977,8 +996,8 @@
    &Verbose("Running qmake for $comp");
    my @qmake_opts = (
      'QMAKE_LFLAGS+=-Wl,-search_paths_first',
-    'INCLUDEPATH+="' . $PREFIX . '/include"',
-    'LIBS+=-L/usr/lib -L"' . $PREFIX . '/lib"'
+    'INCLUDEPATH+="' . $PREFIX . '/include" /opt/local/include',
+    'LIBS+=-L/usr/lib -L"' . $PREFIX . '/lib" -L/opt/local/lib'
     );
    &Syscall([ $PREFIX . '/bin/qmake',
               'PREFIX=../Resources',



More information about the mythtv-users mailing list