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

Diff of /eclass/mysql.eclass

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

Revision 1.121 Revision 1.122
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.121 2009/12/09 18:54:05 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.122 2009/12/09 19:17:49 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
157# PBXT engine
155mysql_version_is_at_least "5.1.12" \ 158mysql_version_is_at_least "5.1.12" \
156&& [[ -n "${PBXT_VERSION}" ]] \ 159&& [[ -n "${PBXT_VERSION}" ]] \
160&& PBXT_P="pbxt-${PBXT_VERSION}" \
161&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
157&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URIPBXT_SRC_URI} )" 162&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URIPBXT_SRC_URI} )"
158 163
159# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set 164# 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" \ 165mysql_version_is_at_least "5.1.26" \
162&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \ 166&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
167&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \
168&& 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} )" 169&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI} )"
164 170
165DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 171DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
166HOMEPAGE="http://www.mysql.com/" 172HOMEPAGE="http://www.mysql.com/"
167LICENSE="GPL-2" 173LICENSE="GPL-2"
600 find . -name 'Makefile.am' \ 606 find . -name 'Makefile.am' \
601 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 607 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
602 608
603 if mysql_version_is_at_least "4.1" ; then 609 if mysql_version_is_at_least "4.1" ; then
604 # Remove what needs to be recreated, so we're sure it's actually done 610 # Remove what needs to be recreated, so we're sure it's actually done
611 einfo "Cleaning up old buildscript files"
605 find . -name Makefile \ 612 find . -name Makefile \
606 -o -name Makefile.in \ 613 -o -name Makefile.in \
607 -o -name configure \ 614 -o -name configure \
608 -exec rm -f {} \; 615 -exec rm -f {} \;
609 rm -f "ltmain.sh" 616 rm -f "ltmain.sh"
610 rm -f "scripts/mysqlbug" 617 rm -f "scripts/mysqlbug"
611 fi 618 fi
612 619
613 local rebuilddirlist d 620 local rebuilddirlist d
614 621
622 if mysql_version_is_at_least "5.1.26" && use xtradb ; then
623 einfo "Replacing InnoDB with Percona XtraDB"
624 pushd "${S}"/storage
625 i="innobase"
626 o="${WORKDIR}/storage-${i}.mysql-upstream"
627 # Have we been here already?
628 [ -h "${i}" ] && rm -f "${i}"
629 # Or maybe we haven't
630 [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
631 ln -s "${WORKDIR}/${XTRADB_P}" "${i}"
632 popd
633 fi
634
615 if mysql_version_is_at_least "5.1.12" ; then 635 if mysql_version_is_at_least "5.1.12" ; then
636 einfo "Updating innobase cmake"
616 rebuilddirlist="." 637 rebuilddirlist="."
617 # TODO: check this with a cmake expert 638 # TODO: check this with a cmake expert
618 cmake \ 639 cmake \
619 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ 640 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \
620 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ 641 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \
630 popd &>/dev/null 651 popd &>/dev/null
631 done 652 done
632 653
633 if mysql_check_version_range "4.1 to 5.0.99.99" \ 654 if mysql_check_version_range "4.1 to 5.0.99.99" \
634 && use berkdb ; then 655 && use berkdb ; then
656 einfo "Fixing up berkdb buildsystem"
635 [[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh" 657 [[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh"
636 cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \ 658 cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \
637 || die "Could not copy libtool.m4 to bdb/dist/" 659 || die "Could not copy libtool.m4 to bdb/dist/"
638 #These files exist only with libtool-2*, and need to be included. 660 #These files exist only with libtool-2*, and need to be included.
639 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then 661 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122

  ViewVC Help
Powered by ViewVC 1.1.20