Ignore:
Timestamp:
Nov 13, 2015, 4:13:51 PM (3 years ago)
Author:
mcalhoun@…
Message:

qt5 and qt5-mac

  • rename qt5-mac to qt5
  • restructure qt5 to be a series of (subport) modules
  • upgrade 5.4.2 -> 5.5.1
Location:
trunk/dports/_resources/port1.0/group
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl

    r134876 r142505  
    3838
    3939PortGroup                       qt5 1.0
     40PortGroup                       active_variants 1.1
    4041
    41 configure.cmd                   ${qt_qmake_cmd} -r
    42 configure.pre_args-replace      --prefix=${prefix} PREFIX=${prefix}
     42# with the -r option, the examples do not install correctly (no source code)
     43#     the install_sources target is not created in the Makefile(s)
     44configure.cmd                   ${qt_qmake_cmd}
     45#configure.cmd                   ${qt_qmake_cmd} -r
     46
     47configure.pre_args-replace      --prefix=${prefix} "PREFIX=${prefix}"
    4348configure.universal_args-delete --disable-dependency-tracking
    4449
    45 # qmake defaults to -mmacosx-version-min=10.6, which implies stdlib is libstdc++, which caused problems
    46 #    (see https://trac.macports.org/wiki/FAQ#libcpp)
    47 configure.pre_args-append       "QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}"
     50# specify build configuration (compiler, 32-bit/64-bit, etc.)
     51if { ![option universal_variant] || ![variant_isset universal] } {
     52    configure.args-append -spec ${qt_qmake_spec}
     53} else {
     54    lappend merger_configure_args(i386)   -spec ${qt_qmake_spec_32}
     55    lappend merger_configure_args(x86_64) -spec ${qt_qmake_spec_64}
     56}
    4857
    49 # qt5-mac does not currently support debug.
    50 configure.pre_args-append       "CONFIG+=release"   
     58# if qtbase was build as a universal,
     59#    QT_ARCH and QT_TARGET_ARCH may be set incorrectly in ${qt_mkspecs_dir}/qconfig.pri,
     60#    so set them manually
     61if { ![option universal_variant] || ![variant_isset universal] } {
     62    pre-configure {
     63        if {[active_variants qt5-qtbase universal ""]} {
     64            configure.args-append \
     65                QT_ARCH=${build_arch} \
     66                QT_TARGET_ARCH=${build_arch}
     67        }
     68    }
     69} else {
     70    foreach arch ${configure.universal_archs} {
     71        lappend merger_configure_args(${arch}) \
     72            QT_ARCH=${arch} \
     73            QT_TARGET_ARCH=${arch}
     74    }
     75}
     76
     77if {![info exists qt5_qmake_request_no_debug]} {
     78    variant debug description {Build both release and debug libraries} {}
     79
     80    # accommodating variant request varies depending on how qtbase was built
     81    pre-configure {
     82
     83        # determine if qmake builds debug libraries by default (set via variants)
     84        if {[active_variants qt5-qtbase debug ""]} {
     85            set base_debug true
     86        } else {
     87            set base_debug false
     88        }
     89
     90        # determine if the user wants to build debug libraries
     91        if { [variant_exists debug] && [variant_isset debug] } {
     92            set this_debug true
     93        } else {
     94            set this_debug false
     95        }
     96
     97        # determine of qmake's default and user requests are compatible; override qmake if necessary
     98        if { ${this_debug} && !${base_debug}  } {
     99            configure.args-append "QT_CONFIG+=\"debug_and_release build_all\""
     100        }
     101
     102        if { !${this_debug} && ${base_debug}  } {
     103            configure.args-append "QT_CONFIG-=\"debug_and_release build_all\" CONFIG-=\"debug\""
     104        }
     105    }
     106}
  • trunk/dports/_resources/port1.0/group/qt5-1.0.tcl

    r137536 r142505  
    3838# no universal binary support in Qt 5
    3939#     see http://lists.qt-project.org/pipermail/interest/2012-December/005038.html
    40 #     see also https://bugreports.qt-project.org/browse/QTBUG-24952
     40#     and https://bugreports.qt.io/browse/QTBUG-24952
     41supported_archs i386 x86_64
    4142if { ![exists universal_variant] || [option universal_variant] } {
    4243    PortGroup muniversal 1.0
    43     #universal_archs_supported i386 x86_64
    44 }
    45 
    46 # check for +debug variant of this port, and make sure Qt was
    47 # installed with +debug as well; if not, error out.
    48 platform darwin {
    49     pre-extract {
    50         if {[variant_exists debug] && \
    51             [variant_isset debug] && \
    52            ![info exists building_qt5]} {
    53             if {![file exists ${qt_frameworks_dir}/QtCore.framework/QtCore_debug]} {
    54                 return -code error "\n\nERROR:\n\
    55 In order to install this port as +debug,
    56 Qt5 must also be installed with +debug.\n"
    57             }
    58         }
    59     }
     44    universal_archs_supported i386 x86_64
    6045}
    6146
     
    6651# standard install directory
    6752global qt_dir
    68 set qt_dir               ${prefix}/libexec/qt5-mac
     53set qt_dir               ${prefix}/libexec/qt5
    6954
    7055# standard Qt non-.app executables directory
     
    135120set qt_mkspecs_dir      ${qt_dir}/mkspecs
    136121
    137 # standard Qt .app executables directory, if created?
     122# standard Qt .app executables directory, if created
    138123global qt_apps_dir
    139 set qt_apps_dir         ${qt_bins_dir}
     124set qt_apps_dir         ${applications_dir}/Qt5
    140125
    141126# standard CMake module directory for Qt-related files
    142127#global qt_cmake_module_dir
    143 #set qt_cmake_module_dir ${qt_libs_dir}/cmake
     128set qt_cmake_module_dir ${qt_libs_dir}/cmake
    144129
    145130# standard qmake command location
     
    164149
    165150# standard qmake spec
    166 # other platforms required? (see http://doc.qt.io/qt-5/supported-platforms.html and http://doc.qt.io/QtSupportedPlatforms/index.html)
    167 global qt_qmake_spec
     151# other platforms required
     152#     see http://doc.qt.io/qt-5/supported-platforms.html
     153#     and http://doc.qt.io/QtSupportedPlatforms/index.html
     154global qt_qmake_spe
    168155global qt_qmake_spec_32
    169156global qt_qmake_spec_64
     
    174161
    175162if { ![option universal_variant] || ![variant_isset universal] } {
    176     if { ${build_arch} eq "i386" } {
     163    if { ${configure.build_arch} eq "i386" } {
    177164        set qt_qmake_spec ${qt_qmake_spec_32}
    178165    } else {
     
    184171
    185172# standard cmake info for Qt5
    186 global qt_cmake_defines
    187 set qt_cmake_defines    \
    188     "-DQT_QT_INCLUDE_DIR=${qt_includes_dir} \
    189      -DQT_QMAKESPEC=${qt_qmake_spec} \
    190      -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \
    191      -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib"
    192 
    193 # set Qt understood arch types, based on user preference
    194 options qt_arch_types
    195 default qt_arch_types   {[string map {i386 x86} [get_canonical_archs]]}
    196 
    197 # allow for depending on either qt5-mac and qt5-mac-devel, simultaneously
     173#global qt_cmake_defines
     174#set qt_cmake_defines    \
     175#    "-DQT_QT_INCLUDE_DIR=${qt_includes_dir} \
     176#     -DQT_QMAKESPEC=${qt_qmake_spec} \
     177#     -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \
     178#     -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib"
    198179
    199180if {![info exists building_qt5]} {
    200     if {${os.platform} eq "darwin"} {
    201 
    202         # see if the framework install exists, and if so depend on it;
    203         # if not, depend on the library version
    204 
    205         if {[file exists ${qt_frameworks_dir}/QtCore/QtCore]} {
    206             depends_lib-append path:Library/Frameworks/QtCore/QtCore:qt5-mac
    207         } else {
    208             depends_lib-append path:lib/libQtCore.5.dylib:qt5-mac
    209         }
    210     }
     181    depends_lib-append port:qt5-qtbase
    211182}
    212183
     
    214185
    215186if {![info exists building_qt5]} {
    216     configure.env-append \
    217         QTDIR=${qt_dir} \
    218         QMAKE=${qt_qmake_cmd} \
    219         MOC=${qt_moc_cmd}
    220 
    221     if { ![option universal_variant] || ![variant_isset universal] } {
    222         configure.env-append QMAKESPEC=${qt_qmake_spec}
    223     } else {
    224         set merger_configure_env(i386)   "QMAKESPEC=${qt_qmake_spec_32}"
    225         set merger_configure_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"
    226     }
     187#    configure.env-append \
     188#        QTDIR=${qt_dir} \
     189#        QMAKE=${qt_qmake_cmd} \
     190#        MOC=${qt_moc_cmd}
    227191
    228192    # make sure the Qt binaries' directory is in the path, if it is
    229193    # not the current prefix
    230194
    231     if {${qt_dir} ne ${prefix}} {
    232         configure.env-append PATH=${qt_dir}/bin:$env(PATH)
    233     }
    234 } else {
    235     configure.env-append QMAKE_NO_DEFAULTS=""
    236 }
    237 
    238 # standard build environment, when not building qt5
    239 
    240 if {![info exists building_qt5]} {
    241     build.env-append \
    242         QTDIR=${qt_dir} \
    243         QMAKE=${qt_qmake_cmd} \
    244         MOC=${qt_moc_cmd}
    245 
    246     if { ![option universal_variant] || ![variant_isset universal] } {
    247         build.env-append QMAKESPEC=${qt_qmake_spec}
    248     } else {
    249         set merger_build_env(i386)   "QMAKESPEC=${qt_qmake_spec_32}"
    250         set merger_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"
    251     }
     195#    if {${qt_dir} ne ${prefix}} {
     196#        configure.env-append PATH=${qt_dir}/bin:$env(PATH)
     197#    }
     198
     199    # standard build environment, when not building qt5
     200
     201    #build.env-append \
     202        #QTDIR=${qt_dir} \
     203        #QMAKE=${qt_qmake_cmd} \
     204        #MOC=${qt_moc_cmd}
     205
     206    #if { ![option universal_variant] || ![variant_isset universal] } {
     207    #    build.env-append QMAKESPEC=${qt_qmake_spec}
     208    #} else {
     209    #    set merger_build_env(i386)   "QMAKESPEC=${qt_qmake_spec_32}"
     210    #    set merger_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"
     211    #}
    252212
    253213    # make sure the Qt binaries' directory is in the path, if it is
    254214    # not the current prefix
    255215
    256     if {${qt_dir} ne ${prefix}} {
    257         build.env-append    PATH=${qt_dir}/bin:$env(PATH)
    258     }
     216    #if {${qt_dir} ne ${prefix}} {
     217    #    build.env-append    PATH=${qt_bins_dir}:$env(PATH)
     218    #}
    259219}
    260220
     
    274234# standard destroot environment, when not building qt5
    275235
    276 if {![info exists building_qt5]} {
    277     destroot.env-append \
    278         QTDIR=${qt_dir} \
    279         QMAKE=${qt_qmake_cmd} \
    280         MOC=${qt_moc_cmd}
    281 
    282     if { ![option universal_variant] || ![variant_isset universal] } {
    283         build.env-append QMAKESPEC=${qt_qmake_spec}
    284     } else {
    285         set destroot_build_env(i386)   "QMAKESPEC=${qt_qmake_spec_32}"
    286         set destroot_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"
    287     }
     236#if {![info exists building_qt5]} {
     237#    destroot.env-append \
     238#        QTDIR=${qt_dir} \
     239#        QMAKE=${qt_qmake_cmd} \
     240#        MOC=${qt_moc_cmd}
     241
     242#    if { ![option universal_variant] || ![variant_isset universal] } {
     243#        build.env-append QMAKESPEC=${qt_qmake_spec}
     244#    } else {
     245#        set destroot_build_env(i386)   "QMAKESPEC=${qt_qmake_spec_32}"
     246#        set destroot_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"
     247#    }
    288248
    289249    # make sure the Qt binaries' directory is in the path, if it is
    290250    # not the current prefix
    291251
    292     if {${qt_dir} ne ${prefix}} {
    293         destroot.env-append PATH=${qt_dir}/bin:$env(PATH)
    294     }
    295 }
     252#    if {${qt_dir} ne ${prefix}} {
     253#        destroot.env-append PATH=${qt_dir}/bin:$env(PATH)
     254#    }
     255#}
Note: See TracChangeset for help on using the changeset viewer.