summary refs log tree commit diff
path: root/gnu/packages/libbsd.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-09-10 19:21:39 +0200
committerMarius Bakke <marius@gnu.org>2022-09-10 20:08:38 +0200
commitae406b91e2aecf2a7c45c456d7e0f4dfd0aeb928 (patch)
tree49698949ccd4e4d69d7c0ea8c0fecb7f8b8649b7 /gnu/packages/libbsd.scm
parent1d526f5035ce51305d8f414b8f55066adedb6f91 (diff)
downloadguix-ae406b91e2aecf2a7c45c456d7e0f4dfd0aeb928.tar.gz
gnu: libbsd: Embed absolute references to libmd.
* gnu/packages/libbsd.scm (libbsd)[arguments]: Add phase to embed absolute
libmd references.
Diffstat (limited to 'gnu/packages/libbsd.scm')
-rw-r--r--gnu/packages/libbsd.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/libbsd.scm b/gnu/packages/libbsd.scm
index 9759d1b5ad..79f1389081 100644
--- a/gnu/packages/libbsd.scm
+++ b/gnu/packages/libbsd.scm
@@ -40,6 +40,23 @@
     (arguments
      (list #:configure-flags #~'("--disable-static")
            #:phases #~(modify-phases %standard-phases
+                        (add-after 'install 'embed-absolute-libmd-references
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (let ((libmd (search-input-file inputs
+                                                            "lib/libmd.so")))
+                              ;; Add absolute references to libmd so it
+                              ;; does not need to be propagated.
+                              (with-directory-excursion #$output
+                                (substitute* "lib/libbsd.so"
+                                  (("^GROUP")
+                                   (string-append "SEARCH_DIR("
+                                                  (dirname libmd)
+                                                  ")\nGROUP")))
+                                (substitute* (find-files "lib/pkgconfig"
+                                                         "\\.pc$")
+                                  (("-lmd")
+                                   (string-append "-L" (dirname libmd)
+                                                  " -lmd")))))))
                         (add-before 'check 'disable-pwcache-test
                           (lambda _
                             ;; This test expects the presence of a root