source: trunk/dports/aqua/qt4-mac/files/patch-mkspecs_features_qt_functions.prf.diff @ 94241

Last change on this file since 94241 was 94241, checked in by michaelld@…, 7 years ago

qt4-mac : upgrade to 4.8.2; upgrade and fix certain dependent ports.

File size: 4.3 KB
  • mkspecs/features/qt_functions.prf

    old new  
    1616}
    1717
    1818defineTest(qtAddLibrary) {
     19#    message(qtAddLibrary: 'LIBS' before $$1 is '$${LIBS}')
     20#    message(qtAddLibrary: 'INCLUDEPATH' before $$1 is '$${INCLUDEPATH}')
     21#    message(qtAddLibrary: 'QMAKE_LFLAGS' before $$1 is '$${QMAKE_LFLAGS}')
     22
     23    # reorder the includes path: user, this library, Qt headers
     24    INCLUDEPATH -= $$QMAKE_INCDIR_QT
    1925    INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
    20     INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
     26    INCLUDEPATH += $$QMAKE_INCDIR_QT/$$1 $$QMAKE_INCDIR_QT
     27
     28    # first time through, append the path for Qt's installed libraries:
     29    # -after- all of the other necessary libraries and paths
     30
     31    mac:!static:contains(QT_CONFIG, qt_framework) {
     32      isEmpty(QMAKE_FRAMEWORKDIR_QT) {
     33         !contains(LIBS,-F$$[QT_INSTALL_PREFIX]/Library/Frameworks) {
     34           LIBS = $$LIBS -F$$[QT_INSTALL_PREFIX]/Library/Frameworks
     35         }
     36      } else {
     37        !contains(LIBS,-F$$QMAKE_FRAMEWORKDIR_QT) {
     38          LIBS = $$LIBS -F$$QMAKE_FRAMEWORKDIR_QT
     39        }
     40      }
     41      isEmpty(QMAKE_LIBDIR_QT) {
     42         !contains(LIBS,-F$$[QT_INSTALL_PREFIX]/lib) {
     43           LIBS = $$LIBS -F$$[QT_INSTALL_PREFIX]/lib
     44         }
     45      } else {
     46        !contains(LIBS,-F$$QMAKE_LIBDIR_QT) {
     47          LIBS = $$LIBS -F$$QMAKE_LIBDIR_QT
     48        }
     49      }
     50    }
     51    isEmpty(QMAKE_LIBDIR_QT) {
     52       !contains(LIBS,-L$$[QT_INSTALL_PREFIX]/lib) {
     53         LIBS = $$LIBS -L$$[QT_INSTALL_PREFIX]/lib
     54       }
     55    } else {
     56      !contains(LIBS,-L$$QMAKE_LIBDIR_QT) {
     57        LIBS = $$LIBS -L$$QMAKE_LIBDIR_QT
     58      }
     59    }
    2160
    2261    LIB_NAME = $$1
    2362    unset(LINKAGE)
    24     mac {
    25        CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced
    26           QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT}
    27           FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers
    28           !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
    29              INCLUDEPATH -= $$FRAMEWORK_INCLUDE
    30              INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
    31            }
    32            LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
    33         } else:!qt_no_framework { #detection
    34            for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) {
    35               exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
    36                 QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
     63    mac:!qt_no_framework {
     64       for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) {
     65           exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
     66               QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
    3767                FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
    3868                !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
    3969                  INCLUDEPATH -= $$FRAMEWORK_INCLUDE
     
    4272                LINKAGE = -framework $${LIB_NAME}
    4373                break()
    4474              }
    45            }
    46        }
     75         }
    4776    }
    4877    symbian {
    4978        isEqual(LIB_NAME, QtCore) {
     
    73102    isEmpty(LINKAGE) {
    74103       if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
    75104           win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
    76            mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
     105           # special for mac: cannot build QtWebKit as debug,
     106           # no-framework, and universal.  If things got here,
     107           # then this is no-framwork; just take care of the rest.
     108           mac {
     109               contains(QT_CONFIG, x86):contains(QT_CONFIG, x86_64):isEqual(LIB_NAME, QtWebKit) {
     110                   LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
     111               } else {
     112                   LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
     113               }
     114           }
    77115       }
    78116       isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
    79117    }
     
    83121        QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
    84122    }
    85123    LIBS += $$LINKAGE
     124#    message(qtAddLibrary: 'LIBS' after $$1 is now '$${LIBS}')
     125#    message(qtAddLibrary: 'INCLUDEPATH' after $$1 is now '$${INCLUDEPATH}')
     126#    message(qtAddLibrary: 'QMAKE_LFLAGS' after $$1 is now '$${QMAKE_LFLAGS}')
    86127    export(LIBS)
    87128    export(INCLUDEPATH)
    88129    export(QMAKE_FRAMEWORKPATH)
     
    119160
    120161    return(true)
    121162}
    122 
Note: See TracBrowser for help on using the repository browser.