pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

chromium: introduce native NetBSD audio backend



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Tue Nov 5 17:10:18 2024 +0100
Changeset:	b389e7b6342aec5fdf82c252e5b4278d14bb3d38

Modified Files:
	chromium/Makefile
	chromium/TODO
	chromium/distinfo
	chromium/options.mk
	chromium/tests.mk

Log Message:
chromium: introduce native NetBSD audio backend

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b389e7b6342aec5fdf82c252e5b4278d14bb3d38

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 chromium/Makefile   | 10 +++++++---
 chromium/TODO       | 18 ++++++++----------
 chromium/distinfo   |  3 +++
 chromium/options.mk | 14 ++++++++++----
 chromium/tests.mk   |  5 +++--
 5 files changed, 31 insertions(+), 19 deletions(-)

diffs:
diff --git a/chromium/Makefile b/chromium/Makefile
index 3707aba24d..6ec54773e7 100644
--- a/chromium/Makefile
+++ b/chromium/Makefile
@@ -4,13 +4,17 @@ DISTNAME=			chromium-${VERSION}
 VERSION=			130.0.6723.69
 CATEGORIES=			www
 MASTER_SITES=			http://commondatastorage.googleapis.com/chromium-browser-official/
-EXTRACT_SUFX=			.tar.xz
+EXTRACT_SUFX_C=			.tar.xz
 
-PROFILE_DISTFILE=		chrome-linux-${VERSION}-llvm17.profdata${EXTRACT_SUFX}
+PROFILE_DISTFILE=		chrome-linux-${VERSION}-llvm17.profdata${EXTRACT_SUFX_C}
 SITES.${PROFILE_DISTFILE}=	http://nerd.hu/distfiles/
-DISTFILES+=			${DISTNAME}${EXTRACT_SUFX}
+DISTFILES+=			${DISTNAME}${EXTRACT_SUFX_C}
 DISTFILES+=			${PROFILE_DISTFILE}
 
+# audioio source
+A_VERSION=			130.0
+GITHUB_SUBMODULES=		kikadf chromium-audioio v${A_VERSION} media/audio/audioio
+
 MAINTAINER=			kikadf.01%gmail.com@localhost
 #MAINTAINER=			ryoon%NetBSD.org@localhost
 HOMEPAGE=			https://www.chromium.org/Home
diff --git a/chromium/TODO b/chromium/TODO
index ab1fae3c94..04827ece63 100644
--- a/chromium/TODO
+++ b/chromium/TODO
@@ -1,21 +1,19 @@
 To Do:
 
-1) If pulseaudio not run, chromium can't start it, so no sound:
+0) Build on NetBSD-10 amd64, should work on OpenBSD and FreeBSD
+
+1) Audio backends
+ a) NetBSD uses sunaudio (https://github.com/kikadf/chromium-audioio)
+ b) OpenBSD uses sndio
+ c) FreeBSD uses pulseaudio
+
+If pulseaudio not run, chromium can't start it, so no sound:
 VERBOSE1:pulse_util.cc(261)] Failed to connect to the context. Error: Connection refused
 WARNING:audio_manager_linux.cc(53)] Falling back to ALSA for audio output. PulseAudio is not available or could not be initialized.
 
 If pulseaudio already started, chromium can join it, and has sound.
 This is the workaround, see the files/chrome launch wrapper.
 
-NOTE: 
- a) OpenBSD (of course) uses sndio.
- b) FreeBSD uses auto audio backand selector:
-    pulse (if running) -> sndio -> alsa -> fake
-    and use sndio/audio_manager_sndio.cc instead of linux/audio_manager_linux.cc
- c) NetBSD uses pulseaudio backend with sndio/audio_manager_sndio.cc (after 128.*)
-
-TODO: port to audioio
-
 2) HID doesn't work on NetBSD.
 NOTE: For this OpenBSD uses fido and libudev-openbsd, FreeBSD uses devd.
 
