aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-01-02 00:24:59 +0800
committerjbeich <jbeich@FreeBSD.org>2017-01-02 00:24:59 +0800
commit3cb14170769d7f7f229977c0370293f32b5223d3 (patch)
tree716e63e0cba53553a6a72de96ffbe353774b5e8d
parentccf8af9323a1bf59c7919ee65eee872b6c68b1d4 (diff)
downloadfreebsd-ports-gnome-3cb14170769d7f7f229977c0370293f32b5223d3.tar.gz
freebsd-ports-gnome-3cb14170769d7f7f229977c0370293f32b5223d3.tar.zst
freebsd-ports-gnome-3cb14170769d7f7f229977c0370293f32b5223d3.zip
www/firefox: add SNDIO option
PR: 212028 Submitted by: Tobias Kortkamp <t@tobik.me>
-rw-r--r--Mk/bsd.gecko.mk13
-rw-r--r--www/firefox/Makefile.options7
2 files changed, 18 insertions, 2 deletions
diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk
index 90ec0b4ee66c..810b3ebac955 100644
--- a/Mk/bsd.gecko.mk
+++ b/Mk/bsd.gecko.mk
@@ -372,6 +372,19 @@ MOZ_OPTIONS+= --enable-pulseaudio
MOZ_OPTIONS+= --disable-pulseaudio
.endif
+.if ${PORT_OPTIONS:MSNDIO}
+LIB_DEPENDS+= libsndio.so:audio/sndio
+post-patch-SNDIO-on:
+ @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
+ ${MOZSRC}/media/libcubeb/src/moz.build \
+ ${MOZSRC}/media/libcubeb/tests/moz.build \
+ ${MOZSRC}/toolkit/library/moz.build
+ @${REINPLACE_CMD} -e 's|OS==\"openbsd\"|OS==\"${OPSYS:tl}\"|g' \
+ ${MOZSRC}/media/webrtc/trunk/webrtc/build/common.gypi
+ @${ECHO} "OS_LIBS += ['sndio']" >> \
+ ${MOZSRC}/media/webrtc/signaling/test/common.build
+.endif
+
.if ${PORT_OPTIONS:MRUST}
BUILD_DEPENDS+= rustc:${RUST_PORT}
RUST_PORT?= lang/rust
diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options
index ca26bd04b632..8a2d15827e5b 100644
--- a/www/firefox/Makefile.options
+++ b/www/firefox/Makefile.options
@@ -5,11 +5,14 @@ OPTIONS_DEFINE+= BUNDLED_CAIRO CANBERRA DBUS DEBUG DTRACE FFMPEG GCONF \
OPTIMIZED_CFLAGS PGO PROFILE TEST
OPTIONS_DEFAULT+= DBUS DTRACE FFMPEG OPTIMIZED_CFLAGS \
- ${OPTIONS_MULTI_AUDIO} \
+ ALSA PULSEAUDIO \
${MACHINE_CPU:Msoftfp:C/.+/INTEGER_SAMPLES/}
OPTIONS_MULTI+= AUDIO
-OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO
+OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO SNDIO
+
+# No lazy-bindings and inconsistent fallback order (libcubeb vs. audio_device)
+SNDIO_PREVENTS= ${OPTIONS_MULTI_AUDIO:NSNDIO}
# dragonfly, sparc64, riscv
.if !exists(/usr/sbin/dtrace)