mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: MariaDB: Fix 'mariadb_config' output to refer to correct directories.
This fixes a regression introduced in ce29031a23
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.
This commit is contained in:
parent
e693617f55
commit
704b7861df
1 changed files with 17 additions and 9 deletions
|
@ -957,8 +957,7 @@ Language.")
|
||||||
"-DMYSQL_DATADIR=/var/lib/mysql"
|
"-DMYSQL_DATADIR=/var/lib/mysql"
|
||||||
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
||||||
|
|
||||||
;; Do not install the tests or benchmark suite.
|
;; Do not install the benchmark suite.
|
||||||
"-DINSTALL_MYSQLTESTDIR=false"
|
|
||||||
"-DINSTALL_SQLBENCHDIR=false"
|
"-DINSTALL_SQLBENCHDIR=false"
|
||||||
|
|
||||||
(string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
|
(string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
|
||||||
|
@ -990,14 +989,26 @@ Language.")
|
||||||
;; to other variables such as $INSTALL_INCLUDEDIR, which does
|
;; to other variables such as $INSTALL_INCLUDEDIR, which does
|
||||||
;; not work when the latter uses an absolute file name.
|
;; not work when the latter uses an absolute file name.
|
||||||
(substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
|
(substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
|
||||||
(("@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@")
|
(("%s/@INSTALL_INCLUDEDIR@")
|
||||||
"@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"
|
(substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
|
||||||
(("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
|
(("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
|
||||||
"@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"
|
(substitute* "include/CMakeLists.txt"
|
||||||
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
|
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
|
||||||
"${INSTALL_INCLUDEDIR}"))
|
"${INSTALL_INCLUDEDIR}"))
|
||||||
|
(substitute* "cmake/mariadb_connector_c.cmake"
|
||||||
|
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
|
||||||
|
"${INSTALL_BINDIR}"))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'adjust-tests
|
(add-after 'unpack 'adjust-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
|
@ -1090,11 +1101,8 @@ Language.")
|
||||||
(string-append lib "/share/mysql")))
|
(string-append lib "/share/mysql")))
|
||||||
|
|
||||||
(with-directory-excursion lib
|
(with-directory-excursion lib
|
||||||
;; FIXME: Something creates an empty gnu/store/xxx-mariadb/bin
|
;; Remove tests.
|
||||||
;; directory at the root of the lib output. It's not present
|
(delete-file-recursively "mysql-test")
|
||||||
;; in the installation log. This started occuring between
|
|
||||||
;; 10.5.6 and 10.5.8. How to prevent it?
|
|
||||||
(delete-file-recursively "gnu")
|
|
||||||
;; Remove static libraries.
|
;; Remove static libraries.
|
||||||
(for-each delete-file (find-files "lib" "\\.a$")))
|
(for-each delete-file (find-files "lib" "\\.a$")))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue