In Fedora we don't have lame in official repos, only 3rd party (rpmfusion), so we want to have something like if lame not found - just disable mp3 support.
What do you meant make it optipnal? It *is* optional - no one forces you to use it. Unless I am misunderstanding something, Fedora is not special here - LAME isn't provided with Windows, MacOS, or other Linux distros either.
OK, but this also is no different than Windows (and presumably MacOS), where you need to install those headers - and potentially quite a few others - manually. I'm not sure we really need to support building of MuseScore in cases where there is no lame, portaudio, libsndfile, libvorbis, jack, or heck, even Qt. On the other hand, if it's easy to do this for LAME specifically, I guess there is no harm in it...
this is my patch. It's just dropping mp3 support everywhere. I think we need to handle if mp3 not found. I can have a time to look at it and write correct patch if you will not able to do this till weekedn.
mp3 is optional but the build still fails in the cmake section if lame isn't installed.
Can this be taken care of with a cmake option w/o needing the patch?
Thanks. That worked. I need to remove mp3 support, otherwise I would have to put the package into the restricted (tainted) repo which we don't want.
I am attaching the patch if someone is interested.
MP3 support is enabled by default but can be disabled by calling cmake with the option -DCMAKE_NON_FREE_LIBS="DISABLED". This can also be done from the top-level Makefile by overriding the Makefile variable NON_FREE with "DISABLED". (i.e. make NON_FREE="DISABLED" && make NON_FREE="DISABLED" install)
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
The solution that has just been merged works slightly differently to the one proposed. lasconic requested I name the option "disable mp3 support" instead of "disable non-free" because mp3 is currently the only non-free component. Here is how you can use it.
By default LAME (i.e. mp3 support) is enabled. To disable mp3 support use:
make BUILD_LAME="OFF"
make BUILD_LAME="OFF" install
or call CMake like this:
cmake -DBUILD_LAME="OFF"
If other non-free components are added in the future then they will receive their own CMake options and a wider "disable non-free" option might then be justifiable.
Accidental double post. I tried to reply to my previous post but for some reason it posted a new comment instead. I definitely clicked "reply" and not "leave a new comment", I checked ;)
Sorry for commenting again, but I thought most of you would find this useful. Since there are a few package maintainers in this thread I thought I'd point out this Package Maintainers' Wishlist I've made specifically for packaging-related feature requests. Ideally you should be able to package MuseScore without needing any patches. If you still have any patches please add them to the list for merging upstream, possibly with a link to more information that could be in the form of a bug report in the issue tracker (like this one). Thanks.
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
Comments
What do you meant make it optipnal? It *is* optional - no one forces you to use it. Unless I am misunderstanding something, Fedora is not special here - LAME isn't provided with Windows, MacOS, or other Linux distros either.
I mean that it requires headers from lame, otherwise it's failing to build. Making optional == allow building if no LAME headers found.
OK, but this also is no different than Windows (and presumably MacOS), where you need to install those headers - and potentially quite a few others - manually. I'm not sure we really need to support building of MuseScore in cases where there is no lame, portaudio, libsndfile, libvorbis, jack, or heck, even Qt. On the other hand, if it's easy to do this for LAME specifically, I guess there is no harm in it...
Igor, I see you did it here http://koji.fedoraproject.org/koji/buildinfo?buildID=630864 but I fail to find to your code change. Can you point me to it ?
http://pkgs.fedoraproject.org/cgit/mscore.git/tree/MuseScore-2.0.0-remo…
this is my patch. It's just dropping mp3 support everywhere. I think we need to handle if mp3 not found. I can have a time to look at it and write correct patch if you will not able to do this till weekedn.
mp3 is optional but the build still fails in the cmake section if lame isn't installed.
Can this be taken care of with a cmake option w/o needing the patch?
There is already a CMake option https://github.com/musescore/MuseScore/blob/master/CMakeLists.txt#L75
Thanks. That worked. I need to remove mp3 support, otherwise I would have to put the package into the restricted (tainted) repo which we don't want.
I am attaching the patch if someone is interested.
If we were to upstream this and make mp3 optional via a new Makefile target, would that be acceptable?
E.g. `make --disable_non-free` or `make --no-mp3`
Would that be good enough for packaging with Fedora?
Edit: I see, it's a tiny change and is essentially already upstream.
I cannot speak for Fedora but it would be OK for Mageia.
Yes, it's well enough for fedora. Why not in cmake -Ddisable_non_free=false?
There is an implementation in PR 2153.
MP3 support is enabled by default but can be disabled by calling cmake with the option
-DCMAKE_NON_FREE_LIBS="DISABLED"
. This can also be done from the top-level Makefile by overriding the Makefile variable NON_FREE with "DISABLED". (i.e.make NON_FREE="DISABLED" && make NON_FREE="DISABLED" install
)Fixed in branch master, commit 198319231f
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
Fixed in branch master, commit 198319231f
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
The solution that has just been merged works slightly differently to the one proposed. lasconic requested I name the option "disable mp3 support" instead of "disable non-free" because mp3 is currently the only non-free component. Here is how you can use it.
By default LAME (i.e. mp3 support) is enabled. To disable mp3 support use:
or call CMake like this:
If other non-free components are added in the future then they will receive their own CMake options and a wider "disable non-free" option might then be justifiable.
Accidental double post. I tried to reply to my previous post but for some reason it posted a new comment instead. I definitely clicked "reply" and not "leave a new comment", I checked ;)
Sorry for commenting again, but I thought most of you would find this useful. Since there are a few package maintainers in this thread I thought I'd point out this Package Maintainers' Wishlist I've made specifically for packaging-related feature requests. Ideally you should be able to package MuseScore without needing any patches. If you still have any patches please add them to the list for merging upstream, possibly with a link to more information that could be in the form of a bug report in the issue tracker (like this one). Thanks.
Package Maintainers' Wishlist: https://musescore.org/en/node/60131/
Fixed in branch 2.0.3, commit e063474317
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
Fixed in branch 2.0.3, commit e063474317
fix #57736 and improve Debian packaging to enable Ubuntu nightlies
- Flag unstable builds more obviously
- Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH.
- Update references to files with SUFFIX.
- Compress man page with highest gzip compression (Debian requirement)
- Display version in title bar of main window.
- fix #57736: enable/disable LAME mp3 support via Makefile option.
- Makefile option to not update MIME and icon cache on Linux.
- rename linux files for consistency with other CMake config files
- Label special builds in title bar (e.g. nightly builds).
- Create symlink aliases for mscore and man pages.
- Correct MimeType associations for nightlies in desktop file.
- Don't manually set RPATH, let CMake handle it automatically.
- Makefile option to not set RPATH at all (Debian requirement).
Automatically closed -- issue fixed for 2 weeks with no activity.