[99012] trunk/dports/devel/qt4-creator-mac

cal at macports.org cal at macports.org
Tue Oct 23 12:43:25 PDT 2012


Revision: 99012
          http://trac.macports.org//changeset/99012
Author:   cal at macports.org
Date:     2012-10-23 12:43:25 -0700 (Tue, 23 Oct 2012)
Log Message:
-----------
qt4-creator-mac: search in MacPorts path for utilities and tools, closes #36280, maintainer timeout

Modified Paths:
--------------
    trunk/dports/devel/qt4-creator-mac/Portfile

Added Paths:
-----------
    trunk/dports/devel/qt4-creator-mac/files/patch-macports-paths.diff

Modified: trunk/dports/devel/qt4-creator-mac/Portfile
===================================================================
--- trunk/dports/devel/qt4-creator-mac/Portfile	2012-10-23 18:54:29 UTC (rev 99011)
+++ trunk/dports/devel/qt4-creator-mac/Portfile	2012-10-23 19:43:25 UTC (rev 99012)
@@ -6,6 +6,7 @@
 
 name                qt4-creator-mac
 version             2.5.2
+revision            1
 categories          devel aqua
 platforms           darwin
 maintainers         mcalhoun openmaintainer
@@ -25,11 +26,18 @@
 # fix up QMake build files to remove debug and release building;
 # specify that here instead.
 patchfiles          patch-remove_build_types.diff \
-                    patch-servicebrowser_p.h.diff
+                    patch-servicebrowser_p.h.diff \
+                    patch-macports-paths.diff
 
 post-patch {
     # remove arch from QMake build scripts
     reinplace "/ppc/d" ${worksrcpath}/qtcreator.pri
+
+    # add MacPorts-specific paths to the list of search paths for Qt binaries
+    reinplace "s|@@PREFIX@@|${prefix}|" \
+        ${worksrcpath}/src/libs/utils/environment.cpp
+    reinplace "s|@@QT_APPS_DIR@@|${qt_apps_dir}|" \
+        ${worksrcpath}/src/plugins/qtsupport/baseqtversion.cpp
 }
 
 pre-configure {

Added: trunk/dports/devel/qt4-creator-mac/files/patch-macports-paths.diff
===================================================================
--- trunk/dports/devel/qt4-creator-mac/files/patch-macports-paths.diff	                        (rev 0)
+++ trunk/dports/devel/qt4-creator-mac/files/patch-macports-paths.diff	2012-10-23 19:43:25 UTC (rev 99012)
@@ -0,0 +1,31 @@
+--- src/libs/utils/environment.cpp.orig	2012-08-08 15:47:06.000000000 +0200
++++ src/libs/utils/environment.cpp	2012-09-22 16:10:03.000000000 +0200
+@@ -89,6 +89,7 @@
+ #endif
+         }
+     }
++    prependOrSetPath("@@PREFIX@@/bin");
+ }
+ 
+ QStringList Environment::toStringList() const
+--- src/plugins/qtsupport/baseqtversion.cpp.orig	2012-08-08 15:47:06.000000000 +0200
++++ src/plugins/qtsupport/baseqtversion.cpp	2012-09-22 13:42:33.000000000 +0200
+@@ -620,10 +620,14 @@
+     default:
+         Q_ASSERT(false);
+     }
+-    foreach (const QString &possibleCommand, possibleCommands) {
+-        const QString fullPath = baseDir + possibleCommand;
+-        if (QFileInfo(fullPath).isFile())
+-            return QDir::cleanPath(fullPath);
++    QStringList baseDirs(baseDir);
++    baseDirs << QLatin1String("@@QT_APPS_DIR@@/");
++    foreach (const QString &currBaseDir, baseDirs) {
++        foreach (const QString &possibleCommand, possibleCommands) {
++            const QString fullPath = currBaseDir + possibleCommand;
++            if (QFileInfo(fullPath).isFile())
++                return QDir::cleanPath(fullPath);
++        }
+     }
+     return QString();
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121023/a90c9700/attachment.html>


More information about the macports-changes mailing list