[bug#76719,1/2] gnu: Add mt32emu.

Message ID 9d2ff0cf36b6eacc11db742f6e68416fc5909ca4.1741033387.git.wongandj@icloud.com
State New
Headers
Series Update Dosbox-Staging. |

Commit Message

Andrew Wong March 3, 2025, 8:30 p.m. UTC
  * gnu/packages/audio.scm (mt32emu): New variable.

Change-Id: I458e4722ac012935814643a2925e185c46ecaba3
---
 gnu/packages/audio.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
  

Comments

Gabriel Wicki March 4, 2025, 10:19 a.m. UTC | #1
Hi there!

First of all: thanks for your time and effort.

On Mon, Mar 03, 2025 at 03:30:22PM -0500, Andrew Wong wrote:
> +(use-modules (guix build utils))
This is usually part of the header of the scheme module.

> +    (arguments
> +     (list
> +      #:tests? #f
Please comment why tests are deactivated - are they missing?

> +      #:phases #~(modify-phases %standard-phases
> +                   (add-after 'unpack 'chdir
> +                     (lambda _ (chdir "mt32emu"))))))
Not sure if this couldn't be specified in a dedicated argument for the
cmake-build-system.  But if it works (and this argument does not exist)
this is ok to me.


Otherwise this patch looks good to me.


Thanks again
gabber
  

Patch

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 9f50f7f940..1b134cd911 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2030,6 +2030,36 @@  (define-public midicomp
       (home-page "https://github.com/markc/midicomp")
       (license license:agpl3))))
 
+(use-modules (guix build utils))
+(define-public mt32emu
+  (package
+    (name "mt32emu")
+    (version "2.7.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/munt/munt")
+             (commit (string-append "libmt32emu_"
+                                    (string-replace-substring
+                                     version "." "_")))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "06d3jzx69nwy9jj6jv9q6rhq5399mp51w6d5mijg3fmwr4al13fd"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:tests? #f
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'chdir
+                     (lambda _ (chdir "mt32emu"))))))
+    (home-page "https://sourceforge.net/projects/munt/")
+    (synopsis "Pre-GM Roland MIDI device emulator")
+    (description "libmt32emu is a C/C++ library which approximately emulates
+the Roland MT-32, CM-32L and LAPC-I synthesizer modules. It is part of the
+Munt project.")
+    (license license:gpl2+)))
+
 (define-public clalsadrv
   (package
     (name "clalsadrv")