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 6 6 7 7 name qt4-creator-mac 8 8 version 2.5.2 9 revision 1 9 10 categories devel aqua 10 11 platforms darwin 11 12 maintainers mcalhoun openmaintainer … … 23 24 24 25 # fix up QMake build files to remove debug and release building; 25 26 # specify that here instead. 26 patchfiles patch-remove_build_types.diff 27 patchfiles patch-remove_build_types.diff patch-macports-paths.diff 27 28 28 29 post-patch { 29 30 # remove arch from QMake build scripts 30 31 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 31 38 } 32 39 33 40 pre-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 }