Ticket #4522: mythplugins_sysroot-1.0.diff

File mythplugins_sysroot-1.0.diff, 5.1 KB (added by anonymous, 14 years ago)
  • mythplugins

    diff -Naur mythplugins/configure mythplugins.patch/configure
    old new  
    99
    1010prefix="/usr/local"
    1111libdir_name="lib"
     12sysroot=""
    1213
    1314music="yes"
    1415video="yes"
     
    5859
    5960Generic options:
    6061  --prefix=PREFIX          MythTV install location PREFIX [$prefix]"
     62  --sysroot=SYSROOT        look for libs and headers in SYSROOT/PREFIX [$sysroot]"
    6163  --libdir-name=LIBNAME    install/look for libs in PREFIX/LIBNAME [$libdir_name]"
    6264  --help                   print this message
    6365  --enable-all             Enable all options
     
    150152  case "$opt" in
    151153  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
    152154  ;;
     155  --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2`
     156  ;;
    153157  --libdir-name=*) libdir_name=`echo $opt | cut -d '=' -f 2`;
    154158  ;;
    155159  --enable-mytharchive) archive="yes"
     
    336340        done
    337341    fi
    338342
    339     LIBPATHS="`echo $LIBPATHS $prefix/$libdir_name /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
     343    LIBPATHS="`echo $LIBPATHS $sysroot/$prefix/$libdir_name $sysroot//$libdir_name $sysroot/usr/$libdir_name $sysroot/usr/local/$libdir_name $sysroot/usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
    340344
    341345    HAS_IT="no"
    342346    for LIBPATH in $LIBPATHS ; do
     
    349353
    350354has_header()
    351355{
    352     HPATHS="$prefix/include /usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include /"
     356    HPATHS="$sysroot/$prefix/include $sysroot/usr/local/include $sysroot/usr/include $sysroot/usr/include/g++-v3 $sysroot/usr/X11R6/include $sysroot/"
    353357    INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
    354358    HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
    355359
     
    587591###########################################################
    588592
    589593# bring in mythtv config
    590 if [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
     594if [ -e $sysroot/$prefix/include/mythtv/mythconfig.mak ] ; then
    591595  rm mythconfig.mak 2> /dev/null
    592   ln -s $prefix/include/mythtv/mythconfig.mak mythconfig.mak
     596  ln -s $sysroot/$prefix/include/mythtv/mythconfig.mak mythconfig.mak
    593597else
    594   echo "ERROR: mythconfig.mak not found at $prefix/include/mythtv/mythconfig.mak"
     598  echo "ERROR: mythconfig.mak not found at $sysroot/$prefix/include/mythtv/mythconfig.mak"
    595599  echo "Did you make AND install MythTV first?"
    596   echo "Are you using the correct prefix ($prefix)?"
     600  echo "Are you using the correct prefix ($prefix) and sysroot ($sysroot)?"
    597601  echo "Bailing out!!"
    598602  exit
    599603fi
  • mytharchive/mytharchive/mytharchive.pro

    diff -Naur mythplugins/mytharchive/mytharchive/mytharchive.pro mythplugins.patch/mytharchive/mytharchive/mytharchive.pro
    old new  
    66   error(Missing config.pro: please run the configure script)
    77}
    88
    9 INCLUDEPATH += $${PREFIX}/include/mythtv $${PREFIX}/include/mythtv/ffmpeg
    10 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythtv
     9INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include/mythtv
     10INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include/mythtv/ffmpeg
     11INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include/mythtv/libmythtv
    1112
    1213TEMPLATE = lib opengl
    1314CONFIG += plugin thread
  • mythmusic/mythmusic/mythmusic.pro

    diff -Naur mythplugins/mythmusic/mythmusic/mythmusic.pro mythplugins.patch/mythmusic/mythmusic/mythmusic.pro
    old new  
    66   error(Missing config.pro: please run the configure script)
    77}
    88 
    9 INCLUDEPATH *= /usr/include/cdda
     9INCLUDEPATH *= $${SYSROOT}/$${PREFIX}/include/cdda
    1010TEMPLATE = lib
    1111CONFIG += plugin thread
    1212TARGET = mythmusic
  • programs-libs.pro

    diff -Naur mythplugins/programs-libs.pro mythplugins.patch/programs-libs.pro
    old new  
    1 INCLUDEPATH += $${PREFIX}/include/mythtv
     1INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include/mythtv
    22
    3 LIBS += -L$${PREFIX}/lib $$EXTRA_LIBS
     3LIBS += -L$${SYSROOT}/$${PREFIX}/lib $$EXTRA_LIBS
    44LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION -lmythupnp-$$LIBVERSION
    55
    66mac:using_firewire:using_backend:LIBS += -F$${CONFIG_MAC_AVC} -framework AVCVideoServices
  • settings.pro

    diff -Naur mythplugins/settings.pro mythplugins.patch/settings.pro
    old new  
    22
    33LIBVERSION = 0.20
    44
    5 INCLUDEPATH += $${PREFIX}/include
     5INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include
    66#INCLUDEPATH += /usr/include/cdda
    77#INCLUDEPATH += /usr/include/FLAC
    88
    9 LIBS *= -L$${PREFIX}/lib
     9LIBS *= -L$${SYSROOT}/$${PREFIX}/lib
    1010
    1111isEmpty(TARGET_OS) : win32 {
    1212    CONFIG += mingw
     
    1717DEFINES += _GNU_SOURCE
    1818DEFINES += PREFIX=\"$${PREFIX}\"
    1919
    20 INCLUDEPATH += $${PREFIX}/include
     20INCLUDEPATH += $${SYSROOT}/$${PREFIX}/include
    2121INCLUDEPATH += $$CONFIG_INCLUDEPATH
    2222
    2323# Prevent building .app bundles everywhere.