| 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.158 2011/03/28 22:36:13 jmbsvicetto Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.163 2011/08/21 16:14:56 jmbsvicetto 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> |
| … | |
… | |
| 142 | done |
142 | done |
| 143 | |
143 | |
| 144 | RDEPEND="${DEPEND} |
144 | RDEPEND="${DEPEND} |
| 145 | !minimal? ( dev-db/mysql-init-scripts ) |
145 | !minimal? ( dev-db/mysql-init-scripts ) |
| 146 | selinux? ( sec-policy/selinux-mysql )" |
146 | selinux? ( sec-policy/selinux-mysql )" |
|
|
147 | |
|
|
148 | DEPEND="${DEPEND} |
|
|
149 | virtual/yacc" |
| 147 | |
150 | |
| 148 | if [ "${EAPI:-0}" = "2" ]; then |
151 | if [ "${EAPI:-0}" = "2" ]; then |
| 149 | DEPEND="${DEPEND} static? ( || ( sys-libs/ncurses[static-libs] <=sys-libs/ncurses-5.7-r3 ) )" |
152 | DEPEND="${DEPEND} static? ( || ( sys-libs/ncurses[static-libs] <=sys-libs/ncurses-5.7-r3 ) )" |
| 150 | fi |
153 | fi |
| 151 | |
154 | |
| … | |
… | |
| 771 | # die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" |
774 | # die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" |
| 772 | # check for conflicting use flags |
775 | # check for conflicting use flags |
| 773 | # create new user and group for mysql |
776 | # create new user and group for mysql |
| 774 | # warn about deprecated features |
777 | # warn about deprecated features |
| 775 | mysql_pkg_setup() { |
778 | mysql_pkg_setup() { |
| 776 | if hasq test ${FEATURES} ; then |
779 | if has test ${FEATURES} ; then |
| 777 | if ! use minimal ; then |
780 | if ! use minimal ; then |
| 778 | if [[ $UID -eq 0 ]]; then |
781 | if [[ $UID -eq 0 ]]; then |
| 779 | eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
782 | eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
| 780 | fi |
783 | fi |
| 781 | fi |
784 | fi |
| … | |
… | |
| 1028 | && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" |
1031 | && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" |
| 1029 | export CXXFLAGS |
1032 | export CXXFLAGS |
| 1030 | |
1033 | |
| 1031 | # bug #283926, with GCC4.4, this is required to get correct behavior. |
1034 | # bug #283926, with GCC4.4, this is required to get correct behavior. |
| 1032 | append-flags -fno-strict-aliasing |
1035 | append-flags -fno-strict-aliasing |
| 1033 | |
1036 | |
| 1034 | # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer |
1037 | # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer |
| 1035 | # causes a mis-compile. |
1038 | # causes a mis-compile. |
| 1036 | # Upstream bugs: |
1039 | # Upstream bugs: |
| 1037 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 |
1040 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 |
| 1038 | # http://bugs.mysql.com/bug.php?id=45205 |
1041 | # http://bugs.mysql.com/bug.php?id=45205 |
| … | |
… | |
| 1050 | --with-low-memory \ |
1053 | --with-low-memory \ |
| 1051 | --with-client-ldflags=-lstdc++ \ |
1054 | --with-client-ldflags=-lstdc++ \ |
| 1052 | --enable-thread-safe-client \ |
1055 | --enable-thread-safe-client \ |
| 1053 | --with-comment="Gentoo Linux ${PF}" \ |
1056 | --with-comment="Gentoo Linux ${PF}" \ |
| 1054 | --without-docs \ |
1057 | --without-docs \ |
|
|
1058 | --with-LIBDIR="$(get_libdir)" \ |
| 1055 | ${myconf} || die "econf failed" |
1059 | ${myconf} || die "econf failed" |
| 1056 | |
1060 | |
| 1057 | # TODO: Move this before autoreconf !!! |
1061 | # TODO: Move this before autoreconf !!! |
| 1058 | find . -type f -name Makefile -print0 \ |
1062 | find . -type f -name Makefile -print0 \ |
| 1059 | | xargs -0 -n100 sed -i \ |
1063 | | xargs -0 -n100 sed -i \ |
| … | |
… | |
| 1168 | done |
1172 | done |
| 1169 | fi |
1173 | fi |
| 1170 | |
1174 | |
| 1171 | # Docs |
1175 | # Docs |
| 1172 | einfo "Installing docs" |
1176 | einfo "Installing docs" |
| 1173 | dodoc README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE |
1177 | for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do |
|
|
1178 | [[ -f "$i" ]] && dodoc "$i" |
|
|
1179 | done |
| 1174 | doinfo "${S}"/Docs/mysql.info |
1180 | doinfo "${S}"/Docs/mysql.info |
| 1175 | |
1181 | |
| 1176 | # Minimal builds don't have the MySQL server |
1182 | # Minimal builds don't have the MySQL server |
| 1177 | if ! use minimal ; then |
1183 | if ! use minimal ; then |
| 1178 | einfo "Including support files and sample configurations" |
1184 | einfo "Including support files and sample configurations" |