Skip to content

Commit

Permalink
www/*chromium: enable PipeWire for screen sharing on Wayland
Browse files Browse the repository at this point in the history
PR:		268726
Approved by:	maintainer timeout (7 months)
  • Loading branch information
jbeich committed Aug 18, 2023
1 parent 00e0320 commit ca9744d
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 7 deletions.
13 changes: 11 additions & 2 deletions www/chromium/Makefile
@@ -1,5 +1,6 @@
PORTNAME= chromium
PORTVERSION= 116.0.5845.96
PORTREVISION= 1
CATEGORIES= www wayland
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \
https://nerd.hu/distfiles/:external
Expand Down Expand Up @@ -137,8 +138,8 @@ GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8"
SUB_FILES= chromium-browser.desktop chrome
SUB_LIST+= COMMENT="${COMMENT}"

OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO TEST
OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO
OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST
OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO
OPTIONS_EXCLUDE_aarch64=LTO
OPTIONS_GROUP= AUDIO
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO
Expand Down Expand Up @@ -192,6 +193,14 @@ LTO_VARS= GN_ARGS+=use_thin_lto=true \
LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false

MIT_LIB_DEPENDS= libkrb.so.3:security/krb5

PIPEWIRE_DESC= Screen capture via PipeWire
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire
PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \
GN_ARGS+=rtc_link_pipewire=true
PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \
GN_ARGS+=rtc_link_pipewire=false

PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true
PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false
Expand Down
@@ -0,0 +1,14 @@
--- third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2022-12-14 00:41:59 UTC
+++ third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
@@ -10,11 +10,9 @@

#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"

-#include <asm/ioctl.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <libdrm/drm_fourcc.h>
-#include <linux/types.h>
#include <spa/param/video/format-utils.h>
#include <unistd.h>
#include <xf86drm.h>
14 changes: 11 additions & 3 deletions www/iridium/Makefile
@@ -1,6 +1,6 @@
PORTNAME= iridium
PORTVERSION= 2023.07.115.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= www wayland
MASTER_SITES= https://downloads.iridiumbrowser.de/source/
PKGNAMESUFFIX= -browser
Expand Down Expand Up @@ -135,8 +135,8 @@ GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles
SUB_FILES= iridium-browser.desktop iridium
SUB_LIST+= COMMENT="${COMMENT}"

OPTIONS_DEFINE= CODECS CUPS DEBUG KERBEROS LTO
OPTIONS_DEFAULT= CODECS CUPS KERBEROS SNDIO
OPTIONS_DEFINE= CODECS CUPS DEBUG KERBEROS LTO PIPEWIRE
OPTIONS_DEFAULT= CODECS CUPS KERBEROS PIPEWIRE SNDIO
OPTIONS_EXCLUDE_aarch64=LTO
OPTIONS_GROUP= AUDIO
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO
Expand Down Expand Up @@ -186,6 +186,14 @@ LTO_VARS= GN_ARGS+=use_thin_lto=true \
LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false

MIT_LIB_DEPENDS= libkrb.so.3:security/krb5

PIPEWIRE_DESC= Screen capture via PipeWire
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire
PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \
GN_ARGS+=rtc_link_pipewire=true
PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \
GN_ARGS+=rtc_link_pipewire=false

PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true
PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false
Expand Down
@@ -0,0 +1,14 @@
--- third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2022-12-14 00:41:59 UTC
+++ third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
@@ -10,11 +10,9 @@

#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"

-#include <asm/ioctl.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <libdrm/drm_fourcc.h>
-#include <linux/types.h>
#include <spa/param/video/format-utils.h>
#include <unistd.h>
#include <xf86drm.h>
13 changes: 11 additions & 2 deletions www/ungoogled-chromium/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ungoogled-chromium
PORTVERSION= 116.0.5845.96
PORTREVISION= 1
UGVERSION= ${DISTVERSION}-1
CATEGORIES= www wayland
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \
Expand Down Expand Up @@ -151,8 +152,8 @@ GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles
SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium
SUB_LIST+= COMMENT="${COMMENT}"

OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO TEST
OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO
OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST
OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO
OPTIONS_EXCLUDE_aarch64=LTO
OPTIONS_GROUP= AUDIO
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO
Expand Down Expand Up @@ -206,6 +207,14 @@ LTO_VARS= GN_ARGS+=use_thin_lto=true \
LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false

MIT_LIB_DEPENDS= libkrb.so.3:security/krb5

PIPEWIRE_DESC= Screen capture via PipeWire
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire
PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \
GN_ARGS+=rtc_link_pipewire=true
PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \
GN_ARGS+=rtc_link_pipewire=false

PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true
PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false
Expand Down
@@ -0,0 +1,14 @@
--- third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig 2022-12-14 00:41:59 UTC
+++ third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
@@ -10,11 +10,9 @@

#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"

-#include <asm/ioctl.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <libdrm/drm_fourcc.h>
-#include <linux/types.h>
#include <spa/param/video/format-utils.h>
#include <unistd.h>
#include <xf86drm.h>

0 comments on commit ca9744d

Please sign in to comment.