mysql-multilib-r1.eclass: Remove private header and don't install tests wrt bug...
authorBrian Evans <grknight@gentoo.org>
Wed, 11 May 2016 18:48:44 +0000 (14:48 -0400)
committerBrian Evans <grknight@gentoo.org>
Wed, 11 May 2016 18:48:44 +0000 (14:48 -0400)
The private include file mysql/private/config.h is not needed by anything
and should not be referenced.  It will never match in multiple ABIs so
just remove it.

When USE=-test, don't install tests which would just be removed later anyway.

eclass/mysql-multilib-r1.eclass

index b18ebd085e4e4cbc9bb1a5108de1647b6ae7aae3..40ef8f544283bf745e273f7c10f11ed10987dd72 100644 (file)
@@ -384,7 +384,6 @@ multilib_src_configure() {
                -DINSTALL_MANDIR=share/man
                -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql
                -DINSTALL_MYSQLSHAREDIR=share/mysql
-               -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test
                -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
                -DINSTALL_SBINDIR=sbin
                -DINSTALL_SCRIPTDIR=share/mysql/scripts
@@ -404,6 +403,12 @@ multilib_src_configure() {
                -DENABLE_STATIC_LIBS=$(usex static-libs)
        )
 
+       if use test ; then
+               mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+       else
+               mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+       fi
+
        if in_iuse systemd ; then
                mycmakeargs+=( -DWITH_SYSTEMD=$(usex systemd) )
        fi
@@ -537,11 +542,16 @@ mysql-multilib-r1_src_install() {
 multilib_src_install() {
        debug-print-function ${FUNCNAME} "$@"
 
-       if multilib_is_native_abi; then
-               # Make sure the vars are correctly initialized
-               mysql_init_vars
+       cmake-utils_src_install
+       # Make sure the vars are correctly initialized
+       mysql_init_vars
+
+       # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+       if [[ -f "${D}${MY_INCLUDEDIR}/private/config.h" ]] ; then
+               rm "${D}${MY_INCLUDEDIR}/private/config.h" || die
+       fi
 
-               cmake-utils_src_install
+       if multilib_is_native_abi; then
 
                # Convenience links
                einfo "Making Convenience links for mysqlcheck multi-call binary"
@@ -627,7 +637,6 @@ multilib_src_install() {
                        fi
                done
        else
-               cmake-utils_src_install
                if [[ "${PN}" == "mariadb" ]] && use server ; then
                        insinto /usr/include/mysql/private
                        doins "${S}"/sql/*.h