From: Sughosha via Guix-patches via <guix-patches@gnu.org>
To: 74723@debbugs.gnu.org
Cc: Sughosha <sughosha@disroot.org>
Subject: [bug#74723] [PATCH 07/19] gnu: Add stk.
Date: Sat, 7 Dec 2024 17:50:21 +0530 [thread overview]
Message-ID: <f3fc8df511c209cdf7b6e4bcb7153f1c571f807b.1733563475.git.sughosha@disroot.org> (raw)
In-Reply-To: <cover.1733563475.git.sughosha@disroot.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 8304 bytes --]
* gnu/packages/music.scm (stk): New variable.
* gnu/packages/patches/stk-5.0.1-typo.patch: New file.
* gnu/local.mk: Register the patch file.
Change-Id: Iaa2e30506b00c9636b79fe47ee69455c1919c83b
---
gnu/local.mk | 1 +
gnu/packages/music.scm | 120 +++++++++++++++++++++-
gnu/packages/patches/stk-5.0.1-typo.patch | 8 ++
3 files changed, 128 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/stk-5.0.1-typo.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c89fd88282..45e7382bf9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1951,6 +1951,7 @@ dist_patch_DATA = \
%D%/packages/patches/sioyek-fix-build.patch \
%D%/packages/patches/smalltalk-multiplication-overflow.patch \
%D%/packages/patches/sqlite-hurd.patch \
+ %D%/packages/patches/stk-5.0.1-typo.patch \
%D%/packages/patches/strace-readlink-tests.patch \
%D%/packages/patches/sunxi-tools-remove-sys-io.patch \
%D%/packages/patches/p11-kit-hurd.patch \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 871e3e0e1e..de6ef7e7f6 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -45,7 +45,7 @@
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Thomas Albers Raviola <thomas@thomaslabs.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
-;;; Copyright © 2022, 2023 Sughosha <sughosha@disroot.org>
+;;; Copyright © 2022, 2023, 2024 Sughosha <sughosha@disroot.org>
;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
@@ -1793,6 +1793,124 @@ (define-public music21
;; Software is dual-licensed.
(license (list license:bsd-3 license:lgpl3+))))
+(define-public stk
+ (package
+ (name "stk")
+ (version "5.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://ccrma.stanford.edu/software/stk/"
+ "release/stk-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1151cpapg8vc8g2sldkgsj6psksyfkxb77cdrg5am2xvlfp5zhxg"))
+ (patches
+ (search-patches "stk-5.0.1-typo.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix commands.
+ (substitute* (find-files "." "Makefile\\.in")
+ (("/bin/") ""))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no tests
+ #:configure-flags
+ #~(list (string-append "RAWWAVE_PATH=" #$output
+ "/share/stk/rawwaves/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (with-directory-excursion "projects"
+ (for-each (lambda (file)
+ (substitute* (string-drop-right file 4)
+ (("wish") (which "wish"))
+ (("< tcl") (string-append "< " #$output:gui
+ "/share/stk/tcl"))
+ (("\\./") (string-append #$output "/bin/"))))
+ (find-files "." "\\.bat$"))
+ (substitute* (find-files "share/stk/tcl" "\\.tcl$")
+ (("tcl/bitmaps")
+ (string-append #$output:gui "/share/stk/tcl/bitmaps")))
+ (substitute* (find-files "." "\\.cpp$")
+ (("\\.\\./\\.\\./rawwaves")
+ (string-append #$output "/share/stk/rawwaves"))
+ (("\"rawwaves")
+ (string-append "\"" #$output "/share/stk/rawwaves"))))))
+ (add-after 'install 'install-data
+ (lambda _
+ (let* ((bin (string-append #$output "/bin"))
+ (data (string-append #$output "/share/stk"))
+ (rawwaves (string-append data "/rawwaves"))
+ (scores (string-append data "/scores"))
+ (gui (string-append #$output:gui "/bin"))
+ (tcl (string-append #$output:gui "/share/stk/tcl")))
+ (mkdir-p data)
+ ;; Install rawwaves.
+ (copy-recursively "rawwaves" rawwaves)
+ ;; Install projects.
+ (with-directory-excursion "projects"
+ ;; Install project binaries.
+ (for-each (lambda (file)
+ (install-file file bin))
+ (list "demo/stk-demo"
+ "effects/effects"
+ "examples/audioprobe"
+ "examples/bethree"
+ "examples/controlbee"
+ "examples/crtsine"
+ "examples/duplex"
+ "examples/foursine"
+ "examples/grains"
+ "examples/inetIn"
+ "examples/inetOut"
+ "examples/midiprobe"
+ "examples/play"
+ "examples/playsmf"
+ "examples/record"
+ "examples/rtsine"
+ "examples/sine"
+ "examples/sineosc"
+ "examples/threebees"
+ "eguitar/eguitar"
+ "ragamatic/ragamat"))
+ ;; Install project rawwaves.
+ (for-each (lambda (dir)
+ (copy-recursively dir rawwaves))
+ (list "examples/rawwaves"
+ "ragamatic/rawwaves"))
+ ;; Install project scores.
+ (for-each (lambda (dir)
+ (copy-recursively dir scores))
+ (list "demo/scores"
+ "eguitar/scores"
+ "examples/scores"))
+ ;; Install GUI scripts.
+ (for-each (lambda (file)
+ (install-file (string-drop-right file 4) gui))
+ (find-files "." "\\.bat"))
+ ;; Install TCL files
+ (for-each (lambda (dir)
+ (copy-recursively dir tcl))
+ (list "demo/tcl"
+ "effects/tcl"
+ "eguitar/tcl"
+ "ragamatic/tcl")))))))))
+ (outputs
+ '("out" "gui"))
+ (inputs
+ (list alsa-lib jack-2 tk))
+ (home-page "https://ccrma.stanford.edu/software/stk/")
+ (synopsis "Audio signal processing and algorithmic synthesis classes")
+ (description
+ "Synthesis ToolKit in C++ (STK) is a set of audio signal processing and
+algorithmic synthesis classes written in C++.
+
+This package also provides its demo project, examples, ElectricGuitar,
+RagaMatic and Effects.")
+ (license (license:non-copyleft "file:///LICENSE"))))
+
(define-public abjad
(package
(name "abjad")
diff --git a/gnu/packages/patches/stk-5.0.1-typo.patch b/gnu/packages/patches/stk-5.0.1-typo.patch
new file mode 100644
index 0000000000..b4160dcdc6
--- /dev/null
+++ b/gnu/packages/patches/stk-5.0.1-typo.patch
@@ -0,0 +1,8 @@
+This patch fixes typo.
+
+diff -ruN stk-5.0.1-a/projects/eguitar/ElectricGuitar stk-5.0.1-b/projects/eguitar/ElectricGuitar
+--- stk-5.0.1-a/projects/eguitar/ElectricGuitar 2024-11-30 15:07:14.267988301 +0530
++++ stk-5.0.1-b/projects/eguitar/ElectricGuitar 2024-11-30 15:05:40.951986213 +0530
+@@ -1 +1 @@
+-wish < tcl/Eguitar.tcl | ./eguitar -or -ip
++wish < tcl/EGuitar.tcl | ./eguitar -or -ip
--
2.46.0
next prev parent reply other threads:[~2024-12-07 12:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 12:07 [bug#74723] [PATCH 00/19] gnu: lmms, carla: New features, fixes and updates Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 01/19] gnu: lmms: Fix building carla plugins Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 02/19] gnu: carla: Fix making carla executable Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 03/19] gnu: lmms: Enable libsoundio and PulseAudio support Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 04/19] gnu: carla: Enable " Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 05/19] gnu: lmms: Enable MP3 file format support for project export Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 06/19] gnu: carla: Add native-search-paths Sughosha via Guix-patches via
2024-12-07 12:20 ` Sughosha via Guix-patches via [this message]
2024-12-07 12:20 ` [bug#74723] [PATCH 08/19] gnu: lmms: Enable Stk Mallets and GIG Player Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 09/19] gnu: lmms: Enable Wayland support Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 10/19] gnu: carla: " Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 11/19] gnu: Add ringbuffer Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 12/19] gnu: Add libbinio Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 13/19] gnu: Add adplug Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 14/19] gnu: Add exprtk Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 15/19] gnu: carla: Update to 2.5.9 Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 16/19] gnu: Add carla-2.4 Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 17/19] gnu: lmms: Replace carla with carla-2.4 Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 18/19] gnu: Add lmms-1.3 Sughosha via Guix-patches via
2024-12-07 12:20 ` [bug#74723] [PATCH 19/19] gnu: carla-2.6: Update to 2.6.0-1.17000e7 Sughosha via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3fc8df511c209cdf7b6e4bcb7153f1c571f807b.1733563475.git.sughosha@disroot.org \
--to=guix-patches@gnu.org \
--cc=74723@debbugs.gnu.org \
--cc=sughosha@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).