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 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | PortGroup qt5 1.0 |
---|
6 | |
---|
7 | name qt5-mysql-plugins |
---|
8 | if {[file exists ${qt_qmake_cmd}]} { |
---|
9 | version [exec ${qt_qmake_cmd} -query QT_VERSION] |
---|
10 | } else { |
---|
11 | # minimum version for which this port exists: |
---|
12 | version 5.3.2 |
---|
13 | } |
---|
14 | set branch [qt_branch] |
---|
15 | categories aqua databases |
---|
16 | platforms macosx |
---|
17 | maintainers gmail.com:rjvbertin openmaintainer |
---|
18 | license {LGPL-2.1 GPL-3} |
---|
19 | |
---|
20 | description Metaport providing the Qt MySQL database plugins |
---|
21 | long_description ${description} |
---|
22 | |
---|
23 | homepage http://qt-project.org |
---|
24 | distname qt-everywhere-opensource-src-${version} |
---|
25 | |
---|
26 | master_sites http://download.qt-project.org/official_releases/qt/${branch}/${version}/single/ |
---|
27 | |
---|
28 | use_xz yes |
---|
29 | switch ${version} { |
---|
30 | "5.3.2" { |
---|
31 | checksums rmd160 e4664d55eb4cfb04e982d680602e4cdcd4f2ac05 \ |
---|
32 | sha256 7f5bf93344cb57bac374ea4a32c8eda87f1357f998f14278e717cf84d0289bf0 |
---|
33 | } |
---|
34 | "5.4.2" { |
---|
35 | checksums rmd160 6b7ce0ce0d6807637b47b4335624d1decc9119a8 \ |
---|
36 | sha256 8c6d070613b721452f8cffdea6bddc82ce4f32f96703e3af02abb91a59f1ea25 |
---|
37 | } |
---|
38 | "5.5.0" { |
---|
39 | checksums rmd160 47eede15296f2275aadb1f4e4806cea4b8205e45 \ |
---|
40 | sha256 7ea2a16ecb8088e67db86b0835b887d5316121aeef9565d5d19be3d539a2c2af |
---|
41 | } |
---|
42 | "5.5.1" { |
---|
43 | checksums rmd160 42bf7768dafb868f2cdef857fd3e444520f2a706 \ |
---|
44 | sha256 6f028e63d4992be2b4a5526f2ef3bfa2fe28c5c757554b11d9e8d86189652518 |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | dist_subdir qt5-mac |
---|
49 | # was this one ever necessary? |
---|
50 | #depends_lib-append path:${qt_dir_rel}/bin/qmake:qt5-mac |
---|
51 | |
---|
52 | if {${subport} eq ${name}} { |
---|
53 | pre-extract { |
---|
54 | ui_error "\nThis is a metaport. It provides:\n${mp.names};\nyou can install exactly one of those.\n" |
---|
55 | return -code error "metaport is not installable" |
---|
56 | } |
---|
57 | } |
---|
58 | |
---|
59 | set DB mysql |
---|
60 | set DRIVER qtbase/src/sql/drivers/${DB} |
---|
61 | set PLUGIN qtbase/src/plugins/sqldrivers/${DB} |
---|
62 | |
---|
63 | # Qt5 is huge. Enable HFS compression. |
---|
64 | #depends_extract-append port:libarchive |
---|
65 | #extract.post_args | bsdtar -x --hfsCompression -f - ${distname}/qtbase |
---|
66 | # extract only the qtbase component |
---|
67 | extract.post_args-append ${distname}/qtbase |
---|
68 | |
---|
69 | post-extract { |
---|
70 | # ensure that we'll be using the installed mkspecs which (may) have been patched |
---|
71 | file delete -force ${worksrcpath}/qtbase/mkspecs |
---|
72 | } |
---|
73 | |
---|
74 | configure.dir ${worksrcpath}/${PLUGIN} |
---|
75 | build.dir ${configure.dir} |
---|
76 | destroot.dir ${configure.dir} |
---|
77 | configure.cmd ${qt_qmake_cmd} |
---|
78 | configure.pre_args PREFIX=${prefix} |
---|
79 | |
---|
80 | if {[variant_isset universal]} { |
---|
81 | configure.universal_args-delete --disable-dependency-tracking |
---|
82 | } |
---|
83 | |
---|
84 | set mp.ports {mysql5 mysql51 mysql55 mysql56 mysql mariadb mariadb-10.0 mariadb-10.1 percona} |
---|
85 | foreach mp.port ${mp.ports} { |
---|
86 | lappend mp.names "qt5-${mp.port}-plugin" |
---|
87 | } |
---|
88 | |
---|
89 | if {${subport} eq "qt5-mysql56-plugin"} { |
---|
90 | replaced_by qt5-mysql-plugin |
---|
91 | } |
---|
92 | |
---|
93 | foreach mp.name ${mp.names} { |
---|
94 | set idx [lsearch ${mp.names} ${mp.name}] |
---|
95 | set mp.port [lindex ${mp.ports} $idx] |
---|
96 | set mp.conflicts [lreplace ${mp.names} $idx $idx] |
---|
97 | |
---|
98 | subport ${mp.name} { |
---|
99 | if {${mp.port} ne "mysql56"} { |
---|
100 | description Qt MySQL database plugin for ${mp.port} |
---|
101 | long_description ${description} |
---|
102 | eval conflicts-append ${mp.conflicts} |
---|
103 | depends_lib-append port:${mp.port} |
---|
104 | configure.args INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port}/mysql" \ |
---|
105 | LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -L${prefix}/lib/${mp.port}/mysql -lmysqlclient_r" |
---|
106 | configure.post_args mysql.pro |
---|
107 | |
---|
108 | variant debug description \ |
---|
109 | {Build both release and debug plugin} {} |
---|
110 | |
---|
111 | post-destroot { |
---|
112 | xinstall -d -m 755 ${destroot}${qt_cmake_module_dir} |
---|
113 | move ${destroot}${qt_frameworks_dir}/cmake/Qt5Sql ${destroot}${qt_cmake_module_dir} |
---|
114 | } |
---|
115 | } |
---|
116 | } |
---|
117 | } |
---|
118 | |
---|
119 | build.target {} |
---|
120 | |
---|
121 | livecheck.type regex |
---|
122 | livecheck.url http://download.qt.io/archive/qt/5.4/ |
---|
123 | livecheck.regex (\\d+(\\.\\d+)+) |
---|