From: Kei Kebreau <kkebreau@posteo.net>
To: Mike Rosset <mike.rosset@gmail.com>
Cc: 39155-done@debbugs.gnu.org
Subject: bug#39155: [PATCH] gnu: tuxguitar: Build and install alsa plugin.
Date: Thu, 23 Jan 2020 21:02:25 -0500 [thread overview]
Message-ID: <87muada9xq.fsf@posteo.net> (raw)
In-Reply-To: <20200116194826.9330-1-mike.rosset@gmail.com> (Mike Rosset's message of "Thu, 16 Jan 2020 11:48:26 -0800")
Hello Mike!
Mike Rosset <mike.rosset@gmail.com> writes:
> * gnu/packages/music.scm (tuxguitar): Allows midi sound output when using
> a synthesizer like timidity.
>
> [inputs]: Adds alsa-lib as an input.
> [phases]: No longer change build directory context between phases.
> [install]: Now install desktop, mime and manual files.
I've changed the format of this log message a bit so it's less
repetitive.
> ---
> gnu/packages/music.scm | 90 +++++++++++++++++++++++++++---------------
> 1 file changed, 59 insertions(+), 31 deletions(-)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index ad369bd3a8..15594ab0ba 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -1746,60 +1746,86 @@ is subjective.")
> (arguments
> `(#:build-target "build"
> #:jdk ,icedtea-8
> - #:tests? #f ; no tests
> + #:tests? #f
I left this comment in since it notes that TuxGuitar actually doesn't
have a test suite, and that we haven't just disabled it for another reason.
> #:phases
> (modify-phases %standard-phases
> - (add-after 'unpack 'enter-dir
> - (lambda _ (chdir "TuxGuitar-lib") #t))
> - (add-after 'build 'build-libraries
> + (replace 'build
> (lambda* (#:key inputs outputs #:allow-other-keys)
> (let* ((initial-classpath (getenv "CLASSPATH"))
> (build-dir (lambda (dir)
> - (chdir "..")
> - (setenv "CLASSPATH"
> - (string-join (cons initial-classpath
> - (find-files (getcwd) "\\.jar$"))
> - ":"))
> - (chdir dir)
> - (if (file-exists? "build.xml")
> - ((assoc-ref %standard-phases 'build)
> - #:build-target "build")
> - (begin
> - ;; Generate default build.xml.
> - ((@@ (guix build ant-build-system) default-build.xml)
> - (string-append (string-downcase dir) ".jar")
> - (string-append (assoc-ref outputs "out")
> - "/share/java"))
> - ((assoc-ref %standard-phases 'build)))))))
> - (map build-dir '("TuxGuitar-editor-utils"
> + (setenv
> + "CLASSPATH"
> + (string-join (cons initial-classpath
> + (find-files (getcwd) "\\.jar$"))
> + ":"))
> + (with-directory-excursion dir
> + (if (file-exists? "build.xml")
> + ((assoc-ref %standard-phases 'build)
> + #:build-target "build")
> + (begin
> + ;; Generate default build.xml.
> + ((@@ (guix build ant-build-system)
> + default-build.xml)
> + (string-append (string-downcase dir) ".jar")
> + (string-append (assoc-ref outputs "out")
> + "/share/java"))
> + ((assoc-ref %standard-phases 'build))))))))
> + (map build-dir '("TuxGuitar-lib"
> + "TuxGuitar-editor-utils"
> "TuxGuitar-ui-toolkit"
> "TuxGuitar-ui-toolkit-swt"
> - "TuxGuitar-awt-graphics")))))
> - (add-after 'build-libraries 'build-application
> + "TuxGuitar-viewer"
> + "TuxGuitar"
> + "TuxGuitar-gm-utils"
> + "TuxGuitar-alsa"
> + "TuxGuitar-midi"
> + "TuxGuitar-midi-ui"))
> + #t)))
> + (add-after 'build 'build-jni
> (lambda _
> - (chdir "../TuxGuitar")
> - ((assoc-ref %standard-phases 'build)
> - #:build-target "build")))
> + (setenv "CC" "gcc")
> + (setenv "CFLAGS" (string-append
> + "-fpic -I"
> + (getcwd)
> + "/build-scripts/native-modules/common-include"))
> + (invoke "make" "-C" "./TuxGuitar-alsa/jni" "-f" "GNUmakefile")))
> (replace 'install
> (lambda* (#:key inputs outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> (bin (string-append out "/bin"))
> (share (string-append out "/share"))
> + (jni-lib (string-append out "/lib"))
> (lib (string-append share "/java"))
> - (swt (assoc-ref inputs "java-swt")))
> + (swt (assoc-ref inputs "java-swt"))
> + (mime (string-append share "/mime/packages"))
> + (app (string-append share "/applications"))
> + (man (string-append share "/man/man1")))
> +
> (mkdir-p bin)
> ;; Install all jars.
> (for-each (lambda (file)
> (install-file file lib))
> - (find-files ".." "\\.jar$"))
> + (find-files "." "\\.jar$"))
> +
> + ;; Install jni libraries
> + (for-each (lambda (file)
> + (install-file file jni-lib))
> + (find-files "." "\\-jni.so$"))
>
> ;; Install all resources.
> - (copy-recursively "share" share)
> + (copy-recursively "./TuxGuitar/share" share)
> +
> + ;; Install desktop and mime files
> + (install-file "./misc/tuxguitar.xml" mime)
> + (install-file "./misc/tuxguitar.desktop" app)
> +
> + ;; Install manaual
> + (install-file "./misc/tuxguitar.1" man)
>
> ;; Create wrapper.
> (call-with-output-file (string-append bin "/tuxguitar")
> (lambda (port)
> - (let ((classpath (string-join (append (find-files lib "\\.jar$")
> + (let ((classpath (string-join (append (find-files lib "\\.jar$")
> (find-files swt "\\.jar$"))
> ":")))
> (format
> @@ -1810,12 +1836,14 @@ is subjective.")
> " -Dtuxguitar.home.path=" out
> " -Dtuxguitar.share.path=" out "/share"
> " -Dswt.library.path=" swt "/lib"
> + " -Djava.library.path=" out "/lib"
> " org.herac.tuxguitar.app.TGMainSingleton"
> " \"$1\" \"$2\"")))))
> (chmod (string-append bin "/tuxguitar") #o555)
> #t))))))
> (inputs
> - `(("java-swt" ,java-swt)))
> + `(("alsa-lib" ,alsa-lib)
> + ("java-swt" ,java-swt)))
> (home-page "http://tuxguitar.com.ar/")
> (synopsis "Multitrack tablature editor and player")
> (description
The rest of this LGTM! This has been pushed to master as commit
44e70dee184c4e4190349def71dc07f05822f591. Thanks for contributing! Now
we guitarists can hear our beautiful
tablature! :-)
Kei
next prev parent reply other threads:[~2020-01-24 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 19:48 [bug#39155] [PATCH] gnu: tuxguitar: Build and install alsa plugin Mike Rosset
2020-01-24 2:02 ` Kei Kebreau [this message]
2020-01-24 2:16 ` Mike Rosset
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87muada9xq.fsf@posteo.net \
--to=kkebreau@posteo.net \
--cc=39155-done@debbugs.gnu.org \
--cc=mike.rosset@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.