Subject: [bug#37979] [PATCH 1/1] * audio.scm (define public lilv): enable python bindings

From: Florian Paul Schmidt <[email-masked]>
Date: Tue, 29 Oct 2019 10:45:41 +0100

>From 5afa9eac9c34c2e74114f96a6fe746a571b752ee Mon Sep 17 00:00:00 2001
From: Florian Paul Schmidt <[email-masked]>
Date: Tue, 29 Oct 2019 10:34:45 +0100
Subject: [PATCH 1/1] * audio.scm (define public lilv): enable python bindings
 to be built

---
 gnu/packages/audio.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 88f3b5eccd..6438e4e3c6 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1828,6 +1828,7 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
     (build-system waf-build-system)
     (arguments
      `(#:tests? #f                      ; no check target
+       #:configure-flags (list "--bindings")
        #:phases
        (modify-phases %standard-phases
          (add-before
@@ -1836,6 +1837,16 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
             (setenv "LDFLAGS"
                     (string-append "-Wl,-rpath="
                                    (assoc-ref outputs "out") "/lib"))
+            #t))
+         (add-after
+           'unpack 'full-store-path-to-shared-library
+           (lambda* (#:key outputs #:allow-other-keys)
+             (chdir "bindings/python")
+             (substitute*
+                 "lilv.py"
+               (("liblilv-0.so") (string-append (assoc-ref outputs "out")
+                                                "/lib/liblilv-0.so")))
+             (chdir "../../")
             #t)))))
     ;; Required by lilv-0.pc.
     (propagated-inputs
@@ -1844,8 +1855,9 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
        ("sord" ,sord)
        ("sratom" ,sratom)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
-    (home-page "https://drobilla.net/software/lilv/")
+     `(("python" ,python)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://drobilla.net/software/lilv")
     (synopsis "Library to simplify use of LV2 plugins in applications")
     (description
      "Lilv is a C library to make the use of LV2 plugins as simple as possible
-- 
2.23.0