gnu: perl-dbd-mysql: Fix build with gcc@14.

* gnu/packages/databases.scm (perl-dbd-mysql)[arguments]<#:phases>:
{'add-cflags}: New phase.
{'skip-library-detection}: Drop #t.

Change-Id: I07e98481d9b9dc8bdc4e3bdf24c9c7b7d63d2bcf
This commit is contained in:
Andreas Enge 2025-07-19 12:27:38 +02:00
parent 0bae6e3586
commit 2dc9927258
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -2630,21 +2630,28 @@ automatically set update and create date and time based fields in a table.")
(base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g")))) (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
(build-system perl-build-system) (build-system perl-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases ;; Tests require running MySQL server.
(add-before 'configure 'skip-library-detection #:tests? #f
;; Avoid dependencies on perl-devel-checklib, openssl, and zlib. They #:phases
;; are really only needed for the test suite; their absence does not #~(modify-phases %standard-phases
;; affect the build or the end result. (add-after 'configure 'add-cflags
(lambda _ (lambda _
(substitute* "Makefile.PL" (substitute* "Makefile"
(("use Devel::CheckLib;" match) (("OPTIMIZE = -O2")
(string-append "# " match)) (string-append "OPTIMIZE = -O2 "
(("assert_lib") "-Wno-error=incompatible-pointer-types "
"print")) "-Wno-error=implicit-function-declaration")))))
#t))) (add-before 'configure 'skip-library-detection
;; Tests require running MySQL server. ;; Avoid dependencies on perl-devel-checklib, openssl, and zlib. They
#:tests? #f)) ;; are really only needed for the test suite; their absence does not
;; affect the build or the end result.
(lambda _
(substitute* "Makefile.PL"
(("use Devel::CheckLib;" match)
(string-append "# " match))
(("assert_lib")
"print")))))))
(propagated-inputs (propagated-inputs
`(("perl-dbi" ,perl-dbi) `(("perl-dbi" ,perl-dbi)
("mysql" ,mariadb "lib") ("mysql" ,mariadb "lib")