summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-04-18 02:08:34 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-04-18 02:08:34 +0000
commit338f4c4e7d9072b9ded7b93089eb9ce18138d224 (patch)
treeed824a4c253b1dacb8c29b4c4d580ad3c627853c /eclass/mysql-v2.eclass
parentBased on 3.3.2 + genpatches-3.3-3 + grsecurity-2.9-3.3.2-201204131715 (diff)
downloadgentoo-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/mysql-v2.eclass')
-rw-r--r--eclass/mysql-v2.eclass77
1 files changed, 16 insertions, 61 deletions
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
}