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

michaelld at macports.org michaelld at macports.org
Fri Nov 30 12:29:50 PST 2012


Revision: 100149
          https://trac.macports.org/changeset/100149
Author:   michaelld at macports.org
Date:     2012-11-30 12:29:49 -0800 (Fri, 30 Nov 2012)
Log Message:
-----------
qt4-mac :

* update to 4.8.4_0.

* remove temporary 4.8.4 patchfile.

* update patchfiles for 4.8.4 changes.

* link each .app's executable into ${prefix}/bin.

* install non-framework ${prefix}/include/Qt/ headers, linked where possible to the actual header located in a framework.

Modified Paths:
--------------
    trunk/dports/aqua/qt4-mac/Portfile
    trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff
    trunk/dports/aqua/qt4-mac/files/patch-configure.diff

Removed Paths:
-------------
    trunk/dports/aqua/qt4-mac/files/patch-4.8.4-osx-native-menu-state-fix.diff

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2012-11-30 19:00:57 UTC (rev 100148)
+++ trunk/dports/aqua/qt4-mac/Portfile	2012-11-30 20:29:49 UTC (rev 100149)
@@ -11,8 +11,7 @@
 
 name                qt4-mac
 conflicts           qt3 qt3-mac qt4-mac-devel
-version             4.8.3
-revision            1
+version             4.8.4
 categories          aqua
 platforms           macosx
 maintainers         michaelld openmaintainer
@@ -27,8 +26,8 @@
 master_sites        trolltech
 distname            qt-everywhere-opensource-src-${version}
 
-checksums           sha1    bc352a283610e0cd2fe0dbedbc45613844090fcb \
-                    rmd160  fe56e5da874503a79d6f84a1e15460eba5a6feae
+checksums           sha1    f5880f11c139d7d8d01ecb8d874535f7d9553198 \
+                    rmd160  3c09a3b1411385d0917225f01ac2ff3a2ce83fda
 
 minimum_xcodeversions   {8 2.5}
 
@@ -216,11 +215,6 @@
 patchfiles-append   \
     patch-tools_macdeployqt_shared_shared.cpp.diff
 
-# (25) temporary fix for Mac menu state; will be removed with 4.8.4.
-
-patchfiles-append   \
-    patch-4.8.4-osx-native-menu-state-fix.diff
-
 ###############################################
 
 # disable CCACHE for now (ticket #34856)
@@ -508,6 +502,11 @@
     if {[file exists ${SDK}]} {
         configure.args-append -sdk ${SDK}
     }
+
+    # set which pkg-config to use
+
+    configure.env-append PKG_CONFIG=${prefix}/bin/pkg-config
+
 }
 
 post-configure {
@@ -842,11 +841,29 @@
         eval xinstall -m 644 [split ${files}] ${dest_dir}
     }
 
-    # Move .apps into the applications_dir
+    # Move .apps into the applications_dir, and link each .apps'
+    # executable back into ${qt_bins_dir}
 
