guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: MariaDB: Fix 'mariadb_config' output to refer to correct dir


From: guix-commits
Subject: 02/02: gnu: MariaDB: Fix 'mariadb_config' output to refer to correct directories.
Date: Sun, 20 Dec 2020 12:52:57 -0500 (EST)

mbakke pushed a commit to branch staging
in repository guix.

commit 704b7861df926240fa730c05a59f7050fa45fec9
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun Dec 20 16:12:50 2020 +0100

    gnu: MariaDB: Fix 'mariadb_config' output to refer to correct directories.
    
    This fixes a regression introduced in 
ce29031a23104928155b498d552fc4140cc03030
    where 'mariadb_config' would return libdir and plugindir relative to the
    location of the 'mariadb_config' program (which lives in a separate output).
    
    While at it, fix a couple other wrong references, and a another regression
    related to test installation.
    
    * gnu/packages/databases.scm (mariadb)[arguments]: Patch 
"mariadb_config.c.in"
    so that it falls back to old behavior.  Patch 'mariadb.pc.in' and
    'mariadb_connector_c.cmake' to cope with absolute directory names. In
     #:configure-flags, don't set INSTALL_MYSQLTESTDIR, but delete the installed
    tests with a phase.
---
 gnu/packages/databases.scm | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 733c8c4..fa5dbfa 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -957,8 +957,7 @@ Language.")
          "-DMYSQL_DATADIR=/var/lib/mysql"
          "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
 
-         ;; Do not install the tests or benchmark suite.
-         "-DINSTALL_MYSQLTESTDIR=false"
+         ;; Do not install the benchmark suite.
          "-DINSTALL_SQLBENCHDIR=false"
 
          (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
@@ -990,14 +989,26 @@ Language.")
              ;; to other variables such as $INSTALL_INCLUDEDIR, which does
              ;; not work when the latter uses an absolute file name.
              (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
-               (("@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@")
-                "@INSTALL_INCLUDEDIR@"))
+               (("%s/@INSTALL_INCLUDEDIR@")
+                (string-append "@INSTALL_INCLUDEDIR@"))
+               ;; As of 10.5.8, the mariadb_config program tries to be
+               ;; clever and computes the installation directory relative
+               ;; to /proc/self/exe when running on Linux.  Make it fall
+               ;; back to the old behaviour.
+               (("defined\\(__linux__\\)")
+                "0"))
              (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
                (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
                 "@INSTALL_INCLUDEDIR@"))
+             (substitute* "support-files/mariadb.pc.in"
+               (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
+                (string-append dir "dir=")))
              (substitute* "include/CMakeLists.txt"
                
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
                 "${INSTALL_INCLUDEDIR}"))
+             (substitute* "cmake/mariadb_connector_c.cmake"
+               (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
+                "${INSTALL_BINDIR}"))
              #t))
          (add-after 'unpack 'adjust-tests
            (lambda _
@@ -1090,11 +1101,8 @@ Language.")
                  (string-append lib "/share/mysql")))
 
               (with-directory-excursion lib
-                ;; FIXME: Something creates an empty gnu/store/xxx-mariadb/bin
-                ;; directory at the root of the lib output.  It's not present
-                ;; in the installation log.  This started occuring between
-                ;; 10.5.6 and 10.5.8.  How to prevent it?
-                (delete-file-recursively "gnu")
+                ;; Remove tests.
+                (delete-file-recursively "mysql-test")
                 ;; Remove static libraries.
                 (for-each delete-file (find-files "lib" "\\.a$")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]