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

michaelld at macports.org michaelld at macports.org
Wed Nov 3 18:17:16 PDT 2010


Revision: 73102
          http://trac.macports.org/changeset/73102
Author:   michaelld at macports.org
Date:     2010-11-03 18:17:13 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
qt4-mac changes:
* addresses tickets #23204, #23206, #23208, #26977, and #27010.
* allow for use of ccache / distcc.
* fix ordering of -I and -L flags in qmake variables, allowing for
  linking with a locally created library that is also installed in the
  system (e.g., creating libqwt while it exists in ${prefix}/lib).
* Mac .apps are now placed in ${applications_dir}/Qt4 .
* qmake optimization on 10.6 i386 is disabled because it does not work.
* set install bindir, libdir, and includedir explicitly.
* move some configure.args into variants.

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

Added Paths:
-----------
    trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff
    trunk/dports/aqua/qt4-mac/files/patch-darwin-g++.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-moc.prf.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt.prf.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt_functions.prf.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs-macx-g++-qmake.prf.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs_common_mac.conf.diff
    trunk/dports/aqua/qt4-mac/files/patch-mkspecs_darwin-g++_qmake.conf.diff

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2010-11-04 01:05:21 UTC (rev 73101)
+++ trunk/dports/aqua/qt4-mac/Portfile	2010-11-04 01:17:13 UTC (rev 73102)
@@ -2,16 +2,16 @@
 # $Id$
 
 PortSystem          1.0
-PortGroup           archcheck 1.0
 
-# use the qt4 group, except for the depends_lib
-# since we're building qt4 here.
+# use the qt4 group; set 'building_qt4' so that the portgroup
+# does not include certain parts
+set building_qt4    1
 PortGroup           qt4 1.0
-depends_lib-delete  path:bin/qmake:qt4-mac
 
 name                qt4-mac
 conflicts           qt4-mac-devel
 version             4.7.0
+revision            1
 categories          aqua
 platforms           macosx
 maintainers         michaelld
@@ -36,6 +36,11 @@
                     lib/libtiff.dylib lib/libpng.dylib \
                     lib/libmng.dylib lib/libjpeg.dylib
 
+# (0) Fix the testing script to properly handle both +universal as
+# well as the native arch for both CXX and CC compiling; also make
+# sure it does not create a Mac app bundle.
+patchfiles-append   patch-config.tests_unix_compile.test.diff
+
 # (1) Test for Precompiled-headers support requires a C++ compiler,
 # but configure calls it, by default, with a C compiler.
 patchfiles-append   patch-precomp.test.diff
@@ -49,16 +54,42 @@
 # 'patch' should be able to figure it out.
 patchfiles-append   patch-configure-arch.diff
 
