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

Diff of /eclass/mysql.eclass

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

Revision 1.120 Revision 1.124
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.120 2009/12/09 18:46:53 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.124 2010/01/31 03:05:54 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>
146fi 146fi
147 147
148# Define correct SRC_URIs 148# Define correct SRC_URIs
149SRC_URI="${SERVER_URI}" 149SRC_URI="${SERVER_URI}"
150 150
151[[ ${MY_EXTRAS_VER} != live ]] && SRC_URI="${SRC_URI} 151# Gentoo patches to MySQL
152[[ ${MY_EXTRAS_VER} != live ]] \
153&& SRC_URI="${SRC_URI}
152 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 154 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
153 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" 155 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
154PBXT_SRC_URI="mirror://sourceforge/pbxt/pbxt-${PBXT_VERSION}.tar.gz" 156 http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
157
158# PBXT engine
155mysql_version_is_at_least "5.1.12" \ 159mysql_version_is_at_least "5.1.12" \
156&& [[ -n "${PBXT_VERSION}" ]] \ 160&& [[ -n "${PBXT_VERSION}" ]] \
161&& PBXT_P="pbxt-${PBXT_VERSION}" \
162&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
157&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URIPBXT_SRC_URI} )" 163&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
158 164
159# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set 165# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
160XTRADB_SRC_URI="http://www.percona.com/${PN}/xtradb/${PERCONA_VER}/source/percona-xtradb-${XTRADB_VER}.tar.gz"
161mysql_version_is_at_least "5.1.26" \ 166mysql_version_is_at_least "5.1.26" \
162&& [[ -n ${XTRADB_VER} && -n ${PERCONA_VER} ]] \ 167&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
168&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \
169&& XTRADB_SRC_URI="http://www.percona.com/${PN}/xtradb/${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \
163&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI} )" 170&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI} )"
164 171
165DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 172DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
166HOMEPAGE="http://www.mysql.com/" 173HOMEPAGE="http://www.mysql.com/"
167LICENSE="GPL-2" 174LICENSE="GPL-2"
182 189
183mysql_version_is_at_least "5.1" \ 190mysql_version_is_at_least "5.1" \
184|| IUSE="${IUSE} berkdb" 191|| IUSE="${IUSE} berkdb"
185 192
186mysql_version_is_at_least "5.1.12" \ 193mysql_version_is_at_least "5.1.12" \
194&& [[ -n "${PBXT_VERSION}" ]] \
187&& IUSE="${IUSE} pbxt" 195&& IUSE="${IUSE} pbxt"
188 196
189mysql_version_is_at_least "5.1.26" \ 197mysql_version_is_at_least "5.1.26" \
198&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
190&& IUSE="${IUSE} xtradb" 199&& IUSE="${IUSE} xtradb"
191 200
192[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ 201[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
193&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling" 202&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling"
194 203
598 find . -name 'Makefile.am' \ 607 find . -name 'Makefile.am' \
599 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 608 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
600 609
601 if mysql_version_is_at_least "4.1" ; then 610 if mysql_version_is_at_least "4.1" ; then
602 # Remove what needs to be recreated, so we're sure it's actually done 611 # Remove what needs to be recreated, so we're sure it's actually done
612 einfo "Cleaning up old buildscript files"
603 find . -name Makefile \ 613 find . -name Makefile \
604 -o -name Makefile.in \ 614 -o -name Makefile.in \
605 -o -name configure \ 615 -o -name configure \
606 -exec rm -f {} \; 616 -exec rm -f {} \;
607 rm -f "ltmain.sh" 617 rm -f "ltmain.sh"
608 rm -f "scripts/mysqlbug" 618 rm -f "scripts/mysqlbug"
609 fi 619 fi
610 620
611 local rebuilddirlist d 621 local rebuilddirlist d
612 622
623 if mysql_version_is_at_least "5.1.26" && use xtradb ; then
624 einfo "Replacing InnoDB with Percona XtraDB"
625 pushd "${S}"/storage
626 i="innobase"
627 o="${WORKDIR}/storage-${i}.mysql-upstream"
628 # Have we been here already?
629 [ -h "${i}" ] && rm -f "${i}"
630 # Or maybe we haven't
631 [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
632 ln -s "${WORKDIR}/${XTRADB_P}" "${i}"
633 popd
634 fi
635
613 if mysql_version_is_at_least "5.1.12" ; then 636 if mysql_version_is_at_least "5.1.12" ; then
637 einfo "Updating innobase cmake"
614 rebuilddirlist="." 638 rebuilddirlist="."
615 # TODO: check this with a cmake expert 639 # TODO: check this with a cmake expert
616 cmake \ 640 cmake \
617 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ 641 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \
618 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ 642 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \
628 popd &>/dev/null 652 popd &>/dev/null
629 done 653 done
630 654
631 if mysql_check_version_range "4.1 to 5.0.99.99" \ 655 if mysql_check_version_range "4.1 to 5.0.99.99" \
632 && use berkdb ; then 656 && use berkdb ; then
657 einfo "Fixing up berkdb buildsystem"
633 [[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh" 658 [[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh"
634 cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \ 659 cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \
635 || die "Could not copy libtool.m4 to bdb/dist/" 660 || die "Could not copy libtool.m4 to bdb/dist/"
636 #These files exist only with libtool-2*, and need to be included. 661 #These files exist only with libtool-2*, and need to be included.
637 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then 662 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.124

  ViewVC Help
Powered by ViewVC 1.1.20