From patchwork Tue Oct 31 13:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosha X-Patchwork-Id: 55731 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C11C027BBEA; Tue, 31 Oct 2023 13:47:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4A33827BBE2 for ; Tue, 31 Oct 2023 13:47:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxp4j-000270-LY; Tue, 31 Oct 2023 09:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxp4g-00025h-52 for guix-patches@gnu.org; Tue, 31 Oct 2023 09:46:30 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxp4f-0006tb-TV for guix-patches@gnu.org; Tue, 31 Oct 2023 09:46:29 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxp5D-0004WQ-Jr for guix-patches@gnu.org; Tue, 31 Oct 2023 09:47:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65367] [PATCH v2 4/4] gnu: Add stargate. Resent-From: Sughosha Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Oct 2023 13:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65367@debbugs.gnu.org Cc: Sughosha Received: via spool by 65367-submit@debbugs.gnu.org id=B65367.169875997317266 (code B ref 65367); Tue, 31 Oct 2023 13:47:03 +0000 Received: (at 65367) by debbugs.gnu.org; 31 Oct 2023 13:46:13 +0000 Received: from localhost ([127.0.0.1]:47764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxp4O-0004UL-DW for submit@debbugs.gnu.org; Tue, 31 Oct 2023 09:46:13 -0400 Received: from layka.disroot.org ([178.21.23.139]:38964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxp4I-0004TY-4G for 65367@debbugs.gnu.org; Tue, 31 Oct 2023 09:46:07 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A757044D6E; Tue, 31 Oct 2023 14:45:31 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vridg4QEulnV; Tue, 31 Oct 2023 14:45:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1698759930; bh=mhbxheBpnGPjHLCfsybcAACKr5NhR1zUD7qPFcvnu48=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TdTrb+8T9XXL011cEkcYSMuD7eJz5e6VtwrLgNv8jZk/XOTtykNuXgD7aclN+FF21 KUiqWvSUrhFcxlN6IjVBv6OQBkiUJfQaFCuExjSinOpdEO76bF7PMIuuuWfuudiTiM MvoIYFY7uno/9aOaDHAzxhUIWCAl6esbXzJws14iSzQY1hzL5lNnJ7rQvBHNmeo0Ry z5xAYwXnKWVezUXqr0n9iOdQgZ+g8wVkUfqqrJtV/S56wlcU1IBcrX/+ky/WHl4xLD /ll/K4FIr99Pf9WStGG4HlYt8JzuSgKXlAKKs+9EiYJGtS/g14GAl4LpN5MQEPsNj7 Xv59Fa7JdEUpw== Date: Tue, 31 Oct 2023 14:44:43 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sughosha X-ACL-Warn: , Sughosha via Guix-patches X-Patchwork-Original-From: Sughosha via Guix-patches via From: Sughosha Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/music.scm (stargate): New variable. --- gnu/packages/music.scm | 182 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index b181c86b45..34f46fbb2c 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -3479,6 +3479,188 @@ (define-public aj-snapshot from the command line.") (license license:gpl3+))) +(define-public stargate + (package + (name "stargate") + (version "23.08.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stargatedaw/stargate") + (commit (string-append "release-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0flnvf9f175bk8xmhpfqjvw10jxhd5cl55viwahai3p531ld30zc")) + (modules '((guix build utils))) + ;; Devendor bundled packages. + (snippet + '(with-directory-excursion "src" + (delete-file-recursively "sg_py_vendor") + (substitute* (find-files "sglib" "\\.py$") + (("from sg_py_vendor ") "")) + (substitute* "Makefile" + ((" sg_py_vendor") "") + (("install -m 755 vendor") "# install -m 755 vendor")))))) + (build-system gnu-build-system) + (arguments + (list #:test-target "tests" + #:make-flags + #~(list "distro" + "PREFIX=/" + "SG_DIR=/lib/stargate" + (string-append "CC=" #$(cc-for-target)) + (string-append "CXX=" #$(cxx-for-target)) + (string-append "DESTDIR=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "src"))) + (delete 'configure) ;no configure script + (add-before 'build 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "sgui/widgets/hardware_dialog.py" + (("libportaudio\\.so") + (search-input-file inputs "/lib/libportaudio.so")) + (("libportmidi\\.so") + (search-input-file inputs "/lib/libportmidi.so"))) + (substitute* "test_parse.sh" + (("python") (which "python3"))) + (substitute* "engine/tests/test_daw.c" + (("INSTALL_PREFIX") "// INSTALL_PREFIX")) + (with-directory-excursion "files/share" + (substitute* '("applications/stargate.desktop" + "doc/stargate/copyright") + (("/usr") #$output))))) + (add-before 'check 'check-setup + (lambda _ + (setenv "HOME" "/tmp") + (setenv "LD_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + ;; test_to_from_str_reorder fails. + (delete-file "test/sglib/models/daw/routing/test_midi.py") + ;; Disable testing with browser. + (substitute* "Makefile" + (("\\$\\(BROWSER\\)") "# $(BROWSER)")))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (let ((bin (string-append #$output "/bin")) + (lib (string-append #$output "/lib/stargate")) + (share (string-append #$output "/share"))) + (rename-file "files/share" "share") + (apply invoke "make" "install_self_contained" make-flags) + (mkdir-p bin) + (symlink (string-append lib "/scripts/stargate") + (string-append bin "/stargate")) + (copy-recursively "share" share)))) + (add-after 'install 'wrap-program + (lambda _ + (wrap-program (string-append #$output "/bin/stargate") + `("GUIX_PYTHONPATH" ":" prefix + (,(getenv "GUIX_PYTHONPATH"))) + `("LD_LIBRARY_PATH" ":" prefix + (,(getenv "PATH"))) + `("PATH" ":" prefix + (,(getenv "PATH"))))))))) + (native-inputs + (list pkg-config + python-gcovr + python-packaging + python-pytest + python-pytest-cov + python-pytest-runner)) + (inputs + (list alsa-lib + bash-minimal + fftw + fftwf + jq + libsndfile + portaudio + portmidi + python + python-jinja2 + python-mido + python-mutagen + python-psutil + python-pymarshal + python-pyqt + python-pyyaml + python-wavefile + python-yq + rubberband + ;; Fork of the libsbsms. + (let ((commit "90fab3440063dc9b6c1c2a8f74c2d92bd0e423f9") + (revision "0")) + (package/inherit libsbsms + (name "stargate-sbsms") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/stargatedaw/stargate-sbsms") + (commit commit))) + (sha256 + (base32 + "11srnzgpavcj6n70zjdm7488jzrprk71mg9dgr1sa6vwp575hf2m")))) + (arguments + (substitute-keyword-arguments (package-arguments libsbsms) + ((#:phases phases) + #~(modify-phases #$phases + (delete 'fix-ar-lib-path) + (add-before 'build 'change-directory + (lambda _ + (chdir "cli"))) + (replace 'configure + (lambda _ + (setenv "DESTDIR" #$output) + (setenv "PREFIX" "/"))) + (add-after 'install 'rename-binary + (lambda _ + (with-directory-excursion + (string-append #$output "/bin") + (rename-file "sbsms" + "stargate-sbsms")))) + (delete 'check))))) + (native-inputs + (list libsndfile)) + (home-page "https://stargatedaw/stargate-sbsms"))) + ;; Fork of soundtouch with extra features and fixes. + (let ((commit "464f474c0be5d7e0970909dd30593012e4621468") + (revision "0")) + (package/inherit soundtouch + (name "stargate-soundtouch") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/stargatedaw/stargate-soundtouch") + (commit commit))) + (sha256 + (base32 + "1aw2j1f10p8n4s197b1nd3g1rjvwbrrszc9gwsbwk01c6nb3nr9v")))) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'install 'rename-binary + (lambda _ + (with-directory-excursion + (string-append #$output "/bin") + (rename-file "soundstretch" + "stargate-soundstretch"))))))) + (home-page "https://stargatedaw/stargate-soundtouch"))))) + (home-page "https://github.com/stargatedaw/stargate") + (synopsis "Digital audio workstation") + (description + "Stargate is a digital audio workstation, with built-in instrument and +effect plugins and wave editor, providing innovative features, especially for +EDM production.") + (license license:gpl3))) + (define-public qtractor (package (name "qtractor")