+# (4) Tweak Qt spec files:
+# (4a) Place the -I path for local moc-created headers -before-
+# all other -I paths.
+patchfiles-append   patch-mkspecs-features-moc.prf.diff
+
+# (4b) Remove Qt's LIBDIR and INCDIR from various Qmake internal
+# variables, since they are already included in the user-supplied
+# LIBS and INCLUDEPATH.
+patchfiles-append   patch-mkspecs-features-qt.prf.diff
+
+# (4c) Change placement of Qt's LIBDIR and INCDIR, to always be after
+# those supplied by the user's QMake (.pro) files.  By the time QMake
+# gets to the patched function, it is creating the Makefile parts to
+# find Qt's headers and libraries, so moving these paths to this
+# location should always work.
+patchfiles-append   patch-mkspecs-features-qt_functions.prf.diff
+
+# (4d) Add "absolute_library_soname" to the default CONFIG variables,
+# so that when a DYLIB is created, if "target.path" is set for it then
+# that path is prepended to its "install_name".
+patchfiles-append   patch-mkspecs-macx-g++-qmake.prf.diff
+
+# (4e) allow use of 'ccache' via "qmake && make CCACHE=ccache", in mac
+# only; this patch requires that (2) already be in place.
+patchfiles-append   patch-mkspecs_common_mac.conf.diff
+
 post-patch {
-    # set ARCHES in configure (per the second patchfile),
-    # for building QMake.
+    # set ARCHES in configure (per the third patchfile above), for
+    # building QMake.  join any 2 or more arch entries with the GCC
+    # arch flag (join does not effect a single entry).  first "-arch"
+    # is already in place in the 'configure' script (since there has
+    # to be at least 1 arch).
     set ARCHES ""
     if {[variant_exists universal] && [variant_isset universal]} {
-        # build for universal, as defined by the local user
-        # first "-arch" is already in place; just 'join' the rest
         set ARCHES [join ${universal_archs} " -arch "]
     } else {
-        # build arch & OS-version specific
         set ARCHES ${build_arch}
     }
     reinplace "s|@ARCHES@|${ARCHES}|g" ${worksrcpath}/configure
@@ -84,6 +115,20 @@
         ${worksrcpath}/mkspecs/macx-g++/qmake.conf
     reinplace "s| gcc\$| ${configure.cc}|"  \
         ${worksrcpath}/mkspecs/macx-g++/qmake.conf
+
+    # fix up tests to work with ccache, if used
+    foreach fixfile [exec find ${worksrcpath}/config.tests \
+                         -name "*.test"] {
+        reinplace "s@\\\"\\\$COMPILER\\\"@\$COMPILER at g" ${fixfile}
+    }
+
+    # fix 'configure' script to find the correct QMAKE CXX compiler by
+    # removing possibilities that include the character "$".  Yes,
+    # that's a lot of "\"s: each "\\\\" -> a single "\" in the patched
+    # file, and need "\\\\$" (with the "s) there.
+    reinplace "/QMAKE_CONF_COMPILER/ \
+             s at tail@grep -v \"\\\\\\\\\\\\\\\\\$\" | tail@" \
+        ${worksrcpath}/configure
 }
 
 # The build process uses -fconstant-cfstrings.
@@ -150,11 +195,13 @@
 
 configure.args                                            \
     -v                                                    \
-    -release                                              \
     -confirm-license                                      \
     -opensource                                           \
     -prefix          ${qt_dir}                            \
+    -bindir          ${qt_bins_dir}                       \
+    -libdir          ${qt_libs_dir}                       \
     -docdir          ${qt_docs_dir}                       \
+    -headerdir       ${qt_includes_dir}                   \
     -plugindir       ${qt_plugins_dir}                    \
     -importdir       ${qt_imports_dir}                    \
     -datadir         ${qt_data_dir}                       \
@@ -166,8 +213,6 @@
     -openssl-linked                                       \
     -dbus-linked                                          \
     -fast                                                 \
-    -nomake demos                                         \
-    -nomake examples                                      \
     -optimized-qmake                                      \
     -no-framework                                         \
     -no-phonon                                            \
@@ -187,8 +232,8 @@
     configure.args-append -no-sql-${driver}
 }
 
-# use the corrected CPATH and LIBRARY_PATH for configure
 pre-configure {
+    # use the corrected CPATH and LIBRARY_PATH for build
     compiler.cpath [join ${header_path} :]
     compiler.library_path [join ${library_path} :]
 }
@@ -206,64 +251,63 @@
     }
 }
 
