summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-11-01 23:57:50 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-11-01 23:57:50 +0000
commit58c9ad36bc88226045691deba1cfef3b5e0dd992 (patch)
tree828ffec962c82b4028e5b521dcb197398a14ab34 /eclass/mysql-cmake.eclass
parentpackage.use.mask tcmalloc/jemalloc/systemtap for MySQL on arches that are lag... (diff)
downloadhistorical-58c9ad36bc88226045691deba1cfef3b5e0dd992.tar.gz
historical-58c9ad36bc88226045691deba1cfef3b5e0dd992.tar.bz2
historical-58c9ad36bc88226045691deba1cfef3b5e0dd992.zip
Bring in MySQL overlay eclass changes for tcmalloc, jemalloc, systemtap, readline gplv3 and pbxt static build.
Diffstat (limited to 'eclass/mysql-cmake.eclass')
-rw-r--r--eclass/mysql-cmake.eclass60
1 files changed, 51 insertions, 9 deletions
diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass
index c06dccb95881..f634c7fd9585 100644
--- a/eclass/mysql-cmake.eclass
+++ b/eclass/mysql-cmake.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-cmake.eclass,v 1.9 2012/06/07 22:06:04 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.10 2012/11/01 23:57:50 robbat2 Exp $
# @ECLASS: mysql-cmake.eclass
# @MAINTAINER:
@@ -26,28 +26,43 @@ inherit cmake-utils flag-o-matic multilib
# Helper function to disable specific tests.
mysql-cmake_disable_test() {
- local rawtestname testname testsuite reason mysql_disable_file
+ local rawtestname testname testsuite reason mysql_disabled_file mysql_disabled_dir
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
testsuite="${rawtestname/.*}"
testname="${rawtestname/*.}"
- mysql_disable_file="${S}/mysql-test/t/disabled.def"
+ for mysql_disabled_file in \
+ ${S}/mysql-test/disabled.def \
+ ${S}/mysql-test/t/disabled.def ; do
+ [ -f "${mysql_disabled_file}" ] && break
+ done
+ #mysql_disabled_file="${S}/mysql-test/t/disabled.def"
#einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
- echo ${testname} : ${reason} >> "${mysql_disable_file}"
+ echo ${testname} : ${reason} >> "${mysql_disabled_file}"
- if [ -n "${testsuite}" ]; then
- for mysql_disable_file in \
+ if [ -n "${testsuite}" ] && [ "${testsuite}" != "main" ]; then
+ for mysql_disabled_file in \
${S}/mysql-test/suite/${testsuite}/disabled.def \
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
FAILED ; do
- [ -f "${mysql_disable_file}" ] && break
+ [ -f "${mysql_disabled_file}" ] && break
done
if [ "${mysql_disabled_file}" != "FAILED" ]; then
- echo "${testname} : ${reason}" >> "${mysql_disable_file}"
+ echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
else
- ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
+ for mysql_disabled_dir in \
+ ${S}/mysql-test/suite/${testsuite} \
+ ${S}/mysql-test/suite/${testsuite}/t \
+ FAILED ; do
+ [ -d "${mysql_disabled_dir}" ] && break
+ done
+ if [ "${mysql_disabled_dir}" != "FAILED" ]; then
+ echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
+ else
+ ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
+ fi
fi
fi
}
@@ -137,6 +152,14 @@ configure_cmake_standard() {
mycmakeargs+=( -DWITH_SSL=0 )
fi
+ if mysql_version_is_at_least "5.5" && use jemalloc; then
+ mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ if mysql_version_is_at_least "5.5" && use tcmalloc; then
+ mycmakeargs+=( -DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc' -DWITH_SAFEMALLOC=OFF )
+ fi
+
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
@@ -149,6 +172,18 @@ configure_cmake_standard() {
-DWITH_PARTITION_STORAGE_ENGINE=1
$(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE)
)
+
+ if pbxt_available ; then
+ mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
+ fi
+
+ if [ "${PN}" == "mariadb" ]; then
+ mycmakeargs+=(
+ $(cmake-utils_use_with oqgraph OQGRAPH_STORAGE_ENGINE)
+ $(cmake-utils_use_with sphinx SPHINX_STORAGE_ENGINE)
+ $(cmake-utils_use_with extraengine FEDERATEDX_STORAGE_ENGINE)
+ )
+ fi
}
#
@@ -213,6 +248,13 @@ mysql-cmake_src_configure() {
-DWITHOUT_UNIT_TESTS=1
)
+ # Bug 412851
+ # MariaDB requires this flag to compile with GPLv3 readline linked
+ # Adds a warning about redistribution to configure
+ if [[ "${PN}" == "mariadb" ]] ; then
+ mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 )
+ fi
+
configure_cmake_locale
if use minimal ; then