diff options
Diffstat (limited to 'eclass/mysql-cmake.eclass')
-rw-r--r-- | eclass/mysql-cmake.eclass | 60 |
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 |