Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 615000 - >=www-client/firefox-bin-52 should have optional dependency on media-sound/pulseaudio
Summary: >=www-client/firefox-bin-52 should have optional dependency on media-sound/pu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-08 12:53 UTC by Bastien Armand
Modified: 2017-06-01 20:50 UTC (History)
0 users

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


Attachments
patch to handle pulseaudio/apulse dependancy (firefox52.diff,672 bytes, patch)
2017-04-08 12:53 UTC, Bastien Armand
Details | Diff
patch to handle pulseaudio/apulse dependancy v2 (firefox-bin.52.0.1_apulse.diff,1.45 KB, patch)
2017-04-11 17:45 UTC, Bastien Armand
Details | Diff
patch to handle pulseaudio/apulse dependancy v3 (firefox-52.0.1.ebuild.patch,1.84 KB, patch)
2017-04-13 18:01 UTC, Bastien Armand
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Armand 2017-04-08 12:53:50 UTC
Created attachment 469480 [details, diff]
patch to handle pulseaudio/apulse dependancy

Hi,

Since version 52, firefox-bin use pulseaudio instead of alsa. There should be a message on the ebuild indicating that no sound (as it is done for video and ffmpeg).

Alternatively, it's possible to use apulse for system without pulseaudio.

I've written a small patch on firefox-bin-52.0.1.ebuild to try to handle that. Please find it attached.

Regards.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2017-04-08 20:24:39 UTC
Patches should be in unified format (i.e. created by `diff -u`).

About apulse, some suggestions are in bug #613980.
Comment 2 Bastien Armand 2017-04-11 17:45:11 UTC
Sorry, I did not find the other bug...

Here is an updated version of my patch (in unified format) and using apulse to launch firefox-bin (if apulse is enabled).

Regards.
Comment 3 Bastien Armand 2017-04-11 17:45:50 UTC
Created attachment 469758 [details, diff]
patch to handle pulseaudio/apulse dependancy v2
Comment 4 Zdeněk Žamberský 2017-04-13 01:29:42 UTC
Adding pulseaudio flag (to addition to apulse flag) as a way to pull in optional dependency, even without actual code being added could be good thing ( skype uses same approach [1] ). But proposed patch feels inconsistently to me. I would either add flags for all optional features, which does not do actual code changes to the package (pulseaudio, ffmpeg and crashreporter) or for none of them. (But this may be separate issue.)

Anyway if pulseaudio flag is added, then there should probably be constraint, not to use both apulse and pulseaudio flags at the same time. ( See [2] [1] . )

In addition to that I would also use "exec" command in case of apulse, so that another wrapper shell process, waiting for firefox to close, is avoided.

[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-im/skype/skype-4.3.0.37-r6.ebuild
[2] https://devmanual.gentoo.org/ebuild-writing/eapi/#variables
Comment 5 Bastien Armand 2017-04-13 18:01:52 UTC
Created attachment 470024 [details, diff]
patch to handle pulseaudio/apulse dependancy v3

Here is the v3 version:
- added missing exec for apulse case;
- added RESTRICT_USE to prevent enabling apulse and pulseaudio at the same time;
- added a crashreporter and a ffmpeg use flags (for consistency).


Thanks Zdeněk for the comment.
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2017-04-14 02:20:51 UTC
I approached the same end-goal a different way, though it's somewhat close to your final iteration:


commit 27dfc5592208b407bbaf26cbc780bfae5294c001
Author: Ian Stakenvicius <axs@gentoo.org>
Date:   Wed Apr 12 17:09:22 2017 -0400

www-client/firefox-bin: add apulse compatibility to wrapper and some use-flags
    
Added ffmpeg and pulseaudio to IUSE, default-enabled, to be (A) compatible with www-client/firefox and (B) ensure dependencies for this functionality is brought in and retained without @world entries required.  It's a binary package so the hit is minimal to be dealing with optional runtime-only deps with use flags.
    
Also added apulse to the LD_LIBRARY_PATH so that it will be used to provide audio support when it is installed.
Comment 7 Bastien Armand 2017-04-14 11:28:33 UTC
Works for me :)

Thanks Ian.