| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.131 2010/02/02 03:01:31 robbat2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.132 2010/02/02 22:16:04 robbat2 Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: mysql.eclass |
5 | # @ECLASS: mysql.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Author: Francesco Riosa (Retired) <vivo@gentoo.org> |
7 | # Author: Francesco Riosa (Retired) <vivo@gentoo.org> |
| 8 | # Maintainers: MySQL Team <mysql-bugs@gentoo.org> |
8 | # Maintainers: MySQL Team <mysql-bugs@gentoo.org> |
| … | |
… | |
| 83 | MYSQL_COMMUNITY_FEATURES=1 |
83 | MYSQL_COMMUNITY_FEATURES=1 |
| 84 | elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then |
84 | elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then |
| 85 | MYSQL_COMMUNITY_FEATURES=1 |
85 | MYSQL_COMMUNITY_FEATURES=1 |
| 86 | elif [ "${PV#5.1}" != "${PV}" ] && mysql_version_is_at_least "5.1.28"; then |
86 | elif [ "${PV#5.1}" != "${PV}" ] && mysql_version_is_at_least "5.1.28"; then |
| 87 | MYSQL_COMMUNITY_FEATURES=1 |
87 | MYSQL_COMMUNITY_FEATURES=1 |
| 88 | elif [ "${PV#5.4}" != "${PV}" ] || [ "${PV#5.4}" != "${PV}" ]; then |
88 | elif [ "${PV#5.4}" != "${PV}" ] ; then |
|
|
89 | MYSQL_COMMUNITY_FEATURES=1 |
|
|
90 | elif [ "${PV#5.5}" != "${PV}" ] ; then |
|
|
91 | MYSQL_COMMUNITY_FEATURES=1 |
|
|
92 | elif [ "${PV#6.0}" != "${PV}" ] ; then |
| 89 | MYSQL_COMMUNITY_FEATURES=1 |
93 | MYSQL_COMMUNITY_FEATURES=1 |
| 90 | else |
94 | else |
| 91 | MYSQL_COMMUNITY_FEATURES=0 |
95 | MYSQL_COMMUNITY_FEATURES=0 |
| 92 | fi |
96 | fi |
| 93 | |
97 | |
| … | |
… | |
| 134 | # For other stuff to bring us in |
138 | # For other stuff to bring us in |
| 135 | PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})" |
139 | PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})" |
| 136 | |
140 | |
| 137 | # Work out the default SERVER_URI correctly |
141 | # Work out the default SERVER_URI correctly |
| 138 | if [ -z "${SERVER_URI}" ]; then |
142 | if [ -z "${SERVER_URI}" ]; then |
|
|
143 | [ -z "${MY_PV}" ] && MY_PV="${PV//_/-}" |
| 139 | # The community build is on the mirrors |
144 | # The community build is on the mirrors |
| 140 | if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then |
145 | if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then |
| 141 | SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz" |
146 | SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${MY_PV}.tar.gz" |
| 142 | # The (old) enterprise source is on the primary site only |
147 | # The (old) enterprise source is on the primary site only |
| 143 | elif [ "${PN}" == "mysql" ]; then |
148 | elif [ "${PN}" == "mysql" ]; then |
| 144 | SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${PV//_/-}.tar.gz" |
149 | SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${MY_PV}.tar.gz" |
| 145 | fi |
150 | fi |
| 146 | fi |
151 | fi |
| 147 | |
152 | |
| 148 | # Define correct SRC_URIs |
153 | # Define correct SRC_URIs |
| 149 | SRC_URI="${SERVER_URI}" |
154 | SRC_URI="${SERVER_URI}" |