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

Diff of /eclass/mysql.eclass

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

Revision 1.119 Revision 1.123
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/Attic/mysql.eclass,v 1.119 2009/12/09 18:45:46 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.123 2009/12/10 01:27:59 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>
89 MYSQL_COMMUNITY_FEATURES=1 89 MYSQL_COMMUNITY_FEATURES=1
90else 90else
91 MYSQL_COMMUNITY_FEATURES=0 91 MYSQL_COMMUNITY_FEATURES=0
92fi 92fi
93 93
94# @ECLASS-VARIABLE: XTRADB_VER
95# @DESCRIPTION:
96# Version of the XTRADB storage engine
97XTRADB_VER="${XTRADB_VER}"
98
99# @ECLASS-VARIABLE: PERCONA_VER
100# @DESCRIPTION:
101# Designation by PERCONA for a MySQL version to apply an XTRADB release
102PERCONA_VER="${PERCONA_VER}"
103
94# Be warned, *DEPEND are version-dependant 104# Be warned, *DEPEND are version-dependant
95# These are used for both runtime and compiletime 105# These are used for both runtime and compiletime
96DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) 106DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
97 userland_GNU? ( sys-process/procps ) 107 userland_GNU? ( sys-process/procps )
98 >=sys-apps/sed-4 108 >=sys-apps/sed-4
136fi 146fi
137 147
138# Define correct SRC_URIs 148# Define correct SRC_URIs
139SRC_URI="${SERVER_URI}" 149SRC_URI="${SERVER_URI}"
140 150
141[[ ${MY_EXTRAS_VER} != live ]] && SRC_URI="${SRC_URI} 151# Gentoo patches to MySQL
152[[ ${MY_EXTRAS_VER} != live ]] \
153&& SRC_URI="${SRC_URI}
142 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 154 mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
143 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" 155 http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
156
157# PBXT engine
144mysql_version_is_at_least "5.1.12" \ 158mysql_version_is_at_least "5.1.12" \
145&& [[ -n "${PBXT_VERSION}" ]] \ 159&& [[ -n "${PBXT_VERSION}" ]] \
146&& SRC_URI="${SRC_URI} pbxt? ( mirror://sourceforge/pbxt/pbxt-${PBXT_VERSION}.tar.gz )" 160&& PBXT_P="pbxt-${PBXT_VERSION}" \
161&& PBXT_SRC_URI="mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
162&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
163
164# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
165mysql_version_is_at_least "5.1.26" \
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" \
169&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI} )"
147 170
148DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 171DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
149HOMEPAGE="http://www.mysql.com/" 172HOMEPAGE="http://www.mysql.com/"
150LICENSE="GPL-2" 173LICENSE="GPL-2"
151SLOT="0" 174SLOT="0"
165 188
166mysql_version_is_at_least "5.1" \ 189mysql_version_is_at_least "5.1" \
167|| IUSE="${IUSE} berkdb" 190|| IUSE="${IUSE} berkdb"
168 191
169mysql_version_is_at_least "5.1.12" \ 192mysql_version_is_at_least "5.1.12" \
193&& [[ -n "${PBXT_VERSION}" ]] \
170&& IUSE="${IUSE} pbxt" 194&& IUSE="${IUSE} pbxt"
195
196mysql_version_is_at_least "5.1.26" \
197&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
198&& IUSE="${IUSE} xtradb"
171 199
172[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ 200[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
173&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling" 201&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling"
174
175 202
176# 203#
177# HELPER FUNCTIONS: 204# HELPER FUNCTIONS:
178# 205#
179 206
579 find . -name 'Makefile.am' \ 606 find . -name 'Makefile.am' \
580 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 607 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
581 608
582 if mysql_version_is_at_least "4.1" ; then 609 if mysql_version_is_at_least "4.1" ; then
583 # 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"
584 find . -name Makefile \ 612 find . -name Makefile \
585 -o -name Makefile.in \ 613 -o -name Makefile.in \
586 -o -name configure \ 614 -o -name configure \
587 -exec rm -f {} \; 615 -exec rm -f {} \;
588 rm -f "ltmain.sh" 616 rm -f "ltmain.sh"
589 rm -f "scripts/mysqlbug" 617 rm -f "scripts/mysqlbug"
590 fi 618 fi
591 619
592 local rebuilddirlist d 620 local rebuilddirlist d
593 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
594 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"
595 rebuilddirlist="." 637 rebuilddirlist="."
596 # TODO: check this with a cmake expert 638 # TODO: check this with a cmake expert
597 cmake \ 639 cmake \
598 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ 640 -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \
599 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ 641 -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \
609 popd &>/dev/null 651 popd &>/dev/null
610 done 652 done
611 653
612 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" \
613 && use berkdb ; then 655 && use berkdb ; then
656 einfo "Fixing up berkdb buildsystem"
614 [[ -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"
615 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" \
616 || die "Could not copy libtool.m4 to bdb/dist/" 659 || die "Could not copy libtool.m4 to bdb/dist/"
617 #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.
618 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then 661 if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.123

  ViewVC Help
Powered by ViewVC 1.1.20