diff --git a/chromium/distinfo b/chromium/distinfo
index 86463dff1e..97eac98dae 100644
--- a/chromium/distinfo
+++ b/chromium/distinfo
@@ -9,6 +9,9 @@ Size (chromium-130.0.6723.69-testdata.tar.xz) = 281900320 bytes
 BLAKE2s (chromium-130.0.6723.69.tar.xz) = 1f07ee21fc5511d426d294a3268fae263ffba0b473ad968c4452ad9acaa97518
 SHA512 (chromium-130.0.6723.69.tar.xz) = 7df415e01dc1d212faf0522b29f9daa6f54d68f2d1cdcf13bc06ceb6cf55fcef374ac5ce39d049968970c7cc37f9ea303a4716d86751aed6efe9d6d315e747ec
 Size (chromium-130.0.6723.69.tar.xz) = 6620926572 bytes
+BLAKE2s (kikadf-chromium-audioio-v130.0.tar.gz) = 45fe07cb8280f81b8ef490059002da426b59fe69b5ebd53951fe1dc3e9495a10
+SHA512 (kikadf-chromium-audioio-v130.0.tar.gz) = 840aed119dc69982f14fd5f4767e144bfc8a66672b660f0f05f5459070d7f6a36b8719ae7c0de049f7345dec39266759aedcdd5ee37aa4e98bcd2b44d06a3a4c
+Size (kikadf-chromium-audioio-v130.0.tar.gz) = 7824 bytes
 SHA1 (patch-BUILD.gn) = 24f3fbb805f7cffb81378590adf1fb2b7573bb3b
 SHA1 (patch-apps_ui_views_app__window__frame__view.cc) = c05f4b3b0787c7abcc3ab2d32f5694189b7920e4
 SHA1 (patch-ash_display_mirror__window__controller.cc) = 3fef804d0c01a9918c8e8b13aa9713502d60d2a3
diff --git a/chromium/options.mk b/chromium/options.mk
index 9a2a4e3a3e..94cbc58252 100644
--- a/chromium/options.mk
+++ b/chromium/options.mk
@@ -2,13 +2,20 @@
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.chromium
 PKG_OPTIONS_REQUIRED_GROUPS=	audio
-PKG_OPTIONS_GROUP.audio=	alsa audioio pulseaudio sndio
+PKG_OPTIONS_GROUP.audio=	alsa pulseaudio sndio sunaudio
 PKG_SUPPORTED_OPTIONS+=		debug
-PKG_SUGGESTED_OPTIONS=		pulseaudio
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+=		sunaudio
+.elif ${OPSYS} == "OpenBSD"
+PKG_SUGGESTED_OPTIONS+=		sndio
+.else
+PKG_SUGGESTED_OPTIONS+=		pulseaudio
+.endif
 
 .include "../../mk/bsd.options.mk"
 
-.if !empty(PKG_OPTIONS:Maudioio)
+.if !empty(PKG_OPTIONS:Msunaudio)
 GN_ARGS+=	use_audioio=true
 .else
 GN_ARGS+=	use_audioio=false
@@ -32,7 +39,6 @@ GN_ARGS+=	use_pulseaudio=false
 
 .if !empty(PKG_OPTIONS:Msndio)
 GN_ARGS+=	use_sndio=true
-.include "../../wip/sndio/buildlink3.mk"
 .else
 GN_ARGS+=	use_sndio=false
 .endif
diff --git a/chromium/tests.mk b/chromium/tests.mk
index 81c50fce1c..f688a362a0 100644
--- a/chromium/tests.mk
+++ b/chromium/tests.mk
@@ -1,8 +1,9 @@
 # $NetBSD$
 
-REGRESS_DISTFILE=		chromium-${VERSION}-testdata${EXTRACT_SUFX}
+REGRESS_DISTFILE=		chromium-${VERSION}-testdata${EXTRACT_SUFX_C}
 DISTFILES+=			${REGRESS_DISTFILE}
-EXTRACT_ONLY=			${DISTNAME}${EXTRACT_SUFX} ${PROFILE_DISTFILE}
+EXTRACT_ONLY=			${DISTNAME}${EXTRACT_SUFX_C} ${PROFILE_DISTFILE}
+EXTRACT_ONLY+=			${_GITHUB_DEFAULT_DISTFILES}
 
 USE_TOOLS+=	xzcat gzip tar
 


Home | Main Index | Thread Index | Old Index