Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40139 closed submission (fixed)

frescobaldi @2.0.10

Reported by: dliessi (Davide Liessi) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: frescobaldi

Description

Frescobaldi is a LilyPond sheet music text editor (see http://www.frescobaldi.org/). It depends on python-poppler-qt4, a Python binding for Poppler-Qt4 (see https://code.google.com/p/python-poppler-qt4/). I have just submitted a Portfile for python-poppler-qt4 as ticket #40138.

Attachments (18)

Portfile (1.6 KB) - added by dliessi (Davide Liessi) 11 years ago.
Portfile.2 (1.4 KB) - added by dliessi (Davide Liessi) 11 years ago.
Add modeline to Portfile; remove 'no_*' variants
Portfile.3 (1.5 KB) - added by dliessi (Davide Liessi) 11 years ago.
Add notes about fluidsynth and SoundFonts for MIDI output
Portfile.4 (1.7 KB) - added by dliessi (Davide Liessi) 11 years ago.
Better wording and further explanation of MIDI/audio output support in notes
Portfile.5 (1.7 KB) - added by dliessi (Davide Liessi) 11 years ago.
Make python26 and python27 variants conflict
Portfile.6 (4.7 KB) - added by dliessi (Davide Liessi) 11 years ago.
upgrade to 2.0.11; use github portgroup; remove python version suffix from link inside ${prefix}/bin; properly place files in ${prefix}/share; create application bundle
frescobaldi.icns (300.9 KB) - added by dliessi (Davide Liessi) 11 years ago.
icons file for application bundle
Portfile.7 (4.7 KB) - added by dliessi (Davide Liessi) 11 years ago.
oops, remove forgotten conflicts line
Portfile.8 (3.6 KB) - added by dliessi (Davide Liessi) 11 years ago.
extract Info.plist and InfoPlist.strings from the Portfile
Info.plist (832 bytes) - added by dliessi (Davide Liessi) 11 years ago.
InfoPlist.strings (191 bytes) - added by dliessi (Davide Liessi) 11 years ago.
Portfile.9 (4.4 KB) - added by dliessi (Davide Liessi) 11 years ago.
add -devel subport
Portfile.10 (4.8 KB) - added by dliessi (Davide Liessi) 11 years ago.
use py2app instead of cx_Freeze; solves some problems with file association
file_open_eventhandler.py (1.8 KB) - added by dliessi (Davide Liessi) 11 years ago.
mac-app.py (4.2 KB) - added by dliessi (Davide Liessi) 11 years ago.
patch-frescobaldi_app-main.py.diff (2.0 KB) - added by dliessi (Davide Liessi) 11 years ago.
Portfile.11 (4.6 KB) - added by dliessi (Davide Liessi) 11 years ago.
mac-app.2.py (2.3 KB) - added by dliessi (Davide Liessi) 11 years ago.

Download all attachments as: .zip

Change History (35)

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Port: frescobaldi added

Thanks. Some observations:

  • The standard modeline should be added and the portfile's whitespace should be changed to conform to it (indentations at multiples of 4 spaces)
  • Variants whose names begin with "no_" are deprecated and should not be added to new ports. Instead use positively-named variants and enable them by default using default_variants.
  • It's usually insufficient for a variant to merely add or remove a dependency. Usually configure arguments, environment variables or patches have to also be used to ensure that the software does not include support for the given feature in the event that the user has already installed the dependency but not selected the corresponding variant.
  • Do there actually need to be variants to remove portmidi or py-python-poppler-qt4? Is there any problem with just leaving them enabled all the time and dispensing with the variants?
  • The python 1.0 portgroup is usually used to build python modules; I'm surprised to see it used here to add python variants to a non-python-module port. Does that actually work?

comment:2 in reply to:  1 Changed 11 years ago by dliessi (Davide Liessi)

Replying to ryandesign@…:

  • The standard modeline should be added and the portfile's whitespace should be changed to conform to it (indentations at multiples of 4 spaces)

Will do (also in #40138).

  • Variants whose names begin with "no_" are deprecated and should not be added to new ports. Instead use positively-named variants and enable them by default using default_variants.
  • It's usually insufficient for a variant to merely add or remove a dependency. Usually configure arguments, environment variables or patches have to also be used to ensure that the software does not include support for the given feature in the event that the user has already installed the dependency but not selected the corresponding variant.
  • Do there actually need to be variants to remove portmidi or py-python-poppler-qt4? Is there any problem with just leaving them enabled all the time and dispensing with the variants?

frescobaldi works correctly as an editor with or without portmidi or py-python-poppler-qt4, which are used to preview MIDI and PDF output within the program.

I added those variants because portmidi is declared as optional even by the author and maybe some people don't want to install poppler with qt4 variant (because this needs a long build time on the user machine).

Other than that, I can't see any reason to avoid PDF and MIDI preview, so I think I will remove the variants. If you prefer to keep the variants, I will address your previous observations.

  • The python 1.0 portgroup is usually used to build python modules; I'm surprised to see it used here to add python variants to a non-python-module port. Does that actually work?

frescobaldi is entirely written in Python, so I thought that I should use python portgroup. The program (as the author says in https://github.com/wbsoft/frescobaldi/blob/master/INSTALL) doesn't have a build phase, but the install command is the same as provided by python portgroup. I could avoid the python portgroup and manually specify the install command, I just thought it was more convenient to use the portgroup. What do you think?

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.2 added

Add modeline to Portfile; remove 'no_*' variants

comment:3 Changed 11 years ago by dliessi (Davide Liessi)

If it is better to keep the possibility to not have MIDI or PDF support, I will add the 'no_*' variants again, addressing the observations in comment:1 (positively-named variants enabled by default).

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.3 added

Add notes about fluidsynth and SoundFonts for MIDI output

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.4 added

Better wording and further explanation of MIDI/audio output support in notes

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.5 added

Make python26 and python27 variants conflict

comment:4 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.6 added

upgrade to 2.0.11; use github portgroup; remove python version suffix from link inside ${prefix}/bin; properly place files in ${prefix}/share; create application bundle

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: frescobaldi.icns added

icons file for application bundle

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.7 added

oops, remove forgotten conflicts line

comment:5 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Everything looks fine to me, except the Info.plist embedded in the portfile. You can add files in the files/ subdirectory located in the port directory. From there you can copy it to its final destination via the copy or xinstall verb.

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.8 added

extract Info.plist and InfoPlist.strings from the Portfile

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Info.plist added

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: InfoPlist.strings added

comment:6 in reply to:  5 Changed 11 years ago by dliessi (Davide Liessi)

Replying to g5pw@…:

Everything looks fine to me, except the Info.plist embedded in the portfile. You can add files in the files/ subdirectory located in the port directory. From there you can copy it to its final destination via the copy or xinstall verb.

Done. The files/ subdirectory should contain frescobaldi.icns, Info.plist and InfoPlist.strings.

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.9 added

add -devel subport

comment:7 Changed 11 years ago by dliessi (Davide Liessi)

See #40831 about the set PortInfo(name) ${subport} thing.

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.10 added

use py2app instead of cx_Freeze; solves some problems with file association

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: file_open_eventhandler.py added

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: mac-app.py added

Changed 11 years ago by dliessi (Davide Liessi)

comment:8 Changed 11 years ago by dliessi (Davide Liessi)

I'm sorry for the multiplication of files. :)

The files needed for the last version of the Portfile (Portfile.10) are:

  • file_open_eventhandler.py
  • frescobaldi.icns
  • InfoPlist.strings
  • mac-app.py
  • patch-frescobaldi_app-main.py.diff

Info.plist is no longer necessary.

comment:9 Changed 11 years ago by dliessi (Davide Liessi)

I understand that including a large binary file such as frescobaldi.icns in the files/ directory is not good practice. I'll update the Portfile soon.

comment:10 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Owner: changed from macports-tickets@… to g5pw@…
Status: newassigned

It would be good to depend on lilypond{,-devel}, too, right?

comment:11 in reply to:  10 ; Changed 11 years ago by dliessi (Davide Liessi)

Replying to g5pw@…:

It would be good to depend on lilypond{,-devel}, too, right?

I don't think so. Most LilyPond users (at least the ones on the lilypond-user list) prefer to download LilyPond.app from the website (which is the advised installation method). I would prefer to let the user choose how to install LilyPond.

(Frescobaldi will work with any LilyPond installation, and excluding the compilation of the source it will work also without a LilyPond installation.)

By the way, thanks for taking care of this ticket. As soon as a couple of changes will be committed to Frescobaldi, I'll update the Portfile (also for the stable version: some bug fixes will be back-ported).

comment:12 in reply to:  11 ; Changed 11 years ago by g5pw (Aljaž Srebrnič)

Replying to davide.liessi@…:

Replying to g5pw@…:

It would be good to depend on lilypond{,-devel}, too, right?

I don't think so. Most LilyPond users (at least the ones on the lilypond-user list) prefer to download LilyPond.app from the website (which is the advised installation method). I would prefer to let the user choose how to install LilyPond.

Why not instruct MacPorts on how to build Lilypond.app and use that? If you let the user choose, are you sure you're not gonna have headaches by users installing old lilypond versions, or just users who don't know they have to download lilypond.app or install it via MacPorts for Frescobaldi to work?

This just happened to me: I was sure i had lilypond installed via macports, I fired up Frescobaldi and tried to build an example file. When I pressed Engrave nothing happened. I looked quickly around for any error message, but found none. So I labeled it as not working for me. After some time, I remember I hadn't installed lilypond after my Mavericks upgrade. So, some users will install frescobaldi without installing LilyPond, and this will lead to confusion.

Maybe it's better to investigate why does the users prefer downloading lilypond rather than installing through macports.

(Frescobaldi will work with any LilyPond installation, and excluding the compilation of the source it will work also without a LilyPond installation.)

By the way, thanks for taking care of this ticket. As soon as a couple of changes will be committed to Frescobaldi, I'll update the Portfile (also for the stable version: some bug fixes will be back-ported).

Great, I'll wait for the patches. By the way, the application fails at runtime on my machine (MacBook 10.9) with this error:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 86, in engraveRunner
    self.engravePreview()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 90, in engravePreview
    self.engrave(True)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 127, in engrave
    self.runJob(command.defaultJob(doc, preview), doc)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 148, in runJob
    jobmanager.manager(document).startJob(job)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/jobmanager.py", line 62, in startJob
    job.start()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/job.py", line 131, in start
    self._process.start(self.command[0], self.command[1:])
TypeError: arguments did not match any overloaded call:
  QProcess.start(QString, QStringList, QIODevice.OpenMode mode=QIODevice.ReadWrite): argument 1 has unexpected type 'bool'
  QProcess.start(QString, QIODevice.OpenMode mode=QIODevice.ReadWrite): argument 1 has unexpected type 'bool'

I don't know if it's related to the fact that I don't have LilyPond installed.

comment:13 in reply to:  12 Changed 11 years ago by dliessi (Davide Liessi)

Replying to g5pw@…:

When I pressed Engrave nothing happened. I looked quickly around for any error message, but found none.

[...]

By the way, the application fails at runtime on my machine (MacBook 10.9) with this error:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 86, in engraveRunner
    self.engravePreview()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 90, in engravePreview
    self.engrave(True)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 127, in engrave
    self.runJob(command.defaultJob(doc, preview), doc)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/engrave/__init__.py", line 148, in runJob
    jobmanager.manager(document).startJob(job)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/jobmanager.py", line 62, in startJob
    job.start()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/frescobaldi_app/job.py", line 131, in start
    self._process.start(self.command[0], self.command[1:])
TypeError: arguments did not match any overloaded call:
  QProcess.start(QString, QStringList, QIODevice.OpenMode mode=QIODevice.ReadWrite): argument 1 has unexpected type 'bool'
  QProcess.start(QString, QIODevice.OpenMode mode=QIODevice.ReadWrite): argument 1 has unexpected type 'bool'

I don't know if it's related to the fact that I don't have LilyPond installed.

Yes, it is related to that, and it is a bug. Also the lack of a message explaining the need to install LilyPond or to point Frescobaldi's preferences to an existing LilyPond installation is surely a bug in Frescobaldi. I'm going to fix this tonight.

With respect to the choice of LilyPond installation, I think I changed my mind. Despite the fact that many Linux distributions include a LilyPond package, LilyPond developers encourage people to download and install LilyPond manually, to ensure that the user has a recent version. But as far as I can see the LilyPond ports are kept reasonably up to date (latest stable, only one development version behind), so installing through MacPorts doesn't have that kind of disadvantage. I've also noticed that Frescobaldi packages in Linux distributions have LilyPond as a dependency. I'll think about it and discuss with Frescobaldi's main author, but I think that adding a dependency on LilyPond is OK.

Anyway I would depend on the LilyPond binary (with default port set to lilypond) rather than lilypond port.

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: Portfile.11 added

Changed 11 years ago by dliessi (Davide Liessi)

Attachment: mac-app.2.py added

comment:14 Changed 11 years ago by dliessi (Davide Liessi)

The files needed by Portfile.11 are InfoPlist.strings and mac-app.2.py; ignore the other files.

I didn't discuss this with Frescobaldi's author, but I decided not to depend on lilypond(-devel) port at the moment, for the following reasons:

  • a dialog has been added to frescobaldi-devel and also back-ported to frescobaldi that informs the user that LilyPond was not found;
  • forcing the user to download and install texlive +doc+medium seems to me a bit excessive, considering that you don't need it to use LilyPond;
  • this is the same situation as TeXShop/TeXShop3 ports: a text editor specialized in the *TeX language(s) doesn't have texlive as a dependency (I presume because there's more than one way to install a TeX system on a machine, and MacPorts is not, as I understand, the predominant one);
  • lilypond-devel does not compile on my machine (I'll file a bug report soon).

comment:15 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Fine by me. I'll test and commit it today or tomorrow.

comment:16 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: assignedclosed

Commited in r112987, thanks for the patience.

comment:17 in reply to:  16 Changed 11 years ago by dliessi (Davide Liessi)

Thanks for taking care of this.

Note: See TracTickets for help on using tickets.