Changeset 142505


Ignore:
Timestamp:
Nov 13, 2015, 4:13:51 PM (4 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
Files:
7 added
3 deleted
8 edited
1 copied

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#}
  • trunk/dports/aqua/qt5-mac/Portfile

    r139229 r142505  
    55
    66name                qt5-mac
    7 version             5.4.2
    8 revision            1
    9 set branch          [join [lrange [split ${version} .] 0 1] .]
    10 
     7version             5.5.1
     8license             {LGPL-2.1 GPL-3}
    119categories          aqua
    12 platforms           macosx
    13 maintainers         mcalhoun openmaintainer
    14 license             {LGPL-2.1 GPL-3}
    15 
    16 homepage            http://qt.io
    17 description         Qt Tool Kit ${branch}
    18 long_description    Qt Tool Kit: A cross-platform framework \
    19     (headers, data, and libraries) for writing \
    20     cross-platform GUI-based applications.
    21 
    22 distname            qt-everywhere-opensource-src-${version}
    23 
    24 master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
    25 
    26 checksums           rmd160  3382c482a99e114560f56a9fe9501b8cabf334a9 \
    27                     sha256  cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd
    28 
    29 if { ${os.major} < 11 } {
    30     pre-fetch {
    31         ui_error "OS X prior to 10.8 (Mountain Lion) is not a Reference Configuration for Qt."
    32         ui_error "OS X prior to 10.7 (Lion) is not even tested."
    33         ui_error "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations"
    34         return -code error "unsupported OS"
    35     }
    36 } elseif { ${os.major} > 14 } {
    37     pre-fetch {
    38         ui_warn "OS X subsequent to 10.10 (Yosemite) is not a Reference Configuration for Qt."
    39         ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations"
    40     }
    41 } else {
    42     # 11 <= ${os.major} <= 14
    43     if { [variant_isset universal] } {
    44         pre-fetch {
    45             ui_warn "Multiple architectures is not a Reference Configuration for Qt."
    46             ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations"
    47         }
    48     } else {
    49         if { ${build_arch} eq "i386" } {
    50             pre-fetch {
    51                 ui_warn "32-bit mode is not a Reference Configuration for Qt."
    52                 ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations"
    53             }
    54         }
    55     }
    56 }
    57 
    58 if { ${subport} eq "${name}-docs"  } {
    59     universal_variant no
    60 }
    61 
    62 if { ${subport} eq ${name} || ${subport} eq "${name}-docs" } {
    63     # use the qt5 group; set 'building_qt5' so that the portgroup
    64     # does not include certain parts
    65     set building_qt5    1
    66     PortGroup           conflicts_build 1.0
    67     PortGroup           qt5 1.0
    68     PortGroup           xcodeversion 1.0
    69 
    70     conflicts           qt3 qt3-mac qt4-mac
    71 
    72     minimum_xcodeversions   {11 4.1}
    73 
    74     # See https://bugreports.qt.io/browse/QTBUG-34902
    75     conflicts_build-append  qt4-mac
    76 
    77     # Kuba states in https://trac.macports.org/ticket/44207#comment:7
    78     #  "There's no reason to have parallel building disabled. Really."
    79     #use_parallel_build no
    80 
    81     # qtwebengine/src/core/gyp_run.pro buils an executable using g++
    82     # This causes an error if UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
    83     # Quick fix is to use full path to g++ (should use ${configure.cxx} instead?)
    84     # N.B. that the python executable is found from the configuration environment
    85     #patchfiles-append patch-ninja-compiler.diff
    86 
    87     #needed? qtwebengine/src/3rdparty/chromium/build/gyp_helper.py
    88 
    89     # qtwebengine/src/core/gyp_run.pro
    90     #    calls
    91     #   qtwebengine/tools/buildscripts/gyp_qtwebengine
    92     # gyp_qtwebengine insists on x64 and libcpp ?
    93 
    94     # qtwebengine/src/3rdparty/ninja/bootstrap.py calls g++ (must set CXX)
    95 
    96     if { [variant_isset tests] } {
    97         # header file QtCore/private/qmachparser_p.h is included only if "defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)"
    98         #     code from header is used only "ifdef Q_OF_MACH_O"
    99         #     the two must be consistent
    100         #     assume the header include code is correct
    101         patchfiles-append patch-tst_qpluginloader.diff
    102 
    103         # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
    104         patchfiles-append patch-tst_benchlibcallgrind.diff
    105 
    106         # When testing, ensure that a universal object file is not inadvertently created.
    107         patchfiles-append patch-machtest.diff
    108 
    109         # On testing of 32-bit systems,
    110         #  Pre-patch: QCOMPARE(unsigned long const&, unsigned int const&
    111         # Post-patch: QCOMPARE(unsigned int  const&, unsigned int const&
    112         # Function template is only instantiated for same first and second arguments.
    113         patchfiles-append patch-tst_qarraydata.diff
    114 
    115         # During testing, NSStringFromRect requires NSRect.
    116         patchfiles-append patch-tst_qaccessibilitymac_helpers.diff
    117     }
    118 
    119     # see #44934 (and #35067 for the qt4-mac version)
    120     if { true } {
    121         set framework_list [split ${qt_frameworks_dir} '/']
    122         set qt_list        [split ${qt_dir} '/']
    123 
    124         while {[llength ${qt_list}] && [llength ${framework_list}]} {
    125             set var_qt        [lindex $qt_list        0]
    126             set var_framework [lindex $framework_list 0]
    127 
    128             if { ${var_qt} ne ${var_framework} } {
    129                 break
    130             }
    131 
    132             # remove first element from list
    133             set qt_list        [lreplace ${qt_list}        0 0]
    134             set framework_list [lreplace ${framework_list} 0 0]
    135         }
    136         set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
    137         if { ${libreplace} ne "lib" } {
    138             patchfiles-append patch-shared.diff
    139             post-patch {
    140                 reinplace "s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g" ${worksrcpath}/qttools/src/macdeployqt/shared/shared.cpp
    141             }
    142         }
    143     }
    144 
    145     # --prefix is not recognized.
    146     configure.pre_args-delete       --prefix=${prefix}
    147 
    148     # --disable-dependency-tracking is not recognized.
    149     configure.universal_args-delete --disable-dependency-tracking
    150 
    151     # Installation options:
    152     #-extprefix     SYSROOT/PREFIX
    153     #-hostprefix    EXTPREFIX
    154     #-libexecdir    ARCHDATADIR/libexec
    155     #-hostbindir    HOSTPREFIX/bin
    156     #-hostlibdir    HOSTPREFIX/lib
    157     configure.args-append                      \
    158         -prefix         ${qt_dir}              \
    159         -bindir         ${qt_bins_dir}         \
    160         -headerdir      ${qt_includes_dir}     \
    161         -libdir         ${qt_libs_dir}         \
    162         -archdatadir    ${qt_archdata_dir}     \
    163         -plugindir      ${qt_plugins_dir}      \
    164         -importdir      ${qt_imports_dir}      \
    165         -qmldir         ${qt_qml_dir}          \
    166         -datadir        ${qt_data_dir}         \
    167         -docdir         ${qt_docs_dir}         \
    168         -translationdir ${qt_translations_dir} \
    169         -sysconfdir     ${qt_sysconf_dir}      \
    170         -examplesdir    ${qt_examples_dir}     \
    171         -testsdir       ${qt_tests_dir}        \
    172         -hostdatadir    ${qt_host_data_dir}
    173 
    174     # Configure options:
    175     configure.args-append \
    176         -release          \
    177         -opensource       \
    178         -confirm-license  \
    179         -shared           \
    180         -largefile        \
    181         -accessibility
    182    
    183     foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } {
    184         configure.args-append -no-sql-${driver}
    185     }
    186 
    187     if { ![variant_isset universal] } {
    188         configure.args-append "-platform ${qt_qmake_spec}"
    189     } else {
    190         set merger_configure_args(i386)   "-platform ${qt_qmake_spec_32}"
    191         set merger_configure_args(x86_64) "-platform ${qt_qmake_spec_64}"
    192     }
    193 
    194     configure.args-append \
    195         -force-pkg-config
    196 
    197     # Third Party Libraries:
    198     configure.args-append   \
    199         -system-zlib        \
    200         -no-mtdev           \
    201         -no-journald        \
    202         -system-libpng      \
    203         -system-libjpeg     \
    204         -system-freetype    \
    205         -system-harfbuzz    \
    206         -openssl-linked     \
    207         -system-pcre        \
    208         --disable-xcb       \
    209         --disable-xkbcommon \
    210         -no-xinput2         \
    211         -no-xcb-xlib        \
    212         -glib               \
    213         -no-pulseaudio      \
    214         -no-alsa            \
    215         -no-gtkstyle
    216 
    217     # Additional options:
    218     configure.args-append       \
    219         {-make libs}            \
    220         {-make tools}           \
    221         {-nomake examples}      \
    222         {-nomake tests}         \
    223         -gui                    \
    224         -widgets                \
    225         -rpath                  \
    226         -verbose                \
    227         -no-optimized-qmake     \
    228         -nis                    \
    229         -cups                   \
    230         -iconv                  \
    231         -no-evdev               \
    232         -icu                    \
    233         -fontconfig             \
    234         -strip                  \
    235         -no-pch                 \
    236         -dbus-linked            \
    237         -no-use-gold-linker     \
    238         -no-separate-debug-info \
    239         -no-xcb                 \
    240         -no-eglfs               \
    241         -no-directfb            \
    242         -no-linuxfb             \
    243         -no-kms                 \
    244         -no-system-proxies
    245    
    246     # MacOS/iOS options:
    247     configure.args-append    \
    248         -framework
    249 
    250     if {${configure.sdkroot} ne ""} {
    251         configure.args-append \
    252             -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} "/"] end] "."] 0 end-1] "."]]
    253     }
    254    
    255     # configure options that don't show up in configure --help
    256     configure.args-append \
    257         -no-libudev       \
    258         -no-egl           \
    259         -no-openvg
    260 
    261     # Qt builds part of the system using environment provided my MacPorts.
    262     # It builds the rest using its own internal environment.
    263     # For consistency, clear MacPorts environment.
    264     configure.cxx_stdlib
    265     configure.sdkroot
    266     configure.cc_archflags
    267     configure.cxx_archflags
    268     configure.objc_archflags
    269     configure.objcxx_archflags
    270     configure.ld_archflags
    271     configure.cppflags
    272     configure.cflags
    273     configure.cxxflags
    274     configure.objcflags
    275     configure.objcxxflags
    276     configure.ldflags
    277     configure.pipe  no
    278     if { [variant_isset universal] } {
    279         set merger_arch_flag no
    280     }
    281     configure.march
    282     configure.mtune
    283     configure.universal_ldflags
    284     configure.universal_cflags
    285     configure.universal_cxxflags
    286     configure.universal_cppflags
    287 }
    28810
    28911if { ${subport} eq ${name} } {
    290     depends_lib                              \
    291         port:zlib                            \
    292         port:libpng                          \
    293         port:jpeg                            \
    294         port:freetype                        \
    295         path:bin/dbus-daemon:dbus            \
    296         path:lib/libssl.dylib:openssl                         \
    297         port:tiff                            \
    298         port:libmng                          \
    299         path:lib/pkgconfig/glib-2.0.pc:glib2 \
    300         port:icu                             \
    301         port:pcre                            \
    302         port:libiconv                        \
    303         port:harfbuzz
     12    replaced_by     qt5
     13} elseif { ${subport} eq "${name}-docs"  } {
     14    replaced_by     qt5-docs
     15} elseif { ${subport} eq "${name}-sqlite3-plugin"  } {
     16    replaced_by     qt5-sqlite-plugin
     17} elseif { ${subport} eq "${name}-psql84-plugin"  } {
     18    replaced_by     qt5-psql-plugin
     19} elseif { ${subport} eq "${name}-mysql56-plugin"  } {
     20    replaced_by     qt5-mysql-plugin
     21}
     22PortGroup           obsolete 1.0
    30423
    305     # see https://bugreports.qt.io/browse/QTBUG-35514
    306     build.target
    307 
    308     if { [variant_isset universal] } {
    309         merger-post-destroot {
    310             foreach arch ${universal_archs_to_use} {
    311                 set dir ${destroot}-${arch}
    312 
    313                 # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
    314                 reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
    315 
    316                 foreach prlfl [glob ${dir}${qt_libs_dir}/*.framework/*.prl] {
    317                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
    318                 }
    319 
    320                 foreach prlfl [glob ${dir}${qt_libs_dir}/*.prl] {
    321                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
    322                 }
    323 
    324                 reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_mkspecs_dir}/modules/qt_lib_bootstrap_private.pri
    325                 reinplace "s|macx-clang-32|macx-clang|g"              ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
    326                
    327                
    328                 if { [variant_isset examples] } {
    329                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    330                     reinplace -E "/\\w*-arch \\\\/d"                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    331                     reinplace -E "/\\w*${arch} \\\\/d"                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    332                     reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    333                     reinplace "s|macx-clang-32|macx-clang|g"              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    334 
    335                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
    336                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
    337                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
    338                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    339                     if { [variant_isset debug] } {
    340                         reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/libpnp_basictools_debug.prl
    341                     }
    342                 }
    343             }
    344         }
    345 
    346         post-destroot {
    347             # delete preprocessor comments surrounding QT_CPU_FEATURES.i386 and QT_CPU_FEATURES.x86_64
    348             reinplace "/^#ifndef.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri
    349             reinplace "/^#else.*$/d"   ${destroot}${qt_mkspecs_dir}/qmodule.pri
    350             reinplace "/^#endif.*$/d"  ${destroot}${qt_mkspecs_dir}/qmodule.pri
    351         }
    352 
    353         # The file ${prefix}/share/qt5/mkspecs/qconfig.pri is still not properly merged
    354         # The solution is ???.
    355     }
    356 
    357     post-destroot {
    358         # see #44204
    359         foreach f [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir} *.framework] {
    360             set framework [file rootname ${f}]
    361 
    362             set include_list   [split ${qt_includes_dir}   '/']
    363             set framework_list [split ${qt_libs_dir} '/']
    364 
    365             while {[llength ${include_list}] && [llength ${framework_list}]} {
    366                 set var_include   [lindex $include_list   0]
    367                 set var_framework [lindex $framework_list 0]
    368 
    369                 if { ${var_include} ne ${var_framework} } {
    370                     break
    371                 }
    372 
    373                 # remove first element from list
    374                 set include_list   [lreplace ${include_list} 0 0]
    375                 set framework_list [lreplace ${framework_list} 0 0]
    376             }
    377 
    378             ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework}
    379         }
    380     }
    381 
    382     variant tests description {Enable tests} {
    383         configure.args-replace {-nomake tests} {-make tests}
    384     }
    385 
    386     variant examples description {Build examples} {
    387         configure.args-replace {-nomake examples} {-make examples}
    388     }
    389 
    390     variant debug description {Build both release and debug library} {
    391         configure.args-replace -release -debug-and-release
    392     }
    393 
    394     variant pulseaudio description {Compile PulseAudio support} {
    395         depends_lib-append port:pulseaudio
    396         configure.args-replace -no-pulseaudio -pulseaudio
    397     }
    398 }
    399 
    400 subport ${name}-docs {
    401     depends_lib-append \
    402         path:${qt_bins_dir}/qdoc:${name} \
    403         path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite3-plugin
    404 
    405     supported_archs   noarch
    406 
    407     build.target      docs
    408     destroot.target   install_docs
    409 
    410     post-extract {
    411         # For the most part, generated makefiles use ${prefix}/bin/qdoc.
    412         ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin
    413 
    414         # Similarly, location of qhelpgenerator is expected in ${worksrcpath}
    415         xinstall -d -m 755 ${worksrcpath}/qttools/bin/
    416         ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/
    417 
    418         # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target
    419         #    keeps generating itself over and over again.
    420         # This file is only created when the library is being built, however.
    421         xinstall -d -m 755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
    422         touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc
    423     }
    424 }
    425 
    426 # See http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
    427 
    428 subport ${name}-sqlite3-plugin {
    429     PortGroup           qmake5 1.0
    430 
    431     depends_lib-append port:sqlite3
    432 
    433     # for single architecture, easier to use
    434     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/sqlite,
    435     #    but doesn't work for universal build
    436     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/sqlite
    437     build.dir     ${configure.dir}
    438     destroot.dir  ${configure.dir}
    439 
    440     configure.args-append "INCLUDEPATH+=${prefix}/include" "LIBS+=\"-L${prefix}/lib -lsqlite3\""
    441 }
    442 
    443 subport ${name}-psql84-plugin {
    444     PortGroup           qmake5 1.0
    445 
    446     depends_lib-append port:postgresql84
    447 
    448     # for single architecture, easier to use
    449     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/psql,
    450     #    but doesn't work for universal build
    451     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/psql
    452     build.dir     ${configure.dir}
    453     destroot.dir  ${configure.dir}
    454 
    455     configure.args-append "INCLUDEPATH+=${prefix}/include/postgresql84" "LIBS+=\"-L${prefix}/lib/postgresql84 -lpq\""
    456 }
    457 
    458 subport ${name}-mysql56-plugin {
    459     PortGroup           qmake5 1.0
    460 
    461     depends_lib-append port:mysql56
    462 
    463     # for single architecture, easier to use
    464     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/mysql,
    465     #    but doesn't work for universal build
    466     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/mysql
    467     build.dir     ${configure.dir}
    468     destroot.dir  ${configure.dir}
    469 
    470     configure.args-append "INCLUDEPATH+=${prefix}/include/mysql56/mysql" "LIBS+=\"-L${prefix}/lib/mysql56/mysql -lmysqlclient_r\""
    471 }
    472 
    473 livecheck.type      regex
    474 livecheck.url       http://download.qt.io/archive/qt/${branch}/
    475 livecheck.regex     (\\d+(\\.\\d+)+)
     24subport ${name}-docs { }
     25subport ${name}-sqlite3-plugin { }
     26subport ${name}-psql84-plugin { }
     27subport ${name}-mysql56-plugin { }
  • trunk/dports/aqua/qt5/Portfile

    r139229 r142505  
    44PortSystem          1.0
    55
    6 name                qt5-mac
    7 version             5.4.2
    8 revision            1
     6name                qt5
     7version             5.5.1
     8
     9# get Qt's version numbers
    910set branch          [join [lrange [split ${version} .] 0 1] .]
     11set qt_major        [lindex [split ${version} .] 0]
    1012
    1113categories          aqua
     
    1517
    1618homepage            http://qt.io
    17 description         Qt Tool Kit ${branch}
    18 long_description    Qt Tool Kit: A cross-platform framework \
    19     (headers, data, and libraries) for writing \
    20     cross-platform GUI-based applications.
    21 
    22 distname            qt-everywhere-opensource-src-${version}
    23 
    24 master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
    25 
    26 checksums           rmd160  3382c482a99e114560f56a9fe9501b8cabf334a9 \
    27                     sha256  cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd
    28 
    29 if { ${os.major} < 11 } {
     19
     20# generate documentation from complete code base
     21# generate modules from separate downloads
     22if { ${subport} ne "${name}-docs" } {
     23    master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/submodules
     24} else {
     25    master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
     26}
     27
     28if { ${subport} ne ${name} } {
     29    # file sizes are significantly smaller using xz
     30    use_xz yes
     31}
     32
     33if { ${os.platform} ne "darwin" } {
     34    pre-fetch {
     35        ui_warn "${subport} is untested on \"${os.platform}\"."
     36    }
     37} elseif { ${os.major} < 11 } {
    3038    pre-fetch {
    3139        ui_error "OS X prior to 10.8 (Mountain Lion) is not a Reference Configuration for Qt."
     
    4755        }
    4856    } else {
    49         if { ${build_arch} eq "i386" } {
     57        if { ${configure.build_arch} eq "i386" } {
    5058            pre-fetch {
    5159                ui_warn "32-bit mode is not a Reference Configuration for Qt."
     
    5664}
    5765
    58 if { ${subport} eq "${name}-docs"  } {
     66############################################################################### Modules Not Considered
     67#
     68# No qt5             (Doesn't Install Anything)
     69# No qtactiveqt      (Windows Only)
     70# No qtandroidextras (Android Only)
     71# No qtdoc           (Doesn't Install Anything)
     72# No qtwayland       (Linux Only)
     73# No qtx11extras     (X11 Only)
     74# No qtwinextras     (Windows Only)
     75#
     76###############################################################################
     77
     78############################################################################### Finding Dependencies
     79#
     80# grep -r "%dependencies" *
     81# find ./ -name sync.profile
     82#
     83# grep -r qtCompileTest *
     84#
     85# find ./ -name config.tests
     86#
     87# find ./ -name Find\*.cmake
     88#
     89###############################################################################
     90
     91############################################################################### Notes
     92#
     93# qtconnectivity checks for bluetooth libraries
     94#    bluez and bluez_le (Linux Only)
     95#    btapi10_2_1 libbb2 (Blackberry Only)
     96#
     97# qtconnectivity depends on
     98#    qtandroidextras    (Android Only)
     99#
     100# qttools depends on
     101#    qtactiveqt (Windows Only)
     102#
     103# qtwebkit has tests for libraries in:
     104#     Tools/qmake/mkspecs/features/configure.prf
     105#     Tools/qmake/config.tests/
     106#
     107###############################################################################
     108
     109############################################################################### TODO
     110#
     111# TODO: possible to trim dependencies of qtbase?
     112# TODO: force qttools to not depend on (deprecated) qtwebkit?
     113# TODO: do not use rpath?
     114# TODO: support older versions of OS X via different versions of Qt 5
     115#
     116###############################################################################
     117
     118############################################################################### Module Format
     119#
     120# "Qt Module Name" {
     121#     checksum, rmd160
     122#     checksum, sha256
     123#     dependencies, build
     124#     dependencies, lib
     125#     dependencies, Qt module name
     126#     Qt components provided
     127#     included in "standard" installation of Qt (empty string is no, explanation string is yes)
     128#     variant overrides
     129# }
     130#
     131# module info found at https://doc.qt.io/qt-5/qtmodules.html
     132#
     133###############################################################################
     134array set modules {
     135    qt3d {
     136        181929ce80c7e88e4230239c260242749771f8ad
     137        e380906e2bcbd825dab45043bf063dd88b793c0d5fb050ee915bf4e2b58b1bf7
     138        ""
     139        "port:assimp"
     140        "qtbase qtxmlpatterns qtdeclarative qtimageformats"
     141        {"Qt3D Core" "Qt3D Renderer" "Qt3D Quick" "Qt3D Quick Renderer" "Qt3D Input"}
     142        "technology preview module"
     143        "variant overrides: "
     144    }
     145    qtbase {
     146        ce4bccd0703aaf8d904fbecd1f334ef13d698a44
     147        dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916
     148        ""
     149        "port:zlib port:libpng port:jpeg port:freetype path:bin/dbus-daemon:dbus path:lib/libssl.dylib:openssl  port:tiff port:libmng path:lib/pkgconfig/glib-2.0.pc:glib2 port:icu port:pcre port:libiconv port:harfbuzz"
     150        ""
     151        {"Qt Gui" "Qt Widgets" "Qt Print Support" "Qt OpenGL" "Qt Core" "Qt XML" "Qt SQL" "Qt Network" "Qt Test" "Qt D-Bus" "Qt Concurrent" "Qt Platform Headers"}
     152        ""
     153        "variant overrides: "
     154    }
     155    qtcanvas3d {
     156        ed68d3c61b0c67818626595a7bba14a627f5120b
     157        759b171030d7110751943643885c1484c7900fed7737424d202e36bdeba0b080
     158        ""
     159        ""
     160        "qtbase qtdeclarative"
     161        {"Qt Canvas 3D"}
     162        ""
     163        "variant overrides: "
     164    }
     165    qtconnectivity {
     166        ff138deaf87850b047c1e472188a2455b2e0ff54
     167        3637e6def8582fc0fb3684179b93650720ba2da1311a560d358296153f245023
     168        ""
     169        ""
     170        "qtbase qtdeclarative qtxmlpatterns"
     171        {"Qt Bluetooth" "Qt NFC"}
     172        ""
     173        "variant overrides: "
     174    }
     175    qtdeclarative {
     176        1d8939c42f4b510443365479ffe8bc525e0faac6
     177        5fd14eefb83fff36fb17681693a70868f6aaf6138603d799c16466a094b26791
     178        ""
     179        ""
     180        "qtbase qtxmlpatterns"
     181        {"Qt QML" "Qt Quick" "Qt Quick Widgets"}
     182        ""
     183        "variant overrides: "
     184    }
     185    qtenginio {
     186        5b23212c3da401b9c74f33a6486ba18166f129f6
     187        a79936bd5b6a35aba28dd282291b28c8fa869b8d86652c62efe5e268d94defe2
     188        ""
     189        ""
     190        "qtbase qtdeclarative qtxmlpatterns"
     191        {"Enginio"}
     192        ""
     193        "variant overrides: "
     194    }
     195    qtgraphicaleffects {
     196        43f6a91f75863f8333fc6b70456f1b0d175b55e4
     197        9bca0f8db3a4289eceebfa9504915440fe3fa6301d90b65705e4ece528c12d47
     198        ""
     199        ""
     200        "qtbase qtdeclarative qtxmlpatterns"
     201        {"Qt Graphical Effects"}
     202        ""
     203        "variant overrides: "
     204    }
     205    qtimageformats {
     206        75000000ddfbb83b960b73c07d2083b85dcd81fa
     207        c97fee00c602f9f089fea480546d6e9d61a2b2297c2f163bfd9f8aba92b754a5
     208        ""
     209        "port:jasper port:libmng port:tiff port:webp"
     210        "qtbase"
     211        {"Qt Image Formats"}
     212        ""
     213        "variant overrides: "
     214    }
     215    qtlocation {
     216        3792eedc159db6bf15eef706ee218f3cc5759a51
     217        1fe948cb87649f4450be921cf3cdefc311595a80ef6a7a7b7484901baa0d6316
     218        ""
     219        ""
     220        "qtbase qtxmlpatterns qtdeclarative qtquickcontrols"
     221        {"Qt Location" "Qt Positioning"}
     222        ""
     223        "variant overrides: "
     224    }
     225    qtmacextras {
     226        e31be686e79c1cf4a70357921f0caad4cd496c79
     227        025350fdcc936118539ee3703115549b4547def329d3d959b9db5bd853ec9058
     228        ""
     229        ""
     230        "qtbase"
     231        {"Qt Mac Extras"}
     232        ""
     233        "variant overrides: "
     234    }
     235    qtmultimedia {
     236        68049da5e203e484de766c17d683a34a888e0603
     237        7cc7ca99f41587c188303670499e5c75101f9a8cb6178e8f29cc941e637d957f
     238        ""
     239        ""
     240        "qtbase qtxmlpatterns qtdeclarative"
     241        {"Qt Multimedia" "Qt Multimedia Widgets"}
     242        ""
     243        "variant overrides: "
     244    }
     245    qtquick1 {
     246        dd1c71468426a5b9fe4f5297a6f2b04c9caddc78
     247        c812a7e59a8b9f0a87693181059933e15fef04bc875b6486cd653be1b9b51f2c
     248        ""
     249        ""
     250        "qtbase qtscript qtxmlpatterns qtdeclarative qttools qtwebkit"
     251        {"Qt Declarative"}
     252        "deprecated"
     253        "variant overrides: "
     254    }
     255    qtquickcontrols {
     256        3975fbb34a74d55f88f47b436b6fca6ce3f7c078
     257        1b7a8389d656066c629bd2cb520b39a7eb041d184b567dd1b9639b88d841fcf0
     258        ""
     259        ""
     260        "qtbase qtdeclarative qtxmlpatterns"
     261        {"Qt Quick Controls" "Qt Quick Dialogs" "Qt Quick Layouts" "Qt Quick Extras"}
     262        ""
     263        "variant overrides: "
     264    }
     265    qtscript {
     266        7d8ff8c4462b21b83212dd780030a01bd00b8ca9
     267        cd46dddd998f22bcb06447e0407fef81f7052f25bc770b1c27625654cee828fd
     268        ""
     269        ""
     270        "qtbase"
     271        {"Qt Script" "Qt Script Tools"}
     272        "deprecated in favor QJS* in Qt QML"
     273        "variant overrides: "
     274    }
     275    qtsensors {
     276        9a3eaad761efaefc0a56258c0bd64e01d0889cba
     277        5d264fc0729a5d7679bd4eb8d7a0a9b142ed38d09fa68fc7dfe57f64afc8eeea
     278        ""
     279        ""
     280        "qtbase qtxmlpatterns qtdeclarative"
     281        {"Qt Sensors"}
     282        ""
     283        "variant overrides: "
     284    }
     285    qtserialport {
     286        00c53b307fd6ad509aedc6ed0b3a464ac3d8e809
     287        a034dbfb023db1b9b9de54390f7e76a48c1d1eb12533b0ffd574505c99968f7a
     288        ""
     289        ""
     290        "qtbase"
     291        {"Qt Serial Port"}
     292        ""
     293        "variant overrides: "
     294    }
     295    qtsvg {
     296        db1dd37355a1e4b40a37decc1df60d574ab14088
     297        f7f588be48befd9ccab5a6086832551b8899e8bed9e603ddea979581e05a91c7
     298        ""
     299        ""
     300        "qtbase"
     301        {"Qt SVG"}
     302        ""
     303        "variant overrides: "
     304    }
     305    qttools {
     306        279aacc94f7fa583a59d3fe005ecb3e598e92b32
     307        4361f6ce49717058160908297841a18b94645cec593d1b48fb126c9d06c87bfd
     308        ""
     309        ""
     310        "qtbase qtxmlpatterns qtdeclarative qtwebkit"
     311        {"Qt Help" "Qt UI Tools" "Qt Designer" }
     312        ""
     313        "variant overrides: "
     314    }
     315    qttranslations {
     316        f9c956935768cea5c935a10493963f7e411dc255
     317        41f800710f0bc6ca263f1e54f1fa22be7043962999304e73ce9887ebefc7a4c6
     318        ""
     319        ""
     320        "qtbase qttools"
     321        {"translation files"}
     322        ""
     323        "variant overrides: ~examples ~tests ~debug noarch"
     324    }
     325    qtwebchannel {
     326        fca861f785f9d718aa17853bf7a3c072efcd53b7
     327        7f4295ee57cd4ecba3cb263452d2a08d501b45c9a2b8b7794b6a97d7652f15d0
     328        ""
     329        ""
     330        "qtbase qtwebsockets qtdeclarative"
     331        {"Qt WebChannel"}
     332        ""
     333        "variant overrides: "
     334    }
     335    qtwebengine {
     336        0c24bb89cc72a18c06e2fd613db1eb879ada2a2a
     337        7c4d328dd305991aaf0c3450615f4a8e5d80152194bee6f5925bd8d3477e2b90
     338        ""
     339        ""
     340        "qtbase qtdeclarative qtxmlpatterns qtquickcontrols qtwebchannel"
     341        {"Qt WebEngine" "Qt WebEngine Widgets"}
     342        "very large and relatively new; requires newer version of XCode"
     343        "variant overrides: "
     344    }
     345    qtxmlpatterns {
     346        403a3b2377728629b6a3f1073b24af3f3360adf7
     347        b537eb0252988e3805a32a16c65038973371d647baf246fdf703bde725d0e8ec
     348        ""
     349        ""
     350        "qtbase"
     351        {"Qt XML Patterns"}
     352        ""
     353        "variant overrides: "
     354    }
     355    qtwebsockets {
     356        83dcc5d07dca6c1cccfaed13cd16fde940ad0b94
     357        cf4e834a867b90337188be504ef20184c52666370f721e704952988f8cb12deb
     358        ""
     359        ""
     360        "qtbase qtdeclarative"
     361        {"Qt WebSockets"}
     362        ""
     363        "variant overrides: "
     364    }
     365    qtwebkit {
     366        0594ec1150f7899d72f57d8ff2f108f3f75faaf9
     367        77583f9dbd3e6ad874386df71b165dc3ce88efdabbc6e5d97a959ee2187d6d69
     368        ""
     369        "port:fontconfig port:icu port:leveldb port:webp port:libxml2 port:libxslt port:zlib port:sqlite3"
     370        "qtbase qtxmlpatterns qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel"
     371        {"Qt WebKit" "Qt WebKit Widgets"}
     372        "deprecated in favor of Qt WebEngine"
     373        "variant overrides: "
     374    }
     375    qtwebkit-examples {
     376        6d2a3aee163e419fbc6ec56a941c4354e8e93b7d
     377        098935b42d6d249027d1a635e4e70edc3d2969dd860f825b36aec06fc72e46c6
     378        ""
     379        ""
     380        "qtbase qtwebkit qtscript qtsvg qtxmlpatterns qtdeclarative qttools"
     381        {"examples for Qt WebKit"}
     382        "deprecated in favor of Qt WebEngine; doen't provide functionality"
     383        "variant overrides: ++examples"
     384    }
     385}
     386
     387############################################################################### SQL Plugin Format
     388#
     389# {
     390#     variant name
     391#     dependency, library
     392#     include path
     393#     link requirement
     394#     obsolete? (empty string is no)
     395# }
     396#
     397###############################################################################
     398array set sql_plugins {
     399    {sqlite SQLite} {
     400        {
     401            "sqlite3"
     402            "port:sqlite3"
     403            "${prefix}/include"
     404            "-L${prefix}/lib -lsqlite3"
     405            ""
     406        }
     407    }
     408    {psql PostgreSQL} {
     409        {
     410            "postgresql94"
     411            "port:postgresql94"
     412            "${prefix}/include/postgresql94"
     413            "-L${prefix}/lib/postgresql94 -lpq"
     414            ""
     415        }
     416        {
     417            "postgresql84"
     418            "port:postgresql84"
     419            "${prefix}/include/postgresql84"
     420            "-L${prefix}/lib/postgresql84 -lpq"
     421            ""
     422        }
     423    }
     424    {mysql MySQL} {
     425        {
     426            "mysql56"
     427            "port:mysql56"
     428            "${prefix}/include/mysql56/mysql"
     429            "-L${prefix}/lib/mysql56/mysql -lmysqlclient_r"
     430            ""
     431        }
     432    }
     433}
     434
     435foreach {module module_info} [array get modules] {
     436
     437    subport ${name}-${module} {
     438        distname        ${module}-opensource-src-${version}
     439
     440        # see https://bugreports.qt.io/browse/QTBUG-35514
     441        build.target
     442
     443        checksums                              \
     444            rmd160  [lindex ${module_info} 0]  \
     445            sha256  [lindex ${module_info} 1]
     446
     447        foreach deps [lindex ${module_info} 2] {
     448            depends_build-append [subst ${deps}]
     449        }
     450
     451        foreach deps [lindex ${module_info} 3] {
     452            depends_lib-append [subst ${deps}]
     453        }
     454
     455        foreach qtdeps [lindex ${module_info} 4] {
     456            depends_lib-append port:${name}-${qtdeps}
     457        }
     458
     459        description       Tools and Module(s) for Qt Tool Kit ${qt_major}
     460
     461        set modules_provided_list [lindex ${module_info} 5]
     462        if { [llength ${modules_provided_list}] == 1 } {
     463            set modules_provided_join [lindex ${modules_provided_list} 0]
     464        } elseif { [llength ${modules_provided_list}] == 2 } {
     465            set modules_provided_join [join ${modules_provided_list} " and "]
     466        } else {
     467            set modules_provided_join [join [list [join [lrange ${modules_provided_list} 0 end-1] ", "] [lindex ${modules_provided_list} end]] ", and "]
     468        }
     469
     470        long_description  "Tools and Module(s) for Qt Tool Kit ${qt_major}: ${modules_provided_join}"
     471    }
     472}
     473
     474subport ${name}-docs {
     475    distname            qt-everywhere-opensource-src-${version}
     476
     477    checksums                                             \
     478        rmd160  42bf7768dafb868f2cdef857fd3e444520f2a706  \
     479        sha256  6f028e63d4992be2b4a5526f2ef3bfa2fe28c5c757554b11d9e8d86189652518
     480
     481    description         Documentation for Qt Tool Kit ${qt_major}
     482    long_description    Documentation for Qt Tool Kit ${qt_major}
     483
     484    supported_archs   noarch
    59485    universal_variant no
    60 }
    61 
    62 if { ${subport} eq ${name} || ${subport} eq "${name}-docs" } {
     486
     487    build.target      docs
     488    destroot.target   install_docs
     489}
     490
     491# see http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
     492foreach {sql_names sql_info} [array get sql_plugins] {
     493    set driver [lindex ${sql_names} 0]
     494    set dbms   [lindex ${sql_names} 1]
     495
     496    subport ${name}-${driver}-plugin {
     497        distname        qtbase-opensource-src-${version}
     498
     499        checksums                               \
     500            rmd160  [lindex $modules(qtbase) 0] \
     501            sha256  [lindex $modules(qtbase) 1]
     502
     503        description       ${dbms} Database Driver for Qt Tool Kit ${qt_major}
     504        long_description  ${dbms} Database Driver for Qt Tool Kit ${qt_major}
     505
     506        # if there is more than one version of the database system, create variants for each version
     507        if { [llength ${sql_info}] > 1 } {
     508
     509            set any_variant_set false
     510
     511            foreach variant_info ${sql_info} {
     512
     513                set varName [lindex ${variant_info} 0]
     514
     515                # find every other variant so it can be marked as conflicting
     516                set conflicts_list ""
     517                foreach variant_info2 ${sql_info} {
     518                    set varName2 [lindex ${variant_info2} 0]
     519
     520                    if { ${varName} ne ${varName2} } {
     521                        lappend conflicts_list ${varName2}
     522                    }
     523                }
     524
     525                # get only the numbers from the name
     526                regexp {[0-9].} ${varName} varVer
     527
     528                variant ${varName} conflicts ${conflicts_list} description "use version ${varVer} of ${dbms}" {}
     529
     530                # check if any variant has been set
     531                if { [variant_isset ${varName}] } {
     532                    set any_variant_set true
     533                }
     534            }
     535
     536            # ensure at least one variant is set
     537            if { !${any_variant_set} } {
     538                default_variants-append +[lindex [lindex ${sql_info} 0] 0]
     539            }
     540        }
     541
     542        foreach variant_info ${sql_info} {
     543            set varName [lindex ${variant_info} 0]
     544
     545            if { ( [variant_exists ${varName}] && [variant_isset ${varName}] ) || [llength ${sql_info}]==1 } {
     546                depends_lib-append [lindex ${variant_info} 1]
     547
     548                configure.args-append                                    \
     549                    [subst INCLUDEPATH+=\"[lindex ${variant_info} 2]\"]  \
     550                    [subst LIBS+=\"[lindex ${variant_info} 3]\"]
     551            }
     552        }
     553
     554        # for single architecture, easier to use
     555        #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/${driver},
     556        #    but doesn't work for universal build
     557        configure.dir ${worksrcpath}/src/plugins/sqldrivers/${driver}
     558        build.dir     ${configure.dir}
     559        destroot.dir  ${configure.dir}
     560    }
     561}
     562
     563if { ${subport} eq ${name} } {
     564    # the main port is Meta-port to install various modules
     565
     566    description         Qt Tool Kit ${qt_major}
     567    long_description    Qt Tool Kit: A cross-platform framework \
     568        (headers, data, and libraries) for writing \
     569        cross-platform GUI-based applications.
     570
     571    fetch {}
     572    checksum {}
     573    configure {}
     574    build {}
     575
     576    # create a dummy file so the port can be successfully activated
     577    destroot {
     578        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport}
     579        set docfile   [open ${destroot}${prefix}/share/doc/${subport}/README.txt "w"]
     580        puts ${docfile} "Meta-port for ${name}"
     581        puts ${docfile} "${long_description}"
     582        close ${docfile}
     583    }
     584
     585    foreach {module module_info} [array get modules] {
     586        if { [lindex ${module_info} 6] eq "" } {
     587            depends_lib-append port:${name}-${module}
     588        }
     589    }
     590    depends_lib-append port:${name}-sqlite-plugin
     591
     592    supported_archs   noarch
     593    universal_variant no
     594
     595} elseif { ${subport} ne "${name}-qtbase" && ${subport} ne "${name}-docs" } {
     596    # these subports use qmake
     597
     598    # special case
     599    if { ${subport} eq "${name}-qtlocation" } {
     600        # qtlocation uses
     601        #    GeoClue (http://freedesktop.org/wiki/Software/GeoClue/) and
     602        #    Gypsy (http://gypsy.freedesktop.org)
     603        #    if they can be found
     604        # Ensure that test fails even if software is installed
     605        post-patch {
     606            foreach test { geoclue geoclue-satellite gypsy } {
     607                reinplace "s|return 0;|return 0;\\\n#error turn off test|g" ${worksrcpath}/config.tests/${test}/main.cpp
     608            }
     609        }
     610    }
     611
     612    # special case
     613    if { ${subport} eq "${name}-qtwebkit" } {
     614        # qmake uses pkgconfig to look for icu
     615        # This feature does not work without "CONFIG += link_pkgconfig"
     616        patchfiles-append patch-icu.pro.diff
     617
     618        # qtwebkit uses
     619        #    glx
     620        #    libXcomposite
     621        #    libXrender
     622        #    if they can be found
     623        # Ensure that test fails even if software is installed
     624        post-patch {
     625            foreach test { glx libXcomposite libXrender } {
     626                reinplace "s|return 0;|return 0;\\\n#error turn off test|g" ${worksrcpath}/Tools/qmake/config.tests/${test}/${test}.cpp
     627            }
     628        }
     629    }
     630
     631    # special case
     632    if { ${subport} eq "${name}-qtwebengine" } {
     633        # see https://wiki.qt.io/QtWebEngine
     634        PortGroup           xcodeversion 1.0
     635        minimum_xcodeversions   {12 5.1}
     636
     637        # see https://codereview.qt-project.org/#/c/125968/
     638        patchfiles-append patch-qtwebengine32.diff
     639
     640        # at some point prior to OS X 10.11, MIDI types were unified
     641        patchfiles-append patch-midifix.diff
     642
     643        # see https://codereview.qt-project.org/#/c/127759/
     644        patchfiles-append patch-fix_sdk.diff
     645
     646        # UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
     647        build.env-append      CXX=${configure.cxx}
     648        configure.args-append QMAKE_LINK=${configure.cxx}
     649    }
     650
     651    # detremint which variants are to be turned off
     652    set request_examples true
     653    set request_tests    true
     654    set def_var          ""
     655
     656    set current_module [string range ${subport} [string length "${name}-"] end]
     657    # is subport a module or an SQL plugin?
     658    if { [info exists modules(${current_module})] } {
     659        # subport is a module
     660
     661        set module_info    $modules(${current_module})
     662
     663        if { [lsearch -exact [lindex ${module_info} 7] "~universal"] != -1 } {
     664            universal_variant no
     665        }
     666
     667        if { [lsearch -exact [lindex ${module_info} 7] "noarch"] != -1 } {
     668            supported_archs   noarch
     669            universal_variant no
     670        }
     671
     672        if { [lsearch -exact [lindex ${module_info} 7] "~debug"] != -1 } {
     673            set qt5_qmake_request_no_debug true
     674        }
     675
     676        if { [lsearch -exact [lindex ${module_info} 7] "~examples"] != -1 } {
     677            set request_examples false
     678        }
     679
     680        if { [lsearch -exact [lindex ${module_info} 7] "~tests"] != -1 } {
     681            set request_tests    false
     682        }
     683
     684        if { [lsearch -exact [lindex ${module_info} 7] "++examples"] != -1 } {
     685            set request_examples true
     686            lappend def_var "+examples"
     687        }
     688    } else {
     689        # subport is an SQL plugin
     690    }
     691
     692    if { ${request_examples} } {
     693        variant examples description {Build examples} {}
     694    }
     695
     696    if { ${request_tests} } {
     697        variant tests description {Enable tests} {}
     698    }
     699
     700    if { ${def_var} ne "" } {
     701        default_variants-append ${def_var}
     702    }
     703
     704    # special case
     705    if { ${subport} eq "${name}-qtwebkit-examples" && ![variant_isset examples] } {
     706        # create a dummy file so the port can be successfully activated
     707        post-destroot {
     708            xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport}
     709            set docfile [open ${destroot}${prefix}/share/doc/${subport}/README.txt "w"]
     710            puts ${docfile} "Without the examples variant, no examples are installed"
     711            puts ${docfile} "${long_description}"
     712            close ${docfile}
     713        }
     714    }
     715
     716    # special case
     717    if { ${subport} eq "${name}-qtsensors" && [variant_isset examples] } {
     718        if { [variant_isset debug] } {
     719            set debug "_debug"
     720        } else {
     721            set debug ""
     722        }
     723        # fix library path names or MacPorts will try to reinstall
     724        post-destroot {
     725            foreach dylib "grue/Grue/libdeclarative_grue${debug}.dylib grue/libgruesensor.1.dylib grue/sensors/libqtsensors_grue${debug}.dylib sensor_explorer/Explorer/libdeclarative_explorer${debug}.dylib" {
     726                system "/usr/bin/install_name_tool -id ${qt_examples_dir}/sensors/${dylib} ${destroot}${qt_examples_dir}/sensors/${dylib}"
     727            }
     728            foreach dylib "grue/Grue/libdeclarative_grue${debug}.dylib grue/sensors/libqtsensors_grue${debug}.dylib" {
     729                system "/usr/bin/install_name_tool -change libgruesensor.1.dylib ${qt_examples_dir}/sensors/grue/libgruesensor.1.dylib ${destroot}${qt_examples_dir}/sensors/${dylib}"
     730            }
     731        }
     732    }
     733
     734    PortGroup           qmake5 1.0
     735
     736    # accommodating variant request varies depending on how qtbase was built
     737    pre-configure {
     738
     739        # determine if qmake builds examples by default (set via variants)
     740        if {[active_variants ${name}-qtbase examples ""]} {
     741            set base_examples true
     742        } else {
     743            set base_examples false
     744        }
     745
     746        # determine if qmake runs tests by default (set via varians)
     747        if {[active_variants ${name}-qtbase tests ""]} {
     748            set base_tests true
     749        } else {
     750            set base_tests false
     751        }
     752
     753        # determine if the user wants to build examples
     754        if { [variant_exists examples] && [variant_isset examples] } {
     755            set this_examples true
     756        } else {
     757            set this_examples false
     758        }
     759
     760        # determine if the user wants to run tests
     761        if { [variant_exists tests] && [variant_isset tests] } {
     762            set this_tests true
     763        } else {
     764            set this_tests false
     765        }
     766
     767        # determine of qmake's default and user requests are compatible; override qmake if necessary
     768        if { ${this_examples} && !${base_examples}  } {
     769            configure.args-append "QT_BUILD_PARTS+=\"examples\""
     770        }
     771
     772        if { !${this_examples} && ${base_examples}  } {
     773            configure.args-append "QT_BUILD_PARTS-=\"examples\""
     774        }
     775
     776        if { ${this_tests} && !${base_tests}  } {
     777            configure.args-append "QT_BUILD_PARTS+=\"tests\""
     778        }
     779
     780        if { !${this_tests} && ${base_tests}  } {
     781            configure.args-append "QT_BUILD_PARTS-=\"tests\""
     782        }
     783    }
     784} else {
     785    # these subports do NOT use qmake (they use configure script)
     786
    63787    # use the qt5 group; set 'building_qt5' so that the portgroup
    64788    # does not include certain parts
     
    67791    PortGroup           qt5 1.0
    68792    PortGroup           xcodeversion 1.0
     793    PortGroup           cxx11 1.0
    69794
    70795    conflicts           qt3 qt3-mac qt4-mac
    71796
    72     minimum_xcodeversions   {11 4.1}
    73 
    74     # See https://bugreports.qt.io/browse/QTBUG-34902
     797    minimum_xcodeversions   {11 4.3}
     798
     799    # see https://bugreports.qt.io/browse/QTBUG-34902
    75800    conflicts_build-append  qt4-mac
    76801
    77     # Kuba states in https://trac.macports.org/ticket/44207#comment:7
    78     #  "There's no reason to have parallel building disabled. Really."
    79     #use_parallel_build no
    80 
    81     # qtwebengine/src/core/gyp_run.pro buils an executable using g++
    82     # This causes an error if UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
    83     # Quick fix is to use full path to g++ (should use ${configure.cxx} instead?)
    84     # N.B. that the python executable is found from the configuration environment
    85     #patchfiles-append patch-ninja-compiler.diff
    86 
    87     #needed? qtwebengine/src/3rdparty/chromium/build/gyp_helper.py
    88 
    89     # qtwebengine/src/core/gyp_run.pro
    90     #    calls
    91     #   qtwebengine/tools/buildscripts/gyp_qtwebengine
    92     # gyp_qtwebengine insists on x64 and libcpp ?
    93 
    94     # qtwebengine/src/3rdparty/ninja/bootstrap.py calls g++ (must set CXX)
     802    # special case
     803    if { ${subport} ne "${name}-docs" } {
     804        # qmake automatically makes certain commands (QMAKE_CC, etc.) absolute paths
     805        # add one more for consistency (QMAKE_LINK_C)
     806        patchfiles-append patch-add_sdk.diff
     807
     808        # the build system automatically use OpenGL frameworks (-framework OpenGL -framework AGL)
     809        # the build system also uses pkgconfig to look for an OpenGL installation (gl.pc)
     810        # if mesa is installed, the build system will try to use both OpenGL systems
     811        # later, this will cause problems
     812        #    Undefined symbols: "_CGLGetCurrentContext"
     813        patchfiles-append patch-configure.diff
     814
     815        # see https://codereview.qt-project.org/#/c/122729/
     816        patchfiles-append patch-pcfiles.diff
     817    }
    95818
    96819    if { [variant_isset tests] } {
     
    101824        patchfiles-append patch-tst_qpluginloader.diff
    102825
    103         # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
    104         patchfiles-append patch-tst_benchlibcallgrind.diff
    105 
    106         # When testing, ensure that a universal object file is not inadvertently created.
    107         patchfiles-append patch-machtest.diff
    108 
    109         # On testing of 32-bit systems,
    110         #  Pre-patch: QCOMPARE(unsigned long const&, unsigned int const&
    111         # Post-patch: QCOMPARE(unsigned int  const&, unsigned int const&
    112         # Function template is only instantiated for same first and second arguments.
    113         patchfiles-append patch-tst_qarraydata.diff
    114 
    115         # During testing, NSStringFromRect requires NSRect.
    116         patchfiles-append patch-tst_qaccessibilitymac_helpers.diff
    117     }
    118 
    119     # see #44934 (and #35067 for the qt4-mac version)
    120     if { true } {
    121         set framework_list [split ${qt_frameworks_dir} '/']
    122         set qt_list        [split ${qt_dir} '/']
    123 
    124         while {[llength ${qt_list}] && [llength ${framework_list}]} {
    125             set var_qt        [lindex $qt_list        0]
    126             set var_framework [lindex $framework_list 0]
    127 
    128             if { ${var_qt} ne ${var_framework} } {
    129                 break
    130             }
    131 
    132             # remove first element from list
    133             set qt_list        [lreplace ${qt_list}        0 0]
    134             set framework_list [lreplace ${framework_list} 0 0]
    135         }
    136         set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
    137         if { ${libreplace} ne "lib" } {
    138             patchfiles-append patch-shared.diff
    139             post-patch {
    140                 reinplace "s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g" ${worksrcpath}/qttools/src/macdeployqt/shared/shared.cpp
    141             }
     826        if { ${configure.build_arch} eq "i386" || [variant_isset universal] } {
     827            # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
     828            # only runs test code on 32-bit systems
     829            patchfiles-append patch-tst_benchlibcallgrind.diff
     830
     831            # this test might still cause problems, but with 5.4.2->5.5.0, it is no longer run
     832            # tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro:
     833            #     -macx-*: SUBDIRS += machtest
     834            #     +macx-*: contains(QT_CONFIG, private_tests): SUBDIRS += machtest
     835            #
     836            # When testing, ensure that a universal object file is not inadvertently created.
     837            patchfiles-append patch-machtest.diff
    142838        }
    143839    }
     
    180876        -largefile        \
    181877        -accessibility
    182    
     878
    183879    foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } {
    184880        configure.args-append -no-sql-${driver}
     
    193889
    194890    configure.args-append \
     891        -no-testcocoon    \
     892        -no-gcov          \
    195893        -force-pkg-config
    196894
     
    205903        -system-harfbuzz    \
    206904        -openssl-linked     \
     905        -no-libproxy        \
    207906        -system-pcre        \
    208907        --disable-xcb       \
    209         --disable-xkbcommon \
     908        -no-xkbcommon-x11   \
     909        -no-xkbcommon-evdev \
    210910        -no-xinput2         \
    211911        -no-xcb-xlib        \
     
    225925        -rpath                  \
    226926        -verbose                \
    227         -no-optimized-qmake     \
     927        -optimized-qmake        \
    228928        -nis                    \
    229929        -cups                   \
    230930        -iconv                  \
    231931        -no-evdev               \
     932        -no-tslib               \
    232933        -icu                    \
    233934        -fontconfig             \
     
    242943        -no-linuxfb             \
    243944        -no-kms                 \
     945        -no-libinput            \
     946        -no-gstreamer           \
    244947        -no-system-proxies
    245    
     948
    246949    # MacOS/iOS options:
    247950    configure.args-append    \
     
    252955            -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} "/"] end] "."] 0 end-1] "."]]
    253956    }
    254    
     957
    255958    # configure options that don't show up in configure --help
    256959    configure.args-append \
     
    285988    configure.universal_cxxflags
    286989    configure.universal_cppflags
    287 }
    288 
    289 if { ${subport} eq ${name} } {
    290     depends_lib                              \
    291         port:zlib                            \
    292         port:libpng                          \
    293         port:jpeg                            \
    294         port:freetype                        \
    295         path:bin/dbus-daemon:dbus            \
    296         path:lib/libssl.dylib:openssl                         \
    297         port:tiff                            \
    298         port:libmng                          \
    299         path:lib/pkgconfig/glib-2.0.pc:glib2 \
    300         port:icu                             \
    301         port:pcre                            \
    302         port:libiconv                        \
    303         port:harfbuzz
    304 
    305     # see https://bugreports.qt.io/browse/QTBUG-35514
    306     build.target
    307 
     990
     991    # cofigure script looks for perl but doesn't seem to use it for our configuration
     992
     993    # configure script uses gawk if it can find it,
     994    #    so require it for consistency
     995    depends_build-append port:gawk
     996
     997    # unless overridden, configure script uses gmake if it can find it
     998    configure.env-append MAKE=${build.cmd}
     999}
     1000
     1001# special case
     1002if { ${subport} eq "${name}-qtbase" } {
    3081003    if { [variant_isset universal] } {
    309         merger-post-destroot {
    310             foreach arch ${universal_archs_to_use} {
    311                 set dir ${destroot}-${arch}
    312 
    313                 # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
    314                 reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
    315 
    316                 foreach prlfl [glob ${dir}${qt_libs_dir}/*.framework/*.prl] {
    317                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
    318                 }
    319 
    320                 foreach prlfl [glob ${dir}${qt_libs_dir}/*.prl] {
    321                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
    322                 }
    323 
    324                 reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_mkspecs_dir}/modules/qt_lib_bootstrap_private.pri
    325                 reinplace "s|macx-clang-32|macx-clang|g"              ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
    326                
    327                
    328                 if { [variant_isset examples] } {
    329                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    330                     reinplace -E "/\\w*-arch \\\\/d"                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    331                     reinplace -E "/\\w*${arch} \\\\/d"                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    332                     reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    333                     reinplace "s|macx-clang-32|macx-clang|g"              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    334 
    335                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
    336                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
    337                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
    338                     reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
    339                     if { [variant_isset debug] } {
    340                         reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/libpnp_basictools_debug.prl
    341                     }
    342                 }
    343             }
    344         }
    3451004
    3461005        post-destroot {
     
    3511010        }
    3521011
    353         # The file ${prefix}/share/qt5/mkspecs/qconfig.pri is still not properly merged
    354         # The solution is ???.
    355     }
    356 
     1012        # The file ${qt_mkspecs_dir}/qconfig.pri is still not properly merged
     1013        # A workaround is to set QT_ARCH and QT_TARGET_ARCH manually (see e.g. the qmake5 PortGroup)
     1014    }
     1015
     1016    variant tests description {Enable tests} {
     1017        configure.args-replace {-nomake tests} {-make tests}
     1018    }
     1019
     1020    variant examples description {Build examples} {
     1021        configure.args-replace {-nomake examples} {-make examples}
     1022    }
     1023
     1024    variant debug description {Build both release and debug libraries} {
     1025        configure.args-replace -release -debug-and-release
     1026    }
     1027
     1028    variant pulseaudio description {Compile PulseAudio support} {
     1029        depends_lib-append port:pulseaudio
     1030        configure.args-replace -no-pulseaudio -pulseaudio
     1031    }
     1032
     1033    variant gstreamer description {Compile GStreamer support} {
     1034        depends_lib-append port:gstreamer1 port:gstreamer1-gst-plugins-base
     1035        configure.args-replace -no-gstreamer {-gstreamer 1.0}
     1036    }
     1037}
     1038
     1039# special case
     1040if { ${subport} eq "${name}-docs" } {
     1041
     1042    depends_lib-append                                                           \
     1043        path:${qt_bins_dir}/qdoc:${name}-qtbase                                  \
     1044        path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite-plugin \
     1045        path:${qt_bins_dir}/qhelpgenerator:${name}-qttools
     1046
     1047    post-extract {
     1048        # For the most part, generated makefiles use ${prefix}/bin/qdoc.
     1049        ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin/
     1050
     1051        # Similarly, location of qhelpgenerator is expected in ${worksrcpath}
     1052        xinstall -d -m 0755 ${worksrcpath}/qttools/bin/
     1053        ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/
     1054
     1055        # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target
     1056        #    keeps generating itself over and over again.
     1057        # This file is only created when the library is being built, however.
     1058        xinstall -d -m 0755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
     1059        touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc
     1060    }
     1061}
     1062
     1063if { [variant_exists universal] && [variant_isset universal] } {
     1064    merger-post-destroot {
     1065        foreach arch ${universal_archs_to_use} {
     1066
     1067            set dir ${destroot}-${arch}
     1068
     1069            foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.framework/*.prl] {
     1070                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
     1071            }
     1072
     1073            foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.prl] {
     1074                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
     1075            }
     1076
     1077            foreach prlfl [glob -nocomplain ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/*.prl] {
     1078                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl}
     1079            }
     1080
     1081            if { [file exists ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake] } {
     1082                reinplace "s|macx-clang-32|macx-clang|g" ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
     1083            }
     1084
     1085            # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
     1086            if { [file exists ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc] } {
     1087                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
     1088            }
     1089            if { [file exists ${dir}${qt_libs_dir}/pkgconfig/Qt5WebEngineCore.pc] } {
     1090                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_libs_dir}/pkgconfig/Qt5WebEngineCore.pc
     1091            }
     1092
     1093            if { [file exists ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile] } {
     1094                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
     1095                reinplace -E "/\\w*-arch \\\\/d"                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
     1096                reinplace -E "/\\w*${arch} \\\\/d"                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
     1097                reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
     1098                reinplace "s|macx-clang-32|macx-clang|g"              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
     1099            }
     1100
     1101            if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl] } {
     1102                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
     1103            }
     1104
     1105            if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl] } {
     1106                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
     1107            }
     1108
     1109            if { [file exists ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl   ] } {
     1110                reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
     1111            }
     1112        }
     1113    }
     1114}
     1115
     1116# see #44934 (and #35067 for the qt4-mac version)
     1117if { ${subport} eq "${name}-qttools" } {
     1118    set framework_list [split ${qt_frameworks_dir} '/']
     1119    set qt_list        [split ${qt_dir} '/']
     1120
     1121    while {[llength ${qt_list}] && [llength ${framework_list}]} {
     1122        set var_qt        [lindex $qt_list        0]
     1123        set var_framework [lindex $framework_list 0]
     1124
     1125        if { ${var_qt} ne ${var_framework} } {
     1126            break
     1127        }
     1128
     1129        # remove first element from list
     1130        set qt_list        [lreplace ${qt_list}        0 0]
     1131        set framework_list [lreplace ${framework_list} 0 0]
     1132    }
     1133    set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
     1134    if { ${libreplace} ne "lib" } {
     1135        patchfiles-append patch-shared.diff
     1136        post-patch {
     1137            reinplace "s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g" ${worksrcpath}/src/macdeployqt/shared/shared.cpp
     1138        }
     1139    }
     1140}
     1141
     1142if { ${subport} ne ${name} } {
    3571143    post-destroot {
    3581144        # see #44204
     
    3761162            }
    3771163
     1164            xinstall -d -m 0755 ${destroot}${qt_includes_dir}
    3781165            ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework}
    3791166        }
    380     }
    381 
    382     variant tests description {Enable tests} {
    383         configure.args-replace {-nomake tests} {-make tests}
    384     }
    385 
    386     variant examples description {Build examples} {
    387         configure.args-replace {-nomake examples} {-make examples}
    388     }
    389 
    390     variant debug description {Build both release and debug library} {
    391         configure.args-replace -release -debug-and-release
    392     }
    393 
    394     variant pulseaudio description {Compile PulseAudio support} {
    395         depends_lib-append port:pulseaudio
    396         configure.args-replace -no-pulseaudio -pulseaudio
    397     }
    398 }
    399 
    400 subport ${name}-docs {
    401     depends_lib-append \
    402         path:${qt_bins_dir}/qdoc:${name} \
    403         path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite3-plugin
    404 
    405     supported_archs   noarch
    406 
    407     build.target      docs
    408     destroot.target   install_docs
    409 
    410     post-extract {
    411         # For the most part, generated makefiles use ${prefix}/bin/qdoc.
    412         ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin
    413 
    414         # Similarly, location of qhelpgenerator is expected in ${worksrcpath}
    415         xinstall -d -m 755 ${worksrcpath}/qttools/bin/
    416         ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/
    417 
    418         # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target
    419         #    keeps generating itself over and over again.
    420         # This file is only created when the library is being built, however.
    421         xinstall -d -m 755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
    422         touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc
    423     }
    424 }
    425 
    426 # See http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
    427 
    428 subport ${name}-sqlite3-plugin {
    429     PortGroup           qmake5 1.0
    430 
    431     depends_lib-append port:sqlite3
    432 
    433     # for single architecture, easier to use
    434     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/sqlite,
    435     #    but doesn't work for universal build
    436     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/sqlite
    437     build.dir     ${configure.dir}
    438     destroot.dir  ${configure.dir}
    439 
    440     configure.args-append "INCLUDEPATH+=${prefix}/include" "LIBS+=\"-L${prefix}/lib -lsqlite3\""
    441 }
    442 
    443 subport ${name}-psql84-plugin {
    444     PortGroup           qmake5 1.0
    445 
    446     depends_lib-append port:postgresql84
    447 
    448     # for single architecture, easier to use
    449     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/psql,
    450     #    but doesn't work for universal build
    451     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/psql
    452     build.dir     ${configure.dir}
    453     destroot.dir  ${configure.dir}
    454 
    455     configure.args-append "INCLUDEPATH+=${prefix}/include/postgresql84" "LIBS+=\"-L${prefix}/lib/postgresql84 -lpq\""
    456 }
    457 
    458 subport ${name}-mysql56-plugin {
    459     PortGroup           qmake5 1.0
    460 
    461     depends_lib-append port:mysql56
    462 
    463     # for single architecture, easier to use
    464     #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/mysql,
    465     #    but doesn't work for universal build
    466     configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/mysql
    467     build.dir     ${configure.dir}
    468     destroot.dir  ${configure.dir}
    469 
    470     configure.args-append "INCLUDEPATH+=${prefix}/include/mysql56/mysql" "LIBS+=\"-L${prefix}/lib/mysql56/mysql -lmysqlclient_r\""
     1167
     1168        # .app and non-.app programs are both put in qt_bins_dir
     1169        # put a link of any .app programs in the ${qt_apps_dir}
     1170        if { ${qt_bins_dir} ne ${qt_apps_dir} } {
     1171            xinstall -d -m 0755 ${destroot}${qt_apps_dir}
     1172            foreach app [glob -nocomplain -tails -directory ${destroot}${qt_bins_dir} *.app] {
     1173                ln -s ${qt_bins_dir}/${app} ${destroot}${qt_apps_dir}
     1174            }
     1175        }
     1176
     1177        # put configuration files in places they will be found automatically
     1178        if { ${qt_libs_dir} ne "${prefix}/lib" } {
     1179
     1180            # put link to pkgconfig files in place where pkgconfig will find it
     1181            # most Qt 5 pkgconfig files begin with Qt5, so link should not conflict with any other Qt installations
     1182            #    exceptions: Enginio (new in Qt 5.3)
     1183            xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
     1184            foreach pcfile [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir}/pkgconfig *.pc] {
     1185                ln -s ${qt_libs_dir}/pkgconfig/${pcfile} ${destroot}${prefix}/lib/pkgconfig
     1186            }
     1187
     1188            # put link to cmake files in place where cmake will find it
     1189            # most Qt 5 cmake directories begin with Qt5, so link should not conflict with any other Qt installations
     1190            #    exceptions: Enginio (new in Qt 5.3)
     1191            xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake
     1192            foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] {
     1193                xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake/${cmakedir}
     1194                foreach cmakefile [glob -tails -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] {
     1195                    ln -s ${qt_libs_dir}/cmake/${cmakedir}/${cmakefile} ${destroot}${prefix}/lib/cmake/${cmakedir}/
     1196                }
     1197            }
     1198
     1199            # if cmake finds configuration files in ${prefix}/lib/cmake, CMAKE_CURRENT_LIST_DIR expands to ${prefix}/lib/cmake/xxx
     1200            # cmake configuration files actually installed in ${qt_cmake_module_dir}/xxx
     1201            foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] {
     1202                foreach cmakefile [glob -nocomplain -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] {
     1203                    reinplace "s|\\\${CMAKE_CURRENT_LIST_DIR}|${qt_cmake_module_dir}/${cmakedir}|g" ${cmakefile}
     1204                }
     1205            }
     1206        }
     1207    }
    4711208}
    4721209
  • trunk/dports/aqua/qt5/files/patch-machtest.diff

    r121554 r142505  
    1 --- qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig   2014-06-19 03:08:00.000000000 -0700
    2 +++ qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro        2014-06-27 11:09:55.000000000 -0700
    3 @@ -4,10 +4,10 @@
    4      generate-bad.pl
    5  
     1--- tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig  2015-07-05 12:53:46.000000000 -0700
     2+++ tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro       2015-07-05 12:53:25.000000000 -0700
     3@@ -7,10 +7,10 @@
     4 load(qt)
     5
    66 i386.target = good.i386.dylib
    7 -i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $<
    8 +i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $<
     7-i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$(INCPATH) $<
     8+i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$(INCPATH) $<
    99 i386.depends += $$PWD/../fakeplugin.cpp
    1010 x86_64.target = good.x86_64.dylib
    11 -x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $<
    12 +x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $<
     11-x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$(INCPATH) $<
     12+x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$(INCPATH) $<
    1313 x86_64.depends += $$PWD/../fakeplugin.cpp
    14  
     14
    1515 # Current Mac OS X toolchains have no compiler for PPC anymore
  • trunk/dports/aqua/qt5/files/patch-shared.diff

    r137229 r142505  
    1 --- qttools/src/macdeployqt/shared/shared.cpp.orig      2015-02-16 21:57:17.000000000 -0700
    2 +++ qttools/src/macdeployqt/shared/shared.cpp   2015-05-31 10:36:56.000000000 -0700
    3 @@ -196,7 +196,7 @@
     1--- src/macdeployqt/shared/shared.cpp.orig      2015-02-16 21:57:17.000000000 -0700
     2+++ src/macdeployqt/shared/shared.cpp   2015-05-31 10:36:56.000000000 -0700
     3@@ -233,7 +233,7 @@
    44                 state = DylibName;
    55                 continue;
  • trunk/dports/aqua/qt5/files/patch-tst_benchlibcallgrind.diff

    r121554 r142505  
    1 --- qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp.orig        2014-06-28 00:25:11.000000000 -0700
    2 +++ qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp     2014-06-19 03:08:01.000000000 -0700
    3 @@ -81,9 +81,9 @@
     1--- tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp.orig       2014-06-28 00:25:11.000000000 -0700
     2+++ tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp    2014-06-19 03:08:01.000000000 -0700
     3@@ -73,9 +73,9 @@
    44     QBENCHMARK {
    55         __asm__ __volatile__(
  • trunk/dports/aqua/qt5/files/patch-tst_qpluginloader.diff

    r137229 r142505  
    1 --- .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp.orig        2015-05-30 18:33:03.000000000 -0700
    2 +++ .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp     2015-05-30 18:34:54.000000000 -0700
     1--- tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp.orig  2015-05-30 18:33:03.000000000 -0700
     2+++ tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp       2015-05-30 18:34:54.000000000 -0700
    33@@ -311,7 +311,7 @@
    4  
     4
    55 void tst_QPluginLoader::loadMachO_data()
    66 {
     
    88+#if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)
    99     QTest::addColumn<int>("parseResult");
    10  
     10
    1111     QTest::newRow("/dev/null") << int(QMachOParser::NotSuitable);
    1212@@ -347,7 +347,7 @@
    13  
     13
    1414 void tst_QPluginLoader::loadMachO()
    1515 {
Note: See TracChangeset for help on using the changeset viewer.