Ticket #36280: qt4-creator-mac-qmlviewer.patch

File qt4-creator-mac-qmlviewer.patch, 2.3 KB (added by macports@…, 12 years ago)
  • Portfile

    old new  
    66
    77name                qt4-creator-mac
    88version             2.5.2
     9revision            1
    910categories          devel aqua
    1011platforms           darwin
    1112maintainers         mcalhoun openmaintainer
     
    2324
    2425# fix up QMake build files to remove debug and release building;
    2526# specify that here instead.
    26 patchfiles          patch-remove_build_types.diff
     27patchfiles          patch-remove_build_types.diff patch-macports-paths.diff
    2728
    2829post-patch {
    2930    # remove arch from QMake build scripts
    3031    reinplace "/ppc/d" ${worksrcpath}/qtcreator.pri
     32
     33    # add MacPorts-specific paths to the list of search paths for Qt binaries
     34    reinplace "s|@@PREFIX@@|${prefix}|" \
     35        ${worksrcpath}/src/libs/utils/environment.cpp
     36    reinplace "s|@@QT_APPS_DIR@@|${qt_apps_dir}|" \
     37        ${worksrcpath}/src/plugins/qtsupport/baseqtversion.cpp
    3138}
    3239
    3340pre-configure {
  • files/patch-macports-paths.diff

    old new  
     1--- src/libs/utils/environment.cpp.orig 2012-08-08 15:47:06.000000000 +0200
     2+++ src/libs/utils/environment.cpp      2012-09-22 16:10:03.000000000 +0200
     3@@ -89,6 +89,7 @@
     4 #endif
     5         }
     6     }
     7+    prependOrSetPath("@@PREFIX@@/bin");
     8 }
     9 
     10 QStringList Environment::toStringList() const
     11--- src/plugins/qtsupport/baseqtversion.cpp.orig        2012-08-08 15:47:06.000000000 +0200
     12+++ src/plugins/qtsupport/baseqtversion.cpp     2012-09-22 13:42:33.000000000 +0200
     13@@ -620,10 +620,14 @@
     14     default:
     15         Q_ASSERT(false);
     16     }
     17-    foreach (const QString &possibleCommand, possibleCommands) {
     18-        const QString fullPath = baseDir + possibleCommand;
     19-        if (QFileInfo(fullPath).isFile())
     20-            return QDir::cleanPath(fullPath);
     21+    QStringList baseDirs(baseDir);
     22+    baseDirs << QLatin1String("@@QT_APPS_DIR@@/");
     23+    foreach (const QString &currBaseDir, baseDirs) {
     24+        foreach (const QString &possibleCommand, possibleCommands) {
     25+            const QString fullPath = currBaseDir + possibleCommand;
     26+            if (QFileInfo(fullPath).isFile())
     27+                return QDir::cleanPath(fullPath);
     28+        }
     29     }
     30     return QString();
     31 }