From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OmbOJ-0002Vh-OA for garchives@archives.gentoo.org; Fri, 20 Aug 2010 23:52:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECC08E09A1; Fri, 20 Aug 2010 23:52:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A606FE09A1 for ; Fri, 20 Aug 2010 23:52:53 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E9DFD1B4021 for ; Fri, 20 Aug 2010 23:52:52 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 544) id 8A37A2004C; Fri, 20 Aug 2010 23:52:51 +0000 (UTC) From: "Robin H. Johnson (robbat2)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, robbat2@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: mysql.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: mysql.eclass X-VCS-Directories: eclass X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson Content-Type: text/plain; charset=utf8 Message-Id: <20100820235251.8A37A2004C@flycatcher.gentoo.org> Date: Fri, 20 Aug 2010 23:52:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4178b7b0-823f-45b7-87d3-074550f3fafc X-Archives-Hash: c091cd8d372a7024cc1927cb692e63c8 robbat2 10/08/20 23:52:51 Modified: mysql.eclass Log: Add MySQL-cluster support to the eclass. Ebuild not moving from overlay= quite yet however. Revision Changes Path 1.149 eclass/mysql.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclas= s?rev=3D1.149&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclas= s?rev=3D1.149&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclas= s?r1=3D1.148&r2=3D1.149 Index: mysql.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v retrieving revision 1.148 retrieving revision 1.149 diff -p -w -b -B -u -u -r1.148 -r1.149 --- mysql.eclass 9 Aug 2010 19:29:49 -0000 1.148 +++ mysql.eclass 20 Aug 2010 23:52:51 -0000 1.149 @@ -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/0= 9 19:29:49 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.149 2010/08/2= 0 23:52:51 robbat2 Exp $ =20 # @ECLASS: mysql.eclass # @MAINTAINER: @@ -61,6 +61,14 @@ esac # mysql_upgrade. MYSQL_PV_MAJOR=3D"$(get_version_component_range 1-2 ${PV})" =20 +# Cluster is a special case... +if [[ "${PN}" =3D=3D "mysql-cluster" ]]; then + case $PV in + 6.1*|7.0*|7.1*) MYSQL_PV_MAJOR=3D5.1 ;; + esac +fi + + # @ECLASS-VARIABLE: MYSQL_VERSION_ID # @DESCRIPTION: # MYSQL_VERSION_ID will be: @@ -97,7 +105,9 @@ elif [ "${PV#5.4}" !=3D "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=3D1 elif [ "${PV#5.5}" !=3D "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=3D1 -elif [ "${PV#6.0}" !=3D "${PV}" ] ; then +elif [ "${PV#6}" !=3D "${PV}" ] ; then + MYSQL_COMMUNITY_FEATURES=3D1 +elif [ "${PV#7}" !=3D "${PV}" ] ; then MYSQL_COMMUNITY_FEATURES=3D1 else MYSQL_COMMUNITY_FEATURES=3D0 @@ -126,7 +136,7 @@ DEPEND=3D"ssl? ( >=3Ddev-libs/openssl-0.9.6d && DEPEND=3D"${DEPEND} libevent? ( >=3Ddev-libs/libevent-1.4 )" =20 # 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}" =3D=3D ${PN} ]] || DEPEND=3D"${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-x= 86/${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}" =3D=3D "1" ]; then + # The community and cluster builds are on the mirrors + elif [[ "${MYSQL_COMMUNITY_FEATURES}" =3D=3D "1" || ${PN} =3D=3D "mysql= -cluster" ]] ; then if [[ "${PN}" =3D=3D "mysql-cluster" ]] ; then URI_DIR=3D"MySQL-Cluster" URI_FILE=3D"mysql-cluster-gpl" @@ -206,8 +216,12 @@ IUSE=3D"big-tables debug embedded minimal=20 mysql_version_is_at_least "4.1" \ && IUSE=3D"${IUSE} latin1" =20 -mysql_version_is_at_least "4.1.3" \ -&& IUSE=3D"${IUSE} cluster extraengine" +if mysql_version_is_at_least "4.1.3" ; then + IUSE=3D"${IUSE} extraengine" + if [[ "${PN}" !=3D "mysql-cluster" ]] ; then + IUSE=3D"${IUSE} cluster" + fi +fi =20 mysql_version_is_at_least "5.0" \ || IUSE=3D"${IUSE} raid" @@ -438,7 +452,7 @@ configure_common() { else myconf=3D"${myconf} --without-debug" mysql_version_is_at_least "4.1.3" \ - && use cluster \ + && ( use cluster || [[ "${PN}" =3D=3D "mysql-cluster" ]] ) \ && myconf=3D"${myconf} --without-ndb-debug" fi =20 @@ -505,8 +519,10 @@ configure_40_41_50() { =20 if mysql_version_is_at_least "4.1.3" ; then myconf=3D"${myconf} --with-geometry" + if [[ "${PN}" !=3D "mysql-cluster" ]] ; then myconf=3D"${myconf} $(use_with cluster ndbcluster)" fi + fi =20 if mysql_version_is_at_least "4.1.3" && use extraengine ; then # http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html @@ -626,7 +642,7 @@ configure_51() { done =20 # like configuration=3Dmax-no-ndb - if use cluster ; then + if ( use cluster || [[ "${PN}" =3D=3D "mysql-cluster" ]] ) ; then plugins_sta=3D"${plugins_sta} ndbcluster partition" plugins_dis=3D"${plugins_dis//partition}" myconf=3D"${myconf} --with-ndb-binlog" @@ -824,9 +840,12 @@ mysql_src_prepare() { i=3D"${S}"/storage/innodb_plugin/plug.in=09 [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" =20 - # Additional checks, remove bundled zlib + # Additional checks, remove bundled zlib (Cluster needs this, for stati= c + # memory management in zlib, leave available for Cluster) + if [[ "${PN}" !=3D "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" =20 # 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=3D"--(skip-)?${opt}" optfull=3D"--skip-${opt}" egrep -sq -- "${optexp}" "${helpfile}" && options=3D"${options} ${optf= ull}"