[118978] trunk/dports/aqua/qt4-mac/Portfile

michaelld at macports.org michaelld at macports.org
Mon Apr 14 06:54:02 PDT 2014


Revision: 118978
          https://trac.macports.org/changeset/118978
Author:   michaelld at macports.org
Date:     2014-04-14 06:54:02 -0700 (Mon, 14 Apr 2014)
Log Message:
-----------
qt4-mac:
+ use MINOR instead of os.version throughout; addresses ticket #43329;
+ MINOR is an integer, so treat is as such (e.g., use "==" etc instead of "eq");
+ fix livecheck for latest qt download method;
+ use just "error" instead of "return -code error".

Modified Paths:
--------------
    trunk/dports/aqua/qt4-mac/Portfile

Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile	2014-04-14 13:28:00 UTC (rev 118977)
+++ trunk/dports/aqua/qt4-mac/Portfile	2014-04-14 13:54:02 UTC (rev 118978)
@@ -50,6 +50,22 @@
                     port:openssl port:tiff \
                     port:libpng port:libmng port:jpeg
 
+# find a way to specify the OS MINOR version.  For OSX 10.X, this
+# value will be X.  The type is this variable is integer, so we can
+# use "==" and so forth for comparison.
+
+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} ne ""} {
+    set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
+} else {
+    set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
+}
+
 ###############################################
 # Patches are used to both fix compiling on various OS versions, and
 # to enhance the functionality of QMake and its build files.  Some of
@@ -221,8 +237,10 @@
 # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead.  For
 # some reason 10.5+ "knows" that how to do this correctly.
 
-platform darwin 8 {
-    patchfiles-append patch-QtHelp_10.4_only.diff
+platform darwin {
+    if {${MINOR} == 4} {
+        patchfiles-append patch-QtHelp_10.4_only.diff
+    }
 }
 
 # (20) fix the Mac timer's use of "mach_timebase_info"
@@ -238,7 +256,7 @@
 # (22) Under 10.8 and 10.9: Patch to fix corelib linking
 
 platform darwin {
-    if {${os.major} > 12} {
+    if {${MINOR} >= 8} {
         patchfiles-append patch-src_corelib_corelib.pro.diff
     }
 }
@@ -257,35 +275,39 @@
 # (26) Fix qglobals.h to build under 10.9 CLang
 # (27 a-e) Fix WebKit to build under 10.9 CLang
 
-platform darwin 13 {
-    patchfiles-append   \
-        patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
-        patch-src_corelib_global_qglobal.h.diff \
-        patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
-        patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
-        patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
-        patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
-        patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
+platform darwin {
+    if {${MINOR} == 9} {
+        patchfiles-append \
+            patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
+            patch-src_corelib_global_qglobal.h.diff \
+            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
+            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
+            patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
+            patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
+            patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
 
-    # Copy new version of webkit's lib for OS X 10.9 only.
-    # Attached by reference:
-    # https://codereview.qt-project.org/#change,69328
-    # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
+        # Copy new version of webkit's lib for OS X 10.9 only.
+        # Attached by reference:
+        # https://codereview.qt-project.org/#change,69328
+        # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
 
-    distfiles-append libWebKitSystemInterfaceMavericks.a
-    post-patch {
-        copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
-            ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
+        distfiles-append libWebKitSystemInterfaceMavericks.a
+        post-patch {
+            copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
+                ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
+        }
     }
 }
 
+# error out if trying to build on a new OSX version (> 10.9).
+
 platform darwin {
-    if {${os.major} > 13} {
+    if {${MINOR} > 9} {
         # This project needs to be updated to build with clang++ against libc++
         depends_lib
         depends_run
         pre-fetch {
-            ui_error "$name does not build on OSX later than 10.9 'Mavericks'."
+            ui_error "$name does not currently build on OSX later than 10.9 'Mavericks'."
             error "unsupported platform"
         }
     }
@@ -297,18 +319,6 @@
 
 configure.ccache no
 
-# 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} ne ""} {
-    set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
-} else {
-    set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
-}
-
 # find a way to specify the SDK to use; Qt will use the 10.4u by
 # default which won't work on 10.6 since it is not supported.  Allow
 # the user to specify the SDK if desired.
@@ -318,7 +328,7 @@
 if {${SDK} eq ""} {
     # set SDK version depending on OS version
     set sdk_version ""
-    if {${MINOR} eq "4"} {
+    if {${MINOR} == 4} {
         # OSX 10.4 requires an additional 'u'
         set sdk_version "10.4u"
     } else {
@@ -566,7 +576,7 @@
 
     # for 10.4 or 10.5 32-bit PPC, build as Carbon only, not Cocoa
 
-    if {${MINOR} eq "4"} {
+    if {${MINOR} == 4} {
 
         configure.args-append -carbon
 
@@ -575,7 +585,7 @@
         configure.ldflags-append -lcrypto -ldbus-1 -ljpeg -llcms \
             -lssl -lz
 
-    } elseif {${MINOR} eq "5" &&
+    } elseif {${MINOR} == 5 &&
               [llength ${qt_arch_types}] == 1 &&
               [lsearch -exact ${qt_arch_types} ppc] == 0} {
 
@@ -601,7 +611,7 @@
         # not building for native arch: disable optimizing qmake
         configure.args-delete -optimized-qmake
 
-    } elseif {${MINOR} eq "6" &&
+    } elseif {${MINOR} == 6 &&
               [llength ${qt_arch_types}] == 1 &&
               [lsearch -exact ${qt_arch_types} x86] == 0} {
 
@@ -627,7 +637,7 @@
     if {[string match *clang* ${configure.compiler}]} {
         if {[info exists configure.cxx_stdlib]} {
             configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
-        } elseif {${MINOR} eq "9"} {
+        } elseif {${MINOR} == 9} {
             configure.env-append QMAKE_STDLIB="-stdlib=libc++"
         } else {
             configure.env-append QMAKE_STDLIB="-stdlib=libstdc++"
@@ -1033,12 +1043,12 @@
 
 variant framework description {Framework Legacy Compatibility Variant} {
     ui_error "${name} variant +framework has been disabled because ${name} now installs as both libraries and frameworks.  Please install ${name} without +framework."
-    return -code error "Variant disabled"
+    error "Variant disabled"
 }
 
 variant mysql description {MySQL Qt4 Plugin Legacy Compatibility Variant} {
     ui_error "${name} variant +mysql has been replaced by the port 'qt4-mac-mysql55-plugin' and its subports.  Please install ${name} without +mysql, then install your desired MySQL Qt plugin."
-    return -code error "Variant disabled"
+    error "Variant disabled"
 }
 
 variant odbc description {Enable iODBC SQL Driver} {
@@ -1074,7 +1084,7 @@
 
 if {${psql_version} ne ""} {
     ui_error "${name} variant +psql${psql_version} has been replaced by the port 'qt4-mac-postgresql91-plugin' and its subports.  Please install ${name} without +psql${psql_version}, then install your desired PostgreSQL Qt plugin."
-    return -code error "Variant disabled"
+    error "Variant disabled"
 }
 
 variant raster description {Use raster graphics system by default} {
@@ -1169,5 +1179,5 @@
 #}
 
 livecheck.type      regex
-livecheck.url       http://releases.qt-project.org/qt4/source
-livecheck.regex     "qt-everywhere-opensource-src-(\[0-9a-z.-\]+)${extract.suffix}"
+livecheck.url       http://download.qt-project.org/official_releases/qt/${branch}/
+livecheck.regex     >(\[0-9.\]+)/<
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140414/9550a08e/attachment-0001.html>


More information about the macports-changes mailing list