diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-12-04 20:12:41 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-12-04 20:12:41 +0100 |
commit | 33b59c1a3edbb81735e8d4e977b107f3ba1c2f9f (patch) | |
tree | 79ee86a29266d0a32ec0d0aa790ee5904b1098b8 /gnu/packages/databases.scm | |
parent | 936aa05209402dd399869ffae188db5dd5f67d69 (diff) | |
parent | d733a469d74f74734825f1ce777956fb4cac5534 (diff) | |
download | patches-33b59c1a3edbb81735e8d4e977b107f3ba1c2f9f.tar patches-33b59c1a3edbb81735e8d4e977b107f3ba1c2f9f.tar.gz |
Merge branch 'staging'
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r-- | gnu/packages/databases.scm | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 8260bfcb43..cb843672af 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -717,9 +717,11 @@ Language.") (find-files "pcre") (find-files "zlib"))) #t)))) (build-system cmake-build-system) + (outputs '("out" "lib" "dev")) (arguments `(#:configure-flags - '("-DBUILD_CONFIG=mysql_release" + (list + "-DBUILD_CONFIG=mysql_release" ;; Linking with libarchive fails, like this: ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o): @@ -743,15 +745,26 @@ Language.") "-DDEFAULT_COLLATION=utf8_general_ci" "-DMYSQL_DATADIR=/var/lib/mysql" "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" - "-DINSTALL_INFODIR=share/mysql/docs" - "-DINSTALL_MANDIR=share/man" + (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib")) + (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib") + "/lib") + (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out") + "/share/mysql/docs") + (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out") + "/share/man") + (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin") + (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin") + "-DCMAKE_INSTALL_LIBDIR=lib" "-DINSTALL_PLUGINDIR=lib/mysql/plugin" - "-DINSTALL_SCRIPTDIR=bin" - "-DINSTALL_INCLUDEDIR=include/mysql" - "-DINSTALL_DOCREADMEDIR=share/mysql/docs" - "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files" + (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev") + "/include/mysql") + (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out") + "/share/mysql/docs") + (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out") + "/share/mysql/docs") + (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out") + "/share/mysql/support-files") "-DINSTALL_MYSQLSHAREDIR=share/mysql" - "-DINSTALL_DOCDIR=share/mysql/docs" "-DINSTALL_SHAREDIR=share") #:phases (modify-phases %standard-phases @@ -834,19 +847,29 @@ Language.") 'install 'post-install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (test (assoc-ref outputs "test"))) + (dev (assoc-ref outputs "dev")) + (lib (assoc-ref outputs "lib"))) (substitute* (string-append out "/bin/mysql_install_db") (("basedir=\"\"") (string-append "basedir=\"" out "\""))) ;; Remove unneeded files for testing. - (with-directory-excursion out + (with-directory-excursion lib (for-each delete-file-recursively - '("data" "mysql-test" "sql-bench" - "share/man/man1/mysql-test-run.pl.1")) - ;; Delete huge and unnecessary executables. - (for-each delete-file (find-files "bin" "(test|embedded)")) + '("data" "mysql-test" "sql-bench")) ;; And static libraries. (for-each delete-file (find-files "lib" "\\.a$"))) + (with-directory-excursion out + (delete-file "share/man/man1/mysql-test-run.pl.1") + ;; Delete huge and unnecessary executables. + (for-each delete-file (find-files "bin" "(test|embedded)"))) + (mkdir-p (string-append dev "/share")) + (mkdir-p (string-append dev "/bin")) + (rename-file (string-append lib "/bin/mysqld") + (string-append out "/bin/mysqld")) + (rename-file (string-append lib "/share/pkgconfig") + (string-append dev "/share/pkgconfig")) + (rename-file (string-append out "/bin/mysql_config") + (string-append dev "/bin/mysql_config")) #t)))))) (native-inputs `(("bison" ,bison) @@ -1611,7 +1634,8 @@ columns, primary keys, unique constraints and relationships.") #:tests? #f)) (propagated-inputs `(("perl-dbi" ,perl-dbi) - ("mysql" ,mariadb))) + ("mysql" ,mariadb "lib") + ("mysql-dev" ,mariadb "dev"))) (home-page "https://metacpan.org/release/DBD-mysql") (synopsis "DBI MySQL interface") (description "This package provides a MySQL driver for the Perl5 @@ -2729,7 +2753,8 @@ database).") ("mock" ,python-mock) ("py.test" ,python-pytest))) (inputs - `(("mysql" ,mariadb) + `(("mysql" ,mariadb "lib") + ("mysql-dev" ,mariadb "dev") ("libz" ,zlib) ("openssl" ,openssl))) (home-page "https://github.com/PyMySQL/mysqlclient-python") |