diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-11-01 23:57:50 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-11-01 23:57:50 +0000 |
commit | afbf5f59ad87a66c0dc84bd35b302f78b4ddff12 (patch) | |
tree | 4ca1caa117530b54d396aa69f27bdd1b4bda1f90 /eclass | |
parent | package.use.mask tcmalloc/jemalloc/systemtap for MySQL on arches that are lag... (diff) | |
download | gentoo-2-afbf5f59ad87a66c0dc84bd35b302f78b4ddff12.tar.gz gentoo-2-afbf5f59ad87a66c0dc84bd35b302f78b4ddff12.tar.bz2 gentoo-2-afbf5f59ad87a66c0dc84bd35b302f78b4ddff12.zip |
Bring in MySQL overlay eclass changes for tcmalloc, jemalloc, systemtap, readline gplv3 and pbxt static build.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 7 | ||||
-rw-r--r-- | eclass/mysql-autotools.eclass | 10 | ||||
-rw-r--r-- | eclass/mysql-cmake.eclass | 60 | ||||
-rw-r--r-- | eclass/mysql-v2.eclass | 26 |
4 files changed, 85 insertions, 18 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 54fe8aa446e9..1a9e5a0c11e0 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.497 2012/11/01 21:49:34 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.498 2012/11/01 23:57:50 robbat2 Exp $ + + 01 Nov 2012; Robin H. Johnson <robbat2@gentoo.org> mysql-autotools.eclass, + mysql-cmake.eclass, mysql-v2.eclass: + Bring in MySQL overlay eclass changes for tcmalloc, jemalloc, systemtap, + readline gplv3 and pbxt static build. 01 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass: Minor documentation improvements. diff --git a/eclass/mysql-autotools.eclass b/eclass/mysql-autotools.eclass index 19054e50b323..f3aa85e298b3 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.9 2012/06/07 22:06:04 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.10 2012/11/01 23:57:50 robbat2 Exp $ # @ECLASS: mysql-autotools.eclass # @MAINTAINER: @@ -96,6 +96,12 @@ mysql-autotools_configure_minimal() { myconf="${myconf} --with-charset=latin1" myconf="${myconf} --with-collation=latin1_swedish_ci" fi + + # MariaDB requires this flag in order to link to GPLv3 readline v6 or greater + # A note is added to the configure output + if [[ "${PN}" == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then + myconf="${myconf} --disable-distribution" + fi } # @FUNCTION: mysql-autotools_configure_common @@ -397,7 +403,7 @@ mysql-autotools_src_prepare() { popd >/dev/null fi - if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then + if pbxt_patch_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then einfo "Adding storage engine: PBXT" pushd "${S}"/storage >/dev/null i='pbxt' 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 diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index f98c5dba971b..ac20d17f9633 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.20 2012/11/01 20:22:57 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.21 2012/11/01 23:57:50 robbat2 Exp $ # @ECLASS: mysql-v2.eclass # @MAINTAINER: @@ -176,6 +176,7 @@ IUSE="${IUSE} berkdb" IUSE="${IUSE} +community profiling" [[ ${PN} == "mariadb" ]] \ +&& mysql_check_version_range "5.1.38 to 5.3.99" \ && IUSE="${IUSE} libevent" [[ ${PN} == "mariadb" ]] \ @@ -186,6 +187,11 @@ IUSE="${IUSE} +community profiling" && mysql_version_is_at_least "5.2.5" \ && IUSE="${IUSE} sphinx" +if mysql_version_is_at_least "5.5"; then + REQUIRED_USE="tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )" + IUSE="${IUSE} jemalloc tcmalloc" +fi + mysql_version_is_at_least "5.5.7" \ && IUSE="${IUSE} systemtap" @@ -205,6 +211,7 @@ DEPEND=" " [[ ${PN} == mariadb ]] \ +&& mysql_check_version_range "5.1.38 to 5.3.99" \ && DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" # Having different flavours at the same time is not a good idea @@ -241,7 +248,14 @@ mysql_version_is_at_least "5.5.8" \ && DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )" mysql_version_is_at_least "5.5.7" \ -&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )" +&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )" \ +&& DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio )" + +mysql_version_is_at_least "5.5" \ +&& DEPEND="${DEPEND} jemalloc? ( dev-libs/jemalloc )" + +mysql_version_is_at_least "5.5" \ +&& DEPEND="${DEPEND} tcmalloc? ( dev-util/google-perftools )" # dev-perl/DBD-mysql is needed by some scripts installed by MySQL PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" @@ -495,10 +509,10 @@ mysql-v2_pkg_postinst() { fi if pbxt_available && use pbxt ; then - # TODO: explain it better - elog " mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';" - elog " mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;" - elog "if, after that, you cannot start the MySQL server," + elog "Note: PBXT is now statically built when enabled." + elog "" + elog "If, you previously installed as a plugin and " + elog "you cannot start the MySQL server," elog "remove the ${MY_DATADIR}/mysql/plugin.* files, then" elog "use the MySQL upgrade script to restore the table" elog "or execute the following SQL command:" |