source: trunk/dports/aqua/qt4-mac-mysql55-plugin/Portfile

Last change on this file was 140960, checked in by michaelld@…, 2 years ago

qt4 various: change qt_dir to ${prefix}/libexec/qt4 to allow for a parallel install with qt5; rev-bump dependencies that are known to work with this change. Addresses the primary issue of #44193. Will address secondary issues down the road.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# -*- 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
2# $Id: Portfile 140960 2015-10-06 20:13:45Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6# use the qt4 group (indirectly via the qmake PortGroup); set
7# 'building_qt4' so that the portgroup does not include certain parts
8set building_qt4    1
9PortGroup           qmake 1.0
10PortGroup           xcodeversion 1.0
11
12name                qt4-mac-mysql55-plugin
13version             4.8.7
14revision            1
15set branch          [join [lrange [split ${version} .] 0 1] .]
16categories          aqua databases
17platforms           macosx
18maintainers         michaelld pixilla openmaintainer
19license             {LGPL-2.1 GPL-3}
20homepage            http://www.qt.io/
21
22master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/
23
24distname            qt-everywhere-opensource-src-${version}
25
26checksums           rmd160 afb5e5a99388e6429faca59cb5000054feffd166 \
27                    sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0
28
29dist_subdir         qt4-mac
30
31# when using 'building_qt4' and qmake, have to include dependency on qt4-mac
32depends_lib-append  port:qt4-mac
33
34set DB              mysql
35set DRIVER          src/sql/drivers/${DB}
36set PLUGIN          src/plugins/sqldrivers/${DB}
37
38extract.post_args   | tar -xf - \
39                    ${distname}/${DRIVER} \
40                    ${distname}/${PLUGIN} \
41                    ${distname}/src/plugins/sqldrivers/qsqldriverbase.pri \
42                    ${distname}/src/plugins/qpluginbase.pri \
43                    ${distname}/src/qt_targets.pri
44
45configure.dir       ${worksrcpath}/${PLUGIN}
46configure.env-append \
47                    QMAKESPEC=${qt_mkspecs_dir}/macx-g++
48
49set mp.ports     {mysql5 mysql51 mysql55 mysql56 mariadb mariadb-10.0 mariadb-10.1 percona}
50foreach mp.port ${mp.ports} {
51
52    lappend mp.names "qt4-mac-${mp.port}-plugin"
53}
54
55foreach mp.name ${mp.names} {
56
57    set idx [lsearch ${mp.names} ${mp.name}]
58    set mp.port [lindex ${mp.ports} $idx]
59    set mp.conflicts [lreplace ${mp.names} $idx $idx]
60
61    if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} {
62
63        description         Qt MySQL database plugin for ${mp.port}
64        long_description    ${description}
65        eval conflicts-append    ${mp.conflicts}
66        depends_lib-append  port:${mp.port}
67        configure.args-append INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port}/mysql" \
68                            LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -L${prefix}/lib/${mp.port}/mysql -lmysqlclient_r"
69        configure.post_args mysql.pro
70
71        variant debug description {Build both release and debug plugin} {}
72
73        pre-configure {
74            configure.args-append CONFIG+=\"${qt_arch_types}\"
75        }
76
77        post-patch {
78            if {![variant_isset debug]} {
79                reinplace "s@debug_and_release@release@" \
80                    ${worksrcpath}/src/plugins/qpluginbase.pri
81            }
82        }
83
84    } else {
85
86        subport ${mp.name} {
87       
88            description         Qt MySQL database plugin for ${mp.port}
89            long_description    ${description}
90            eval conflicts-append    ${mp.conflicts}
91            depends_lib-append  port:${mp.port}
92            configure.args      INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port}/mysql" \
93                                LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -L${prefix}/lib/${mp.port}/mysql -lmysqlclient_r"
94            configure.post_args mysql.pro
95
96            variant debug description \
97                {Build both release and debug plugin} {}
98
99            pre-configure {
100                configure.args-append CONFIG+=\"${qt_arch_types}\"
101            }
102
103            post-patch {
104                if {![variant_isset debug]} {
105                    reinplace "s@debug_and_release@release@" \
106                        ${worksrcpath}/src/plugins/qpluginbase.pri
107                }
108            }
109        }
110    }
111}
112
113build.dir           ${worksrcpath}/${PLUGIN}
114build.target        {}
115
116livecheck.type      regex
117livecheck.url       http://download.qt.io/official_releases/qt/${branch}/
118livecheck.regex     >(\[0-9.\]+)/<
Note: See TracBrowser for help on using the repository browser.