Revision: 121554 https://trac.macports.org/changeset/121554 Author: mcalhoun@macports.org Date: 2014-06-29 15:55:52 -0700 (Sun, 29 Jun 2014) Log Message: ----------- New Port: qt5-mac and its associated Portgroups and subports. Attempts to fix #37331. Added Paths: ----------- trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl trunk/dports/_resources/port1.0/group/qt5-1.0.tcl trunk/dports/aqua/qt5-mac/ trunk/dports/aqua/qt5-mac/Portfile trunk/dports/aqua/qt5-mac/files/ trunk/dports/aqua/qt5-mac/files/patch-machtest.diff trunk/dports/aqua/qt5-mac/files/patch-tst_benchlibcallgrind.diff trunk/dports/aqua/qt5-mac/files/patch-tst_qaccessibilitymac_helpers.diff trunk/dports/aqua/qt5-mac/files/patch-tst_qarraydata.diff trunk/dports/aqua/qt5-mac/files/patch-tst_qpluginloader.diff Added: trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl =================================================================== --- trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl (rev 0) +++ trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,50 @@ +# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 +# $Id: qmake-1.0.tcl 106930 2013-06-12 03:13:56Z ryandesign@macports.org $ + +# +# Copyright (c) 2013 The MacPorts Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of Apple Computer, Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# This portgroup defines standard settings when using qmake. +# +# Usage: +# PortGroup qmake5 1.0 + +PortGroup qt5 1.0 + +configure.cmd ${qt_qmake_cmd} -r +configure.pre_args-replace --prefix=${prefix} PREFIX=${prefix} +configure.universal_args-delete --disable-dependency-tracking + +# qmake defaults to -mmacosx-version-min=10.6, which implies stdlib is libstdc++, which caused problems +# (see https://trac.macports.org/wiki/FAQ#libcpp) +configure.pre_args-append "QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}" + +# qt5-mac does not currently support debug. +configure.pre_args-append "CONFIG+=release" Added: trunk/dports/_resources/port1.0/group/qt5-1.0.tcl =================================================================== --- trunk/dports/_resources/port1.0/group/qt5-1.0.tcl (rev 0) +++ trunk/dports/_resources/port1.0/group/qt5-1.0.tcl 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,291 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 +# $Id: qt5-1.0.tcl 113952 2013-11-26 18:01:53Z michaelld@macports.org $ + +# Copyright (c) 2014 The MacPorts Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of Apple Computer, Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# This portgroup defines standard settings when using Qt5. +# +# Usage: +# PortGroup qt5 1.0 + +# no universal binary support in Qt 5 +# see http://lists.qt-project.org/pipermail/interest/2012-December/005038.html +# see also https://bugreports.qt-project.org/browse/QTBUG-24952 +if { ![exists universal_variant] || [option universal_variant] } { + PortGroup muniversal 1.0 + #universal_archs_supported i386 x86_64 +} + +# check for +debug variant of this port, and make sure Qt was +# installed with +debug as well; if not, error out. +platform darwin { + pre-extract { + if {[variant_exists debug] && \ + [variant_isset debug] && \ + ![info exists building_qt5]} { + if {![file exists ${qt_frameworks_dir}/QtCore.framework/QtCore_debug]} { + return -code error "\n\nERROR:\n\ +In order to install this port as +debug, +Qt5 must also be installed with +debug.\n" + } + } + } +} + +# standard Qt5 name +global qt_name +set qt_name qt5 + +# standard install directory +global qt_dir +set qt_dir ${prefix} + +# standard Qt documents directory +global qt_docs_dir +set qt_docs_dir ${qt_dir}/share/doc/${qt_name} + +# standard Qt plugins directory +global qt_plugins_dir +set qt_plugins_dir ${qt_dir}/share/${qt_name}/plugins + +# standard Qt mkspecs directory +global qt_mkspecs_dir +set qt_mkspecs_dir ${qt_dir}/share/${qt_name}/mkspecs + +# standard Qt imports directory +global qt_imports_dir +set qt_imports_dir ${qt_dir}/share/${qt_name}/imports + +# standard Qt qml directory +global qt_qml_dir +set qt_qml_dir ${qt_dir}/share/${qt_name}/qml + +# standard Qt includes directory +global qt_includes_dir +set qt_includes_dir ${qt_dir}/include + +# standard Qt libraries directory +global qt_libs_dir +set qt_libs_dir ${qt_dir}/lib + +# standard Qt libraries directory +global qt_frameworks_dir +set qt_frameworks_dir ${qt_dir}/Library/Frameworks + +# standard Qt non-.app executables directory +global qt_bins_dir +set qt_bins_dir ${qt_dir}/bin + +# standard Qt .app executables directory, if created +global qt_apps_dir +set qt_apps_dir ${applications_dir}/Qt5 + +# standard Qt data directory +global qt_data_dir +set qt_data_dir ${qt_dir}/share/${qt_name} + +# standard Qt translations directory +global qt_translations_dir +set qt_translations_dir ${qt_dir}/share/${qt_name}/translations + +# standard Qt sysconf directory +global qt_sysconf_dir +set qt_sysconf_dir ${qt_dir}/etc/${qt_name} + +# standard Qt examples directory +global qt_examples_dir +set qt_examples_dir ${qt_dir}/share/${qt_name}/examples + +# standard Qt tests directory +global qt_tests_dir +set qt_tests_dir ${qt_dir}/share/${qt_name}/tests + +# standard Qt demos directory +global qt_demos_dir +set qt_demos_dir ${qt_dir}/share/${qt_name}/demos + +# standard CMake module directory for Qt-related files +global qt_cmake_module_dir +set qt_cmake_module_dir ${qt_libs_dir}/cmake + +# standard qmake command location +global qt_qmake_cmd +set qt_qmake_cmd ${qt_dir}/bin/qmake + +# standard qmake spec +# configure script prefers clang (but "[a]dvertise[s] g++ as an alternative on Lion and below"). +# According to http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..., +# however, Snow Leopard is only tested on "GCC as provided by Apple" +# Create a variant for Snow Leopard that uses "-platform macx-g++-32" or "-platform macx-g++"? +global qt_qmake_spec +global qt_qmake_spec_32 +global qt_qmake_spec_64 +compiler.whitelist clang + +set qt_qmake_spec_32 macx-clang-32 +set qt_qmake_spec_64 macx-clang + +if { ![option universal_variant] || ![variant_isset universal] } { + if { ${build_arch} eq "i386" } { + set qt_qmake_spec ${qt_qmake_spec_32} + } else { + set qt_qmake_spec ${qt_qmake_spec_64} + } +} else { + set qt_qmake_spec "" +} + +# standard moc command location +global qt_moc_cmd +set qt_moc_cmd ${qt_dir}/bin/moc + +# standard uic command location +global qt_uic_cmd +set qt_uic_cmd ${qt_dir}/bin/uic + +# standard lrelease command location +global qt_lrelease_cmd +set qt_lrelease_cmd ${qt_dir}/bin/lrelease + +# standard PKGCONFIG path +global qt_pkg_config_dir +set qt_pkg_config_dir ${qt_libs_dir}/pkgconfig + +# data used by qmake +global qt_host_data_dir +set qt_host_data_dir ${qt_dir}/share/${qt_name} + +# standard cmake info for Qt5 +global qt_cmake_defines +set qt_cmake_defines \ + "-DQT_QT_INCLUDE_DIR=${qt_includes_dir} \ + -DQT_QMAKESPEC=${qt_qmake_spec} \ + -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \ + -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib" + +# allow for depending on either qt5-mac and qt5-mac-devel, simultaneously + +if {![info exists building_qt5]} { + if {${os.platform} == "darwin"} { + + # see if the framework install exists, and if so depend on it; + # if not, depend on the library version + + if {[file exists ${qt_frameworks_dir}/QtCore/QtCore]} { + depends_lib-append path:Library/Frameworks/QtCore/QtCore:qt5-mac + } else { + depends_lib-append path:lib/libQtCore.5.dylib:qt5-mac + } + } +} + +# standard configure environment, when not building qt5 + +if {![info exists building_qt5]} { + configure.env-append \ + QTDIR=${qt_dir} \ + QMAKE=${qt_qmake_cmd} \ + MOC=${qt_moc_cmd} + + if { ![option universal_variant] || ![variant_isset universal] } { + configure.env-append QMAKESPEC=${qt_qmake_spec} + } else { + set merger_configure_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" + set merger_configure_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" + } + + # make sure the Qt binaries' directory is in the path, if it is + # not the current prefix + + if {${qt_dir} != ${prefix}} { + configure.env-append PATH=${qt_dir}/bin:$env(PATH) + } +} else { + configure.env-append QMAKE_NO_DEFAULTS="" +} + +# standard build environment, when not building qt5 + +if {![info exists building_qt5]} { + build.env-append \ + QTDIR=${qt_dir} \ + QMAKE=${qt_qmake_cmd} \ + MOC=${qt_moc_cmd} + + if { ![option universal_variant] || ![variant_isset universal] } { + build.env-append QMAKESPEC=${qt_qmake_spec} + } else { + set merger_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" + set merger_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" + } + + # make sure the Qt binaries' directory is in the path, if it is + # not the current prefix + + if {${qt_dir} != ${prefix}} { + build.env-append PATH=${qt_dir}/bin:$env(PATH) + } +} + +# use PKGCONFIG for Qt discovery in configure scripts +depends_build-append port:pkgconfig + +# standard destroot environment +if { ![option universal_variant] || ![variant_isset universal] } { + destroot.env-append \ + INSTALL_ROOT=${destroot} +} else { + foreach arch ${configure.universal_archs} { + lappend merger_destroot_env($arch) INSTALL_ROOT=${workpath}/destroot-${arch} + } +} + +# standard destroot environment, when not building qt5 + +if {![info exists building_qt5]} { + destroot.env-append \ + QTDIR=${qt_dir} \ + QMAKE=${qt_qmake_cmd} \ + MOC=${qt_moc_cmd} + + if { ![option universal_variant] || ![variant_isset universal] } { + build.env-append QMAKESPEC=${qt_qmake_spec} + } else { + set destroot_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" + set destroot_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" + } + + # make sure the Qt binaries' directory is in the path, if it is + # not the current prefix + + if {${qt_dir} != ${prefix}} { + destroot.env-append PATH=${qt_dir}/bin:$env(PATH) + } +} Added: trunk/dports/aqua/qt5-mac/Portfile =================================================================== --- trunk/dports/aqua/qt5-mac/Portfile (rev 0) +++ trunk/dports/aqua/qt5-mac/Portfile 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,420 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 +# $Id$ + +PortSystem 1.0 + +name qt5-mac +version 5.3.1 +set branch [join [lrange [split ${version} .] 0 1] .] + +categories aqua +platforms macosx +maintainers mcalhoun openmaintainer +license {LGPL-2.1 GPL-3} + +homepage http://qt-project.org +description Qt Tool Kit +long_description Qt Tool Kit: A cross-platform framework \ + (headers, data, and libraries) for writing \ + cross-platform GUI-based applications. + +distname qt-everywhere-opensource-src-${version} + +master_sites http://download.qt-project.org/official_releases/qt/${branch}/${version}/single/ + +checksums rmd160 4cf6af424fe84223c5d9570848b4e21e251c5cdf \ + sha256 ba898625ba525d90a54739d2e33e4701d0bcd22d45663737b8123cd9b17b35a1 + +if { ${os.major} < 10 } { + pre-fetch { + ui_error "OS X prior to 10.7 (Lion) is not a Reference Configuration for Qt." + ui_error "OS X prior to 10.6 (Snow Leopard) is not even tested." + ui_error "See http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..." + return -code error "unsupported OS" + } +} elseif { ${os.major} == 10 } { + pre-fetch { + ui_warn "OS X prior to 10.7 (Lion) is not a Reference Configuration for Qt." + if { [variant_isset universal] } { + ui_warn "OS X 10.6 (Snow Leopard) is \"occasionally tested\" but ONLY in 32-bit mode." + ui_warn "OS X 10.6 (Snow Leopard) is deprecated and scheduled for removal in Qt 5.4." + } else { + if { ${build_arch} eq "i386" } { + ui_warn "OS X 10.6 (Snow Leopard) is \"occasionally tested\"." + ui_warn "OS X 10.6 (Snow Leopard) is deprecated and scheduled for removal in Qt 5.4." + } else { + ui_warn "OS X 10.6 (Snow Leopard) is \"occasionally tested\" but ONLY in 32-bit mode." + ui_warn "OS X 10.6 (Snow Leopard) is deprecated and scheduled for removal in Qt 5.4." + } + } + ui_warn "See http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..." + } +} elseif { ${os.major} > 13 } { + pre-fetch { + ui_warn "OS X subsequent to 10.9 (Mavericks) is not a Reference Configuration for Qt." + ui_warn "See http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..." + } +} else { + # 11 <= ${os.major} <= 13 + if { [variant_isset universal] } { + pre-fetch { + ui_warn "Multiple architectures is not a Reference Configuration for Qt." + ui_warn "See http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..." + } + } else { + if { ${build_arch} eq "i386" } { + pre-fetch { + ui_warn "32-bit mode is not a Reference Configuration for Qt." + ui_warn "See http://qt-project.org/doc/qt-5/supported-platforms.html#reference-configurat..." + } + } + } +} + +if { ${subport} eq "${name}-docs" } { + universal_variant no +} + +if { ${subport} eq ${name} || ${subport} eq "${name}-docs" } { + # use the qt5 group; set 'building_qt5' so that the portgroup + # does not include certain parts + set building_qt5 1 + PortGroup qt5 1.0 + PortGroup xcodeversion 1.0 + + conflicts qt3 qt3-mac qt4-mac + + minimum_xcodeversions {10 3.2} + + pre-configure { + # See https://bugreports.qt-project.org/browse/QTBUG-34902 + if {![catch {set installed [lindex [registry_active qt4-mac] 0]}]} { + ui_error "${name} fails if qt4-mac is active during configuration phase." + ui_error "Please deactivate qt4-mac to continue" + return -code error "conflicting port (qt4-mac)" + } + } + + # More testing is required to see if this is necessary. + use_parallel_build no + + # header file QtCore/private/qmachparser_p.h is included only if "defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)" + # code from header is used only "ifdef Q_OF_MACH_O" + # the two must be consistent + # assume the header include code is correct + patchfiles-append patch-tst_qpluginloader.diff + + # When testing, ensure that a universal object file is not inadvertently created. + patchfiles-append patch-machtest.diff + + # On testing of 32-bit systems, + # Pre-patch: QCOMPARE(unsigned long const&, unsigned int const& + # Post-patch: QCOMPARE(unsigned int const&, unsigned int const& + # Function template is only instantiated for same first and second arguments. + patchfiles-append patch-tst_qarraydata.diff + + # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-i... + patchfiles-append patch-tst_benchlibcallgrind.diff + + # During testing, NSStringFromRect requires NSRect. + patchfiles-append patch-tst_qaccessibilitymac_helpers.diff + + # --prefix is not recognized. + configure.pre_args-delete --prefix=${prefix} + + # --disable-dependency-tracking is not recognized. + configure.universal_args-delete --disable-dependency-tracking + + if {${configure.sdkroot} ne ""} { + configure.args-append \ + -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} "/"] end] "."] 0 end-1] "."]] + } + + configure.args-append \ + -prefix ${qt_dir} \ + -docdir ${qt_docs_dir} \ + -headerdir ${qt_includes_dir} \ + -plugindir ${qt_plugins_dir} \ + -importdir ${qt_imports_dir} \ + -qmldir ${qt_qml_dir} \ + -datadir ${qt_data_dir} \ + -libdir ${qt_frameworks_dir} \ + -bindir ${qt_bins_dir} \ + -translationdir ${qt_translations_dir} \ + -sysconfdir ${qt_sysconf_dir} \ + -examplesdir ${qt_examples_dir} \ + -testsdir ${qt_tests_dir} \ + -hostdatadir ${qt_host_data_dir} + + # Configure options: + configure.args-append \ + -release \ + -opensource \ + -confirm-license \ + -shared \ + -process + + # Third Party Libraries: + configure.args-append \ + -no-mtdev \ + -no-harfbuzz \ + -openssl-linked \ + -no-xinput2 \ + -no-xcb-xlib + + # configure options that don't show up in configure --help + configure.args-append \ + -no-libudev \ + -no-egl + + # Additional options: + configure.args-append \ + {-make libs} \ + {-make tools} \ + {-nomake examples} \ + {-nomake tests} \ + -verbose \ + -no-optimized-qmake \ + -nis \ + -cups \ + -iconv \ + -no-evdev \ + -icu \ + -fontconfig \ + -strip \ + -no-pch \ + -dbus-linked \ + -no-xcb \ + -glib \ + -directfb \ + -no-linuxfb \ + -no-kms \ + -no-system-proxies \ + -framework + + foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } { + configure.args-append -no-sql-${driver} + } + + if { ![variant_isset universal] } { + configure.args-append "-platform ${qt_qmake_spec}" + } else { + set merger_configure_args(i386) "-platform ${qt_qmake_spec_32}" + set merger_configure_args(x86_64) "-platform ${qt_qmake_spec_64}" + } + + # configure options that don't show up in configure --help + configure.args-append \ + -no-openvg + + # Qt builds part of the system using environment provided my MacPorts. + # It builds the rest using its own internal environment. + # For consistency, clear MacPorts environment. + configure.cxx_stdlib + configure.sdkroot + configure.cc_archflags + configure.cxx_archflags + configure.objc_archflags + configure.objcxx_archflags + configure.ld_archflags + configure.cppflags + configure.cflags + configure.cxxflags + configure.objcflags + configure.objcxxflags + configure.ldflags + configure.pipe no + if { [variant_isset universal] } { + set merger_arch_flag no + } + configure.march + configure.mtune + configure.universal_ldflags + configure.universal_cflags + configure.universal_cxxflags + configure.universal_cppflags +} + +if { ${subport} eq ${name} } { + depends_lib \ + port:zlib \ + port:libpng \ + port:jpeg \ + port:freetype \ + path:bin/dbus-daemon:dbus \ + port:openssl \ + port:tiff \ + port:libmng \ + path:lib/pkgconfig/glib-2.0.pc:glib2 \ + port:icu \ + port:pcre \ + port:libiconv + + # see https://bugreports.qt-project.org/browse/QTBUG-35514 + build.target + + if { [variant_isset universal] } { + merger-post-destroot { + foreach arch ${universal_archs_to_use} { + set dir ${destroot}-${arch} + + reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_frameworks_dir}/pkgconfig/Qt5WebKit.pc + + foreach prlfl [glob ${dir}${qt_frameworks_dir}/*.framework/*.prl] { + reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} + } + + foreach prlfl [glob ${dir}${qt_frameworks_dir}/*.prl] { + reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} + } + + foreach prlfl [glob ${dir}${qt_frameworks_dir}/*.framework/*.prl] { + reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} + } + + reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_mkspecs_dir}/modules/qt_lib_bootstrap_private.pri + + reinplace \ + "s|^set(_qt5_corelib_extra_includes \"\${_qt5Core_install_prefix}/share/qt5//mkspecs/macx-clang.*\")$|set(_qt5_corelib_extra_includes \"\${_qt5Core_install_prefix}/share/qt5//mkspecs/macx-clang-32\" \"\${_qt5Core_install_prefix}/share/qt5//mkspecs/macx-clang\")|" \ + ${dir}${qt_frameworks_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake + } + } + + post-destroot { + # delete preprocessor comments surrounding QT_CPU_FEATURES.i386 and QT_CPU_FEATURES.x86_64 + reinplace "/^#ifndef.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri + reinplace "/^#else.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri + reinplace "/^#endif.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri + } + + # The file ${prefix}/share/qt5/mkspecs/qconfig.pri is still not properly merged + # The solution is ???. + } + + post-destroot { + # move items out of the Frameworks directory that are more appropriate to lib directory + xinstall -m 775 -d ${destroot}${qt_cmake_module_dir} + foreach d [glob -tails -nocomplain -directory ${destroot}${qt_frameworks_dir}/cmake *] { + xinstall -m 775 -d ${destroot}${qt_cmake_module_dir}/${d} + foreach f [glob -nocomplain -directory ${destroot}${qt_frameworks_dir}/cmake/${d} *.cmake] { + # ${qt_frameworks_dir} is ${qt_dir}/Library/Frameworks while + # ${qt_libs_dir} is ${qt_dir}/lib + # unless modified, cmake files will point to a directory that is too high in the directory hierarchy + reinplace "s|/../../../../|/../../../|g" ${f} + file rename ${f} ${destroot}${qt_cmake_module_dir}/${d}/ + } + } + xinstall -m 775 -d ${destroot}${qt_pkg_config_dir} + foreach f [glob -nocomplain -directory ${destroot}${qt_frameworks_dir}/pkgconfig *.pc] { + file rename ${f} ${destroot}${qt_pkg_config_dir} + } + xinstall -m 775 -d ${destroot}${qt_libs_dir}/ + foreach f [glob -nocomplain -directory ${destroot}${qt_frameworks_dir} *.{a,prl,la}] { + file rename ${f} ${destroot}${qt_libs_dir}/ + } + + # move items out of the bin directory that are more appropriate to the Applications directory + xinstall -m 775 -d ${destroot}${qt_apps_dir} + foreach f [glob -nocomplain -directory ${destroot}${qt_bins_dir} *.app] { + file rename ${f} ${destroot}${qt_apps_dir}/ + } + } + + variant harfbuzz description {(experimental) Use HarfBuzz-NG to do text shaping} { + depends_lib-append port:harfbuzz + configure.args-replace \ + -no-harfbuzz \ + -system-harfbuzz + } + + variant tests description {Enable tests} { + configure.args-replace {-nomake tests} {-make tests} + } + + variant examples description {Build examples} { + configure.args-replace {-nomake examples} {-make examples} + } + + variant debug description {Build both release and debug library} { + configure.args-replace -release -debug-and-release + } +} + +subport ${name}-docs { + depends_lib-append \ + path:${prefix}/bin/qdoc:${name} \ + path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite3-plugin + + supported_archs noarch + + build.target docs + destroot.target install_docs + + post-extract { + # For the most part, generated makefiles use ${prefix}/bin/qdoc. + # There are a couple of places that look in ${worksrcpath}/qtbase/src/tools/qdoc/. + ln -s ${prefix}/bin/qdoc ${worksrcpath}/qtbase/src/tools/qdoc/ + ln -s ${prefix}/bin/qdoc ${worksrcpath}/qtbase/bin + + # Similarly, location of qhelpgenerator is expected in ${worksrcpath} + xinstall -d -m 755 ${worksrcpath}/qttools/bin/ + ln -s ${prefix}/bin/qhelpgenerator ${worksrcpath}/qttools/bin/ + + # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target + # keeps generating itself over and over again. + # This file is only created when the library is being built, however. + xinstall -d -m 755 ${worksrcpath}/qtwebkit/Source/WebCore/generated + touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc + } +} + +# See http://qt-project.org/doc/qt-5/sql-driver.html for info on building SQL Database Drivers + +subport ${name}-sqlite3-plugin { + PortGroup qmake5 1.0 + + depends_lib-append port:sqlite3 + + # for single architecture, easier to use + # worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/sqlite, + # but doesn't work for universal build + configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/sqlite + build.dir ${configure.dir} + destroot.dir ${configure.dir} + + configure.args-append "INCLUDEPATH+=${prefix}/include" "LIBS+=\"-L${prefix}/lib -lsqlite3\"" +} + +subport ${name}-psql84-plugin { + PortGroup qmake5 1.0 + + depends_lib-append port:postgresql84 + + # for single architecture, easier to use + # worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/psql, + # but doesn't work for universal build + configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/psql + build.dir ${configure.dir} + destroot.dir ${configure.dir} + + configure.args-append "INCLUDEPATH+=${prefix}/include/postgresql84" "LIBS+=\"-L${prefix}/lib/postgresql84 -lpq\"" +} + +subport ${name}-mysql56-plugin { + PortGroup qmake5 1.0 + + depends_lib-append port:mysql56 + + # for single architecture, easier to use + # worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/mysql, + # but doesn't work for universal build + configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/mysql + build.dir ${configure.dir} + destroot.dir ${configure.dir} + + configure.args-append "INCLUDEPATH+=${prefix}/include/mysql56/mysql" "LIBS+=\"-L${prefix}/lib/mysql56/mysql -lmysqlclient_r\"" +} + +livecheck.type regex +livecheck.url http://qt-project.org/downloads +livecheck.regex "Qt (5(?:\\.\\d+)*) for Mac" Property changes on: trunk/dports/aqua/qt5-mac/Portfile ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: trunk/dports/aqua/qt5-mac/files/patch-machtest.diff =================================================================== --- trunk/dports/aqua/qt5-mac/files/patch-machtest.diff (rev 0) +++ trunk/dports/aqua/qt5-mac/files/patch-machtest.diff 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,15 @@ +--- qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig 2014-06-19 03:08:00.000000000 -0700 ++++ qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro 2014-06-27 11:09:55.000000000 -0700 +@@ -4,10 +4,10 @@ + generate-bad.pl + + i386.target = good.i386.dylib +-i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $< ++i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $< + i386.depends += $$PWD/../fakeplugin.cpp + x86_64.target = good.x86_64.dylib +-x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $< ++x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $< + x86_64.depends += $$PWD/../fakeplugin.cpp + + # Current Mac OS X toolchains have no compiler for PPC anymore Added: trunk/dports/aqua/qt5-mac/files/patch-tst_benchlibcallgrind.diff =================================================================== --- trunk/dports/aqua/qt5-mac/files/patch-tst_benchlibcallgrind.diff (rev 0) +++ trunk/dports/aqua/qt5-mac/files/patch-tst_benchlibcallgrind.diff 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,14 @@ +--- qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp.orig 2014-06-28 00:25:11.000000000 -0700 ++++ qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp 2014-06-19 03:08:01.000000000 -0700 +@@ -81,9 +81,9 @@ + QBENCHMARK { + __asm__ __volatile__( + "mov $100000000,%%eax \n" +- "LOOPTOP: \n" ++ "1: \n" + "dec %%eax \n" +- "jnz LOOPTOP \n" ++ "jnz 1b \n" + : /* no output */ + : /* no input */ + : /* clobber */ "eax" Added: trunk/dports/aqua/qt5-mac/files/patch-tst_qaccessibilitymac_helpers.diff =================================================================== --- trunk/dports/aqua/qt5-mac/files/patch-tst_qaccessibilitymac_helpers.diff (rev 0) +++ trunk/dports/aqua/qt5-mac/files/patch-tst_qaccessibilitymac_helpers.diff 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,11 @@ +--- qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm.orig 2014-06-19 03:08:01.000000000 -0700 ++++ qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm 2014-06-28 00:58:02.000000000 -0700 +@@ -116,7 +116,7 @@ + + - (AXUIElementRef) ref { return reference; } + - (void) print { +- NSLog(@"Accessible Object role: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.description, self.value, NSStringFromRect(self.rect)); ++ NSLog(@"Accessible Object role: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.description, self.value, NSStringFromRect(NSRectFromCGRect(self.rect))); + NSLog(@" Children: %ld", [[self childList] count]); + } + Added: trunk/dports/aqua/qt5-mac/files/patch-tst_qarraydata.diff =================================================================== --- trunk/dports/aqua/qt5-mac/files/patch-tst_qarraydata.diff (rev 0) +++ trunk/dports/aqua/qt5-mac/files/patch-tst_qarraydata.diff 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,11 @@ +--- qtbase/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp~ 2014-06-19 03:07:59.000000000 -0700 ++++ qtbase/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp 2014-06-27 23:17:34.000000000 -0700 +@@ -797,7 +797,7 @@ + + minAlignment - Q_ALIGNOF(QArrayData))); + + // Data is aligned +- QCOMPARE(quintptr(data->data()) % alignment, quintptr(0u)); ++ QCOMPARE(quintptr(quintptr(data->data()) % alignment), quintptr(0)); + + // Check that the allocated array can be used. Best tested with a + // memory checker, such as valgrind, running. Added: trunk/dports/aqua/qt5-mac/files/patch-tst_qpluginloader.diff =================================================================== --- trunk/dports/aqua/qt5-mac/files/patch-tst_qpluginloader.diff (rev 0) +++ trunk/dports/aqua/qt5-mac/files/patch-tst_qpluginloader.diff 2014-06-29 22:55:52 UTC (rev 121554) @@ -0,0 +1,20 @@ +x--- .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp.orig 2014-02-01 13:37:28.000000000 -0700 ++++ .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp 2014-04-19 10:57:51.000000000 -0700 +@@ -319,7 +319,7 @@ + + void tst_QPluginLoader::loadMachO_data() + { +-#ifdef Q_OF_MACH_O ++#if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O) + QTest::addColumn<int>("parseResult"); + + QTest::newRow("/dev/null") << int(QMachOParser::NotSuitable); +@@ -355,7 +355,7 @@ + + void tst_QPluginLoader::loadMachO() + { +-#ifdef Q_OF_MACH_O ++#if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O) + QFile f(QFINDTESTDATA(QTest::currentDataTag())); + QVERIFY(f.open(QIODevice::ReadOnly)); + QByteArray data = f.readAll();