29 | | variant mysql5 conflicts mysql4 description {Build with MySQL 5 support} { |
30 | | depends_lib-append path:bin/mysql_config5:mysql5 |
31 | | configure.args --with-mysql-lib=${prefix}/lib/mysql5/mysql \ |
32 | | --with-mysql-include=${prefix}/include/mysql5/mysql |
| 33 | variant mysql5 \ |
| 34 | conflicts mysql4 mysql51 mysql55 mysql56 mariadb percona \ |
| 35 | description {Build with mysql5 port} { |
| 36 | |
| 37 | depends_lib-append port:mysql5 |
| 38 | configure.args-append --with-mysql-lib=${prefix}/lib/mysql5/mysql \ |
| 39 | --with-mysql-include=${prefix}/include/mysql5/mysql |
| 51 | variant mysql55 \ |
| 52 | conflicts mysql4 mysql5 mysql51 mysql56 mariadb percona \ |
| 53 | description {Build with mysql55 port} { |
| 54 | |
| 55 | depends_lib-append port:mysql55 |
| 56 | configure.args-append --with-mysql-lib=${prefix}/lib/mysql55/mysql \ |
| 57 | --with-mysql-include=${prefix}/include/mysql55/mysql |
| 58 | } |
| 59 | |
| 60 | variant mysql56 \ |
| 61 | conflicts mysql4 mysql5 mysql51 mysql55 mariadb percona \ |
| 62 | description {Build with mysql56 port} { |
| 63 | |
| 64 | depends_lib-append port:mysql56 |
| 65 | configure.args-append --with-mysql-lib=${prefix}/lib/mysql56/mysql \ |
| 66 | --with-mysql-include=${prefix}/include/mysql56/mysql |
| 67 | } |
| 68 | |
| 69 | variant mariadb \ |
| 70 | conflicts mysql4 mysql5 mysql51 mysql55 mysql56 percona \ |
| 71 | description {Build with mariadb port} { |
| 72 | |
| 73 | depends_lib-append port:mariadb |
| 74 | configure.args-append --with-mysql-lib=${prefix}/lib/mariadb/mysql \ |
| 75 | --with-mysql-include=${prefix}/include/mariadb/mysql |
| 76 | } |
| 77 | |
| 78 | variant percona \ |
| 79 | conflicts mysql4 mysql5 mysql51 mysql55 mysql56 mariadb \ |
| 80 | description {Build with percona port} { |
| 81 | |
| 82 | depends_lib-append port:percona |
| 83 | configure.args-append --with-mysql-lib=${prefix}/lib/percona/mysql \ |
| 84 | --with-mysql-include=${prefix}/include/percona/mysql |
| 85 | } |
| 86 | |
| 87 | if { |
| 88 | |
| 89 | ![variant_isset mysql4] |
| 90 | && ![variant_isset mysql5] |
| 91 | && ![variant_isset mysql51] |
| 92 | && ![variant_isset mysql55] |
| 93 | && ![variant_isset mysql56] |
| 94 | && ![variant_isset mariadb] |
| 95 | && ![variant_isset percona] |
| 96 | } { |
| 97 | default_variants +mariadb |
| 98 | } |
| 99 | pre-fetch { |
| 100 | if { |
| 101 | |
| 102 | ![variant_isset mysql4] |
| 103 | && ![variant_isset mysql5] |
| 104 | && ![variant_isset mysql51] |
| 105 | && ![variant_isset mysql55] |
| 106 | && ![variant_isset mysql56] |
| 107 | && ![variant_isset mariadb] |
| 108 | && ![variant_isset percona] |
| 109 | } { |
| 110 | |
| 111 | return -code error "${name} requires one of these variants: +mysql4, +mysql5, +mysql51, +mysql55, +mysql56, +mariadb or +percona" |
| 112 | } |
| 113 | } |
| 114 | |