[96486] trunk/dports/aqua/qt4-mac

michaelld at macports.org michaelld at macports.org
Sat Aug 11 14:54:29 PDT 2012


Revision: 96486
          https://trac.macports.org/changeset/96486
Author:   michaelld at macports.org
Date:     2012-08-11 14:54:27 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
qt4-mac :
+ Corrects detection of corewlan +universal builds.
+ Removes warnings when building on 10.8.
+ also addresses tickets:

* #35523 : correctly select the "pg_config" for psql variant selected (if any), to allow building as universal;
* #34934 : correctly use mach timer info to compute time;
* #34902 : patch Qt QMake build system to allow full compilation on 32-bit systems;
* #34864 : correct +framework header links; and
* #34856 : disable ccache for now; try to fix later; it's involved.

Modified Paths:
--------------
    trunk/dports/aqua/qt4-mac/Portfile
    trunk/dports/aqua/qt4-mac/files/patch-EXPERIMENTAL-ML-fixes.diff
    trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff
    trunk/dports/aqua/qt4-mac/files/patch-configure.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff

Added Paths:
-----------
    trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
    trunk/dports/aqua/qt4-mac/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2012-08-11 15:53:41 UTC (rev 96485)
+++ trunk/dports/aqua/qt4-mac/Portfile	2012-08-11 21:54:27 UTC (rev 96486)
@@ -12,6 +12,7 @@
 name                qt4-mac
 conflicts           qt3 qt3-mac qt4-mac-devel
 version             4.8.2
+revision            1
 categories          aqua
 platforms           macosx
 maintainers         michaelld openmaintainer
@@ -139,7 +140,8 @@
     patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff \
     patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff
 
-# (14) fix MKSPECS install location for WebKit
+# (14) fix MKSPECS install location for WebKit; fix WebCore to handle
+# 32-bit compiling correctly on x86 and ppc
 
 patchfiles-append   \
     patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff
@@ -182,7 +184,8 @@
 # (19) fix 'macdeployqt' to look for the correct plugins location by
 # default.  This is paired with a "reinplace" in post-patch
 
-patchfiles-append patch-tools_macdeployqt_macdeployqt_main.cpp.diff
+patchfiles-append   \
+    patch-tools_macdeployqt_macdeployqt_main.cpp.diff
 
 # (20) Under 10.4 only: patch QMake build files using just "-lQtHelp"
 # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead.  For
@@ -192,6 +195,16 @@
     patchfiles-append patch-QtHelp_10.4_only.diff
 }
 
+# (21) fix the Mac timer's use of "mach_timebase_info"
+
+patchfiles-append   \
+    patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff
+
+# (22) fix WebCore to handle 32-bit compiling correctly on x86 and ppc
+
+patchfiles-append   \
+    patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
+
 # Temporary patch to get ML working; some of this is already upstream 
 # https://codereview.qt-project.org/#change,31759
 # See also https://trac.macports.org/ticket/35430
@@ -201,6 +214,15 @@
 
 ###############################################
 
+# disable CCACHE for now (ticket #34856)
+
+configure.ccache no
+
+# create the global for the psql version, if selected
+
+global psql_version
+set psql_version ""
+
 # find a way to specify the OS MINOR version.
 global MINOR
 set MINOR ""
@@ -281,6 +303,12 @@
     reinplace "s, at QT_PLUGINS_DIR@,${qt_plugins_dir},g" \
         ${worksrcpath}/tools/macdeployqt/macdeployqt/main.cpp
 
