Ticket #7317: sysroot.patch

File sysroot.patch, 10.8 KB (added by pebender@…, 15 years ago)
  • mythplugins/programs-libs.pro

     
    44INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmyth
    55DEPENDPATH *= $${INCLUDEPATH}
    66
    7 LIBS += -L$${LIBDIR} $$EXTRA_LIBS -lmythdb-$$LIBVERSION
     7LIBS += -L$${SYSROOT}$${LIBDIR} $$EXTRA_LIBS -lmythdb-$$LIBVERSION
    88LIBS += -lmythavutil-$$LIBVERSION -lmythavcodec-$$LIBVERSION
    99LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION -lmythupnp-$$LIBVERSION
    1010
  • mythplugins/configure

     
    266266
    267267has_library()
    268268{
    269     if test -f /etc/ld.so.conf ; then
    270         LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
    271     else
    272         LIBPATHS=''
    273     fi
     269    LIBPATHS=''
     270    if test "x$sysroot" = "x" ; then
     271        if test -f /etc/ld.so.conf ; then
     272            LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
     273        fi
    274274
    275     LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
    276     # Mac OS X has a different variable for this:
    277     LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
     275        LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
     276        # Mac OS X has a different variable for this:
     277        LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
    278278
    279     # recurse down just one level, should be enough in most cases
    280     if test -f /etc/ld.so.conf ; then
    281         INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
    282         SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
    283         for x in $SRCH ; do
    284             LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
    285             LIBPATHS="$LIBPATHS $LP_APPEND"
    286         done
     279        # recurse down just one level, should be enough in most cases
     280        if test -f /etc/ld.so.conf ; then
     281            INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
     282            SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
     283            for x in $SRCH ; do
     284                LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
     285                LIBPATHS="$LIBPATHS $LP_APPEND"
     286            done
     287        fi
    287288    fi
    288289
    289290    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` "
     
    300301has_header()
    301302{
    302303    HPATHS="$sysroot$prefix/include $sysroot/usr/local/include $sysroot/usr/include $sysroot/usr/include/g++-v3 $sysroot/usr/X11R6/include $sysroot/"
    303     INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
    304     HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
     304    if test "x$sysroot" = "x" ; then
     305        INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
     306        HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
     307    fi
    305308
    306309    HAS_IT="no"
    307310    for HPATH in $HPATHS ; do
     
    689692        if test "$sdl" = "yes" ; then
    690693            echo "        libvisual      support will be included in MythMusic"
    691694            echo "#define LIBVISUAL_SUPPORT 1" >> ./mythmusic/mythmusic/config.h
    692             echo "INCLUDEPATH += /usr/include/libvisual-0.4" >> ./mythmusic/mythmusic/config.pro
     695            echo "INCLUDEPATH += ${sysroot}/usr/include/libvisual-0.4" >> ./mythmusic/mythmusic/config.pro
    693696            echo "LIBS += -lvisual-0.4" >> ./mythmusic/mythmusic/config.pro
    694697        else
    695698            echo "        libvisual      support will not be included in MythMusic (requires SDL support)"
  • mythplugins/settings.pro

     
    33LIBVERSION = 0.22
    44
    55INCLUDEPATH += $${SYSROOT}$${PREFIX}/include
    6 #INCLUDEPATH += /usr/include/cdda
    7 #INCLUDEPATH += /usr/include/FLAC
     6#INCLUDEPATH += $${SYSROOT}/usr/include/cdda
     7#INCLUDEPATH += $${SYSROOT}/usr/include/FLAC
    88
    99LIBS *= -L$${SYSROOT}$${PREFIX}/$${LIBDIRNAME}
    1010
  • mythplugins/mythgallery/mythgallery/mythgallery.pro

     
    1414target.path = $${LIBDIR}/mythtv/plugins
    1515INSTALLS += target
    1616
    17 INCLUDEPATH += $${PREFIX}/include/mythtv
     17INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv
    1818
    1919# Input
    2020HEADERS += iconview.h          singleview.h
  • mythplugins/mythweather/mythweather/mythweather.pro

     
    1313QMAKE_COPY_DIR = sh ../../cpsvndir
    1414win32:QMAKE_COPY_DIR = sh ../../cpsimple
    1515
    16 INCLUDEPATH += $${PREFIX}/include/mythtv
    17 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythui
     16INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv
     17INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythui
    1818
    1919datafiles.path = $${PREFIX}/share/mythtv/mythweather/
    2020datafiles.files = weather-screens.xml
  • mythplugins/mythflix/mythflix/mythflix.pro

     
    88target.path = $${LIBDIR}/mythtv/plugins
    99INSTALLS += target
    1010
    11 INCLUDEPATH += $${PREFIX}/include/mythtv
     11INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv
    1212
    1313installfiles.path = $${PREFIX}/share/mythtv/mythflix
    1414installfiles.files = netflix-rss.xml
  • mythplugins/mythmovies/mythmovies/mythmovies.pro

     
    1010target.path = $${LIBDIR}/mythtv/plugins
    1111INSTALLS += target
    1212
    13 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythui
     13INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythui
    1414
    1515# Input
    1616HEADERS += moviesui.h helperobjects.h moviessettings.h
  • mythplugins/mythzoneminder/mythzoneminder/mythzoneminder.pro

     
    88target.path = $${LIBDIR}/mythtv/plugins
    99INSTALLS += target
    1010
    11 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythui
     11INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythui
    1212
    1313# Input
    1414HEADERS += zmconsole.h zmplayer.h zmevents.h zmliveplayer.h zmdefines.h
  • mythplugins/mythnews/mythnews/mythnews.pro

     
    1010target.path = $${LIBDIR}/mythtv/plugins
    1111INSTALLS += target
    1212
    13 INCLUDEPATH += $${PREFIX}/include/mythtv
    14 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythui
    15 INCLUDEPATH += $${PREFIX}/include/mythtv/libmythdb
     13INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv
     14INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythui
     15INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythdb
    1616
    1717installfiles.path = $${PREFIX}/share/mythtv/mythnews
    1818installfiles.files = news-sites.xml
  • mythplugins/targetdep.pro

     
    1010MYTH_LIB_EXT  =$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    1111
    1212
    13 DEPLIBS = $${LIBDIR}
     13DEPLIBS = $${SYSROOT}$${LIBDIR}
    1414
    1515# On Windows, dlls were installed with exes:
    16 mingw : DEPLIBS = $${PREFIX}/bin
     16mingw : DEPLIBS = $${SYSROOT}$${PREFIX}/bin
    1717
    1818TARGETDEPS += $${DEPLIBS}/libmyth-$${MYTH_SHLIB_EXT}
    1919TARGETDEPS += $${DEPLIBS}/libmythdb-$${MYTH_SHLIB_EXT}
  • mythtv/configure

     
    919919#deprecated, use check_lib or check_lib2 instead
    920920has_library()
    921921{
    922     if test -f /etc/ld.so.conf ; then
    923         LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
    924     else
    925         LIBPATHS=''
    926     fi
     922    LIBPATHS=''
     923    if test "x${sysroot}" = "x" ; then
     924        if test -f /etc/ld.so.conf ; then
     925            LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
     926        fi
     927        LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
     928        # Mac OS X has a different variable for this:
     929        LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
    927930
    928     LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
    929     # Mac OS X has a different variable for this:
    930     LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
    931 
    932     # recurse down just one level, should be enough in most cases
    933     if test -f /etc/ld.so.conf ; then
    934         INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
    935         SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
    936         for x in $SRCH ; do
    937             LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
    938             LIBPATHS="$LIBPATHS $LP_APPEND"
    939         done
     931        # recurse down just one level, should be enough in most cases
     932        if test -f /etc/ld.so.conf ; then
     933            INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
     934            SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
     935            for x in $SRCH ; do
     936                LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
     937                LIBPATHS="$LIBPATHS $LP_APPEND"
     938            done
     939        fi
    940940    fi
    941941
    942     LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
     942    LIBPATHS="`echo $LIBPATHS $sysroot/$libdir_name $sysroot/usr/$libdir_name $sysroot/usr/local/$libdir_name $sysroot/usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
    943943
    944944    HAS_IT="no"
    945945    for LIBPATH in $LIBPATHS ; do
     
    42524252#       -L from early in the link line, to ignore any old installed libmyth*
    42534253# Note: Qt uses QMAKE_INCDIR_QT to build an absolute path for include
    42544254#       directories, it cannot be modified.
    4255 QMAKE_LIBDIR_QT -= $libdir
    4256 LATE_LIBS            += -L$libdir
     4255QMAKE_LIBDIR_QT -= ${sysroot}${libdir}
     4256LATE_LIBS            += -L${sysroot}${libdir}
    42574257EOF
    42584258
    42594259diff $TMPH $MYTH_CONFIG_H >/dev/null 2>&1