-    xinstall -m 755 -d ${destroot}${qt_apps_dir}
-    foreach app [glob ${destroot}/${qt_bins_dir}/*.app] {
-        move ${app} ${destroot}${qt_apps_dir}
+    set dr_qt_apps_dir ${destroot}${qt_apps_dir}
+    set dr_qt_bins_dir ${destroot}${qt_bins_dir}
+
+    xinstall -m 755 -d ${dr_qt_apps_dir}
+    foreach app [glob ${dr_qt_bins_dir}/*.app] {
+
+        # remove the leading stuff
+
+        set app [lindex [split ${app} /] end]
+
+        # move the .app
+
+        move ${dr_qt_bins_dir}/${app} ${dr_qt_apps_dir}
+
+        # link the app's executable back
+
+        set texe [strsed ${app} {g@\.app@@}]
+        ln -s ${qt_apps_dir}/${app}/Contents/MacOS/${texe} \
+            ${dr_qt_bins_dir}
+
     }
 
     # move tests to ${qt_data_dir}
@@ -854,6 +871,46 @@
     xinstall -m 755 -d ${destroot}${qt_data_dir}
     move ${destroot_qt}/tests/qt4 ${destroot}${qt_data_dir}/tests
 
+    # install ${qt_includes_dir}/Qt if not already and it exists in
+    # the build, for support of legacy projects
+
+    if {![file exists ${destroot}${qt_includes_dir}/Qt] &&
+        [file exists ${worksrcpath}/include/Qt]} {
+
+        # copy the Qt headers directory
+
+        copy ${worksrcpath}/include/Qt ${destroot}${qt_includes_dir}
+
+    }
+
+    # if ${qt_includes_dir}/Qt was installed, then replace each header
+    # with a link to its actual header when possible
+
+    if {[file exists ${destroot}${qt_includes_dir}/Qt]} {
+
+        foreach QtH [exec find ${destroot}${qt_includes_dir}/Qt | \
+                         sed -e "1d" -e "s@${destroot}${qt_includes_dir}/Qt/@@g"] {
+
+            # find the header
+
+            set tH [exec find ${destroot}${qt_frameworks_dir} -name ${QtH} | \
+                        sed -e "s@${destroot}@@g"]
+
+            # if found ...
+
+            if {${tH} != ""} {
+
+                # remove this header
+
+                file delete ${destroot}${qt_includes_dir}/Qt/${QtH}
+
+                # link it to the found header
+
+                ln -s ${tH} ${destroot}${qt_includes_dir}/Qt/${QtH}
+
+            }
+        }
+    }
 }
 
 pre-activate {

Deleted: trunk/dports/aqua/qt4-mac/files/patch-4.8.4-osx-native-menu-state-fix.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-4.8.4-osx-native-menu-state-fix.diff	2012-11-30 19:00:57 UTC (rev 100148)
+++ trunk/dports/aqua/qt4-mac/files/patch-4.8.4-osx-native-menu-state-fix.diff	2012-11-30 20:29:49 UTC (rev 100149)
@@ -1,77 +0,0 @@
---- src/gui/widgets/qmenu.cpp.orig
-+++ src/gui/widgets/qmenu.cpp
-@@ -2387,7 +2387,7 @@ void QMenu::changeEvent(QEvent *e)
-         if (d->tornPopup) // torn-off menu
-             d->tornPopup->setEnabled(isEnabled());
-         d->menuAction->setEnabled(isEnabled());
--#ifdef Q_WS_MAC
-+#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
-         if (d->mac_menu)
-             d->setMacMenuEnabled(isEnabled());
- #endif
---- src/gui/widgets/qmenu_mac.mm.orig
-+++ src/gui/widgets/qmenu_mac.mm
-@@ -1554,6 +1554,7 @@ QMenuPrivate::syncSeparatorsCollapsible(bool collapse)
- 
- 
- 
-+#ifndef QT_MAC_USE_COCOA
- /*!
-   \internal
- */
-@@ -1567,26 +1568,16 @@ void QMenuPrivate::setMacMenuEnabled(bool enable)
-         for (int i = 0; i < mac_menu->actionItems.count(); ++i) {
-             QMacMenuAction *menuItem = mac_menu->actionItems.at(i);
-             if (menuItem && menuItem->action && menuItem->action->isEnabled()) {
--#ifndef QT_MAC_USE_COCOA
-                 // Only enable those items which contains an enabled QAction.
-                 // i == 0 -> the menu itself, hence i + 1 for items.
-                 EnableMenuItem(mac_menu->menu, i + 1);
--#else
--                [menuItem->menuItem setEnabled:true];
--#endif
-             }
-         }
-     } else {
--#ifndef QT_MAC_USE_COCOA
-         DisableAllMenuItems(mac_menu->menu);
--#else
--        NSMenu *menu = mac_menu->menu;
--        for (NSMenuItem *item in [menu itemArray]) {
--            [item setEnabled:false];
--        }
--#endif
-     }
- }
-+#endif
- 
- /*!
-     \internal
-@@ -1744,6 +1735,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::syncAction(QMacMenuAction *action)
-         [item setSubmenu: submenu];
-         [submenu setTitle:qt_mac_QStringToNSString(qt_mac_removeMnemonics(action->action->text()))];
-         syncNSMenuItemVisiblity(item, visible);
-+        syncNSMenuItemEnabled(item, action->action->isEnabled());
- #endif
-         if (release_submenu) { //no pointers to it
- #ifndef QT_MAC_USE_COCOA
-@@ -1846,6 +1838,7 @@ OSMenuRef QMenuBarPrivate::macMenu()
-         return 0;
-     } else if (!mac_menubar->menu) {
-         mac_menubar->menu = qt_mac_create_menu(q);
-+        [mac_menubar->menu setAutoenablesItems:NO];
-         ProcessSerialNumber mine, front;
-         if (GetCurrentProcess(&mine) == noErr && GetFrontProcess(&front) == noErr) {
-             if (!qt_mac_no_menubar_merge && !mac_menubar->apple_menu) {
---- src/gui/widgets/qmenu_p.h.orig
-+++ src/gui/widgets/qmenu_p.h
-@@ -327,7 +327,9 @@ public:
-         }
-     } *mac_menu;
-     OSMenuRef macMenu(OSMenuRef merge);
-+#ifndef QT_MAC_USE_COCOA
-     void setMacMenuEnabled(bool enable = true);
-+#endif
-     void syncSeparatorsCollapsible(bool collapsible);
-     static QHash<OSMenuRef, OSMenuRef> mergeMenuHash;
-     static QHash<OSMenuRef, QMenuMergeList*> mergeMenuItemsHash;

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-11-30 19:00:57 UTC (rev 100148)
+++ trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff	2012-11-30 20:29:49 UTC (rev 100149)
@@ -1,11 +1,11 @@
---- config.tests/unix/compile.test.orig	2012-04-23 14:49:04.000000000 -0400
-+++ config.tests/unix/compile.test	2012-04-17 14:38:16.000000000 -0400
-@@ -68,7 +68,7 @@
- # Make sure output from possible previous tests is gone
+--- config.tests/unix/compile.test.orig	2012-11-23 05:11:21.000000000 -0500
++++ config.tests/unix/compile.test	2012-11-29 12:02:46.000000000 -0500
+@@ -69,7 +69,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_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"
+ echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache"
+-"$OUTDIR/bin/qmake" -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" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
++"$OUTDIR/bin/qmake" -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" "$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-11-30 19:00:57 UTC (rev 100148)
+++ trunk/dports/aqua/qt4-mac/files/patch-configure.diff	2012-11-30 20:29:49 UTC (rev 100149)
@@ -1,6 +1,6 @@
---- configure.orig	2012-09-17 11:00:59.000000000 -0400
-+++ configure	2012-09-17 11:01:07.000000000 -0400
-@@ -920,6 +920,7 @@
+--- configure.orig	2012-11-23 05:11:23.000000000 -0500
++++ configure	2012-11-29 12:08:53.000000000 -0500
+@@ -924,6 +924,7 @@
  QT_INSTALL_DOCS=
  QT_INSTALL_HEADERS=
  QT_INSTALL_LIBS=
@@ -8,7 +8,7 @@
  QT_INSTALL_BINS=
  QT_INSTALL_PLUGINS=
  QT_INSTALL_IMPORTS=
-@@ -1380,6 +1381,9 @@
+@@ -1392,6 +1393,9 @@
      libdir)
          QT_INSTALL_LIBS="$VAL"
          ;;
@@ -18,7 +18,7 @@
      qtnamespace)
          QT_NAMESPACE="$VAL"
          ;;
-@@ -3697,6 +3701,19 @@
+@@ -3685,6 +3689,19 @@
      fi
      QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
  
@@ -104,7 +104,7 @@
  	    if [ '!' -z "$CFG_SDK" ]; then
  		echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
  		echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
-@@ -5441,9 +5454,9 @@
+@@ -5511,9 +5524,9 @@
          psql)
              if [ "$CFG_SQL_psql" != "no" ]; then
                  # Be careful not to use native pg_config when cross building.
@@ -117,7 +117,7 @@
                  fi
                  [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
                  [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
-@@ -7097,16 +7110,8 @@
+@@ -7161,16 +7174,8 @@
  
  # set the global Mac deployment target. This is overridden on an arch-by-arch basis
  # in some cases, see code further down
@@ -136,7 +136,7 @@
  
  # disable Qt 3 support on VxWorks, Symbian and INTEGRITY
  case "$XPLATFORM" in
-@@ -7844,28 +7849,28 @@
+@@ -7910,28 +7915,28 @@
  # env. variable. 
  if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
      if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
@@ -181,7 +181,7 @@
      fi
  fi
  
-@@ -8618,6 +8623,7 @@
+@@ -8689,6 +8694,7 @@
  QMAKE_RCC        = \$\$QT_BUILD_TREE/bin/rcc
  QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
  QMAKE_INCDIR_QT  = \$\$QT_BUILD_TREE/include
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121130/683b19ac/attachment.html>


More information about the macports-changes mailing list