| 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.142 2010/03/24 20:37:54 robbat2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.144 2010/04/01 20:36:39 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> |
| … | |
… | |
| 656 | && use minimal ; then |
656 | && use minimal ; then |
| 657 | eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" |
657 | eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" |
| 658 | die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" |
658 | die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" |
| 659 | fi |
659 | fi |
| 660 | |
660 | |
|
|
661 | # Bug #290570, 284946, 307251 |
| 661 | # Bug #290570 fun. Upstream made us need a fairly new GCC4. |
662 | # Upstream changes made us need a fairly new GCC4. |
| 662 | if mysql_version_is_at_least "5.0.83" ; then |
663 | # But only for 5.0.8[3-6]! |
|
|
664 | if mysql_version_is_at_least "5.0.83" && ! mysql_version_is_at_least 5.0.87 ; then |
| 663 | GCC_VER=$(gcc-version) |
665 | GCC_VER=$(gcc-version) |
| 664 | case ${GCC_VER} in |
666 | case ${GCC_VER} in |
| 665 | 2*|3*|4.0|4.1|4.2) die "Active GCC too old! Must have at least GCC4.3" ;; |
667 | 2*|3*|4.0|4.1|4.2) |
|
|
668 | eerror "Some releases of MySQL required a very new GCC, and then" |
|
|
669 | eerror "later release relaxed that requirement again. Either pick a" |
|
|
670 | eerror "MySQL >=5.0.87, or use a newer GCC." |
|
|
671 | die "Active GCC too old!" ;; |
| 666 | esac |
672 | esac |
| 667 | fi |
673 | fi |
| 668 | |
674 | |
| 669 | # This should come after all of the die statements |
675 | # This should come after all of the die statements |
| 670 | enewgroup mysql 60 || die "problem adding 'mysql' group" |
676 | enewgroup mysql 60 || die "problem adding 'mysql' group" |
| … | |
… | |
| 1198 | --user=mysql \ |
1204 | --user=mysql \ |
| 1199 | --basedir=${ROOT}/usr \ |
1205 | --basedir=${ROOT}/usr \ |
| 1200 | --datadir=${ROOT}/${MY_DATADIR} \ |
1206 | --datadir=${ROOT}/${MY_DATADIR} \ |
| 1201 | --max_allowed_packet=8M \ |
1207 | --max_allowed_packet=8M \ |
| 1202 | --net_buffer_length=16K \ |
1208 | --net_buffer_length=16K \ |
|
|
1209 | --default-storage-engine=MyISAM \ |
| 1203 | --socket=${socket} \ |
1210 | --socket=${socket} \ |
| 1204 | --pid-file=${pidfile}" |
1211 | --pid-file=${pidfile}" |
| 1205 | #einfo "About to start mysqld: ${mysqld}" |
1212 | #einfo "About to start mysqld: ${mysqld}" |
| 1206 | ebegin "Starting mysqld" |
1213 | ebegin "Starting mysqld" |
| 1207 | ${mysqld} & |
1214 | ${mysqld} & |