[81844] trunk/dports/aqua/qt4-mac
michaelld at macports.org
michaelld at macports.org
Fri Aug 5 12:00:22 PDT 2011
Revision: 81844
http://trac.macports.org/changeset/81844
Author: michaelld at macports.org
Date: 2011-08-05 12:00:22 -0700 (Fri, 05 Aug 2011)
Log Message:
-----------
qt4-mac: hopefully addresses tickets #30346 and #29141. Patch CoreWLan files to use the correct SDK and version (as either provided by the user, or the default for the given OS version); patch the MM file to work under 10.7.
Modified Paths:
--------------
trunk/dports/aqua/qt4-mac/Portfile
trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff
Added Paths:
-----------
trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff
Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile 2011-08-05 18:57:02 UTC (rev 81843)
+++ trunk/dports/aqua/qt4-mac/Portfile 2011-08-05 19:00:22 UTC (rev 81844)
@@ -77,6 +77,7 @@
# (5) fix the corewlan qmake file to use non-standard Developer SDK
# location under 10.6, e.g., for some developers doing both iOS and
# OSX. This patch does not change behavior for 10.4 or 10.5.
+# Also include fix to use the correct SDK.
patchfiles-append patch-src-plugins-bearer-corewlan-corewlan.pro.diff
# (6) fix use of CARBON, found on PPC64, but will work on any system
@@ -85,9 +86,24 @@
# (7) fix use of NSDragOperation on OS X 10.7
patchfiles-append patch-NSDragOperation.diff
-global TARGET
-set TARGET ""
+# (8) Allow compiling under OS X 10.7
+patchfiles-append patch-src-corelib-global-qglobal.h.diff
+# (9) fix #includes for OS X 10.7 in Bearer CoreWLAN
+patchfiles-append patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff
+
+# find a way to specify the OS MINOR version.
+global MINOR
+set MINOR ""
+
+# hopefully the macosx_deployment_target exists and is set by now. if
+# not, last resort (which is not desirable) is to use the os.version.
+if {${macosx_deployment_target} == ""} {
+ set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
+} else {
+ set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
+}
+
post-patch {
# set ARCHES in configure (per the third patchfile above), for
# building QMake. join any 2 or more arch entries with the GCC
@@ -102,17 +118,12 @@
}
reinplace "s|@ARCHES@|${ARCHES}|g" ${worksrcpath}/configure
+ global MINOR
+
# set MACOSX_DEPLOYMENT_TARGET version in various places. These
# were all patched in (2) above, and can be easily changed or
# overridden by the user in a project-local qmake .pro script.
- set TARGET ${macosx_deployment_target}
-
- # hopefully the TARGET exists and is set by now. if not, last
- # resort (which is not desirable) is to use the os.version.
- if {${TARGET} == ""} {
- set minor [expr [lindex [split ${os.version} "."] 0] - 4]
- set TARGET "10.${minor}"
- }
+ set TARGET "10.${MINOR}"
foreach fixfile {configure mkspecs/common/mac-g++.conf \
mkspecs/common/mac.conf qmake/qmake.pri \
src/tools/bootstrap/bootstrap.pro } {
@@ -120,6 +131,10 @@
${worksrcpath}/${fixfile}
}
+ # Fix OS version on Bearer CoreWLAN QMake file
+ reinplace "s|@MACOSX_VERSION_MINOR@|${MINOR}|g" \
+ ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro
+
# Ensure that correct C/C++ compilers are used.
reinplace "s| g++\$| ${configure.cxx}|" \
${worksrcpath}/mkspecs/common/g++.conf
@@ -295,23 +310,14 @@
# supported. Allow the user to specify the SDK if desired.
set SDK ${configure.sdkroot}
if {${SDK} == ""} {
- # find a way to specify the SDK to use, based on the TARGET
- # hopefully the TARGET exists and is set by now.
- # last resort: use os.version to get target (bad)
- set minor ""
- global TARGET
- if {${TARGET} == ""} {
- set minor [expr [lindex [split ${os.version} "."] 0] - 4]
- } else {
- set minor [lindex [split ${TARGET} "."] 1]
- }
# set SDK version depending on OS version
+ global MINOR
set sdk_version ""
- if {${minor} == "4"} {
+ if {${MINOR} == "4"} {
# OSX 10.4 requires an additional 'u'
set sdk_version "10.4u"
} else {
- set sdk_version "10.${minor}"
+ set sdk_version "10.${MINOR}"
}
set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk
}
Modified: trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff 2011-08-05 18:57:02 UTC (rev 81843)
+++ trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff 2011-08-05 19:00:22 UTC (rev 81844)
@@ -1,11 +1,14 @@
---- src/plugins/bearer/corewlan/corewlan.pro.orig 2011-01-10 11:23:43.000000000 -0500
-+++ src/plugins/bearer/corewlan/corewlan.pro 2011-01-10 11:29:19.000000000 -0500
-@@ -5,7 +5,7 @@
+--- src/plugins/bearer/corewlan/corewlan.pro.orig 2011-08-04 21:23:52.000000000 -0400
++++ src/plugins/bearer/corewlan/corewlan.pro 2011-08-04 21:24:31.000000000 -0400
+@@ -5,9 +5,9 @@
LIBS += -framework Foundation -framework SystemConfiguration
contains(QT_CONFIG, corewlan) {
- isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
-+ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "@DEVELOPER_DIR@/SDKs/MacOSX10.6.sdk") {
++ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "@DEVELOPER_DIR@/SDKs/MacOSX10. at MACOSX_VERSION_MINOR@.sdk") {
LIBS += -framework CoreWLAN -framework Security
- DEFINES += MAC_SDK_10_6
+- DEFINES += MAC_SDK_10_6
++ DEFINES += MAC_SDK_10_ at MACOSX_VERSION_MINOR@
}
+ }
+
Added: trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff 2011-08-05 19:00:22 UTC (rev 81844)
@@ -0,0 +1,13 @@
+--- src/plugins/bearer/corewlan/qcorewlanengine.mm.orig 2011-08-04 16:33:29.000000000 +0200
++++ src/plugins/bearer/corewlan/qcorewlanengine.mm 2011-08-04 16:34:21.000000000 +0200
+@@ -52,6 +52,10 @@
+ #include <QtCore/qdebug.h>
+
+ #include <QDir>
++#ifdef MAC_SDK_10_7
++ #include <CoreWLAN/CoreWLANConstants.h>
++ #include <CoreWLAN/CoreWLANTypes.h>
++#endif
+ #include <CoreWLAN/CoreWLAN.h>
+ #include <CoreWLAN/CWInterface.h>
+ #include <CoreWLAN/CWNetwork.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110805/d32c1950/attachment-0001.html>
More information about the macports-changes
mailing list