From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4A70F1381F3 for ; Wed, 18 Sep 2013 20:32:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC3E7E0B25; Wed, 18 Sep 2013 20:32:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 44DCAE0B25 for ; Wed, 18 Sep 2013 20:32:30 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1A0B933E874 for ; Wed, 18 Sep 2013 20:32:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C0FC3E530A for ; Wed, 18 Sep 2013 20:32:27 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1379536318.f01e91e34a3f90f811fff493b83dcb0c52aadf8a.grknight.pub@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-cmake.eclass eclass/mysql-v2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight.pub X-VCS-Committer-Name: Brian Evans X-VCS-Revision: f01e91e34a3f90f811fff493b83dcb0c52aadf8a X-VCS-Branch: master Date: Wed, 18 Sep 2013 20:32:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ce8c02df-c254-4ea0-8832-d56459fe7864 X-Archives-Hash: 69485c5df357eaa5e448ac7007c2ff68 commit: f01e91e34a3f90f811fff493b83dcb0c52aadf8a Author: Brian Evans lavabit com> AuthorDate: Wed Sep 18 20:31:58 2013 +0000 Commit: Brian Evans lavabit com> CommitDate: Wed Sep 18 20:31:58 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=f01e91e3 Eclass changes to support mariadb 5.5.33+ --- eclass/mysql-cmake.eclass | 39 +++++++++++++++++++++++++++++++++------ eclass/mysql-v2.eclass | 14 +++++++++++++- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass index f21e855..5c2a3d3 100644 --- a/eclass/mysql-cmake.eclass +++ b/eclass/mysql-cmake.eclass @@ -67,6 +67,15 @@ mysql-cmake_disable_test() { fi } +mysql-cmake_use_plugin() { + [[ -z $2 ]] && die "mysql-cmake_use_plugin " + if use $1 ; then + echo "-DWITH_$2=1" + else + echo "-D$2_DISABLED=1" + fi +} + # @FUNCTION: configure_cmake_locale # @DESCRIPTION: # Helper function to configure locale cmake options @@ -181,13 +190,17 @@ configure_cmake_standard() { 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) + $(mysql-cmake_use_plugin oqgraph OQGRAPH) + $(mysql-cmake_use_plugin sphinx SPHINX) + $(mysql-cmake_use_plugin extraengine FEDERATEDX) + $(mysql-cmake_use_plugin tokudb TOKUDB) + $(mysql-cmake_use_plugin pam AUTH_PAM) ) - if ! use pam ; then - mycmakeargs+=( -DAUTH_PAM_DISABLED=1 ) + #Disable bundled copy of jemalloc + mycmakeargs+=( -DWITH_JEMALLOC=no ) + if use jemalloc ; then + mycmakeargs+=( -DLIBJEMALLOC="jemalloc" ) fi fi @@ -237,13 +250,27 @@ mysql-cmake_src_prepare() { [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" rm -f "scripts/mysqlbug" - if use jemalloc; then + if use jemalloc && ! ( [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.5.33" ); then echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" fi if use tcmalloc; then echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" fi + + if has tokudb ${IUSE} ; then + # Don't build TokuDB unless requested in configure + # Upstream bug https://mariadb.atlassian.net/browse/MDEV-5021 + if [[ "${PV}" == "5.5.33" ]] ; then + sed -i 's/"x86_64" AND/"x86_64" AND WITH_TOKUDB AND/' \ + "${S}/storage/tokudb/CMakeLists.txt" || die "sed failed for tokudb CMakeLists.txt" + fi + + # Don't build bundled xz-utils + rm -f "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" + touch "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" + fi + epatch_user } diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index 6147297..3d2f73c 100644 --- a/eclass/mysql-v2.eclass +++ b/eclass/mysql-v2.eclass @@ -214,6 +214,8 @@ if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then mysql_version_is_at_least "5.2" && IUSE="${IUSE} oqgraph" mysql_version_is_at_least "5.2.5" && IUSE="${IUSE} sphinx" mysql_version_is_at_least "5.2.10" && IUSE="${IUSE} pam" + mysql_version_is_at_least "10.0.5" && IUSE="${IUSE} tokudb" + mysql_check_version_range "5.5.33 to 5.5.99" && IUSE="${IUSE} tokudb" fi if mysql_version_is_at_least "5.5"; then @@ -254,6 +256,10 @@ if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then mysql_version_is_at_least "5.2.10" && DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam ) )" # Bug 441700 MariaDB >=5.3 include custom mytop mysql_version_is_at_least "5.3" && DEPEND="${DEPEND} perl? ( !dev-db/mytop )" + has tokudb ${IUSE} && DEPEND="${DEPEND} tokudb? ( + >=sys-devel/gcc-4.7[lto] + app-arch/xz-utils + )" fi # Having different flavours at the same time is not a good idea @@ -340,7 +346,7 @@ pbxt_patch_available() { } pbxt_available() { - pbxt_patch_available || [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] + pbxt_patch_available || ( [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && mysql_check_version_range "5.1 to 5.5.32" ) return $? } @@ -449,6 +455,12 @@ mysql-v2_pkg_setup() { mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_setup fi + if has tokudb ${IUSE} && use tokudb && [[ $(gcc-version) < 4.7 ]] ; then + eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." + eerror "Please use gcc-config to switch to gcc-4.7 or later version." + die + fi + } # @FUNCTION: mysql-v2_src_unpack