diff options
Diffstat (limited to 'eclass/mysql-cmake-multilib.eclass')
-rw-r--r-- | eclass/mysql-cmake-multilib.eclass | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/eclass/mysql-cmake-multilib.eclass b/eclass/mysql-cmake-multilib.eclass index a58d73c..4ed1e56 100644 --- a/eclass/mysql-cmake-multilib.eclass +++ b/eclass/mysql-cmake-multilib.eclass @@ -8,6 +8,7 @@ # - MySQL Team <mysql-bugs@gentoo.org> # - Robin H. Johnson <robbat2@gentoo.org> # - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> +# - Brian Evans <grknight@gentoo.org> # @BLURB: This eclass provides the support for cmake based mysql releases # @DESCRIPTION: # The mysql-cmake-multilib.eclass provides the support to build the mysql @@ -172,7 +173,10 @@ mysql-cmake-multilib_src_configure() { CMAKE_BUILD_TYPE="RelWithDebInfo" + # debug hack wrt #497532 mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug "" "-DNDEBUG")" + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug "" "-DNDEBUG")" -DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr -DMYSQL_DATADIR=${EPREFIX}/var/lib/mysql -DSYSCONFDIR=${EPREFIX}/etc/mysql @@ -199,6 +203,7 @@ mysql-cmake-multilib_src_configure() { -DWITH_ZLIB=system -DWITHOUT_LIBWRAP=1 -DENABLED_LOCAL_INFILE=1 + -DWITH_SSL=$(usex ssl system bundled) ) if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.6.12" ; then @@ -211,11 +216,20 @@ mysql-cmake-multilib_src_configure() { mycmakeargs+=( -DWITH_SSL=bundled ) 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 ) + mycmakeargs+=( + -DNOT_FOR_DISTRIBUTION=1 + -DWITH_JEMALLOC=$(usex jemalloc system) + ) fi if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then @@ -234,7 +248,7 @@ mysql-cmake-multilib_src_configure() { CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" CXXFLAGS="${CXXFLAGS} -felide-constructors" - # Causes linkage failures. Upstream bug #59607 removes it + # Causes linkage failures. Upstream bug #59607 removes it if ! mysql_version_is_at_least "5.6" ; then CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" fi @@ -298,15 +312,6 @@ mysql-cmake-multilib_src_install() { # Various junk (my-*.cnf moved elsewhere) einfo "Removing duplicate /usr/share/mysql files" - # Clean up stuff for a minimal build -# if use minimal ; then -# einfo "Remove all extra content for minimal build" -# rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} -# rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} -# rm -f "${ED}/usr/sbin/mysqld" -# rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a -# fi - # Unless they explicitly specific USE=test, then do not install the # testsuite. It DOES have a use to be installed, esp. when you want to do a # validation of your database configuration after tuning it. @@ -321,15 +326,15 @@ mysql-cmake-multilib_src_install() { esac einfo "Building default my.cnf (${mysql_mycnf_version})" insinto "${MY_SYSCONFDIR#${EPREFIX}}" - doins scripts/mysqlaccess.conf + doins "${S}"/scripts/mysqlaccess.conf mycnf_src="my.cnf-${mysql_mycnf_version}" sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ "${FILESDIR}/${mycnf_src}" \ - > "${TMPDIR}/my.cnf.ok" + > "${TMPDIR}/my.cnf.ok" || die if use latin1 ; then sed -i \ -e "/character-set/s|utf8|latin1|g" \ - "${TMPDIR}/my.cnf.ok" + "${TMPDIR}/my.cnf.ok" || die fi eprefixify "${TMPDIR}/my.cnf.ok" newins "${TMPDIR}/my.cnf.ok" my.cnf @@ -337,6 +342,17 @@ mysql-cmake-multilib_src_install() { #Remove mytop if perl is not selected [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \ && rm -f "${ED}/usr/bin/mytop" + + # Percona has decided to rename libmysqlclient to libperconaserverclient + # Use a symlink to preserve linkages for those who don't use mysql_config + if [[ ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.5.36" ; then + dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient.so + dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient_r.so + if use static-libs ; then + dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient.a + dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient_r.a + fi + fi } _mysql-cmake-post-src_install_perabi() { |