Ticket #43329: Portfile-qt4-mac.diff

File Portfile-qt4-mac.diff, 4.5 KB (added by springermac (Jonathan Springer), 11 years ago)
  • Portfile

    old new  
    5050                    port:openssl port:tiff \
    5151                    port:libpng port:libmng port:jpeg
    5252
     53# find a way to specify the OS MINOR version.
     54global MINOR
     55set MINOR ""
     56
     57# hopefully the macosx_deployment_target exists and is set by now.  if
     58# not, last resort (which is not desirable) is to use the os.version.
     59if {${macosx_deployment_target} ne ""} {
     60    set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
     61} else {
     62    set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
     63}
     64
    5365###############################################
    5466# Patches are used to both fix compiling on various OS versions, and
    5567# to enhance the functionality of QMake and its build files.  Some of
     
    221233# to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead.  For
    222234# some reason 10.5+ "knows" that how to do this correctly.
    223235
    224 platform darwin 8 {
    225     patchfiles-append patch-QtHelp_10.4_only.diff
     236platform darwin {
     237    if {${MINOR} == 4} {
     238        patchfiles-append patch-QtHelp_10.4_only.diff
     239    }
    226240}
    227241
    228242# (20) fix the Mac timer's use of "mach_timebase_info"
     
    238252# (22) Under 10.8 and 10.9: Patch to fix corelib linking
    239253
    240254platform darwin {
    241     if {${os.major} > 12} {
     255    if {${MINOR} >= 8} {
    242256        patchfiles-append patch-src_corelib_corelib.pro.diff
    243257    }
    244258}
     
    257271# (26) Fix qglobals.h to build under 10.9 CLang
    258272# (27 a-e) Fix WebKit to build under 10.9 CLang
    259273
    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
     274platform darwin {
     275    if {${MINOR} >= 9} {
     276        patchfiles-append   \
     277            patch-src_3rdparty_clucene_src_CLucene_search_FieldCacheImpl.cpp.diff \
     278            patch-src_corelib_global_qglobal.h.diff \
     279            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.h.diff \
     280            patch-src_3rdparty_webkit_Source_WebCore_platform_Timer.cpp.diff \
     281            patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp.diff \
     282            patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp.diff \
     283            patch-src_3rdparty_webkit_Source_WebCore_platform_network_qt_QNetworkReplyHandler.cpp.diff
     284
     285        # Copy new version of webkit's lib for OS X 10.9 only.
     286        # Attached by reference:
     287        # https://codereview.qt-project.org/#change,69328
     288        # http://trac.webkit.org/browser/trunk/WebKitLibraries/ChangeLog?rev=157771
     289
     290        distfiles-append libWebKitSystemInterfaceMavericks.a
     291        post-patch {
     292            copy ${distpath}/libWebKitSystemInterfaceMavericks.a \
     293                ${worksrcpath}/src/3rdparty/webkit/WebKitLibraries
     294        }
    279295    }
    280296}
    281297
    282298platform darwin {
    283     if {${os.major} > 13} {
     299    if {${MINOR} >= 9} {
    284300        # This project needs to be updated to build with clang++ against libc++
    285301        depends_lib
    286302        depends_run
     
    297313
    298314configure.ccache no
    299315
    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 }
    311 
    312316# find a way to specify the SDK to use; Qt will use the 10.4u by
    313317# default which won't work on 10.6 since it is not supported.  Allow
    314318# the user to specify the SDK if desired.