summary refs log tree commit diff
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2021-03-05 01:53:36 -0300
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-03-06 13:59:21 +0100
commit75862a9ea7b8902aebe739c784dcbcc82ee4fbf1 (patch)
tree021d3cd1cb17d3219c8c775b6fdcb23ed723a20f
parent5dc130c465c9e0f8c000ded874c9220a97f9bcc4 (diff)
downloadguix-75862a9ea7b8902aebe739c784dcbcc82ee4fbf1.tar.gz
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>
-rw-r--r--gnu/packages/image-processing.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 0b5c792b56..81b90d87ec 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -613,7 +613,18 @@ due to its architecture which automatically parallelises the image workflows.")
         (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