unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 26956@debbugs.gnu.org
Subject: bug#26956: [PATCH] Add MuseScore
Date: Wed, 17 May 2017 14:19:35 +0200	[thread overview]
Message-ID: <87ziebr7zc.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87fug432kq.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 16 May 2017 23:37:57 +0200")

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

Hello,

Thank you for the review.

ludo@gnu.org (Ludovic Courtès) writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:
>
>> I used glib-or-gtk-build-system because, somewhere in the Makefile,
>> there's a call to `gtk-update-icon-cache'. However, since that command
>> cannot be found during the build process, I skip it with
>> UPDATE_CACHE=FALSE. So, should I leave the package as-is, or add
>> a "gtk+" input, or simply downgrade to gnu-build-system?
>
> Since it uses Qt, perhaps we’d better use ‘gnu-build-system’ (or
> ‘cmake-build-system’?) no?  Would we lose something?

cmake-build-system is a path I already walked. Using cmake is
insufficient to build the package, as it fails during the install phase.

IIUC, the Makefile is a wrapper that calls the cmake command, which, in
turn, generates a new make target that the initial make call can
process... The new target is responsible for, at the very least,
generating the translation files.

About gnu-build-system, I don't know if we loose something. It builds
with it. I can run the application. I thought that calling
gtk-update-icon-cache was somehow a clue that glib-or-gtk-build-system
would be needed, but I was wrong, if I interpret correctly your
question.

The updated patch uses gnu-build-system.

> FWIW I trimmed the description a bit

OK.

> and moved ‘cmake’ to ‘native-inputs’.

Maybe the linter could suggest it. It already told me that "qttools"
input should be moved there, but didn't complain about "cmake".

> Also, a couple of #:use-module were missing.

Oops. It probably happened when I moved the package definition from my
incubator to music.scm.

About the bundled freetype library: it is skipped per the cmake option.
Should we also delete it from source in a snippet or is it fine as-is?

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

[-- Attachment #2: 0001-gnu-Add-MuseScore.patch --]
[-- Type: text/x-diff, Size: 4535 bytes --]

From b477f78c67572b2d979a4d00a6e4a29dce566baf Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue, 16 May 2017 17:55:29 +0200
Subject: [PATCH] gnu: Add MuseScore.

* gnu/packages/music.scm (musescore): New variable.
---
 gnu/packages/music.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index d4a72df1d..427f1e2f4 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
 ;;; Copyright © 2017 Rodger Fox <thylakoid@openmailbox.org>
+;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages code)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
@@ -2990,3 +2992,79 @@ are a C compiler and glib.  Full API documentation and examples are included.")
 melodies and beats and for mixing and arranging songs.  LMMS includes instruments based on
 audio samples and various soft sythesizers.  It can receive input from a MIDI keyboard.")
     (license license:gpl2+)))
+
+(define-public musescore
+  (package
+    (name "musescore")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/musescore/MuseScore/archive/"
+                    "v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0irwsq6ihfz3y3b943cwqy29g3si7gqbgxdscgw53vwv9vfvi085"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
+         ;; Skip update-mime-database and gtk-update-icon-cache.
+         "UPDATE_CACHE=FALSE")
+       ;; There are tests, but no simple target to run.  The command
+       ;; used to run them is:
+       ;;
+       ;;   make debug && sudo make installdebug && cd \
+       ;;   build.debug/mtest && make && ctest
+       ;;
+       ;; Basically, it requires to start a whole new build process.
+       ;; So we simply skip them.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'use-system-freetype
+           (lambda _
+             (substitute* "Makefile"
+               ;; XXX: For the time being, we grossly insert the CMake
+               ;; option needed to ignore bundled freetype.  However,
+               ;; there's a pending PR to have it as a regular make
+               ;; option, in a future release.
+               (("cmake -DCMAKE") "cmake -DUSE_SYSTEM_FREETYPE=ON -DCMAKE"))
+             #t)))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("freetype" ,freetype)
+       ("jack" ,jack-1)
+       ("lame" ,lame)
+       ("libogg" ,libogg)
+       ("libsndfile" ,libsndfile)
+       ("libvorbis" ,libvorbis)
+       ("openssl" ,openssl)
+       ("portaudio" ,portaudio)
+       ("pulseaudio" ,pulseaudio)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtscript" ,qtscript)
+       ("qtsvg" ,qtsvg)
+       ("qtwebkit" ,qtwebkit)
+       ("qtxmlpatterns" ,qtxmlpatterns)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("cmake" ,cmake)
+       ("qttools" ,qttools)))
+    (synopsis "Music composition and notation software")
+    (description "MuseScore is a music score typesetter.  Its main purpose is
+the creation of high-quality engraved musical scores in a WYSIWYG environment.
+
+It supports unlimited staves, linked parts and part extraction, tablature,
+MIDI input, percussion notation, cross-staff beaming, automatic transposition,
+lyrics (multiple verses), fretboard diagrams, and in general everything
+commonly used in sheet music.  Style options and style sheets to change the
+appearance and layout are provided.
+
+MuseScore can also play back scores through the built-in sequencer and SoundFont
+sample library.")
+    (home-page "https://musescore.org")
+    (license license:gpl2)))
-- 
2.13.0


  reply	other threads:[~2017-05-17 12:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 16:07 bug#26956: [PATCH] Add MuseScore Nicolas Goaziou
2017-05-16 21:37 ` Ludovic Courtès
2017-05-17 12:19   ` Nicolas Goaziou [this message]
2017-05-18 12:21     ` Ludovic Courtès
2017-05-20  9:00       ` Nicolas Goaziou
2017-05-23 11:55         ` Ludovic Courtès
2017-05-23 12:13           ` Nicolas Goaziou

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=87ziebr7zc.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=26956@debbugs.gnu.org \
    --cc=ludo@gnu.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).