Changeset 118978 for trunk/dports/aqua


Ignore:
Timestamp:
Apr 14, 2014, 1:54:02 PM (5 years ago)
Author:
michaelld@…
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".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/qt4-mac/Portfile

    r115032 r118978  
    5151                    port:libpng port:libmng port:jpeg
    5252
     53# find a way to specify the OS MINOR version.  For OSX 10.X, this
     54# value will be X.  The type is this variable is integer, so we can
     55# use "==" and so forth for comparison.
     56
     57global MINOR
     58set MINOR ""
     59
     60# hopefully the MACOSX_DEPLOYMENT_TARGET exists and is set by now.  if
     61# not, last resort (which is not desirable) is to use the os.version.
     62
     63if {${macosx_deployment_target} ne ""} {
     64    set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
     65} else {
     66    set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
     67}
     68
    5369###############################################
    5470# Patches are used to both fix compiling on various OS versions, and
     
    222238# some reason 10.5+ "knows" that how to do this correctly.
    223239
    224 platform darwin 8 {
    225     patchfiles-append patch-QtHelp_10.4_only.diff
     240platform darwin {
     241    if {${MINOR} == 4} {
     242        patchfiles-append patch-QtHelp_10.4_only.diff
     243    }
    226244}
    227245
     
    239257
    240258platform darwin {
    241     if {${os.major} > 12} {
     259    if {${MINOR} >= 8} {
    242260        patchfiles-append patch-src_corelib_corelib.pro.diff
    243261    }
     
    258276# (27 a-e) Fix WebKit to build under 10.9 CLang
    259277
    260 platform darwin 13 {
    261     patchfiles-append   \
    262         patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
    263         patch-src_corelib_global_qglobal.h.diff \
    264         patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
    265         patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
    266         patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
    267         patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
    268         patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
    269 
    270     # Copy new version of webkit's lib for OS X 10.9 only.
    271     # Attached by reference:
    272     # https://codereview.qt-project.org/#change,69328
    273     # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
    274 
    275     distfiles-append libWebKitSystemInterfaceMavericks.a
    276     post-patch {
    277         copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
    278             ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
    279     }
    280 }
    281 
    282278platform darwin {
    283     if {${os.major} > 13} {
     279    if {${MINOR} == 9} {
     280        patchfiles-append \
     281            patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
     282            patch-src_corelib_global_qglobal.h.diff \
     283            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
     284            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
     285            patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
     286            patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
     287            patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
     288
     289        # Copy new version of webkit's lib for OS X 10.9 only.
     290        # Attached by reference:
     291        # https://codereview.qt-project.org/#change,69328
     292        # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
     293
     294        distfiles-append libWebKitSystemInterfaceMavericks.a
     295        post-patch {
     296            copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
     297                ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
     298        }
     299    }
     300}
     301
     302# error out if trying to build on a new OSX version (> 10.9).
     303
     304platform darwin {
     305    if {${MINOR} > 9} {
    284306        # This project needs to be updated to build with clang++ against libc++
    285307        depends_lib
    286308        depends_run
    287309        pre-fetch {
    288             ui_error "$name does not build on OSX later than 10.9 'Mavericks'."
     310            ui_error "$name does not currently build on OSX later than 10.9 'Mavericks'."
    289311            error "unsupported platform"
    290312        }
     
    297319
    298320configure.ccache no
    299 
    300 # find a way to specify the OS MINOR version.
    301 global MINOR
    302 set MINOR ""
    303 
    304 # hopefully the macosx_deployment_target exists and is set by now.  if
    305 # not, last resort (which is not desirable) is to use the os.version.
    306 if {${macosx_deployment_target} ne ""} {
    307     set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
    308 } else {
    309     set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
    310 }
    311321
    312322# find a way to specify the SDK to use; Qt will use the 10.4u by
     
    319329    # set SDK version depending on OS version
    320330    set sdk_version ""
    321     if {${MINOR} eq "4"} {
     331    if {${MINOR} == 4} {
    322332        # OSX 10.4 requires an additional 'u'
    323333        set sdk_version "10.4u"
     
    567577    # for 10.4 or 10.5 32-bit PPC, build as Carbon only, not Cocoa
    568578
    569     if {${MINOR} eq "4"} {
     579    if {${MINOR} == 4} {
    570580
    571581        configure.args-append -carbon
     
    576586            -lssl -lz
    577587
    578     } elseif {${MINOR} eq "5" &&
     588    } elseif {${MINOR} == 5 &&
    579589              [llength ${qt_arch_types}] == 1 &&
    580590              [lsearch -exact ${qt_arch_types} ppc] == 0} {
     
    602612        configure.args-delete -optimized-qmake
    603613
    604     } elseif {${MINOR} eq "6" &&
     614    } elseif {${MINOR} == 6 &&
    605615              [llength ${qt_arch_types}] == 1 &&
    606616              [lsearch -exact ${qt_arch_types} x86] == 0} {
     
    628638        if {[info exists configure.cxx_stdlib]} {
    629639            configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
    630         } elseif {${MINOR} eq "9"} {
     640        } elseif {${MINOR} == 9} {
    631641            configure.env-append QMAKE_STDLIB="-stdlib=libc++"
    632642        } else {
     
    10341044variant framework description {Framework Legacy Compatibility Variant} {
    10351045    ui_error "${name} variant +framework has been disabled because ${name} now installs as both libraries and frameworks.  Please install ${name} without +framework."
    1036     return -code error "Variant disabled"
     1046    error "Variant disabled"
    10371047}
    10381048
    10391049variant mysql description {MySQL Qt4 Plugin Legacy Compatibility Variant} {
    10401050    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."
    1041     return -code error "Variant disabled"
     1051    error "Variant disabled"
    10421052}
    10431053
     
    10751085if {${psql_version} ne ""} {
    10761086    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."
    1077     return -code error "Variant disabled"
     1087    error "Variant disabled"
    10781088}
    10791089
     
    11701180
    11711181livecheck.type      regex
    1172 livecheck.url       http://releases.qt-project.org/qt4/source
    1173 livecheck.regex     "qt-everywhere-opensource-src-(\[0-9a-z.-\]+)${extract.suffix}"
     1182livecheck.url       http://download.qt-project.org/official_releases/qt/${branch}/
     1183livecheck.regex     >(\[0-9.\]+)/<
Note: See TracChangeset for help on using the changeset viewer.