Bug 255093

Summary: audio/pulseaudio: optionalize X11
Product: Ports & Packages Reporter: Evgeniy Khramtsov <evgeniy>
Component: Individual Port(s)Assignee: freebsd-desktop (Team) <desktop>
Status: Closed FIXED    
Severity: Affects Only Me CC: arrowd, swills
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (desktop)
Hardware: Any   
OS: Any   
Description Flags
patch none

Description Evgeniy Khramtsov 2021-04-15 15:46:20 UTC
Created attachment 224137 [details]

Make audio/pulseaudio dependency on X11 optional.

Pulseaudio is needed to build www/firefox pulse-rust backend, which can be used with pipewire-pulse instead of pulseaudio.

I run locally-patched ports tree that ensures that I am not building *any* X11-related dependencies (e.g. even libGL and libx{11,xcb}), and building X11 just for the build time dependency breaks my X11-less setup.

This might also be desirable for headless environments, e.g. servers using pulseaudio for some reason. I wouldn't mind if this will never be merged.

Consolekit has a hard dependency on X11 by using checks in configure files and including and then using Xlib.h, so don't depend on this lib if X11 is off.

No functional change for the default build.
Comment 1 Evgeniy Khramtsov 2021-05-16 21:57:44 UTC
(In reply to Evgeniy Khramtsov from comment #0)

> so don't depend on this lib if X11 is off

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252783#c2

If this gets committed, the "libck-connector.so:sysutils/consolekit2" part of this patch can be removed.
Comment 2 Evgeniy Khramtsov 2021-06-04 18:43:31 UTC
Actual/rebased version is available now here: https://codeberg.org/ei/ports/commits/branch/ei
Comment 3 commit-hook freebsd_committer 2021-06-04 20:02:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9f6ccfbfaf7b949f339cc2ff31155218fcfce9eb

commit 9f6ccfbfaf7b949f339cc2ff31155218fcfce9eb
Author:     Evgeniy Khramtsov <evgeniy@khramtsov.org>
AuthorDate: 2021-06-04 19:55:00 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-06-04 20:01:38 +0000

    audio/pulseaudio: Add X11 option.

    PR:             255093
    Tested by:      arrowd

 audio/pulseaudio/Makefile  | 10 ++++++----
 audio/pulseaudio/pkg-plist | 18 +++++++++---------
 2 files changed, 15 insertions(+), 13 deletions(-)
Comment 4 Gleb Popov freebsd_committer 2021-06-04 20:05:43 UTC
Pushed in, thanks!