gnu: gmic: Disable static libraries and enable LTO.

* gnu/packages/image-processing.scm (gmic)[arguments]: Pass
"-DBUILD_LIB_STATIC=OFF", "-DENABLE_DYNAMIC_LINKING=ON" and "-DENABLE_LTO=ON"
to #:configure-flags. Add phase to set LDFLAGS.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Vinicius Monego 2021-03-05 01:53:36 -03:00 committed by Nicolas Goaziou
parent 5dc130c465
commit 75862a9ea7
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -613,7 +613,18 @@ (define-public gmic
(base32 "06n1dcskky7aqg3a0cp7biwz8agc4xqvr8091l2wsvgib98yhbyj"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ;there are no tests
`(#:tests? #f ;there are no tests
#:configure-flags '("-DBUILD_LIB_STATIC=OFF"
"-DENABLE_DYNAMIC_LINKING=ON"
"-DENABLE_LTO=ON")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'set-LDFLAGS
(lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "LDFLAGS"
(string-append
"-Wl,-rpath="
(assoc-ref outputs "out") "/lib")))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs