aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-03-17 01:22:34 -0700
committerGregory M. Tuner <gmt@be-evil.net>2014-03-17 01:29:41 -0700
commitcc3bbea3cae81b6d9a7616f54be4c998bb92e4a0 (patch)
treeb710fe1674e6c74f816c5f05cfb23f928bdf21c3 /eclass
parentnet-libs/gnutls: update ChangeLog (should really be doing this everywhere... ... (diff)
downloadgmt-cc3bbea3cae81b6d9a7616f54be4c998bb92e4a0.tar.gz
gmt-cc3bbea3cae81b6d9a7616f54be4c998bb92e4a0.tar.bz2
gmt-cc3bbea3cae81b6d9a7616f54be4c998bb92e4a0.zip
eclass/mysql-{v2,cmake-multilib}: merge upstream
Here we merge upstream (nb: these two eclasses, and the ebuilds in dev-db/mysql are following the mysql overlay, not gentoo-x86 like most other stuff in this overlay) deltas. Something changed (I suspect, something in my workstation's kernel configuration that was breaking systemtap entirely, causing mysql to steer clear of it and, until now, thereby hiding this bug on my test box) So make sure to explicitly disable systemtap in the minimal build (which will also be used for non-best-ABI's. Otherwise, this is 99% robo-merge with no intersting new content. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/mysql-cmake-multilib.eclass67
-rw-r--r--eclass/mysql-v2.eclass113
2 files changed, 103 insertions, 77 deletions
diff --git a/eclass/mysql-cmake-multilib.eclass b/eclass/mysql-cmake-multilib.eclass
index 57f365b..3a05764 100644
--- a/eclass/mysql-cmake-multilib.eclass
+++ b/eclass/mysql-cmake-multilib.eclass
@@ -12,10 +12,10 @@
# @DESCRIPTION:
# The mysql-cmake-multilib.eclass provides the support to build the mysql
# ebuilds using the cmake build system. This eclass provides
-# the src_prepare, src_configure, src_compile and src_install
+# the src_prepare, src_configure, src_compile, and src_install
# phase hooks.
-inherit flag-o-matic multilib prefix mysql-cmake cmake-multilib
+inherit flag-o-matic multilib prefix eutils mysql-cmake cmake-multilib
#
# HELPER FUNCTIONS:
@@ -40,14 +40,8 @@ configure_cmake_minimal() {
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DWITHOUT_EMBEDDED_SERVER=1
- -DENABLED_LOCAL_INFILE=1
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
- -DWITH_SSL=system
- -DWITH_ZLIB=system
- -DWITHOUT_LIBWRAP=1
- -DWITH_READLINE=0
- -DWITH_LIBEDIT=0
-DWITHOUT_ARCHIVE_STORAGE_ENGINE=1
-DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1
-DWITHOUT_CSV_STORAGE_ENGINE=1
@@ -59,6 +53,7 @@ configure_cmake_minimal() {
-DWITHOUT_PARTITION_STORAGE_ENGINE=1
-DWITHOUT_INNOBASE_STORAGE_ENGINE=1
-DWITH_UNIT_TESTS=0
+ -DENABLE_DTRACE=0
)
}
@@ -69,13 +64,8 @@ configure_cmake_standard() {
debug-print-function ${FUNCNAME} "$@"
mycmakeargs+=(
- -DENABLED_LOCAL_INFILE=1
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
- -DWITH_READLINE=0
- -DWITH_LIBEDIT=0
- -DWITH_ZLIB=system
- -DWITHOUT_LIBWRAP=1
)
mycmakeargs+=(
@@ -85,18 +75,13 @@ configure_cmake_standard() {
$(cmake-utils_use_with profiling)
$(cmake-utils_use_enable systemtap DTRACE)
$(cmake-utils_use_with test UNIT_TESTS)
+ $(cmake-utils_use_enable static-libs STATIC_LIBS)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
- if use ssl; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
if use jemalloc; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
@@ -118,7 +103,7 @@ configure_cmake_standard() {
$(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE)
)
- if pbxt_available ; then
+ if in_iuse pbxt ; then
mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
fi
@@ -131,12 +116,6 @@ configure_cmake_standard() {
$(mysql-cmake_use_plugin pam AUTH_PAM)
)
- 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
@@ -202,7 +181,8 @@ mysql-cmake-multilib_src_configure() {
-DINSTALL_DOCREADMEDIR=share/doc/${P}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=@GET_LIBDIR@/mysql
+ -DINSTALL_LIBDIR=@GET_LIBDIR@
+ -DINSTALL_ELIBDIR=@GET_LIBDIR@/mysql
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql
-DINSTALL_MYSQLSHAREDIR=share/mysql
@@ -214,29 +194,54 @@ mysql-cmake-multilib_src_configure() {
-DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
-DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock
-DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_READLINE=0
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
)
+ 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 this flag to compile with GPLv3 realine 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
+ # TODO: uncomment this when libpcre 8.35 is released to remove bundled library
+# mysql_version_is_at_least "10.0.9" mycmakeargs+=( -DWITH_PCRE=system )
+ fi
+
configure_cmake_locale
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
- CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
+ CXXFLAGS="${CXXFLAGS} -felide-constructors"
# Causes linkage failures. Upstream bug #59607 removes it
if ! mysql_version_is_at_least "5.6" ; then
CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
fi
- # As of 5.7, exceptions are used!
+ # As of 5.7, exceptions and rtti are used!
if ! mysql_version_is_at_least "5.7" ; then
- CXXFLAGS="${CXXFLAGS} -fno-exceptions"
+ CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
fi
export CXXFLAGS
diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
index ef7b4f4..57a5cf7 100644
--- a/eclass/mysql-v2.eclass
+++ b/eclass/mysql-v2.eclass
@@ -138,15 +138,17 @@ mysql_version_is_at_least "5.1.50" || die "This eclass should only be used with
if [[ -z ${SERVER_URI} ]]; then
[[ -z ${MY_PV} ]] && MY_PV="${PV//_/-}"
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
- MARIA_FULL_PV=$(replace_version_separator 3 '-' ${MY_PV})
+ # Beginning with 5.5, MariaDB stopped putting beta, alpha or rc on their tarball names
+ mysql_version_is_at_least "5.5" && MARIA_FULL_PV=$(get_version_component_range 1-3) || \
+ MARIA_FULL_PV=$(replace_version_separator 3 '-' ${MY_PV})
MARIA_FULL_P="${PN}-${MARIA_FULL_PV}"
SERVER_URI="
http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
- http://ftp.rediris.es/mirror/MariaDB/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
- http://maria.llarian.net/download/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
- http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/${MARIA_FULL_P}.tar.gz
- http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
- http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://mirror.jmu.edu/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://mirrors.coreix.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://mirrors.syringanetworks.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://mirrors.fe.up.pt/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://mirror2.hs-esslingen.de/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
"
if [[ ${PN} == "mariadb-galera" ]]; then
MY_SOURCEDIR="${PN%%-galera}-${MARIA_FULL_PV}"
@@ -211,28 +213,25 @@ case "${BUILD}" in
IUSE="big-tables debug embedded minimal +perl selinux ssl static test"
;;
cmake*)
- IUSE="debug embedded minimal +perl selinux ssl static test"
+ IUSE="debug embedded minimal +perl selinux ssl static static-libs test"
;;
esac
-IUSE="${IUSE} latin1"
-
-IUSE="${IUSE} extraengine"
-IUSE="${IUSE} cluster"
-
-IUSE="${IUSE} max-idx-128"
-IUSE="${IUSE} +community profiling"
+# Common IUSE
+IUSE="${IUSE} latin1 extraengine cluster max-idx-128 +community profiling"
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
mysql_check_version_range "5.1.38 to 5.3.99" && IUSE="${IUSE} libevent"
- 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" && IUSE="${IUSE} oqgraph" && \
+ REQUIRED_USE="${REQUIRED_USE} minimal? ( !oqgraph )"
+ mysql_version_is_at_least "5.2.5" && IUSE="${IUSE} sphinx" && \
+ REQUIRED_USE="${REQUIRED_USE} minimal? ( !sphinx )"
mysql_version_is_at_least "5.2.10" && IUSE="${IUSE} pam"
# 5.5.33 and 10.0.5 add TokuDB. Authors strongly recommend jemalloc or perfomance suffers
mysql_version_is_at_least "10.0.5" && IUSE="${IUSE} tokudb odbc xml" && \
- REQUIRED_USE="odbc? ( extraengine ) xml? ( extraengine ) tokudb? ( jemalloc )"
+ REQUIRED_USE="${REQUIRED_USE} odbc? ( extraengine ) xml? ( extraengine ) tokudb? ( jemalloc )"
mysql_check_version_range "5.5.33 to 5.5.99" && IUSE="${IUSE} tokudb" && \
- REQUIRED_USE="tokudb? ( jemalloc )"
+ REQUIRED_USE="${REQUIRED_USE} tokudb? ( jemalloc )"
fi
if mysql_version_is_at_least "5.5"; then
@@ -261,10 +260,17 @@ DEPEND="
kernel_linux? ( sys-process/procps )
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
- >=sys-libs/readline-4.1${_mysql_v2_multilib_usedep}
>=sys-libs/zlib-1.2.3${_mysql_v2_multilib_usedep}
- !dev-db/mariadb-native-client[mysqlcompat]
"
+# TODO: add this as a dep if it is moved from the overlay
+# !dev-db/mariadb-native-client[mysqlcompat]
+
+# dev-db/mysql-5.6.12+ only works with dev-libs/libedit
+if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.6.12" ; then
+ DEPEND="${DEPEND} dev-libs/libedit${_mysql_v2_multilib_usedep}"
+else
+ DEPEND="${DEPEND} >=sys-libs/readline-4.1${_mysql_v2_multilib_usedep}"
+fi
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
mysql_check_version_range "5.1.38 to 5.3.99" && \
@@ -277,6 +283,21 @@ if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam${_mysql_v2_multilib_usedep} ) )"
# Bug 441700 MariaDB >=5.3 include custom mytop
mysql_version_is_at_least "5.3" && DEPEND="${DEPEND} perl? ( !dev-db/mytop )"
+ if mysql_version_is_at_least "10.0.5" ; then
+ DEPEND="${DEPEND}
+ odbc? ( dev-db/unixODBC${_mysql_v2_multilib_usedep} )
+ xml? ( dev-libs/libxml2${_mysql_v2_multilib_usedep} )
+ "
+ fi
+ mysql_version_is_at_least "10.0.7" && \
+ DEPEND="${DEPEND} oqgraph? ( dev-libs/judy${_mysql_v2_multilib_usedep} )"
+ # TODO: uncomment this when libpcre 8.35 is released to remove bundled library
+# if mysql_version_is_at_least "10.0.9" ; then
+# use embedded && \
+# DEPEND="${DEPEND}
+# >=dev-libs/libpcre-8.35[static-libs?${_mysql_v2_multilib_usedep_nobrackets}]" || \
+# DEPEND="${DEPEND} >=dev-libs/libpcre-8.35${_mysql_v2_multilib_usedep}"
+# fi
fi
# Having different flavours at the same time is not a good idea
@@ -285,14 +306,14 @@ for i in "mysql" "mariadb" "mariadb-galera" "percona-server" "mysql-cluster" ; d
DEPEND="${DEPEND} !dev-db/${i}"
done
-if mysql_version_is_at_least "5.5" ; then
- DEPEND="${DEPEND} jemalloc? ( dev-libs/jemalloc${_mysql_v2_multilib_usedep} )"
- DEPEND="${DEPEND} tcmalloc? ( dev-util/google-perftools${_mysql_v2_multilib_usedep} )"
-fi
-
if mysql_version_is_at_least "5.5.7" ; then
- DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3${_mysql_v2_multilib_usedep} )"
- DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio${_mysql_v2_multilib_usedep} )"
+ DEPEND="${DEPEND}
+ jemalloc? ( dev-libs/jemalloc[static-libs?${_mysql_v2_multilib_usedep_nobrackets}] )
+ tcmalloc? ( dev-util/google-perftools${_mysql_v2_multilib_usedep} )
+ >=sys-libs/zlib-1.2.3[static-libs?${_mysql_v2_multilib_usedep_nobrackets}]
+ ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?${_mysql_v2_multilib_usedep_nobrackets}] )
+ systemtap? ( >=dev-util/systemtap-1.3${_mysql_v2_multilib_usedep} )
+ kernel_linux? ( dev-libs/libaio${_mysql_v2_multilib_usedep} )"
fi
if [[ ${PN} == "mysql-cluster" ]] ; then
@@ -317,13 +338,6 @@ if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes ) "
fi
-
- if mysql_version_is_at_least "10.0.5" ; then
- RDEPEND="${RDEPEND}
- odbc? ( dev-db/unixODBC${_mysql_v2_multilib_usedep} )
- xml? ( dev-libs/libxml2${_mysql_v2_multilib_usedep} )
- "
- fi
fi
if [[ ${PN} == "mariadb-galera" ]] ; then
@@ -364,7 +378,7 @@ PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}-r1${_mysql_v2_multilib_used
# External patches
#
-# MariaDB has integrated PBXT
+# MariaDB has integrated PBXT until it was dropped in version 5.5.33
# PBXT_VERSION means that we have a PBXT patch for this PV
# PBXT was only introduced after 5.1.12
pbxt_patch_available() {
@@ -373,7 +387,7 @@ pbxt_patch_available() {
}
pbxt_available() {
- pbxt_patch_available || ( [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && mysql_check_version_range "5.1 to 5.5.32" )
+ pbxt_patch_available || [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && mysql_check_version_range "5.1 to 5.5.32"
return $?
}
@@ -482,7 +496,7 @@ 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
+ if use_if_iuse 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
@@ -588,20 +602,13 @@ mysql-v2_pkg_postinst() {
done
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
- if mysql_version_is_at_least "5.2.10" && use pam ; then
+ if use_if_iuse pam ; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://kb.askmonty.org/en/pam-authentication-plugin/"
einfo
fi
-
- if mysql_version_is_at_least "10.0.7" ; then
- einfo
- elog "In 10.0, XtraDB is no longer the default InnoDB implementation."
- elog "It is installed as a dynamic plugin and must be activated in my.cnf."
- einfo
- fi
fi
einfo
@@ -614,9 +621,19 @@ mysql-v2_pkg_postinst() {
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
+
+ if [[ ${PN} == "mariadb-galera" ]] ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
fi
- if pbxt_available && use pbxt ; then
+ if use_if_iuse pbxt ; then
elog "Note: PBXT is now statically built when enabled."
elog ""
elog "If, you previously installed as a plugin and "
@@ -777,6 +794,10 @@ mysql-v2_pkg_config() {
use prefix || options="${options} --user=mysql"
+ # Fix bug 446200. Don't reference host my.cnf
+ use prefix && [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] \
+ && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
pushd "${TMPDIR}" &>/dev/null
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}"
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db