Ticket #1152: commflag.patch

File commflag.patch, 22.9 KB (added by dave@…, 18 years ago)
  • libs/libmythtv/jobqueue.cpp

     
    17051705                            "autodetect" :
    17061706                            QString::number(transcoder);
    17071707
    1708     QString path = gContext->GetInstallPrefix() + "/bin/mythtranscode";
     1708    QString path = gContext->GetAppPath("mythtranscode");
     1709
    17091710    QString command = QString("%1 -j %2 -V %3 -p %4 %5")
    17101711                      .arg(path).arg(jobID).arg(print_verbose_messages)
    17111712                      .arg(profilearg.ascii()).arg(useCutlist ? "-l" : "");
     
    20082009    gContext->LogEntry("commflag", LP_NOTICE, msg, logDesc);
    20092010
    20102011    int breaksFound = 0;
    2011     QString path = gContext->GetInstallPrefix() + "/bin/mythcommflag";
     2012    QString path = gContext->GetAppPath("mythcommflag");
    20122013    QString cmd = QString("%1 -j %2 -V %3")
    20132014                          .arg(path).arg(jobID).arg(print_verbose_messages);
    20142015
  • libs/libmythtv/progfind.h

     
    9595
    9696    TV *m_player;
    9797
    98     QString baseDir;
    9998    QString *searchData;
    10099    QString *initData;
    101100    QString *progData;
  • libs/libmythtv/progfind.cpp

     
    8888    inFill = false;
    8989    needFill = false;
    9090
    91     baseDir = gContext->GetInstallPrefix();
    92 
    9391    listRect = QRect(0, 0, 0, 0);
    9492    infoRect = QRect(0, 0, 0, 0);
    9593
  • libs/libmyth/lcddevice.cpp

     
    142142    {
    143143        // we need to start the mythlcdserver
    144144        startedServer = true;
    145         system(gContext->GetInstallPrefix() + "/bin/mythlcdserver -v none&");
     145        system(gContext->GetAppPath("mythlcdserver") + " -v none&");
    146146        // have to disconnect the error signal otherwise we get connection refused
    147147        // errors while the server is starting up
    148148        disconnect(socket, SIGNAL(error(int)), 0, 0);
  • libs/libmyth/mythcontext.h

     
    264264    void BlockShutdown(void);
    265265    void AllowShutdown(void);
    266266   
    267     QString GetInstallPrefix(void);
     267    QString GetAppPath(QString app_name);
    268268    QString GetShareDir(void);
    269269    QString GetLibraryDir(void);
    270270    static QString GetConfDir(void);
  • libs/libmyth/mythcontext.cpp

     
    33#include <qimage.h>
    44#include <qpixmap.h>
    55#include <qdir.h>
     6#include <qfileinfo.h>
    67#include <qpainter.h>
    78#include <unistd.h>
    89#include <qsqldatabase.h>
     
    185186    Settings *m_settings;
    186187    Settings *m_qtThemeSettings;
    187188
    188     QString m_installprefix;
     189    QDir m_self_directory;
     190#ifdef CONFIG_DARWIN
     191    bool m_in_package;
     192#endif
     193    QString m_share_parent;
    189194
    190195    bool m_gui;
    191196    bool m_backend;
     
    254259};
    255260
    256261
     262namespace
     263{
     264  QDir compute_self_directory()
     265  {
     266#if QT_VERSION >= 0x030200
     267      return qApp->applicationDirPath();
     268#else
     269      QString appPath = QFileInfo(qApp->argv()[0]).absFilePath();
     270      return QDir(appPath.left(appPath.findRev("/")));
     271#endif
     272  }
     273}
    257274
    258275MythContextPrivate::MythContextPrivate(MythContext *lparent)
    259276    : parent(lparent),
    260277      m_settings(new Settings()), m_qtThemeSettings(new Settings()),
    261       m_installprefix(PREFIX),
     278      m_self_directory( compute_self_directory() ),
     279#ifdef CONFIG_DARWIN
     280      m_in_package( m_self_directory.path().contains(".app/Contents/MacOS") ),
     281#endif
     282      m_share_parent(),
    262283      m_gui(false), m_backend(false), m_themeloaded(false),
    263284      m_menuthemepathname(QString::null), m_themepathname(QString::null),
    264285      m_backgroundimage(NULL),
     
    283304      display_res(NULL),
    284305      m_priv_mutex(new QMutex(true))
    285306{
     307   
    286308    char *tmp_installprefix = getenv("MYTHTVDIR");
    287     if (tmp_installprefix)
    288         m_installprefix = tmp_installprefix;
     309    QString installprefix(tmp_installprefix ? tmp_installprefix : PREFIX);
    289310
    290 #if QT_VERSION >= 0x030200
    291     QDir prefixDir = qApp->applicationDirPath();
    292 #else
    293     QString appPath = QFileInfo(qApp->argv()[0]).absFilePath();
    294     QDir prefixDir(appPath.left(appPath.findRev("/")));
    295 #endif
     311#ifdef CONFIG_DARWIN
     312    QDir resource_dir(m_self_directory);
     313    resource_dir.cd("../Resources");
     314    if (m_in_package && QDir(resource_dir.canonicalPath() + "/share").exists())
     315    {
     316        m_share_parent = resource_dir.canonicalPath();
     317    }
     318    else
     319#endif
    296320
    297     if (QDir(m_installprefix).isRelative())
     321    if (QDir(installprefix).isRelative())
    298322    {
     323        QDir prefixDir(m_self_directory);
    299324        // If the PREFIX is relative, evaluate it relative to our
    300325        // executable directory. This can be fragile on Unix, so
    301326        // use relative PREFIX values with care.
    302         prefixDir.cd(m_installprefix);
    303         m_installprefix = prefixDir.canonicalPath();
     327        prefixDir.cd(installprefix);
     328        m_share_parent = prefixDir.canonicalPath();
    304329    }
    305     else if (prefixDir.path().contains(".app/Contents/MacOS"))
     330    else
    306331    {
    307         prefixDir.cd("../Resources");
    308         if (QDir(prefixDir.canonicalPath() + "/share").exists())
    309             m_installprefix = prefixDir.canonicalPath();
     332        m_share_parent = installprefix;
    310333    }
     334
    311335    VERBOSE(VB_IMPORTANT, QString("Using runtime prefix = %1")
    312             .arg(m_installprefix));
     336            .arg(m_share_parent));
    313337}
    314338
    315339// Get screen size from Qt. If the windowing system environment
     
    10911115    return GetSetting("RecordFilePrefix");
    10921116}
    10931117
    1094 QString MythContext::GetInstallPrefix(void)
     1118QString MythContext::GetAppPath(QString executable_name)
    10951119{
    1096     return d->m_installprefix;
     1120#ifdef CONFIG_DARWIN
     1121    if ( d->m_in_package )
     1122    {
     1123        QString path(d->m_self_directory.path() + "/" + executable_name);
     1124        if ( QFileInfo(path).exists() )
     1125            return path;
     1126    }
     1127#endif
     1128    return d->m_share_parent + "/bin/" + executable_name;
    10971129}
    10981130
    10991131QString MythContext::GetConfDir(void)
     
    11151147
    11161148QString MythContext::GetShareDir(void)
    11171149{
    1118     return d->m_installprefix + "/share/mythtv/";
     1150    return d->m_share_parent + "/share/mythtv/";
    11191151}
    11201152
    11211153QString MythContext::GetLibraryDir(void)
    11221154{
    1123     return d->m_installprefix + "/lib/mythtv/";
     1155    return d->m_share_parent + "/lib/mythtv/";
    11241156}
    11251157
    11261158QString MythContext::GetThemesParentDir(void)
     
    11801212
    11811213bool MythContext::LoadSettingsFiles(const QString &filename)
    11821214{
    1183     return d->m_settings->LoadSettingsFiles(filename, d->m_installprefix);
     1215    return d->m_settings->LoadSettingsFiles(filename, d->m_share_parent);
    11841216}
    11851217
    11861218void MythContext::LoadQtConfig(void)
     
    13461378   
    13471379void MythContext::CacheThemeImages(void)
    13481380{
    1349     QString baseDir = d->m_installprefix + "/share/mythtv/themes/default/";
     1381    QString baseDir = GetThemesParentDir() + "default/";
    13501382
    13511383    if (d->m_screenwidth == d->m_baseWidth && d->m_screenheight == d->m_baseHeight)
    13521384        return;
     
    16321664    if (dir.exists())
    16331665        return testdir;
    16341666
    1635     testdir = d->m_installprefix + "/share/mythtv/themes/" + themename;
     1667    testdir = GetThemesParentDir() + themename;
    16361668    dir.setPath(testdir);
    16371669    if (dir.exists())
    16381670        return testdir;
     
    16461678    // Don't complain about the "default" theme being missing
    16471679    if (themename == QObject::tr("Default"))
    16481680    {
    1649         testdir = d->m_installprefix + "/share/mythtv/";
     1681        testdir = GetShareDir();
    16501682        dir.setPath(testdir);
    16511683        if (dir.exists())
    16521684            return testdir;
    16531685    }
    16541686
    1655     testdir = d->m_installprefix + "/share/mythtv/themes/G.A.N.T.";
     1687    testdir = GetThemesParentDir() + "G.A.N.T.";
    16561688    dir.setPath(testdir);
    16571689    if (dir.exists())
    16581690        return testdir;
     
    20192051
    20202052bool MythContext::FindThemeFile(QString &filename)
    20212053{
    2022     QString baseDir = d->m_installprefix + "/share/mythtv/themes/default/";
     2054    QString baseDir = GetThemesParentDir() + "/default/";
    20232055    QString file;
    20242056    int pathStart = filename.findRev('/');
    20252057    bool bFound = false;
     
    20732105{
    20742106    if (filename.left(5) == "myth:")
    20752107        return NULL;
    2076     QString baseDir = d->m_installprefix + "/share/mythtv/themes/default/";
     2108    QString baseDir = GetThemesParentDir() + "/default/";
    20772109
    20782110    if (d->themecachedir != "" && fromcache)
    20792111    {
     
    21672199{
    21682200    if (filename.left(5) == "myth:")
    21692201        return NULL;
    2170     QString baseDir = d->m_installprefix + "/share/mythtv/themes/default/";
     2202    QString baseDir = GetThemesParentDir() + "/default/";
    21712203
    21722204    if (d->themecachedir != "" && fromcache)
    21732205    {
  • programs/mythfrontend/globalsettings.cpp

     
    24952498{
    24962499    GlobalLineEdit *be = new GlobalLineEdit("MythFillDatabasePath");
    24972500    be->setLabel(QObject::tr("mythfilldatabase Path"));
    2498     be->setValue(gContext->GetInstallPrefix() + "/bin/mythfilldatabase");
     2501    be->setValue(gContext->GetAppPath("mythfilldatabase"));
    24992502    be->setHelpText(QObject::tr("Path (including executable) of the "
    25002503                    "mythfilldatabase program."));
    25012504    return be;
  • programs/mythwelcome/welcomedialog.h

     
    6767    QTimer         *m_updateScreenTimer;
    6868    QTimer         *m_timeTimer;
    6969
    70     QString        m_installDir;
     70    QString        m_shutdown_app;
    7171    QString        m_timeFormat;
    7272    bool           m_isRecording;
    7373    bool           m_hasConflicts;
  • programs/mythwelcome/welcomedialog.cpp

     
    2222                                 QString window_name,
    2323                                 QString theme_filename,
    2424                                 const char* name)
    25                 :MythThemedDialog(parent, window_name, theme_filename, name)
     25  : MythThemedDialog(parent, window_name, theme_filename, name)
     26    , m_shutdown_app(gContext->GetAppPath("mythshutdown"))
    2627{
    2728    checkConnectionToServer();
    2829   
     
    3334
    3435    gContext->addListener(this);
    3536       
    36     m_installDir = gContext->GetInstallPrefix();
    3737    m_preRollSeconds = gContext->GetNumSetting("RecordPreRoll");
    3838    m_idleWaitForRecordingTime =
    3939                       gContext->GetNumSetting("idleWaitForRecordingTime", 15);
     
    7171{
    7272    gContext->removeListener(this);
    7373
    74     QString startFECmd = gContext->GetSetting("MythWelcomeStartFECmd",
    75                          m_installDir + "/bin/mythfrontend");
     74    QString startFECmd = gContext->GetSetting(
     75        "MythWelcomeStartFECmd",
     76        gContext->GetAppPath("mythfrontend"));
    7677
    7778    myth_system(startFECmd.ascii());
    7879
     
    8990{
    9091    // mythshutdown --startup returns 0 for automatic startup
    9192    //                                1 for manual startup
    92     int state = system(m_installDir + "/bin/mythshutdown --startup");
     93    int state = system(m_shutdown_app + " --startup");
    9394
    9495    if (WIFEXITED(state))
    9596        state = WEXITSTATUS(state);
     
    193194        }
    194195        else if (action == "0")
    195196        {
    196             int statusCode = system(m_installDir + "/bin/mythshutdown --status");
     197            int statusCode = system(m_shutdown_app + " --status");
    197198            if (WIFEXITED(statusCode))
    198199                statusCode = WEXITSTATUS(statusCode);
    199200       
    200201            // is shutdown locked by a user
    201202            if (statusCode & 16)
    202                 system(m_installDir + "/bin/mythshutdown --unlock");
     203                system(m_shutdown_app + " --unlock");
    203204            else   
    204                 system(m_installDir + "/bin/mythshutdown --lock");
     205                system(m_shutdown_app + " --lock");
    205206                   
    206207            updateStatusMessage();
    207208            updateScreen();   
     
    583584        m_statusList.append(tr("MythTV is busy recording."));
    584585    }
    585586       
    586     int statusCode = system(m_installDir + "/bin/mythshutdown --status");
     587    int statusCode = system(m_shutdown_app + " --status");
    587588    if (WIFEXITED(statusCode))
    588589        statusCode = WEXITSTATUS(statusCode);
    589590   
     
    641642    QLabel *label = popup->addLabel(tr("Menu"), MythPopupBox::Large, false);
    642643    label->setAlignment(Qt::AlignCenter | Qt::WordBreak);
    643644   
    644     int statusCode = system(m_installDir + "/bin/mythshutdown --status");
     645    int statusCode = system(m_shutdown_app + " --status");
    645646    if (WIFEXITED(statusCode))
    646647        statusCode = WEXITSTATUS(statusCode);
    647648 
     
    680681void WelcomeDialog::lockShutdown(void)
    681682{
    682683    cancelPopup();
    683     system(m_installDir + "/bin/mythshutdown --lock");
     684    system(m_shutdown_app + " --lock");
    684685    updateStatusMessage();
    685686    updateScreen();
    686687}
     
    688689void WelcomeDialog::unlockShutdown(void)
    689690{
    690691    cancelPopup();
    691     system(m_installDir + "/bin/mythshutdown --unlock");
     692    system(m_shutdown_app +" --unlock");
    692693    updateStatusMessage();
    693694    updateScreen();
    694695}
     
    737738    }
    738739
    739740    // don't shutdown if we are about to start a wakeup/shutdown period
    740     int statusCode = system(m_installDir + "/bin/mythshutdown --status");
     741    int statusCode = system(m_shutdown_app + " --status");
    741742    if (WIFEXITED(statusCode))
    742743        statusCode = WEXITSTATUS(statusCode);
    743744       
     
    780781    }
    781782   
    782783    // run command to set wakeuptime in bios and shutdown the system
    783     system("sudo " + m_installDir + "/bin/mythshutdown --shutdown");
     784    system("sudo " + m_shutdown_app + " --shutdown");
    784785}
    785786
  • programs/mythwelcome/welcomesettings.cpp

     
    154154{
    155155    HostLineEdit *gc = new HostLineEdit("MythWelcomeStartFECmd");
    156156    gc->setLabel(QObject::tr("Command to run to start the Frontend"));
    157     gc->setValue(gContext->GetInstallPrefix() + "/bin/mythfrontend");
     157    gc->setValue(gContext->GetAppPath("mythfrontend"));
    158158    gc->setHelpText(QObject::tr("Command to start mythfrontend."));
    159159    return gc;
    160160};
  • contrib/osx-packager.pl

     
    159162#   },
    160163  {
    161164    'url'
    162     =>  'ftp://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/sources/qt-mac-free-3.3.4.tar.gz',
     165    =>  'ftp://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/sources/qt-mac-free-3.3.5.tar.gz',
    163166    'conf-cmd'
    164167    =>  'echo yes | ./configure',
    165168    'conf'
     
    191194    =>  [
    192195          'sub-src',
    193196          'qmake-install',
    194           'moc-install'
     197          'moc-install',
     198         
     199         # we need this.  If the library isn't copied to
     200         # $PREFIX/build/lib then it gets its references modified in
     201         # place.  That will screw up linking the next time around, as
     202         # the references can't be found in the expected location.
     203          'src-install'
    195204        ],
    196205  },
    197206 
     
    211220    =>  [
    212221          '--disable-nls',
    213222        ],
     223    'post-conf'
     224    # correct a bug that prevents compilation.  This patch is already
     225    # in the exif developers' CVS repository.  Why they haven't
     226    # released a new version with the fix, I don't know.
     227    =>  'echo "--- libexif/libexif/libexif/exif-utils.c2005/03/10 20:48:211.10
     228+++ libexif/libexif/libexif/exif-utils.c2005/03/31 12:24:311.11
     229@@ -83,7 +83,7 @@
     230 }
     231 }
     232 
     233-static ExifSShort
     234+ExifSShort
     235 exif_get_sshort (const unsigned char *buf, ExifByteOrder order)
     236 {
     237 if (!buf) return 0;
     238" | patch -u --verbose libexif/exif-utils.c'
    214239  },
    215240 
    216241);
    (this hunk was shorter than expected) 
    702740
    703741  chdir $compdir;
    704742 
    705   if ($comp eq 'mythtv')
    706   {
    707     # MythTV has an empty subdirectory 'config' that causes problems for me:
    708     &Syscall('touch config/config.pro');
    709   }
    710 
    711743  if ($OPT{'clean'} && -e 'Makefile')
    712744  {
    713745    &Verbose("Cleaning $comp");
     
    750788
    751789  if ($comp eq 'mythtv')
    752790  {
     791    # MythTV has an empty subdirectory 'config' that causes problems for me:
     792    &Syscall('touch config/config.pro');
     793
    753794    # Remove Nigel's frontend speedup hack
    754795    &DoSpeedupHacks('programs/programs.pro', 'mythfrontend');
    755796    &DoSpeedupHacks('mythtv.pro', 'libs filters programs themes i18n');
    756797  }
    757798 
    758799  &Verbose("Making $comp");
    759800  &Syscall([ '/usr/bin/make' ]) or die;
    760801  # install
    761802  # This requires a change from the compiled-in relative
    762803  # PREFIX to our absolute path of the temp install location.
     
    797851  # Get a fresh copy of the app
    798852  &Verbose("Building self-contained $target");
    799853  &Syscall([ 'rm', '-fr', $finalTarget ]) or die;
    800   &Syscall([ '/bin/cp', '-R',
    801              "$PREFIX/bin/$builtTarget.app",
    802              $finalTarget ]) or die;
     854  &RecursiveCopy("$PREFIX/bin/$builtTarget.app", $finalTarget);
    803855 
    804856  # write a custom Info.plist
    805857  &GeneratePlist($target, $builtTarget, $finalTarget, $VERS);
    806858 
    807859  # Make frameworks from Myth libraries
    808860  &Verbose("Installing frameworks into $target");
    809   my $fw_dir = "$finalTarget/Contents/Frameworks";
    810   mkdir($fw_dir);
    811   my $dephash = &ProcessDependencies("$finalTarget/Contents/MacOS/$builtTarget",
    812                                      glob("$PREFIX/lib/mythtv/*/*.dylib"));
    813   my @deps = values %$dephash;
    814   while (scalar @deps)
    815   {
    816     my $dep = shift @deps;
    817     next if $dep =~ m/executable_path/;
    818 
    819     my $file = &MakeFramework(&FindLibraryFile($dep), $fw_dir);
    820     my $newhash = &ProcessDependencies($file);
    821     foreach my $base (keys %$newhash)
    822     {
    823       next if exists $dephash->{$base};
    824       $dephash->{$base} = $newhash->{$base};
    825       push(@deps, $newhash->{$base});
    826     }
    827   }
     861  &PackagedExecutable($finalTarget, $builtTarget);
    828862 
    829863 if ( $target eq "MythFrontend" or $target eq "MythTV-Setup" )
    830864 {
     
    832866  &Verbose("Installing resources into $target");
    833867  mkdir "$finalTarget/Contents/Resources";
    834868  mkdir "$finalTarget/Contents/Resources/lib";
    835   &Syscall([ '/bin/cp', '-R',
    836              "$PREFIX/lib/mythtv",
    837              "$finalTarget/Contents/Resources/lib" ]) or die;
     869  &RecursiveCopy("$PREFIX/lib/mythtv",
     870                 "$finalTarget/Contents/Resources/lib");
    838871  mkdir "$finalTarget/Contents/Resources/share";
    839   &Syscall([ '/bin/cp', '-R',
    840              "$PREFIX/share/mythtv",
    841              "$finalTarget/Contents/Resources/share" ]) or die;
     872  &RecursiveCopy( "$PREFIX/share/mythtv",
     873                  "$finalTarget/Contents/Resources/share" );
    842874 }
    843875}
    844876
     
    851883    if ( -e $SRC )
    852884    {
    853885      &Syscall([ '/bin/cp', $SRC,
    854                  "$SCRIPTDIR/MythBackend.app/Contents/MacOS" ]) or die
     886                 "$SCRIPTDIR/MythBackend.app/Contents/MacOS" ]) or die;
     887      PackagedExecutable("$SCRIPTDIR/MythBackend.app", $binary);
    855888    }
    856889  }
    857890}
     
    866899
    867900  $SRC  = "$PREFIX/bin/mythtranscode.app/Contents/MacOS/mythtranscode";
    868901  if ( -e $SRC )
    869   { &Syscall([ '/bin/cp', $SRC, $DEST ]) or die }
     902  {
     903      &Syscall([ '/bin/cp', $SRC, $DEST ]) or die
     904      PackagedExecutable("$SCRIPTDIR/MythJobQueue.app", 'mythcommflag');
     905  }
    870906}
    871907
    872908if ($OPT{usehdimage})
     
    881917exit 0;
    882918
    883919
     920######################################
     921## RecursiveCopy copies a directory tree, stripping out .svn
     922## directories and properly managing static libraries.
     923######################################
    884924
     925sub RecursiveCopy
     926{
     927    my ($src, $dst) = @_;
     928
     929    # First copy absolutely everything
     930    &Syscall([ '/bin/cp', '-R', "$src", "$dst"]) or die;
     931
     932    # Then strip out any .svn directories
     933    my @files = map { chomp $_; $_ } `find $dst -name .svn`;
     934    if (scalar @files)
     935    {
     936        &Syscall([ '/bin/rm', '-f', '-r', @files ]);
     937    }
     938
     939    # And make sure any static libraries are properly relocated.
     940    my @libs = map { chomp $_; $_ } `find $dst -name "lib*.a"`;
     941    if (scalar @libs)
     942    {
     943        &Syscall([ 'ranlib', '-s', @libs ]);
     944    }
     945}
     946
    885947######################################
     948## Given an application package $finalTarget and an executable
     949## $builtTarget that has been copied into it, PackagedExecutable
     950## makes sure the package contains all the library dependencies as
     951## frameworks and that all the paths internal to the executable have
     952## been adjusted appropriately.
     953######################################
     954
     955sub PackagedExecutable
     956{
     957  my ($finalTarget, $builtTarget) = @_;
     958
     959  my $fw_dir = "$finalTarget/Contents/Frameworks";
     960  mkdir($fw_dir);
     961
     962  my $dephash = &ProcessDependencies("$finalTarget/Contents/MacOS/$builtTarget",
     963                                     glob("$PREFIX/lib/mythtv/*/*.dylib"));
     964  my @deps = values %$dephash;
     965  while (scalar @deps)
     966  {
     967    my $dep = shift @deps;
     968    next if $dep =~ m/executable_path/;
     969
     970    my $file = &MakeFramework( &FindLibraryFile($dep), $fw_dir );
     971    if ($file)
     972    {
     973      my $newhash = &ProcessDependencies($file);
     974      foreach my $base (keys %$newhash)
     975      {
     976        next if exists $dephash->{$base};
     977        $dephash->{$base} = $newhash->{$base};
     978        push(@deps, $newhash->{$base});
     979      }
     980    }
     981  }
     982}
     983
     984
     985######################################
    886986## MakeFramework copies a dylib into a
    887987## framework bundle.
    888988######################################
     
    892992  my ($dylib, $dest) = @_;
    893993 
    894994  my ($base, $vers) = &BaseVers($dylib);
    895   $vers .= '.' . $OPT{'version'} if ($OPT{'version'} && $base =~ /myth/);
     995  my $vers .= '.' . $OPT{'version'} if ($OPT{'version'} && $base =~ /myth/);
     996  my $fw_dir = $dest . '/' . $base . '.framework';
     997 
     998  return '' if ( -e $fw_dir );
     999
    8961000  &Verbose("Building $base framework");
    897  
    898   my $fw_dir = $dest . '/' . $base . '.framework';
     1001
    8991002  &Syscall([ '/bin/mkdir',
    9001003             '-p',
    9011004             "$fw_dir/Versions/A/Resources" ]) or die;
     
    10521154      chomp $dep;
    10531155      $dep =~ s/\s+(.*) \(.*\)$/$1/;
    10541156     
     1157      # /usr/lib/libstdc++, for example, contains quantifiers that must be escaped
     1158      $dep =~ s/([+*?])/\\$1/;
     1159     
    10551160      # otool sometimes lists the framework as depending on itself
    10561161      next if ($file =~ m,/Versions/A/$dep,);
    10571162
    10581163      # Any dependency which is already package relative can be ignored
    10591164      next if $dep =~ m/\@executable_path/;