Subject: [bug#51410] [PATCH 2/2] gnu: Update ingen.

From: Thorsten Wilms <[email-masked]>
Date: Tue, 26 Oct 2021 13:46:48 +0200

* gnu/packages/music.scm (ingen): New revision, git-fetch recursive for waflib submodule, adjust wscript-patching.
---
 gnu/packages/music.scm | 80 ++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 42 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 07b85b87f6..d4f65a8d10 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 Simon Streit <[email-masked]>
 ;;; Copyright © 2021 Xinglu Chen <[email-masked]>
 ;;; Copyright © 2021 Thomas Albers Raviola <[email-masked]>
+;;; Copyright © 2021 Thorsten Wilms <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4529,7 +4530,7 @@ (define-public mod-utilities
       (license license:gpl2+))))
 
 (define-public ingen
-  (let ((commit "cc4a4db33f4d126a07a4a498e053c5fb9a883be3")
+  (let ((commit "b760e11d5f9f4d25919a566ef727164da4376062")
         (revision "2"))
     (package
       (name "ingen")
@@ -4539,51 +4540,46 @@ (define-public ingen
        (origin
          (method git-fetch)
          (uri (git-reference
-               (url "https://git.drobilla.net/ingen.git")
-               (commit commit)))
+               (url "https://gitlab.com/drobilla/ingen.git")
+               (commit commit)
+	       ;; Include waflib submodule:
+	       (recursive? #t)))
          (file-name (string-append name "-" version "-checkout"))
          (sha256
           (base32
-           "1wg47vjw9djn99gbnsl2bcwj4xhdid61m4wrbn2nlp797flj91ic"))))
+           "1hk8z67ksqga88ivg4r5c87kx7hh1w0cifamm5awwz0583kv5rh9"))))
       (build-system waf-build-system)
       (arguments
-       `(#:python ,python-2
-         #:tests? #f ; no "check" target
-         #:configure-flags (list "--no-webkit")
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'patch-wscript
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (substitute* "wscript"
-                   ;; FIXME: Our version of lv2specgen.py does not behave as
-                   ;; expected.  Maybe this requires a development version of
-                   ;; LV2.
-                   (("lv2specgen.py") "touch ingen.lv2/ingen.html; echo")
-                   ;; Add libraries to RUNPATH.
-                   (("^(.+)target.*= 'src/ingen/ingen'," line prefix)
-                    (string-append prefix
-                                   "linkflags=[\"-Wl,-rpath="
-                                   out "/lib" "\"]," line)))
-                 (substitute* '("src/wscript"
-                                "src/server/wscript")
-                   ;; Add libraries to RUNPATH.
-                   (("bld.env.PTHREAD_LINKFLAGS" line)
-                    (string-append line
-                                   " + [\"-Wl,-rpath=" out "/lib" "\"]")))
-                 (substitute* "src/client/wscript"
-                   ;; Add libraries to RUNPATH.
-                   (("^(.+)target.*= 'ingen_client'," line prefix)
-                    (string-append prefix
-                                   "linkflags=[\"-Wl,-rpath="
-                                   out "/lib" "\"]," line)))
-                 (substitute* "src/gui/wscript"
-                   ;; Add libraries to RUNPATH.
-                   (("^(.+)target.* = 'ingen_gui.*" line prefix)
-                    (string-append prefix
-                                   "linkflags=[\"-Wl,-rpath="
-                                   out "/lib" "\"]," line))))
-               #t)))))
+       `(#:tests? #f ; no "check" target
+	 #:phases
+	 (modify-phases %standard-phases
+	   (add-after 'unpack 'patch-wscript
+	     (lambda* (#:key outputs #:allow-other-keys)
+	       (let ((out (assoc-ref outputs "out")))
+		 (substitute* "wscript"
+		   ;; Add libraries to RUNPATH.
+		   (("^(.+)source.*= 'src/ingen/ingen.cpp'," line prefix)
+		    (string-append prefix
+				   "linkflags=[\"-Wl,-rpath="
+				   out "/lib" "\"]," line)))
+		 (substitute* '("src/wscript"
+				"src/server/wscript")
+		   ;; Add libraries to RUNPATH.
+		   (("bld.env.PTHREAD_LINKFLAGS" line)
+		    (string-append line
+				   " + [\"-Wl,-rpath=" out "/lib" "\"]")))
+		 (substitute* "src/client/wscript"
+		   ;; Add libraries to RUNPATH.
+		   (("^(.+)target.*= 'ingen_client'," line prefix)
+		    (string-append prefix
+				   "linkflags=[\"-Wl,-rpath="
+				   out "/lib" "\"]," line)))
+		 (substitute* "src/gui/wscript"
+		   ;; Add libraries to RUNPATH.
+		   (("^(.+)target.* = 'ingen_gui.*" line prefix)
+		    (string-append prefix
+				   "linkflags=[\"-Wl,-rpath="
+				   out "/lib" "\"]," line))))#t)))))
       (inputs
        `(("boost" ,boost)
          ("python-rdflib" ,python-rdflib)
@@ -4601,7 +4597,7 @@ (define-public ingen
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("python-pygments" ,python-pygments)))
-      (home-page "https://drobilla.net/software/ingen")
+      (home-page "https://drobilla.net/software/ingen.html")
       (synopsis "Modular audio processing system")
       (description "Ingen is a modular audio processing system for JACK and
 LV2 based systems.  Ingen is built around LV2 technology and a strict
-- 
2.33.1