+    # fix path to "pg_config", if the variant was selected
+
+    if {${psql_version} != ""} {
+        reinplace "s, at PATH_TO_PG_CONFIG@,${prefix}/lib/postgresql${psql_version}/bin/,g" ${worksrcpath}/configure
+    }
+
     # if no debug, then do not even build debug code
 
     if {![variant_isset debug]} {
@@ -588,7 +616,8 @@
         # if they are already there first
 
         foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \
-                             -name "*.framework"] {
+                             -name "*.framework" | \
+                             sed -e "s@${destroot}@@g"] {
             set tf_full [strsed ${fixfile} {s@\\.framework@@}]
             set tf [strsed ${tf_full} {g at .*\/@@}]
             set inc_file ${destroot}${qt_includes_dir}/${tf}
@@ -659,7 +688,6 @@
 variant psql91 conflicts psql83 psql84 psql90 \
 description {Enable Postgre SQL Driver version 9.1} {}
 
-set psql_version ""
 if {[variant_isset psql83]} {
     set psql_version "83"
 } elseif {[variant_isset psql84]} {

Modified: trunk/dports/aqua/qt4-mac/files/patch-EXPERIMENTAL-ML-fixes.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-EXPERIMENTAL-ML-fixes.diff	2012-08-11 15:53:41 UTC (rev 96485)
+++ trunk/dports/aqua/qt4-mac/files/patch-EXPERIMENTAL-ML-fixes.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -21,3 +21,17 @@
  mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK
  win32:DEFINES-=QT_NO_CAST_TO_ASCII
  
+--- src/corelib/global/qglobal.h.orig	2012-08-07 16:13:40.000000000 -0400
++++ src/corelib/global/qglobal.h	2012-08-07 16:14:01.000000000 -0400
+@@ -324,7 +324,10 @@
+ #  if !defined(MAC_OS_X_VERSION_10_7)
+ #       define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1
+ #  endif
+-#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7)
++#  if !defined(MAC_OS_X_VERSION_10_8)
++#       define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 1
++#  endif
++#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_8)
+ #    warning "This version of Mac OS X is unsupported"
+ #  endif
+ #endif

Modified: trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff	2012-08-11 15:53:41 UTC (rev 96485)
+++ trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -5,7 +5,7 @@
  rm -f "$EXE" "${EXE}.exe"
  
 -"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
-+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
++"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
  
  if [ "$VERBOSE" = "yes" ]; then
      $MAKE

Modified: trunk/dports/aqua/qt4-mac/files/patch-configure.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-configure.diff	2012-08-11 15:53:41 UTC (rev 96485)
+++ trunk/dports/aqua/qt4-mac/files/patch-configure.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -1,5 +1,5 @@
---- configure.orig	2012-05-28 09:16:17.000000000 -0400
-+++ configure	2012-05-28 09:16:26.000000000 -0400
+--- configure.orig	2012-08-08 16:12:36.000000000 -0400
++++ configure	2012-08-08 16:39:19.000000000 -0400
 @@ -901,6 +901,7 @@
  QT_INSTALL_DOCS=
  QT_INSTALL_HEADERS=
@@ -104,6 +104,19 @@
  	    if [ '!' -z "$CFG_SDK" ]; then
  		echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
  		echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
+@@ -5389,9 +5402,9 @@
+         psql)
+             if [ "$CFG_SQL_psql" != "no" ]; then
+                 # Be careful not to use native pg_config when cross building.
+-                if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
+-                    QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
+-                    QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
++                if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" @PATH_TO_PG_CONFIG at pg_config >/dev/null 2>&1; then
++                    QT_CFLAGS_PSQL=`@PATH_TO_PG_CONFIG at pg_config --includedir 2>/dev/null`
++                    QT_LFLAGS_PSQL=`@PATH_TO_PG_CONFIG at pg_config --libdir 2>/dev/null`
+                 fi
+                 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
+                 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
 @@ -7042,16 +7055,8 @@
  
  # set the global Mac deployment target. This is overridden on an arch-by-arch basis

Added: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -0,0 +1,11 @@
+--- src/3rdparty/webkit/Source/WebCore/WebCore.pro.orig	2012-08-08 16:27:24.000000000 -0400
++++ src/3rdparty/webkit/Source/WebCore/WebCore.pro	2012-08-08 16:30:43.000000000 -0400
+@@ -2975,7 +2975,7 @@
+             platform/mac/WebWindowAnimation.mm
+ 
+         DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
+-        contains(CONFIG, "x86") {
++        contains(CONFIG, "x86")|contains(CONFIG, "ppc") {
+             DEFINES+=NS_BUILD_32_LIKE_64
+         }
+ 

Modified: trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff	2012-08-11 15:53:41 UTC (rev 96485)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_3rdparty_webkit_Source_WebKit_qt_QtWebKit.pro.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -1,5 +1,14 @@
---- src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro.orig	2012-04-23 14:49:04.000000000 -0400
-+++ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro	2012-04-17 14:38:16.000000000 -0400
+--- src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro.orig	2012-08-08 16:27:13.000000000 -0400
++++ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro	2012-08-08 16:33:29.000000000 -0400
+@@ -233,7 +233,7 @@
+                        $$SOURCE_DIR/../WebKitLibraries/
+ 
+         DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
+-        contains(CONFIG, "x86") {
++        contains(CONFIG, "x86")|contains(CONFIG, "ppc") {
+             DEFINES+=NS_BUILD_32_LIKE_64
+         }
+ 
 @@ -295,7 +295,7 @@
  
  !symbian-abld:!symbian-sbsv2 {

Added: trunk/dports/aqua/qt4-mac/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff	2012-08-11 21:54:27 UTC (rev 96486)
@@ -0,0 +1,11 @@
+--- src/corelib/tools/qelapsedtimer_mac.cpp.orig	2011-09-12 08:49:29.000000000 +0200
++++ src/corelib/tools/qelapsedtimer_mac.cpp	2012-02-02 21:30:46.000000000 +0100
+@@ -62,7 +62,7 @@
+ {
+     if (info.denom == 0)
+         mach_timebase_info(&info);
+-    qint64 nsecs = cpuTime * info.numer / info.denom;
++    qint64 nsecs = (qint64)(((double) cpuTime) * ((double) info.numer) / ((double) info.denom));
+     return nsecs;
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120811/bf48dbb4/attachment.html>


More information about the macports-changes mailing list