# -*- 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: Portfile 140960 2015-10-06 20:13:45Z michaelld@macports.org $ PortSystem 1.0 # use the qt4 group (indirectly via the qmake PortGroup); set # 'building_qt4' so that the portgroup does not include certain parts set building_qt4 1 PortGroup qmake 1.0 PortGroup xcodeversion 1.0 name qt4-mac-mysql55-plugin version 4.8.7 revision 1 set branch [join [lrange [split ${version} .] 0 1] .] categories aqua databases platforms macosx maintainers michaelld pixilla openmaintainer license {LGPL-2.1 GPL-3} homepage http://www.qt.io/ master_sites http://download.qt.io/official_releases/qt/${branch}/${version}/ distname qt-everywhere-opensource-src-${version} checksums rmd160 afb5e5a99388e6429faca59cb5000054feffd166 \ sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 dist_subdir qt4-mac # when using 'building_qt4' and qmake, have to include dependency on qt4-mac depends_lib-append port:qt4-mac set DB mysql set DRIVER src/sql/drivers/${DB} set PLUGIN src/plugins/sqldrivers/${DB} extract.post_args | tar -xf - \ ${distname}/${DRIVER} \ ${distname}/${PLUGIN} \ ${distname}/src/plugins/sqldrivers/qsqldriverbase.pri \ ${distname}/src/plugins/qpluginbase.pri \ ${distname}/src/qt_targets.pri configure.dir ${worksrcpath}/${PLUGIN} configure.env-append \ QMAKESPEC=${qt_mkspecs_dir}/macx-g++ set mp.ports {mysql5 mysql51 mysql55 mysql56 mariadb mariadb-10.0 mariadb-10.1 percona} foreach mp.port ${mp.ports} { lappend mp.names "qt4-mac-${mp.port}-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] if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} { description Qt MySQL database plugin for ${mp.port} long_description ${description} eval conflicts-append ${mp.conflicts} depends_lib-append port:${mp.port} configure.args-append 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} {} pre-configure { configure.args-append CONFIG+=\"${qt_arch_types}\" } post-patch { if {![variant_isset debug]} { reinplace "s@debug_and_release@release@" \ ${worksrcpath}/src/plugins/qpluginbase.pri } } } else { subport ${mp.name} { 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} {} pre-configure { configure.args-append CONFIG+=\"${qt_arch_types}\" } post-patch { if {![variant_isset debug]} { reinplace "s@debug_and_release@release@" \ ${worksrcpath}/src/plugins/qpluginbase.pri } } } } } build.dir ${worksrcpath}/${PLUGIN} build.target {} livecheck.type regex livecheck.url http://download.qt.io/official_releases/qt/${branch}/ livecheck.regex >(\[0-9.\]+)/<