/[gentoo-x86]/eclass/mysql.eclass
Gentoo

Diff of /eclass/mysql.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.157 Revision 1.165
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2011 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.157 2011/03/26 23:44:43 jmbsvicetto Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.165 2011/08/29 01:28:10 vapier Exp $
4 4
5# @ECLASS: mysql.eclass 5# @ECLASS: mysql.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
8# Maintainers: MySQL Team <mysql-bugs@gentoo.org> 7# MySQL Team <mysql-bugs@gentoo.org>
9# - Luca Longinotti <chtekk@gentoo.org> 8# Luca Longinotti <chtekk@gentoo.org>
10# - Robin H. Johnson <robbat2@gentoo.org> 9# Robin H. Johnson <robbat2@gentoo.org>
10# @AUTHOR:
11# Francesco Riosa (Retired) <vivo@gentoo.org>
11# @BLURB: This eclass provides most of the functions for mysql ebuilds 12# @BLURB: This eclass provides most of the functions for mysql ebuilds
12# @DESCRIPTION: 13# @DESCRIPTION:
13# The mysql.eclass provides almost all the code to build the mysql ebuilds 14# The mysql.eclass provides almost all the code to build the mysql ebuilds
14# including the src_unpack, src_prepare, src_configure, src_compile, 15# including the src_unpack, src_prepare, src_configure, src_compile,
15# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm 16# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm
143 144
144RDEPEND="${DEPEND} 145RDEPEND="${DEPEND}
145 !minimal? ( dev-db/mysql-init-scripts ) 146 !minimal? ( dev-db/mysql-init-scripts )
146 selinux? ( sec-policy/selinux-mysql )" 147 selinux? ( sec-policy/selinux-mysql )"
147 148
149DEPEND="${DEPEND}
150 virtual/yacc"
151
148if [ "${EAPI:-0}" = "2" ]; then 152if [ "${EAPI:-0}" = "2" ]; then
149 DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )" 153 DEPEND="${DEPEND} static? ( || ( sys-libs/ncurses[static-libs] <=sys-libs/ncurses-5.7-r3 ) )"
150fi 154fi
151 155
152# compile-time-only 156# compile-time-only
153mysql_version_is_at_least "5.1" \ 157mysql_version_is_at_least "5.1" \
154|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )" 158|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )"
613 \) \ 617 \) \
614 -print0 \ 618 -print0 \
615 | xargs -0 sed -r -n \ 619 | xargs -0 sed -r -n \
616 -e '/^MYSQL_STORAGE_ENGINE/{ 620 -e '/^MYSQL_STORAGE_ENGINE/{
617 s~MYSQL_STORAGE_ENGINE\([[:space:]]*\[?([-_a-z0-9]+)\]?.*,~\1 ~g ; 621 s~MYSQL_STORAGE_ENGINE\([[:space:]]*\[?([-_a-z0-9]+)\]?.*,~\1 ~g ;
618 s~^([^ ]+).*~\1~gp; 622 s~^([^ ]+).*~\1~gp;
619 }' \ 623 }' \
620 | tr -s '\n' ' ' 624 | tr -s '\n' ' '
621 )" 625 )"
622 626
623 # 5.1 introduces a new way to manage storage engines (plugins) 627 # 5.1 introduces a new way to manage storage engines (plugins)
771# die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" 775# die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv"
772# check for conflicting use flags 776# check for conflicting use flags
773# create new user and group for mysql 777# create new user and group for mysql
774# warn about deprecated features 778# warn about deprecated features
775mysql_pkg_setup() { 779mysql_pkg_setup() {
776 if hasq test ${FEATURES} ; then 780 if has test ${FEATURES} ; then
777 if ! use minimal ; then 781 if ! use minimal ; then
778 if [[ $UID -eq 0 ]]; then 782 if [[ $UID -eq 0 ]]; then
779 eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." 783 eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
780 fi 784 fi
781 fi 785 fi
1028 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" 1032 && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
1029 export CXXFLAGS 1033 export CXXFLAGS
1030 1034
1031 # bug #283926, with GCC4.4, this is required to get correct behavior. 1035 # bug #283926, with GCC4.4, this is required to get correct behavior.
1032 append-flags -fno-strict-aliasing 1036 append-flags -fno-strict-aliasing
1033 1037
1034 # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer 1038 # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer
1035 # causes a mis-compile. 1039 # causes a mis-compile.
1036 # Upstream bugs: 1040 # Upstream bugs:
1037 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 1041 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562
1038 # http://bugs.mysql.com/bug.php?id=45205 1042 # http://bugs.mysql.com/bug.php?id=45205
1050 --with-low-memory \ 1054 --with-low-memory \
1051 --with-client-ldflags=-lstdc++ \ 1055 --with-client-ldflags=-lstdc++ \
1052 --enable-thread-safe-client \ 1056 --enable-thread-safe-client \
1053 --with-comment="Gentoo Linux ${PF}" \ 1057 --with-comment="Gentoo Linux ${PF}" \
1054 --without-docs \ 1058 --without-docs \
1059 --with-LIBDIR="$(get_libdir)" \
1055 ${myconf} || die "econf failed" 1060 ${myconf} || die "econf failed"
1056 1061
1057 # TODO: Move this before autoreconf !!! 1062 # TODO: Move this before autoreconf !!!
1058 find . -type f -name Makefile -print0 \ 1063 find . -type f -name Makefile -print0 \
1059 | xargs -0 -n100 sed -i \ 1064 | xargs -0 -n100 sed -i \
1168 done 1173 done
1169 fi 1174 fi
1170 1175
1171 # Docs 1176 # Docs
1172 einfo "Installing docs" 1177 einfo "Installing docs"
1173 dodoc README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE 1178 for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do
1179 [[ -f "$i" ]] && dodoc "$i"
1180 done
1174 doinfo "${S}"/Docs/mysql.info 1181 doinfo "${S}"/Docs/mysql.info
1175 1182
1176 # Minimal builds don't have the MySQL server 1183 # Minimal builds don't have the MySQL server
1177 if ! use minimal ; then 1184 if ! use minimal ; then
1178 einfo "Including support files and sample configurations" 1185 einfo "Including support files and sample configurations"

Legend:
Removed from v.1.157  
changed lines
  Added in v.1.165

  ViewVC Help
Powered by ViewVC 1.1.20