Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570588 - media-sound/musescore-2.0.2 ignores pulseaudio use flag
Summary: media-sound/musescore-2.0.2 ignores pulseaudio use flag
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
Depends on:
Reported: 2016-01-02 11:26 UTC by Thomas Axelsson
Modified: 2017-01-30 13:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Change pulseaudio use flag to set BUILD_PULSEAUDIO (musescore-2.0.2.ebuild-pulseaudio-use.patch,634 bytes, patch)
2016-01-02 12:54 UTC, Thomas Axelsson
Details | Diff
Add BUILD_PULSEAUDIO option to Musescore cmake (musescore-2.0.2-optional-pulseaudio.patch,1.84 KB, patch)
2016-01-02 12:54 UTC, Thomas Axelsson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Axelsson 2016-01-02 11:26:24 UTC
I'm trying to emerge musescore-2.0.2 without pulseaudio support. However "-pulseaudio" is ignored and musescore tries to build with pulseaudio anyway. The reason is that the CMakeLists.txt overrides/ignores the USE_PULSEAUDIO from the command line. I have created the following Musescore bug report to find out if modifying USE_PULSEAUDIO from the command line is supposed to be supported or not:

Offending section in CMakeLists.txt:
   213  ## pulseaudio
   214  ##
   216  if (APPLE OR MINGW)
   217        set (USE_PULSEAUDIO 0)
   218  else (APPLE OR MINGW)
   219        if (PULSEAUDIO_FOUND)
   220              set(USE_PULSEAUDIO 1)
   221              message("Pulseaudio found.")
   222        else (PULSEAUDIO_FOUND)
   223              set(USE_PULSEAUDIO 0)
   224              message("Pulseaudio not found.")
   225        endif (PULSEAUDIO_FOUND)
   226  endif (APPLE OR MINGW)

The way I see it, there are two possible ways to go:
1. This is a bug in Musescore, which upstream should patch. We can make a workaround patch in the meantime.
2. Musescore does not support user configuration of pulseaudio support. We can still make a workaround patch so it can be built without requiring pulseaudio.

Reproducible: Always

Steps to Reproduce:
1. USE=-pulseaudio
2. emerge musescore

Actual Results:  
Relevant emerge output:

$ sudo emerge -av musescore
[ebuild     U  ] media-sound/musescore-2.0.2 [1.3::gentoo] USE="(-X%*) -audiofile% -debug% jack%* -portaudio% -pulseaudio%" 0 KiB


cmake --no-warn-unused-cli -C /var/tmp/portage/media-sound/musescore-2.0.2/work/musescore-2.0.2_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DHAVE_audiofile=OFF -DHAVE_AUDIOFILE=OFF -DHAVE_Audiofile=OFF -DBUILD_jack=ON -DBUILD_JACK=ON -DBUILD_Jack=ON -DUSE_portaudio=OFF -DUSE_PORTAUDIO=OFF -DUSE_Portaudio=OFF -DUSE_pulseaudio=OFF -DUSE_PULSEAUDIO=OFF -DUSE_Pulseaudio=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/media-sound/musescore-2.0.2/work/musescore-2.0.2_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-sound/musescore-2.0.2/work/musescore-2.0.2_build/gentoo_toolchain.cmake  /var/tmp/portage/media-sound/musescore-2.0.2/work/MuseScore-2.0.2


-- configured /var/tmp/portage/media-sound/musescore-2.0.2/work/MuseScore-2.0.2/build/ --> /var/tmp/portage/media-sound/musescore-2.0.2/work/musescore-2.0.2_build/Doxyfile
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "0.28") 
-- checking for module 'libpulse'
--   package 'libpulse' not found
-- Found pulseaudio: /usr/lib32/
-- Found Freetype: /usr/lib64/ (found version "2.6.2") 
Alsa found.
Pulseaudio found.


/var/tmp/portage/media-sound/musescore-2.0.2/work/MuseScore-2.0.2/mscore/pulseaudio.cpp:15:30: fatal error: pulse/pulseaudio.h: No such file or directory

$ emerge --info
Portage 2.2.15 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.20-r1, 3.18.3-gentoo x86_64)
System uname: Linux-3.18.3-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.2
KiB Mem:     8183524 total,    453000 free
KiB Swap:   31999992 total,  31217092 free
Timestamp of tree: Thu, 31 Dec 2015 09:15:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.11-r1, 3.3.5-r7, 3.4.3-r7
dev-util/cmake:           3.1.0
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.19.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.12.6, 1.13.4, 1.14.1, 1.15
sys-devel/binutils:       2.25.1-r1
sys-devel/gcc:            4.7.3-r1, 4.8.4, 4.9.3, 5.3.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.4
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r1
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=core2 -msse4.1 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -msse4.1 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acl acpi alsa amd64 amr apache2 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dga divx dri dts dvd dvdr emacs emboss encode exif fam firefox flac fortran gdbm gif glamor gtk iconv ipv6 jack jpeg kde kipi lcms ldap libnotify lm_sensors logrotate mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nptl nsplugin nvidia ogg opengl openmp pam pango pch pcre pdf phonon plasma png policykit ppds python qt3support qt4 readline sdl seccomp semantic-desktop session smp spell sse sse2 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode usb v4l v4l2 vdpau vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse joystick wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm x86_64" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Thomas Axelsson 2016-01-02 12:54:03 UTC
Created attachment 421618 [details, diff]
Change pulseaudio use flag to set BUILD_PULSEAUDIO

Requires patching of Musescore! See other attachment.
Comment 2 Thomas Axelsson 2016-01-02 12:54:47 UTC
Created attachment 421620 [details, diff]
Add BUILD_PULSEAUDIO option to Musescore cmake
Comment 3 Johannes Huber gentoo-dev 2017-01-30 13:12:23 UTC
commit cf4d82c159f7ca1c2bd49fbb4ba92ea2d9449cb2
Author: Gergely Nagy <>
Date:   Sun Nov 27 22:35:28 2016 +0100

    media-sound/musescore: Version bump and dependency fixes.
    * Bumped version to 2.0.3
    * Added missing dependency to dev-qt/designer
    * Removed audiofile dependency (it can only build its own variant)
    * media-libs/libsndfile is always needed
    * Added alsa USE flag
    * Fixed CMAKE args for using portaudio and pulseaudio
    * Rebased patch on the new version