diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-08-20 23:52:51 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-08-20 23:52:51 +0000 |
commit | 9b06d3932d2f1739eda7266e4656551f6dce0706 (patch) | |
tree | 61f7385a5de08334274aa486cd37580786858b6f /eclass/mysql.eclass | |
parent | New snapshot. I wanted to unmask this version, but first it needs some testin... (diff) | |
download | historical-9b06d3932d2f1739eda7266e4656551f6dce0706.tar.gz historical-9b06d3932d2f1739eda7266e4656551f6dce0706.tar.bz2 historical-9b06d3932d2f1739eda7266e4656551f6dce0706.zip |
Add MySQL-cluster support to the eclass. Ebuild not moving from overlay quite yet however.
Diffstat (limited to 'eclass/mysql.eclass')
-rw-r--r-- | eclass/mysql.eclass | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/eclass/mysql.eclass b/eclass/mysql.eclass index 7332ecd2f386..1d484d7efa41 100644 --- a/eclass/mysql.eclass +++ b/eclass/mysql.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.148 2010/08/09 19:29:49 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.149 2010/08/20 23:52:51 robbat2 Exp $ # @ECLASS: mysql.eclass # @MAINTAINER: @@ -61,6 +61,14 @@ esac # mysql_upgrade. MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" +# Cluster is a special case... +if [[ "${PN}" == "mysql-cluster" ]]; then + case $PV in + 6.1*|7.0*|7.1*) MYSQL_PV_MAJOR=5.1 ;; + esac +fi + + # @ECLASS-VARIABLE: MYSQL_VERSION_ID # @DESCRIPTION: # MYSQL_VERSION_ID will be: @@ -97,7 +105,9 @@ elif [ "${PV#5.4}" != "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=1 elif [ "${PV#5.5}" != "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#6.0}" != "${PV}" ] ; then +elif [ "${PV#6}" != "${PV}" ] ; then + MYSQL_COMMUNITY_FEATURES=1 +elif [ "${PV#7}" != "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=1 else MYSQL_COMMUNITY_FEATURES=0 @@ -126,7 +136,7 @@ DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) && DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" # Having different flavours at the same time is not a good idea -for i in "mysql" "mysql-community" "mariadb" ; do +for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do [[ "${i}" == ${PN} ]] || DEPEND="${DEPEND} !dev-db/${i}" done @@ -160,8 +170,8 @@ if [ -z "${SERVER_URI}" ]; then http://maria.llarian.net/download/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/${MARIA_FULL_P}.tar.gz " - # The community build is on the mirrors - elif [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then + # The community and cluster builds are on the mirrors + elif [[ "${MYSQL_COMMUNITY_FEATURES}" == "1" || ${PN} == "mysql-cluster" ]] ; then if [[ "${PN}" == "mysql-cluster" ]] ; then URI_DIR="MySQL-Cluster" URI_FILE="mysql-cluster-gpl" @@ -206,8 +216,12 @@ IUSE="big-tables debug embedded minimal ${IUSE_DEFAULT_ON}perl selinux ssl stati mysql_version_is_at_least "4.1" \ && IUSE="${IUSE} latin1" -mysql_version_is_at_least "4.1.3" \ -&& IUSE="${IUSE} cluster extraengine" +if mysql_version_is_at_least "4.1.3" ; then + IUSE="${IUSE} extraengine" + if [[ "${PN}" != "mysql-cluster" ]] ; then + IUSE="${IUSE} cluster" + fi +fi mysql_version_is_at_least "5.0" \ || IUSE="${IUSE} raid" @@ -438,7 +452,7 @@ configure_common() { else myconf="${myconf} --without-debug" mysql_version_is_at_least "4.1.3" \ - && use cluster \ + && ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) \ && myconf="${myconf} --without-ndb-debug" fi @@ -505,7 +519,9 @@ configure_40_41_50() { if mysql_version_is_at_least "4.1.3" ; then myconf="${myconf} --with-geometry" - myconf="${myconf} $(use_with cluster ndbcluster)" + if [[ "${PN}" != "mysql-cluster" ]] ; then + myconf="${myconf} $(use_with cluster ndbcluster)" + fi fi if mysql_version_is_at_least "4.1.3" && use extraengine ; then @@ -626,7 +642,7 @@ configure_51() { done # like configuration=max-no-ndb - if use cluster ; then + if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) ; then plugins_sta="${plugins_sta} ndbcluster partition" plugins_dis="${plugins_dis//partition}" myconf="${myconf} --with-ndb-binlog" @@ -824,9 +840,12 @@ mysql_src_prepare() { i="${S}"/storage/innodb_plugin/plug.in [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" - # Additional checks, remove bundled zlib - rm -f "${S}/zlib/"*.[ch] - sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" + # Additional checks, remove bundled zlib (Cluster needs this, for static + # memory management in zlib, leave available for Cluster) + if [[ "${PN}" != "mysql-cluster" ]] ; then + rm -f "${S}/zlib/"*.[ch] + sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" + fi rm -f "scripts/mysqlbug" # Make charsets install in the right place @@ -1282,6 +1301,7 @@ mysql_pkg_config() { ${ROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null for opt in grant-tables host-cache name-resolve networking slave-start bdb \ federated innodb ssl log-bin relay-log slow-query-log external-locking \ + ndbcluster \ ; do optexp="--(skip-)?${opt}" optfull="--skip-${opt}" egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" |