diff mbox series

[bug#68813,core-updates,11/20] gnu: autotrace: Remove libtool archives.

Message ID b5f6d4ec7c18dc3e09d00b5b1f3bba5be1d0eafa.1708618218.git.maxim.cournoyer@gmail.com
State New
Headers show
Series Replace pkg-config with pkgconf to reduce propagation / Inkscape updates | expand

Commit Message

Maxim Cournoyer Feb. 22, 2024, 4:10 p.m. UTC
* gnu/packages/graphics.scm (autotrace)
[arguments] <phases>: Add remove-libtool-archives phase.

Change-Id: Icd8dcf86592231e958db1ebe723e3ec6f902e0bd
---

 gnu/packages/graphics.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index bc7bdc124c..fa33dce747 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -405,7 +405,16 @@  (define-public autotrace
                    ;; or IMAGEMAGICK_; fix that.
                    (substitute* "autotrace.pc.in"
                      (("@MAGICK_(LIBS|CFLAGS)@" _ var)
-                      (string-append "@IMAGEMAGICK_" var "@"))))))))
+                      (string-append "@IMAGEMAGICK_" var "@")))))
+               (add-after 'install 'remove-libtool-archives
+                 ;; Libtool archives lists the whole transitive dependencies,
+                 ;; which is unnecessary unless producing static archives and
+                 ;; leads to overlinking, e.g. causing the build of inkscape
+                 ;; to fail due to looking for a transitive pstoedit library.
+                 (lambda _
+                   (for-each delete-file
+                             (find-files (string-append #$output "/lib")
+                                         "\\.la$")))))))
     (native-inputs
      (list which
            autoconf