-# make sure the universal variant exists
-variant universal {}
+platform darwin {
+    pre-configure {
+        # retrieve the arch type(s) to use, in Qt-speak
+        configure.args-append -arch \"${qt_arch_types}\"
 
-platform darwin {
-    set ARCHES ""
-    set SDK ""
-    if {[variant_exists universal] && [variant_isset universal]} {
-        # build for universal, as defined by the local user
-        set ARCHES ${universal_archs}
-        if {[info exists universal_sysroot]} {
-            set SDK ${universal_sysroot}
+        # cannot use pre-compiled headers when compiling with more than 1
+        # arch type (typically +universal) or for X11
+        if {[llength ${qt_arch_types}] != 1 || [variant_isset x11]} {
+            configure.args-append -no-pch
+        } else {
+            configure.args-append -pch
         }
-    } else {
-        # build arch specific
-        set ARCHES ${build_arch}
-    }
-    configure.args-append -arch \"${ARCHES}\"
 
-    # cannot use pre-compiled headers when compiling with more than 1
-    # arch type (typically +universal) or for X11
-    if {[llength ${ARCHES}] != 1 || [variant_isset x11]} {
-        configure.args-append -no-pch
-    } else {
-        configure.args-append -pch
-    }
+        # check to see if not compiling for the native machine hardware
+        # (e.g., compiling for just i386 but CPU is x86_64); optimization
+        # of QMake does not work in this circumstance.
+        if {[lsearch -exact ${qt_arch_types} ${os.arch}] == -1} {
+            # not building for native arch: disable optimizing qmake
+            configure.args-delete -optimized-qmake
+        }
 
-    # check to see if not compiling for the native machine hardware
-    # (e.g., compiling for just i386 but CPU is x86_64); optimization
-    # of QMake does not work in this circumstance.
-    if {[lsearch -exact ${ARCHES} [exec uname -m]] == -1} {
-        # yes: disable optimizing qmake
-        configure.args-delete -optimized-qmake
-    }
-
-    # find a way to specify the SDK to use
-    if {${SDK} == ""} {
-        # else use the one for this OS version, if installed
-        set minor [expr [lindex [split ${os.version} "."] 0] - 4]
-        # set SDK version depending on OS version
-        set sdk_version ""
-        if {${minor} == "4"} {
-            # OSX 10.4 requires an additional 'u'
-            set sdk_version "10.4u"
+        # find a way to specify the SDK to use
+        set SDK ""
+        if {[variant_exists universal] && [variant_isset universal]} {
+            if {[info exists universal_sysroot]} {
+                set SDK ${universal_sysroot}
+            }
+        }
+        if {${SDK} == ""} {
+            # else use the one for this OS version, if installed
+            set minor [expr [lindex [split ${os.version} "."] 0] - 4]
+            # set SDK version depending on OS version
+            set sdk_version ""
+            if {${minor} == "4"} {
+                # OSX 10.4 requires an additional 'u'
+                set sdk_version "10.4u"
+            } else {
+                set sdk_version "10.${minor}"
+            }
+            set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk
+        }
+        if {[file exists ${SDK}]} {
+            configure.args-append -sdk ${SDK}
         } else {
-            set sdk_version "10.${minor}"
-        }
-        set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk
-    }
-    if {[file exists ${SDK}]} {
-        configure.args-append -sdk ${SDK}
-    } else {
-        ui_msg \
+            ui_msg \
 "No SDK found in ${developer_dir}/SDKs for ${sdk_version} ; \
 configure will probably fail. \n \
 Please install Apple's Developer Tools again."
+        }
     }
 }
 
+platform darwin 10 i386 {
+    # optimization of QMake does not work on 10.6 32-bit native
+    configure.args-delete -optimized-qmake
+}
+
 # Remove any '-I' string from the C*FLAGS for SQLITE and DBUS, so that
 # what remains are just non-I flags; these paths are in compiler.cpath .
 # The includes for all the other variants are not used by
@@ -279,8 +323,8 @@
     # depend on any of these changed files.
 }
 
-# use the corrected CPATH and LIBRARY_PATH for build
 pre-build {
+    # use the corrected CPATH and LIBRARY_PATH for build
     compiler.cpath [join ${header_path} :]
     compiler.library_path [join ${library_path} :]
 }
@@ -313,10 +357,16 @@
     # It should never be used in Qt4 or newer.
     # It is there for legacy purposes: it's how
     # Qt3's headers were installed.
-    if {[file exists ${destroot_qt}/include/Qt]} {
-        delete ${destroot_qt}/include/Qt
+    if {[file exists ${destroot}/${qt_includes_dir}/Qt]} {
+        delete ${destroot}/${qt_includes_dir}/Qt
     }
 
+    # Move .apps into the applications_dir
+    xinstall -m 755 -d ${destroot}${qt_apps_dir}
+    foreach app [glob ${destroot}/${qt_bins_dir}/*.app] {
+        move ${app} ${destroot}${qt_apps_dir}
+    }
+
     # Install cmake files (taken from port 'kdelibs4'). To use this
     # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during
     # the initial 'configure' stage (which uses CMake), to the full
@@ -352,6 +402,9 @@
     }
 }
 
+# make sure the universal variant exists
+variant universal {}
+
 variant mysql description {Enable MySQL SQL Driver} {
     depends_lib-append path:lib/mysql5:mysql5
     archcheck.files-append lib/mysql5/mysql/libmysqlclient.dylib
@@ -411,18 +464,24 @@
     configure.args-append -graphicssystem raster
 }
 
-variant demos description {Build demos} {
-   configure.args-delete -nomake demos
+variant demos description {Build demos} {}
+
+if {![variant_isset demos]} {
+   configure.args-append -nomake demos
 }
 
-variant examples description {Build examples} {
-   configure.args-delete -nomake examples
+variant examples description {Build examples} {}
+
+if {![variant_isset examples]} {
+   configure.args-append -nomake examples
 }
 
-variant debug description \
-{Build both release and debug library} {
-    configure.args-delete -release
+variant debug description {Build both release and debug library} {}
+
+if {[variant_isset debug]} {
     configure.args-append -debug-and-release
+} else {
+    configure.args-append -release
 }
 
 variant quartz conflicts x11 \

Added: 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	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-config.tests_unix_compile.test.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,11 @@
+--- config.tests/unix/compile.test.orig	2010-11-01 10:05:07.000000000 -0400
++++ config.tests/unix/compile.test	2010-11-01 10:05:41.000000000 -0400
+@@ -68,7 +68,7 @@
+ # Make sure output from possible previous tests is gone
+ 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"
+ 
+ if [ "$VERBOSE" = "yes" ]; then
+     $MAKE

Modified: trunk/dports/aqua/qt4-mac/files/patch-configure-arch.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-configure-arch.diff	2010-11-04 01:05:21 UTC (rev 73101)
+++ trunk/dports/aqua/qt4-mac/files/patch-configure-arch.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -18,11 +18,11 @@
 -		EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
 -                EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
 -            fi
-+	    X86_CFLAGS="-arch @ARCHES@"
-+	    X86_LFLAGS="-arch @ARCHES@"
-+	    EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
-+	    EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
-+            EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
++           ARCH_CFLAGS="-arch @ARCHES@"
++           ARCH_LFLAGS="-arch @ARCHES@"
++           EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"
++           EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"
++           EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"
  	    if [ '!' -z "$CFG_SDK" ]; then
  		echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
  		echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"

Added: trunk/dports/aqua/qt4-mac/files/patch-darwin-g++.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-darwin-g++.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-darwin-g++.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,20 @@
+--- configure_orig	2010-10-13 21:13:01.000000000 -0400
++++ configure	2010-10-13 21:15:36.000000000 -0400
+@@ -4558,7 +4558,7 @@
+                 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
+             done
+         fi
+-        if [ "$PLATFORM_MAC" = "yes" ]; then
++        if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM" = "darwin-g++" ]; then
+             echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile"
+             echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
+             echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
+@@ -6739,7 +6730,7 @@
+ [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
+ [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
+ 
+-if [ "$PLATFORM_MAC" = "yes" ]; then
++if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM" = "darwin-g++" ]; then
+     if [ "$CFG_RPATH" = "yes" ]; then
+        QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
+     fi

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-moc.prf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-moc.prf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-moc.prf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,18 @@
+--- mkspecs/features/moc.prf	2010-09-10 05:04:49.000000000 -0400
++++ /opt/local/share/qt4/mkspecs/features/moc.prf	2010-10-30 21:39:56.000000000 -0400
+@@ -83,8 +83,13 @@
+ #make sure we can include these files
+ moc_dir_short = $$MOC_DIR
+ contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/,
+-contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR
+-else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR
++
++# order the local moc path -before- the others, since its headers
++# should -always be found locally so we want that path first.
++contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH = $$MOC_DIR $$INCLUDEPATH
++else:INCLUDEPATH = $$OUT_PWD/$$MOC_DIR $$INCLUDEPATH
++
++# message(MOC_DIR is $$MOC_DIR)
+ 
+ # Backwards compatibility: Make shadow builds with default MOC_DIR work
+ # if the user did not add the source dir explicitly.

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt.prf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt.prf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt.prf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,62 @@
+--- mkspecs/features/qt.prf.orig	2010-09-10 05:04:49.000000000 -0400
++++ mkspecs/features/qt.prf	2010-11-02 14:28:24.000000000 -0400
+@@ -134,7 +134,15 @@
+ #specific module settings
+ !isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs
+ QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT
++
+ for(QTLIB, $$list($$lower($$unique(QT)))) {
++
++#   message('LIBS' qt before $$QTLIB is '$${LIBS}')
++#   message('INCLUDEPATH' qt before $$QTLIB is '$${INCLUDEPATH}')
++#   message('QMAKE_LFLAGS' qt before $$QTLIB is '$${QMAKE_LFLAGS}')
++#   message('QMAKE_CFLAGS' qt before $$QTLIB is '$${QMAKE_CFLAGS}')
++#   message('QMAKE_CXXFLAGS' qt before $$QTLIB is '$${QMAKE_CXXFLAGS}')
++
+    unset(qlib_style)
+    !qt_debug:!qt_release {
+       CONFIG(debug, debug|release):qlib_style = debug
+@@ -193,8 +201,43 @@
+      qtAddLibrary($$qlib)
+       }
+    }
++#   message('LIBS' qt after $$QTLIB is '$${LIBS}')
++#   message('INCLUDEPATH' qt after $$QTLIB is '$${INCLUDEPATH}')
++#   message('QMAKE_LFLAGS' qt after $$QTLIB is '$${QMAKE_LFLAGS}')
++#   message('QMAKE_CFLAGS' qt after $$QTLIB is '$${QMAKE_CFLAGS}')
++#   message('QMAKE_CXXFLAGS' qt after $$QTLIB is '$${QMAKE_CXXFLAGS}')
++}
++
++# remove Qt's libdir from various flags; it is already part of LIBS,
++# and should be used only to find Qt's libraries.  Qt puts LIBDIR
++# before all other paths, so it is critical that this variable not
++# contain anything questionable.
++QMAKE_LIBDIR -= $$QMAKE_LIBDIR_QT
++QMAKE_LFLAGS -= -L$$QMAKE_LIBDIR_QT
++!isEqual($$QMAKE_LIBDIR_QT, $$[QT_INSTALL_PREFIX]/lib) {
++  QMAKE_LFLAGS -= -L$$[QT_INSTALL_PREFIX]/lib
++}
++
++# remove Qt's incdir from various flags; it is already part of
++# INCLUDEPATH.  C*FLAGS come before the INCPATH build from
++# INCLUDEPATH, so they should never have this -I in it (or, reall, any
++# other -I but instead just remove the the obvious choices)
++QMAKE_CFLAGS -= -I$$QMAKE_INCDIR_QT
++QMAKE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT
++QMAKE_OBJECTIVE_CFLAGS -= -I$$QMAKE_INCDIR_QT
++QMAKE_OBJECTIVE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT
++!isEqual($$QMAKE_INCDIR_QT, $$[QT_INSTALL_PREFIX]/include) {
++  QMAKE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include
++  QMAKE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include
++  QMAKE_OBJECTIVE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include
++  QMAKE_OBJECTIVE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include
+ }
+ 
++#message(QMAKE_CFLAGS at end is $${QMAKE_CFLAGS})
++#message(QMAKE_CXXFLAGS at end is $${QMAKE_CXXFLAGS})
++#message(QMAKE_OBJECTIVE_CFLAGS at end is $${QMAKE_OBJECTIVE_CFLAGS})
++#message(QMAKE_OBJECTIVE_CXXFLAGS at end is $${QMAKE_OBJECTIVE_CXXFLAGS})
++
+ qt_compat {
+    !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us
+    INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt_functions.prf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt_functions.prf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs-features-qt_functions.prf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,32 @@
+--- mkspecs/features/qt_functions.prf.orig	2010-09-10 05:04:49.000000000 -0400
++++ mkspecs/features/qt_functions.prf	2010-11-02 14:23:13.000000000 -0400
+@@ -16,8 +16,18 @@
+ }
+ 
+ defineTest(qtAddLibrary) {
++#    message('LIBS' before $$1 is '$${LIBS}')
++#    message('INCLUDEPATH' before $$1 is '$${INCLUDEPATH}')
++#    message('QMAKE_LFLAGS' before $$1 is '$${QMAKE_LFLAGS}')
++
++    # reorder the includes path: user, this library, Qt headers
++    INCLUDEPATH -= $$QMAKE_INCDIR_QT
+     INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
+-    INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
++    INCLUDEPATH += $$QMAKE_INCDIR_QT/$$1 $$QMAKE_INCDIR_QT
++
++    # first time through, append the path for Qt's installed libraries:
++    # -after- all of the other necessary libraries and paths
++    !contains(LIBS,-L$$QMAKE_LIBDIR_QT):LIBS = $$LIBS -L$$QMAKE_LIBDIR_QT
+ 
+     LIB_NAME = $$1
+     unset(LINKAGE)
+@@ -73,6 +83,9 @@
+         QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
+     }
+     LIBS += $$LINKAGE
++#    message('LIBS' after $$1 is now '$${LIBS}')
++#    message('INCLUDEPATH' after $$1 is now '$${INCLUDEPATH}')
++#    message('QMAKE_LFLAGS' after $$1 is now '$${QMAKE_LFLAGS}')
+     export(LIBS)
+     export(INCLUDEPATH)
+     export(QMAKE_FRAMEWORKPATH)

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs-macx-g++-qmake.prf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs-macx-g++-qmake.prf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs-macx-g++-qmake.prf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,11 @@
+--- mkspecs/macx-g++/qmake.conf.orig	2010-10-31 13:46:05.000000000 -0400
++++ mkspecs/macx-g++/qmake.conf	2010-10-31 13:46:08.000000000 -0400
+@@ -9,7 +9,7 @@
+ MAKEFILE_GENERATOR	= UNIX
+ TARGET_PLATFORM		= macx
+ TEMPLATE		= app
+-CONFIG			+= qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
++CONFIG			+= qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl absolute_library_soname
+ QT			+= core gui
+ QMAKE_INCREMENTAL_STYLE = sublib
+ 

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs_common_mac.conf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs_common_mac.conf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs_common_mac.conf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,12 @@
+--- mkspecs/common/mac.conf.orig	2010-11-02 10:44:30.000000000 -0400
++++ mkspecs/common/mac.conf	2010-11-02 10:48:37.000000000 -0400
+@@ -40,5 +40,9 @@
+ QMAKE_MKDIR		= mkdir -p
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
+ 
++# allow CC and CXX to use CCACHE;
++# use "make CCACHE=ccache" when building
++QMAKE_CC = "$(CCACHE)" $$QMAKE_CC
++QMAKE_CXX = "$(CCACHE)" $$QMAKE_CXX
+ 
+ include(unix.conf)

Added: trunk/dports/aqua/qt4-mac/files/patch-mkspecs_darwin-g++_qmake.conf.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-mkspecs_darwin-g++_qmake.conf.diff	                        (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-mkspecs_darwin-g++_qmake.conf.diff	2010-11-04 01:17:13 UTC (rev 73102)
@@ -0,0 +1,158 @@
+--- mkspecs/darwin-g++/qmake.conf.orig	2010-10-04 16:26:47.000000000 -0400
++++ mkspecs/darwin-g++/qmake.conf	2010-10-04 16:59:03.000000000 -0400
+@@ -1,21 +1,22 @@
+ #
+ # qmake configuration for darwin-g++
+ #
+-# Written for Qt/X11 on Darwin and XFree86
++# Written for Qt/X11 on Darwin only
+ #
+ 
+ MAKEFILE_GENERATOR	= UNIX
+ TARGET_PLATFORM		= macx
+ TEMPLATE		= app
+-CONFIG			+= qt warn_on release link_prl native_precompiled_headers
++CONFIG			+= qt warn_on release incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+ QT			+= core gui
+ DEFINES                 += __USE_WS_X11__
+ 
++QMAKE_COMPILER_DEFINES  += __APPLE__ __GNUC__
++QMAKE_RESOURCE		= /Developer/Tools/Rez
++QMAKE_FIX_RPATH         = install_name_tool -id 
++QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
++
+ QMAKE_CC		= cc
+-QMAKE_LEX		= flex
+-QMAKE_LEXFLAGS		=
+-QMAKE_YACC		= yacc
+-QMAKE_YACCFLAGS		= -d
+ QMAKE_CFLAGS		= -pipe
+ QMAKE_CFLAGS_DEPS	= -M
+ QMAKE_CFLAGS_WARN_ON	= -Wall -W
+@@ -24,12 +25,16 @@
+ QMAKE_CFLAGS_DEBUG	= -g
+ QMAKE_CFLAGS_SHLIB	= -fPIC
+ QMAKE_CFLAGS_STATIC_LIB	= $$QMAKE_CFLAGS_SHLIB
+-QMAKE_EXTENSION_SHLIB	= dylib
+-QMAKE_EXTENSION_PLUGIN	= so
++#QMAKE_EXTENSION_SHLIB	= dylib
++#QMAKE_EXTENSION_PLUGIN	= so
+ QMAKE_CFLAGS_YACC	= -Wno-unused -Wno-parentheses
+ QMAKE_CFLAGS_HIDESYMS	+= -fvisibility=hidden
+-QMAKE_CFLAGS_THREAD	=
+-QMAKE_CFLAGS_PRECOMPILE	+= -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
++QMAKE_CFLAGS_PPC_64     += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_CFLAGS_X86_64     += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_CFLAGS_PPC        += -arch ppc
++QMAKE_CFLAGS_X86        += -arch i386
++QMAKE_CFLAGS_DWARF2     += -gdwarf-2
++QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+ QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+ 
+ QMAKE_CXX		= c++
+@@ -43,7 +48,48 @@
+ QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+ QMAKE_CXXFLAGS_YACC	= $$QMAKE_CFLAGS_YACC
+ QMAKE_CXXFLAGS_HIDESYMS	+= $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+-QMAKE_CXXFLAGS_THREAD	=
++QMAKE_CXXFLAGS_PPC_64   += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_CXXFLAGS_X86_64   += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_CXXFLAGS_PPC      += -arch ppc
++QMAKE_CXXFLAGS_X86      += -arch i386
++QMAKE_CXXFLAGS_DWARF2   += $$QMAKE_CFLAGS_DWARF2
++QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
++QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
++
++QMAKE_OBJECTIVE_CFLAGS_PPC_64  += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_OBJECTIVE_CFLAGS_X86_64  += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_OBJECTIVE_CFLAGS_PPC  += -arch ppc
++QMAKE_OBJECTIVE_CFLAGS_X86  += -arch i386
++QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
++QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
++
++QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
++QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
++
++QMAKE_PCH_OUTPUT_EXT    = .gch
++
++QMAKE_LINK		= $$QMAKE_CXX
++QMAKE_LINK_SHLIB	= $$QMAKE_CXX
++QMAKE_LINK_C	        = $$QMAKE_CC
++QMAKE_LINK_C_SHLIB      = $$QMAKE_CC
++QMAKE_LFLAGS		+= -headerpad_max_install_names
++QMAKE_LFLAGS_RELEASE	+=
++QMAKE_LFLAGS_DEBUG	+=
++QMAKE_LFLAGS_APP        +=
++QMAKE_LFLAGS_SHLIB	+= -dynamiclib -single_module
++QMAKE_LFLAGS_PLUGIN	+= $$QMAKE_LFLAGS_SHLIB
++QMAKE_LFLAGS_THREAD	+=
++QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
++QMAKE_LFLAGS_SONAME	+= -install_name$${LITERAL_WHITESPACE}
++QMAKE_LFLAGS_PPC_64     += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_LFLAGS_X86_64     += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@
++QMAKE_LFLAGS_PPC        += -arch ppc
++QMAKE_LFLAGS_X86        += -arch i386
++QMAKE_LFLAGS_VERSION    += -current_version$${LITERAL_WHITESPACE}
++QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
++# -all_load requred to make Objective-C categories work in static builds.
++QMAKE_LFLAGS_STATIC_LIB += -all_load
++QMAKE_LFLAGS_RPATH	+=
+ 
+ QMAKE_INCDIR		=
+ QMAKE_LIBDIR		=
+@@ -54,29 +100,11 @@
+ QMAKE_INCDIR_OPENGL	= /usr/X11R6/include
+ QMAKE_LIBDIR_OPENGL	= /usr/X11R6/lib
+ 
+-QMAKE_LINK		= c++
+-QMAKE_LINK_SHLIB	= c++
+-QMAKE_LFLAGS		+= -headerpad_max_install_names
+-QMAKE_LFLAGS		=
+-QMAKE_LFLAGS_RELEASE	=
+-QMAKE_LFLAGS_DEBUG	=
+-QMAKE_LFLAGS_APP        = -prebind
+-QMAKE_LFLAGS_SHLIB	= -prebind -dynamiclib -single_module
+-QMAKE_LFLAGS_PLUGIN	= -prebind -bundle
+-QMAKE_LFLAGS_THREAD	=
+-QMAKE_LFLAGS_SONAME	+= -install_name$${LITERAL_WHITESPACE}
+-
+-QMAKE_LFLAGS_VERSION    = -current_version$${LITERAL_WHITESPACE}
+-QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
+-
+-QMAKE_LFLAGS_RPATH	=
+-
+ QMAKE_LIBS_DYNLOAD	=
+ QMAKE_LIBS_X11		= -lXext -lX11 -lm
+ QMAKE_LIBS_X11SM	= -lSM -lICE
+ QMAKE_LIBS_OPENGL	= -lGLU -lGL
+ QMAKE_LIBS_OPENGL_QT	= -lGL
+-QMAKE_LIBS_THREAD	=
+ 
+ QMAKE_MOC		= $$[QT_INSTALL_BINS]/moc
+ QMAKE_UIC		= $$[QT_INSTALL_BINS]/uic
+@@ -88,19 +116,19 @@
+ QMAKE_TAR		= tar -cf
+ QMAKE_GZIP		= gzip -9f
+ 
++QMAKE_LEX		= flex
++QMAKE_LEXFLAGS		=
++QMAKE_YACC		= yacc
++QMAKE_YACCFLAGS		= -d
++
+ QMAKE_COPY		= cp -f
+ QMAKE_COPY_FILE		= $$QMAKE_COPY
+-QMAKE_COPY_DIR		= $$QMAKE_COPY -r
++QMAKE_COPY_DIR		= $$QMAKE_COPY -R
+ QMAKE_MOVE		= mv -f
+ QMAKE_DEL_FILE		= rm -f
+ QMAKE_DEL_DIR		= rmdir
+ QMAKE_CHK_DIR_EXISTS	= test -d
+ QMAKE_MKDIR		= mkdir -p
+ 
+-QMAKE_PCH_OUTPUT_EXT    = .gch
+-
+-QMAKE_CXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-
+ include(../common/unix.conf)
+ load(qt_config)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101103/d0904b34/attachment-0001.html>


More information about the macports-changes mailing list