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 90870138247 for ; Thu, 7 Nov 2013 19:44:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8496E07FE; Thu, 7 Nov 2013 19:44:11 +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 2F28EE07FE for ; Thu, 7 Nov 2013 19:44:11 +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 E88F433F172 for ; Thu, 7 Nov 2013 19:44:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 69B27E545C for ; Thu, 7 Nov 2013 19:44:08 +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: <1383845364.0ba7387a2bb4954e38129fa37d107257476066d4.grknight.pub@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-cmake-multilib.eclass eclass/mysql-cmake.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight.pub X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 0ba7387a2bb4954e38129fa37d107257476066d4 X-VCS-Branch: master Date: Thu, 7 Nov 2013 19:44:08 +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: 7862edb7-aa63-4bbe-8804-69238de7e70e X-Archives-Hash: c2deef7e2ea54a4abdc543709056b366 commit: 0ba7387a2bb4954e38129fa37d107257476066d4 Author: Brian Evans tuffmail com> AuthorDate: Thu Nov 7 15:35:28 2013 +0000 Commit: Brian Evans lavabit com> CommitDate: Thu Nov 7 17:29:24 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=0ba7387a Bring cmake-multilib in sync and add MariaDB 10.0.5 options --- eclass/mysql-cmake-multilib.eclass | 65 +++++++++++++++++++++++++++++++------- eclass/mysql-cmake.eclass | 18 +++++++++-- 2 files changed, 70 insertions(+), 13 deletions(-) diff --git a/eclass/mysql-cmake-multilib.eclass b/eclass/mysql-cmake-multilib.eclass index 6314193..8834c37 100644 --- a/eclass/mysql-cmake-multilib.eclass +++ b/eclass/mysql-cmake-multilib.eclass @@ -67,6 +67,20 @@ mysql-cmake-multilib_disable_test() { fi } +# @FUNCTION: mysql-cmake_use_plugin +# @DESCRIPTION: +# Helper function to enable/disable plugins by use flags +# cmake-utils_use_with is not enough as some references check WITH_ (0|1) +# and some check WITHOUT_. Also, this can easily extend to non-storage plugins. +mysql-cmake_use_plugin() { + [[ -z $2 ]] && die "mysql-cmake_use_plugin " + if use $1 ; then + echo "-DWITH_$2=1" + else + echo "-DWITHOUT_$2=1 -DWITH_$2=0" + fi +} + # @FUNCTION: configure_cmake_locale # @DESCRIPTION: # Helper function to configure locale cmake options @@ -148,6 +162,10 @@ configure_cmake_standard() { $(cmake-utils_use_enable systemtap DTRACE) ) + if use static; then + mycmakeargs+=( -DWITH_PIC=1 ) + fi + if use ssl; then mycmakeargs+=( -DWITH_SSL=system ) else @@ -179,15 +197,33 @@ configure_cmake_standard() { mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) ) fi - if [[ ${PN} == "mariadb" ]]; then + if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; 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 ) + if use jemalloc ; then + mycmakeargs+=( -DWITH_JEMALLOC="system" ) + else + mycmakeargs+=( -DWITH_JEMALLOC=no ) + fi + + if mysql_version_is_at_least 10.0.5 ; then + # CassandraSE needs Apache Thrift which is not in portage + # TODO: Add use and deps for Connect SE external deps + mycmakeargs+= ( + -DWITHOUT_CASSANDRA=1 -DWITH_CASSANDRA=0 + $(mysql-cmake_use_plugin extraengine SEQUENCE) + $(mysql-cmake_use_plugin extraengine SPIDER) + $(mysql-cmake_use_plugin extraengine CONNECT) + -DCONNECT_WITH_MYSQL=1 + -DCONNECT_WITH_LIBXML=0 + -DCONNECT_WITH_ODBC=0 + ) fi fi @@ -240,13 +276,20 @@ mysql-cmake-multilib_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 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 } @@ -282,7 +325,7 @@ _cmake-multilib_src_configure() { # Bug 412851 # MariaDB requires this flag to compile with GPLv3 readline linked # Adds a warning about redistribution to configure - if [[ ${PN} == "mariadb" ]] ; then + if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 ) fi @@ -345,7 +388,7 @@ mysql-cmake-multilib_src_compile() { } _mysql-cmake-multilib_src_install() { - + debug-print-function ${FUNCNAME} "$@" # Make sure the vars are correctly initialized @@ -364,7 +407,7 @@ _mysql-cmake-multilib_src_install() { dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" # Create a mariadb_config symlink - [[ ${PN} == "mariadb" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config" + [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config" # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir rm -Rf "${ED}/usr/data" @@ -451,7 +494,7 @@ _mysql-cmake-multilib_src_install() { doenvd "${T}"/80mysql-libdir #Remove mytop if perl is not selected - [[ ${PN} == "mariadb" ]] && ! use perl \ + [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \ && rm -f "${ED}/usr/bin/mytop" } diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass index 1b9985f..d6a965e 100644 --- a/eclass/mysql-cmake.eclass +++ b/eclass/mysql-cmake.eclass @@ -12,8 +12,8 @@ # @DESCRIPTION: # The mysql-cmake.eclass provides the support to build the mysql # ebuilds using the cmake build system. This eclass provides -# the src_unpack, src_prepare, src_configure, src_compile, scr_install, -# pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks. +# the src_prepare, src_configure, src_compile, and src_install +# phase hooks. inherit cmake-utils flag-o-matic multilib prefix @@ -211,6 +211,20 @@ configure_cmake_standard() { else mycmakeargs+=( -DWITH_JEMALLOC=no ) fi + + if mysql_version_is_at_least 10.0.5 ; then + # CassandraSE needs Apache Thrift which is not in portage + # TODO: Add use and deps for Connect SE external deps + mycmakeargs+=( + -DWITHOUT_CASSANDRA=1 -DWITH_CASSANDRA=0 + $(mysql-cmake_use_plugin extraengine SEQUENCE) + $(mysql-cmake_use_plugin extraengine SPIDER) + $(mysql-cmake_use_plugin extraengine CONNECT) + -DCONNECT_WITH_MYSQL=1 + -DCONNECT_WITH_LIBXML=0 + -DCONNECT_WITH_ODBC=0 + ) + fi fi if [[ ${PN} == "percona-server" ]]; then