commit: 0002fb2c57a23c8a371f10743e84bc539ed5db19 Author: Brian Evans <grknight <AT> gentoo <DOT> org> AuthorDate: Thu May 15 03:11:08 2014 +0000 Commit: Brian Evans <grknight <AT> lavabit <DOT> com> CommitDate: Thu May 15 03:11:08 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=0002fb2c
[eclass] Cleanup and add usex when useful --- eclass/mysql-cmake.eclass | 27 ++++++++------------------- eclass/mysql-v2.eclass | 7 ++++--- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass index 7bfdf53..2102845 100644 --- a/eclass/mysql-cmake.eclass +++ b/eclass/mysql-cmake.eclass @@ -8,6 +8,7 @@ # - MySQL Team <mysql-b...@gentoo.org> # - Robin H. Johnson <robb...@gentoo.org> # - Jorge Manuel B. S. Vicetto <jmbsvice...@gentoo.org> +# - Brian Evans <grkni...@gentoo.org> # @BLURB: This eclass provides the support for cmake based mysql releases # @DESCRIPTION: # The mysql-cmake.eclass provides the support to build the mysql @@ -129,7 +130,6 @@ configure_cmake_minimal() { -DWITHOUT_MYISAM_STORAGE_ENGINE=1 -DWITHOUT_PARTITION_STORAGE_ENGINE=1 -DWITHOUT_INNOBASE_STORAGE_ENGINE=1 - $(cmake-utils_use_enable static-libs STATIC_LIBS) ) } @@ -147,7 +147,6 @@ configure_cmake_standard() { $(cmake-utils_use_with embedded EMBEDDED_SERVER) $(cmake-utils_use_with profiling) $(cmake-utils_use_enable systemtap DTRACE) - $(cmake-utils_use_enable static-libs STATIC_LIBS) ) if use static; then @@ -190,7 +189,6 @@ configure_cmake_standard() { 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) @@ -308,31 +306,22 @@ mysql-cmake_src_configure() { -DWITH_ZLIB=system -DWITHOUT_LIBWRAP=1 -DENABLED_LOCAL_INFILE=1 + $(cmake-utils_use_enable static-libs STATIC_LIBS) + -DWITH_SSL=$(usex ssl system bundled) ) if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.6.12" ; then mycmakeargs+=( -DWITH_EDITLINE=system ) fi - if use ssl; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - # Bug 412851 - # MariaDB requires this flag to compile with GPLv3 readline linked + # MariaDB requires NOT_FOR_DISTRIBUTION set to compile with GPLv3 readline linked # Adds a warning about redistribution to configure if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 ) - fi - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - if use jemalloc ; then - mycmakeargs+=( -DWITH_JEMALLOC="system" ) - else - mycmakeargs+=( -DWITH_JEMALLOC=no ) - fi + mycmakeargs+=( + -DNOT_FOR_DISTRIBUTION=1 + -DWITH_JEMALLOC=$(usex jemalloc system) + ) mysql_version_is_at_least "10.0.9" && mycmakeargs+=( -DWITH_PCRE=system ) fi diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index 3f904ef..3a9954a 100644 --- a/eclass/mysql-v2.eclass +++ b/eclass/mysql-v2.eclass @@ -8,6 +8,7 @@ # - MySQL Team <mysql-b...@gentoo.org> # - Robin H. Johnson <robb...@gentoo.org> # - Jorge Manuel B. S. Vicetto <jmbsvice...@gentoo.org> +# - Brian Evans <grkni...@gentoo.org> # @BLURB: This eclass provides most of the functions for mysql ebuilds # @DESCRIPTION: # The mysql-v2.eclass is the base eclass to build the mysql and @@ -792,9 +793,9 @@ mysql-v2_pkg_config() { # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it PID_DIR="${EROOT}/var/run/mysqld" if [[ ! -d "${PID_DIR}" ]]; then - mkdir -p "${PID_DIR}" - chown mysql:mysql "${PID_DIR}" - chmod 755 "${PID_DIR}" + mkdir -p "${PID_DIR}" || die "Could not create pid directory" + chown mysql:mysql "${PID_DIR}" || die "Could not set ownership on pid directory" + chmod 755 "${PID_DIR}" || die "Could not set permissions on pid directory" fi pushd "${TMPDIR}" &>/dev/null