diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-04-18 02:08:34 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-04-18 02:08:34 +0000 |
commit | 338f4c4e7d9072b9ded7b93089eb9ce18138d224 (patch) | |
tree | ed824a4c253b1dacb8c29b4c4d580ad3c627853c /eclass | |
parent | Based on 3.3.2 + genpatches-3.3-3 + grsecurity-2.9-3.3.2-201204131715 (diff) | |
download | gentoo-2-338f4c4e7d9072b9ded7b93089eb9ce18138d224.tar.gz gentoo-2-338f4c4e7d9072b9ded7b93089eb9ce18138d224.tar.bz2 gentoo-2-338f4c4e7d9072b9ded7b93089eb9ce18138d224.zip |
Port changes from MySQL overlay. Drops old mysql-community, mysql-cluster. Fixes build of new PBXT, MariaDB and other bits.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mysql-autotools.eclass | 35 | ||||
-rw-r--r-- | eclass/mysql-v2.eclass | 77 |
2 files changed, 31 insertions, 81 deletions
diff --git a/eclass/mysql-autotools.eclass b/eclass/mysql-autotools.eclass index c6c2de44bce2..297a66e781bc 100644 --- a/eclass/mysql-autotools.eclass +++ b/eclass/mysql-autotools.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.5 2012/01/09 10:42:19 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.6 2012/04/18 02:08:34 robbat2 Exp $ # @ECLASS: mysql-autotools.eclass # @MAINTAINER: @@ -123,7 +123,7 @@ mysql-autotools_configure_common() { myconf="${myconf} --with-debug=full" else myconf="${myconf} --without-debug" - if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ); then + if ( use cluster ); then myconf="${myconf} --without-ndb-debug" fi fi @@ -172,13 +172,11 @@ mysql-autotools_configure_51() { # user's data is not accessible. use max-idx-128 && die "Bug #336027: upstream has a corruption issue with max-idx-128 presently" #use max-idx-128 && myconf="${myconf} --with-max-indexes=128" - if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then - myconf="${myconf} $(use_enable community community-features)" - if use community; then - myconf="${myconf} $(use_enable profiling)" - else - myconf="${myconf} --disable-profiling" - fi + myconf="${myconf} $(use_enable community community-features)" + if use community; then + myconf="${myconf} $(use_enable profiling)" + else + myconf="${myconf} --disable-profiling" fi # Scan for all available plugins @@ -219,11 +217,11 @@ mysql-autotools_configure_51() { if [[ "${PN}" != "mariadb" ]] ; then elog "Before using the Federated storage engine, please be sure to read" elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" - plugins_dyn="${plugins_sta} federatedx" + plugins_dyn="${plugins_dyn} federated" else elog "MariaDB includes the FederatedX engine. Be sure to read" elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" - plugins_dyn="${plugins_sta} federated" + plugins_dyn="${plugins_dyn} federatedx" fi else plugins_dis="${plugins_dis} partition federated" @@ -240,7 +238,7 @@ mysql-autotools_configure_51() { done # like configuration=max-no-ndb - if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) ; then + if ( use cluster ) ; then plugins_sta="${plugins_sta} ndbcluster partition" plugins_dis="${plugins_dis//partition}" myconf="${myconf} --with-ndb-binlog" @@ -289,7 +287,7 @@ mysql-autotools_configure_51() { if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then use pbxt \ - && plugins_dyn="${plugins_dyn} pbxt" \ + && plugins_sta="${plugins_sta} pbxt" \ || plugins_dis="${plugins_dis} pbxt" fi @@ -366,12 +364,9 @@ mysql-autotools_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 (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 + # Additional checks, remove bundled zlib + rm -f "${S}/zlib/"*.[ch] + sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" rm -f "scripts/mysqlbug" # Make charsets install in the right place @@ -402,7 +397,7 @@ mysql-autotools_src_prepare() { popd >/dev/null fi - if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then + if pbxt_available && [[ "${PBXT_NEWSTYLE}" != "1" ]] && use pbxt ; then einfo "Adding storage engine: PBXT" pushd "${S}"/storage >/dev/null i='pbxt' diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index fa5c7e3815f2..634d5341a023 100644 --- a/eclass/mysql-v2.eclass +++ b/eclass/mysql-v2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.14 2012/01/09 10:42:19 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.15 2012/04/18 02:08:34 robbat2 Exp $ # @ECLASS: mysql-v2.eclass # @MAINTAINER: @@ -80,14 +80,6 @@ fi # 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: @@ -110,23 +102,6 @@ MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} # This eclass should only be used with at least mysql-5.1.50 mysql_version_is_at_least "5.1.50" || die "This eclass should only be used with >=mysql-5.1.50" -# @ECLASS-VARIABLE: MYSQL_COMMUNITY_FEATURES -# @DESCRIPTION: -# Specifiy if community features are available. Possible values are 1 (yes) -# and 0 (no). -# Community features are available in mysql-community -# AND in the re-merged mysql-5.0.82 and newer -if [ "${PN}" == "mysql-community" -o "${PN}" == "mariadb" ]; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${MYSQL_PV_MAJOR}" == "5.1" ]; then - MYSQL_COMMUNITY_FEATURES=1 -elif mysql_version_is_at_least "5.4.0"; then - MYSQL_COMMUNITY_FEATURES=1 -else - MYSQL_COMMUNITY_FEATURES=0 -fi - - # @ECLASS-VARIABLE: XTRADB_VER # @DEFAULT_UNSET # @DESCRIPTION: @@ -141,7 +116,7 @@ fi if [ -z "${SERVER_URI}" ]; then [ -z "${MY_PV}" ] && MY_PV="${PV//_/-}" if [ "${PN}" == "mariadb" ]; then - MARIA_FULL_PV="$(replace_version_separator 3 '-' ${PV})" + MARIA_FULL_PV="$(replace_version_separator 3 '-' ${MY_PV})" MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" SERVER_URI=" http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz @@ -151,23 +126,14 @@ if [ -z "${SERVER_URI}" ]; then http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz " - # 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" - else - URI_DIR="MySQL" - URI_FILE="mysql" - fi + else + URI_DIR="MySQL" + URI_FILE="mysql" URI_A="${URI_FILE}-${MY_PV}.tar.gz" MIRROR_PV=$(get_version_component_range 1-2 ${PV}) # Recently upstream switched to an archive site, and not on mirrors SERVER_URI="http://downloads.mysql.com/archives/${URI_FILE}-${MIRROR_PV}/${URI_A} mirror://mysql/Downloads/${URI_DIR}-${PV%.*}/${URI_A}" - # The (old) enterprise source is on the primary site only - elif [ "${PN}" == "mysql" ]; then - SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${MY_PV}.tar.gz" fi fi @@ -188,9 +154,6 @@ if [[ "${PN}" == "mariadb" ]]; then HOMEPAGE="http://mariadb.org/" DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged." fi -if [[ "${PN}" == "mysql-community" ]]; then - DESCRIPTION="${DESCRIPTION} (obsolete, move to dev-db/mysql)" -fi LICENSE="GPL-2" SLOT="0" @@ -206,15 +169,11 @@ esac IUSE="${IUSE} latin1" IUSE="${IUSE} extraengine" -if [[ ${PN} != "mysql-cluster" ]] ; then - IUSE="${IUSE} cluster" -fi +IUSE="${IUSE} cluster" IUSE="${IUSE} max-idx-128" IUSE="${IUSE} berkdb" - -[[ ${MYSQL_COMMUNITY_FEATURES} == 1 ]] \ -&& IUSE="${IUSE} +community profiling" +IUSE="${IUSE} +community profiling" [[ ${PN} == "mariadb" ]] \ && IUSE="${IUSE} libevent" @@ -249,7 +208,7 @@ DEPEND=" && 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" "mysql-cluster" "mariadb" ; do +for i in "mysql" "mariadb" ; do [[ ${i} == ${PN} ]] || DEPEND="${DEPEND} !dev-db/${i}" done @@ -290,7 +249,6 @@ PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" # For other stuff to bring us in PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}" - # # External patches # @@ -326,13 +284,14 @@ if pbxt_patch_available; then PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" - # PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins - # vs. built outside the dir - if pbxt_available; then +fi + +# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins +# vs. built outside the dir +if pbxt_available; then - IUSE="${IUSE} pbxt" - PBXT_NEWSTYLE=1 - fi + IUSE="${IUSE} pbxt" + PBXT_NEWSTYLE=1 fi if xtradb_patch_available; then @@ -425,14 +384,10 @@ mysql-v2_pkg_setup() { enewgroup mysql 60 || die "problem adding 'mysql' group" enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" - if [ "${PN}" != "mysql-cluster" ] && use cluster; then + if use cluster; then ewarn "Upstream has noted that the NDB cluster support in the 5.0 and" ewarn "5.1 series should NOT be put into production. In the near" ewarn "future, it will be disabled from building." - ewarn "" - ewarn "If you need NDB support, you should instead move to the new" - ewarn "mysql-cluster package that represents that upstream NDB" - ewarn "development." fi } |