# -*- 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 PortSystem 1.0 PortGroup qt5 1.0 name qt5-mysql-plugins if {[file exists ${qt_qmake_cmd}]} { version [exec ${qt_qmake_cmd} -query QT_VERSION] } else { # minimum version for which this port exists: version 5.3.2 } set branch [qt_branch] categories aqua databases platforms macosx maintainers gmail.com:rjvbertin openmaintainer license {LGPL-2.1 GPL-3} description Metaport providing the Qt MySQL database plugins long_description ${description} homepage http://qt-project.org distname qt-everywhere-opensource-src-${version} master_sites http://download.qt-project.org/official_releases/qt/${branch}/${version}/single/ use_xz yes switch ${version} { "5.3.2" { checksums rmd160 e4664d55eb4cfb04e982d680602e4cdcd4f2ac05 \ sha256 7f5bf93344cb57bac374ea4a32c8eda87f1357f998f14278e717cf84d0289bf0 } "5.4.2" { checksums rmd160 6b7ce0ce0d6807637b47b4335624d1decc9119a8 \ sha256 8c6d070613b721452f8cffdea6bddc82ce4f32f96703e3af02abb91a59f1ea25 } "5.5.0" { checksums rmd160 47eede15296f2275aadb1f4e4806cea4b8205e45 \ sha256 7ea2a16ecb8088e67db86b0835b887d5316121aeef9565d5d19be3d539a2c2af } "5.5.1" { checksums rmd160 42bf7768dafb868f2cdef857fd3e444520f2a706 \ sha256 6f028e63d4992be2b4a5526f2ef3bfa2fe28c5c757554b11d9e8d86189652518 } } dist_subdir qt5-mac # was this one ever necessary? #depends_lib-append path:${qt_dir_rel}/bin/qmake:qt5-mac if {${subport} eq ${name}} { pre-extract { ui_error "\nThis is a metaport. It provides:\n${mp.names};\nyou can install exactly one of those.\n" return -code error "metaport is not installable" } } set DB mysql set DRIVER qtbase/src/sql/drivers/${DB} set PLUGIN qtbase/src/plugins/sqldrivers/${DB} # Qt5 is huge. Enable HFS compression. #depends_extract-append port:libarchive #extract.post_args | bsdtar -x --hfsCompression -f - ${distname}/qtbase # extract only the qtbase component extract.post_args-append ${distname}/qtbase post-extract { # ensure that we'll be using the installed mkspecs which (may) have been patched file delete -force ${worksrcpath}/qtbase/mkspecs } configure.dir ${worksrcpath}/${PLUGIN} build.dir ${configure.dir} destroot.dir ${configure.dir} configure.cmd ${qt_qmake_cmd} configure.pre_args PREFIX=${prefix} if {[variant_isset universal]} { configure.universal_args-delete --disable-dependency-tracking } set mp.ports {mysql5 mysql51 mysql55 mysql56 mysql mariadb mariadb-10.0 mariadb-10.1 percona} foreach mp.port ${mp.ports} { lappend mp.names "qt5-${mp.port}-plugin" } if {${subport} eq "qt5-mysql56-plugin"} { replaced_by qt5-mysql-plugin } foreach mp.name ${mp.names} { set idx [lsearch ${mp.names} ${mp.name}] set mp.port [lindex ${mp.ports} $idx] set mp.conflicts [lreplace ${mp.names} $idx $idx] subport ${mp.name} { if {${mp.port} ne "mysql56"} { description Qt MySQL database plugin for ${mp.port} long_description ${description} eval conflicts-append ${mp.conflicts} depends_lib-append port:${mp.port} configure.args INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port}/mysql" \ LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -L${prefix}/lib/${mp.port}/mysql -lmysqlclient_r" configure.post_args mysql.pro variant debug description \ {Build both release and debug plugin} {} post-destroot { xinstall -d -m 755 ${destroot}${qt_cmake_module_dir} move ${destroot}${qt_frameworks_dir}/cmake/Qt5Sql ${destroot}${qt_cmake_module_dir} } } } } build.target {} livecheck.type regex livecheck.url http://download.qt.io/archive/qt/5.4/ livecheck.regex (\\d+(\\.\\d+)+)