Ticket #5270: runprefix.2.patch

File runprefix.2.patch, 5.1 KB (added by Nigel, 17 years ago)

Always get filters and plugins from PREFIX/lib, re-enable OS X runtime asset location

  • configure

     
    181181  echo ""
    182182  echo "  --enable-mac-bundle      produce standalone OS X apps (e.g. mythfrontend.app)"
    183183  echo ""
     184  echo "  --runtime-prefix=PREFIX  prefix to be used at runtime"
     185  echo "                           (e.g. .. or /myth/latest)"
    184186  echo "  --with-bindings=LIST     install the bindings specified in the"
    185187  echo "                           comma-separated list"
    186188  echo "                           Supported bindings: perl, python"
     
    11601162CONFIG_DEFINES=""
    11611163CONFIG_INCLUDEPATH=""
    11621164PROFILEFLAGS=""
     1165RUNPREFIX=$PREFIX
    11631166audio_alsa="default"
    11641167audio_alsa_libs="-lasound"
    11651168audio_arts="default"
     
    13951398  ;;
    13961399  --enable-mac-bundle) enable mac_bundle
    13971400  ;;
     1401  --runtime-prefix=*) RUNPREFIX="$optval"
     1402  ;;
    13981403  --previous|--prev)
    13991404      echo "No history of previous configure parameters."
    14001405  ;;
     
    28892894echo "DistCC                    $distcc$distcc_txt"
    28902895echo "qmake                     $(which $qmake)"
    28912896echo "install prefix            $PREFIX"
     2897echo "runtime prefix            $RUNPREFIX"
    28922898<<BLOCK_QUOTE
    28932899echo "source path               $source_path"
    28942900echo "C compiler                $cc"
     
    30753081echo "#define FFMPEG_CONFIG_H" >> $TMPH
    30763082echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
    30773083
     3084echo "RUNPREFIX=$RUNPREFIX" >> $MYTH_CONFIG_MAK
    30783085echo "PREFIX=$PREFIX" >> $MYTH_CONFIG_MAK
    30793086echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK
    30803087<<BLOCK_QUOTE
  • libs/libmyth/mythcontext.cpp

     
    221221    Settings *m_settings;          ///< connection stuff, theme, button style
    222222    Settings *m_qtThemeSettings;   ///< everything else theme-related
    223223
    224     QString   m_installprefix;     ///< Compile-time PREFIX, or generated
     224    QString   m_installprefix;     ///< Compile-time RUNPREFIX, or generated
    225225                                   ///< from enviroment ($MYTHTVDIR or $cwd)
    226     QString   m_installlibdir;     ///< Compile-time LIBDIR, or generated
    227226
    228227    bool      m_gui;               ///< Should this context use GUI elements?
    229228    bool      m_backend;           ///< Is this host any sort of backend?
     
    314313MythContextPrivate::MythContextPrivate(MythContext *lparent)
    315314    : parent(lparent),
    316315      m_settings(new Settings()), m_qtThemeSettings(new Settings()),
    317       m_installprefix(PREFIX), m_installlibdir(LIBDIR),
     316      m_installprefix(RUNPREFIX),
    318317      m_gui(false), m_backend(false), m_themeloaded(false),
    319318      m_menuthemepathname(QString::null), m_themepathname(QString::null),
    320319      m_backgroundimage(NULL),
     
    356355
    357356        VERBOSE(VB_IMPORTANT+VB_EXTRA,
    358357                "Relative PREFIX!\nappDir=" + prefixDir.canonicalPath() +
    359                 "\nprefix=" + m_installprefix + ", libdir=" + m_installlibdir);
     358                "\nprefix=" + m_installprefix);
    360359        prefixDir.cd(m_installprefix);
    361360        m_installprefix = prefixDir.canonicalPath();
    362 
    363         // Not strictly necessary, but it tidies up the path:
    364         if (QDir(m_installlibdir).isRelative())
    365         {
    366             prefixDir = qApp->applicationDirPath();
    367             prefixDir.cd(m_installlibdir);
    368             m_installlibdir = prefixDir.canonicalPath();
    369         }
    370361    }
    371     else if (prefixDir.path().contains(".app/Contents/MacOS"))
    372     {
    373         prefixDir.cd("../Resources");
    374         if (QDir(prefixDir.canonicalPath() + "/bin").exists() ||
    375             QDir(prefixDir.canonicalPath() + "/share").exists())
    376             m_installprefix = prefixDir.canonicalPath();
    377         if (QDir(prefixDir.canonicalPath() + "/lib").exists())
    378             m_installlibdir = prefixDir.canonicalPath() + "/lib";
    379     }
    380362
    381     VERBOSE(VB_IMPORTANT, QString("Using runtime prefix = %1, libdir = %2")
    382                           .arg(m_installprefix).arg(m_installlibdir));
     363    VERBOSE(VB_IMPORTANT, "Using runtime prefix = " + m_installprefix);
    383364}
    384365
    385366MythContextPrivate::~MythContextPrivate()
  • settings.pro

     
    33isEmpty( PREFIX ) {
    44    PREFIX = /usr/local
    55}
     6isEmpty( RUNPREFIX ) {
     7    RUNPREFIX = $$PREFIX
     8}
     9isEmpty( LIBDIR ) {
     10    LIBDIR = $${RUNPREFIX}/lib
     11}
    612
    713LIBVERSION = 0.22
    814VERSION = 0.22.0
     
    8995DEFINES += $$CONFIG_DEFINES
    9096DEFINES += _GNU_SOURCE
    9197DEFINES += _FILE_OFFSET_BITS=64
     98DEFINES += RUNPREFIX=\\\"$${RUNPREFIX}\\\"
    9299DEFINES += PREFIX=\\\"$${PREFIX}\\\"
    93100DEFINES += LIBDIR=\\\"$${LIBDIR}\\\"
    94101
  • contrib/OSX/build/osx-packager.pl

     
    483483  'mythtv'
    484484  =>  [
    485485        '--prefix=' . $PREFIX,
     486        '--runtime-prefix=../Resources',
    486487        # To "cross compile" something for a lesser Mac:
    487488        #'--tune=G3',
    488489        #'--disable-altivec',