From a6793a4afb84c06efeb8885969ef300811d8fde9 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Wed, 4 Nov 2020 02:42:23 +0300 Subject: [PATCH 1/4] New package: libpipewire0.2 Add libpipewire0.2 to common/shlibs --- common/shlibs | 1 + srcpkgs/libpipewire0.2-devel | 1 + srcpkgs/libpipewire0.2/template | 36 +++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 120000 srcpkgs/libpipewire0.2-devel create mode 100644 srcpkgs/libpipewire0.2/template diff --git a/common/shlibs b/common/shlibs index 70577febab0..26a0413aedb 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3272,6 +3272,7 @@ libarcan_shmif_ext.so.0.11 arcan-0.5.4.3_1 libarcan_shmif_server.so.0.11 arcan-0.5.4.3_1 libarcan_tui.so.0.11 arcan-0.5.4.3_1 liblwipv6.so.2 lwipv6-1.5a_1 +libpipewire-0.2.so.1 libpipewire0.2-0.2.7_1 libpipewire-0.3.so.0 libpipewire-0.3.6_1 libvolk.so.2.2.1 volk-2.2.1_1 libgnuradio-runtime.so.3.8.0 gnuradio-3.8.0.0_1 diff --git a/srcpkgs/libpipewire0.2-devel b/srcpkgs/libpipewire0.2-devel new file mode 120000 index 00000000000..456616f84ec --- /dev/null +++ b/srcpkgs/libpipewire0.2-devel @@ -0,0 +1 @@ +libpipewire0.2 \ No newline at end of file diff --git a/srcpkgs/libpipewire0.2/template b/srcpkgs/libpipewire0.2/template new file mode 100644 index 00000000000..88a6666d9df --- /dev/null +++ b/srcpkgs/libpipewire0.2/template @@ -0,0 +1,36 @@ +# Template file for 'libpipewire0.2' +pkgname=libpipewire0.2 +version=0.2.7 +revision=1 +wrksrc=pipewire-${version} +build_style=meson +configure_args="-Dgstreamer=disabled -Ddocs=false -Dsystemd=false" +hostmakedepends="pkg-config" +makedepends="dbus-devel alsa-lib-devel eudev-libudev-devel" +short_desc="Server and user space API to deal with multimedia pipelines (v0.2)" +maintainer="Artur Sinila " +license="MIT" +homepage="https://pipewire.org/" +changelog="https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/NEWS" +distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz" +checksum=bfaa0f6ae6c0791e2e0b59234d399753bf24f1b33dbf587682363a8463dd8df1 + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" + LDFLAGS+=" -latomic" +fi + +post_install() { + rm -r ${DESTDIR}/{etc,usr/bin} + vlicense LICENSE +} + +libpipewire0.2-devel_package() { + depends="${pkgname}-${version}_${revision}" + short_desc+=" - pipewire and libspa development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove usr/lib/libpipewire-0.2.so + } +} From 3d72e266d4fa245a2b6ca42ce06b1aa137828f72 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Thu, 5 Nov 2020 07:24:27 +0300 Subject: [PATCH 2/4] chromium: enable WebRTC screen sharing via PipeWire --- srcpkgs/chromium/template | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index b31a09ed1f6..cf14cbb47ca 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -16,12 +16,13 @@ lib32disabled=yes nodebug=yes nopie=yes # contains tools that are not PIE, enables PIE itself -build_options="clang js_optimize vaapi pulseaudio sndio" +build_options="clang js_optimize vaapi pulseaudio sndio pipewire" desc_option_clang="Use clang to build" desc_option_js_optimize="Optimize the JS used for Chromium's UI" desc_option_vaapi="Enable support for VA-API" desc_option_pulseaudio="Enable support for PulseAudio" desc_option_sndio="Enable support for sndio" +desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire" hostmakedepends="$(vopt_if clang clang) python pkgconf perl gperf bison ninja nodejs hwids libatomic-devel libevent-devel libglib-devel $(vopt_if js_optimize openjdk)" @@ -35,14 +36,14 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel re2-devel fontconfig-devel freetype-devel opus-devel ffmpeg-devel libva-devel python-setuptools xcb-proto - $(vopt_if sndio sndio-devel)" + $(vopt_if pipewire libpipewire0.2-devel) $(vopt_if sndio sndio-devel)" depends="libexif hwids desktop-file-utils hicolor-icon-theme xdg-utils" case "$XBPS_TARGET_MACHINE" in ppc64*-musl) makedepends+=" libucontext-devel" ;; esac -build_options_default="clang js_optimize vaapi pulseaudio" +build_options_default="clang js_optimize vaapi pulseaudio pipewire" post_patch() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then @@ -196,6 +197,10 @@ do_configure() { "use_pulseaudio=$(vopt_if pulseaudio true false)" ) + conf+=( + "rtc_use_pipewire=$(vopt_if pipewire true false)" + ) + # Use explicit library dependencies instead of dlopen. # GN only has "link_pulseaudio", the other options used before are not available atm # linux_link_cups=true From 5465fba983022511ccf2173efcd2f077c23f4b4a Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Wed, 9 Dec 2020 20:38:35 -0500 Subject: [PATCH 3/4] chromium: update to 87.0.4280.88. - Built for x86_64, x86_64-musl. - Tested on x86_64. - Add patch to fix musl 1.2 (reference: https://github.com/void-linux/void-packages/pull/24578#issuecomment-684177274) --- .../chromium/files/musl-patches/musl-sandbox.patch | 13 +++++++++++++ srcpkgs/chromium/template | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch b/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch index c770e76d868..230bb7bbd29 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch +++ b/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch @@ -77,3 +77,16 @@ index 80f02c0..21fbe21 100644 case __NR_unshare: #if !defined(__mips__) && !defined(__aarch64__) case __NR_vfork: +--- sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -100,9 +100,9 @@ + case __NR_uname: + case __NR_sched_getparam: + case __NR_sched_getscheduler: ++ case __NR_sched_setscheduler: + return Allow(); + case __NR_sched_getaffinity: +- case __NR_sched_setscheduler: + return RestrictSchedTarget(GetPolicyPid(), sysno); + case __NR_prlimit64: + // See crbug.com/662450 and setrlimit comment above. diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index cf14cbb47ca..7cb351b6f26 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,7 +1,7 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=87.0.4280.66 +version=87.0.4280.88 revision=1 archs="i686* x86_64* aarch64* armv7l* ppc64le*" short_desc="Google's attempt at creating a safer, faster, and more stable browser" @@ -9,7 +9,7 @@ maintainer="Enno Boland " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=29a8e4ea82edec2fdcf34ece68323bec7ab90f3d5669e6b77f58cff9c278f741 +checksum=3e4645328735ef60db78d1a313efb3770a3edeaede90d076414df52f567a09c0 nocross=yes lib32disabled=yes From 95b4ffea5f050fce7a66153f957da19b804f7b53 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Wed, 9 Dec 2020 20:42:32 -0500 Subject: [PATCH 4/4] chromium-widevine: update to 87.0.4280.88. --- srcpkgs/chromium-widevine/INSTALL | 2 +- srcpkgs/chromium-widevine/template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/chromium-widevine/INSTALL b/srcpkgs/chromium-widevine/INSTALL index a8de96756c4..1f63fd0f44c 100644 --- a/srcpkgs/chromium-widevine/INSTALL +++ b/srcpkgs/chromium-widevine/INSTALL @@ -1,6 +1,6 @@ # INSTALL -checksum=e7e4c6a2108140c572562867f522d0311a25ce03ea36c5452cb8431865871226 +checksum=4bc68502dc5e22d5c264b3fb5d0a1ecfdadc3ba21d945646d8d37de4b8a96e58 _baseUrl="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable" _filename="google-chrome-stable_${VERSION%_*}-1_amd64.deb" DISTFILE="${_baseUrl}/${_filename}" diff --git a/srcpkgs/chromium-widevine/template b/srcpkgs/chromium-widevine/template index 66626f83af3..32ede6c8bda 100644 --- a/srcpkgs/chromium-widevine/template +++ b/srcpkgs/chromium-widevine/template @@ -6,7 +6,7 @@ _chromeVersion="current" _channel="stable" pkgname=chromium-widevine -version=87.0.4280.66 +version=87.0.4280.88 revision=1 archs="x86_64" create_wrksrc=yes