View | Details | Raw Unified | Return to bug 212028 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/bsd.gecko.mk (+18 lines)
Lines 391-396 MOZ_OPTIONS+= --enable-pulseaudio Link Here
391
MOZ_OPTIONS+=	--disable-pulseaudio
391
MOZ_OPTIONS+=	--disable-pulseaudio
392
.endif
392
.endif
393
393
394
.if ${PORT_OPTIONS:MSNDIO}
395
LIB_DEPENDS+=	libsndio.so:audio/sndio
396
MOZ_OPTIONS+=	--enable-sndio
397
# In mail/thunderbird and www/seamonky media/libcubeb is in
398
# ${WRKSRC}/mozilla instead of ${WRKSRC}.  All other gecko-based ports
399
# have it in ${WRKSRC}.
400
MOZ_SRC?=	${WRKSRC}
401
post-patch-SNDIO-on:
402
	@${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
403
		${MOZ_SRC}/media/libcubeb/src/moz.build \
404
		${MOZ_SRC}/media/libcubeb/tests/moz.build \
405
		${MOZ_SRC}/toolkit/library/moz.build
406
	@${REINPLACE_CMD} -e 's|OS==\"openbsd\"|OS==\"${OPSYS:tl}\"|g' \
407
		${MOZ_SRC}/media/webrtc/trunk/webrtc/build/common.gypi
408
	@${ECHO} "OS_LIBS += ['sndio']" >> \
409
		${MOZ_SRC}/media/webrtc/signaling/test/common.build
410
.endif
411
394
.if ${MOZILLA_VER:R:R} >= 40
412
.if ${MOZILLA_VER:R:R} >= 40
395
.if ${PORT_OPTIONS:MRUST}
413
.if ${PORT_OPTIONS:MRUST}
396
BUILD_DEPENDS+=	rustc:${RUST_PORT}
414
BUILD_DEPENDS+=	rustc:${RUST_PORT}
(-)b/mail/thunderbird/Makefile (+1 lines)
Lines 46-51 MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ Link Here
46
MOZ_MK_OPTIONS=	MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
46
MOZ_MK_OPTIONS=	MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
47
MOZ_EXPORT=		MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
47
MOZ_EXPORT=		MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
48
MOZ_PKGCONFIG_FILES=
48
MOZ_PKGCONFIG_FILES=
49
MOZ_SRC=	${WRKSRC}/mozilla
49
50
50
PORTNAME_ICON=	${MOZILLA}.png
51
PORTNAME_ICON=	${MOZILLA}.png
51
PORTNAME_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
52
PORTNAME_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
(-)b/www/firefox/Makefile.options (-2 / +2 lines)
Lines 5-15 OPTIONS_DEFINE+= BUNDLED_CAIRO CANBERRA DBUS DEBUG DTRACE FFMPEG GCONF GIO \ Link Here
5
			OPTIMIZED_CFLAGS PGO PROFILE TEST
5
			OPTIMIZED_CFLAGS PGO PROFILE TEST
6
6
7
OPTIONS_DEFAULT+=	DBUS DTRACE FFMPEG GIO GSTREAMER LOGGING OPTIMIZED_CFLAGS \
7
OPTIONS_DEFAULT+=	DBUS DTRACE FFMPEG GIO GSTREAMER LOGGING OPTIMIZED_CFLAGS \
8
			${OPTIONS_MULTI_AUDIO} \
8
			ALSA PULSEAUDIO \
9
			${MACHINE_CPU:tu:MSOFTFP:S/SOFTFP/INTEGER_SAMPLES/}
9
			${MACHINE_CPU:tu:MSOFTFP:S/SOFTFP/INTEGER_SAMPLES/}
10
10
11
OPTIONS_MULTI+=		AUDIO
11
OPTIONS_MULTI+=		AUDIO
12
OPTIONS_MULTI_AUDIO=	ALSA PULSEAUDIO
12
OPTIONS_MULTI_AUDIO=	ALSA PULSEAUDIO SNDIO
13
13
14
# dragonfly, sparc64, riscv
14
# dragonfly, sparc64, riscv
15
.if !exists(/usr/sbin/dtrace)
15
.if !exists(/usr/sbin/dtrace)
(-)b/www/firefox/files/patch-media_libcubeb_src_cubeb_sndio.c (+52 lines)
Added Link Here
1
$OpenBSD: patch-media_libcubeb_src_cubeb_sndio_c,v 1.3 2016/04/27 13:50:27 landry Exp $
2
3
https://github.com/kinetiknz/cubeb/commit/af33b71675a90b501c7510bb793c10bbc27642b0
4
https://github.com/kinetiknz/cubeb/commit/658d7eba38d4b8de932dba367165834b8ac9c130
5
6
--- media/libcubeb/src/cubeb_sndio.c.orig	Mon Mar 28 19:56:03 2016
7
+++ media/libcubeb/src/cubeb_sndio.c	Mon Mar 28 19:57:27 2016
8
@@ -67,7 +67,7 @@ sndio_onmove(void *arg, int delta)
9
 {
10
   cubeb_stream *s = (cubeb_stream *)arg;
11
 
12
-  s->rdpos += delta;
13
+  s->rdpos += delta * s->bpf;
14
 }
15
 
16
 static void *
17
@@ -135,7 +135,7 @@ sndio_mainloop(void *arg)
18
         state = CUBEB_STATE_ERROR;
19
         break;
20
       }
21
-      s->wrpos = 0;
22
+      s->wrpos += n;
23
       start += n;
24
     }
25
   }
26
@@ -197,7 +197,7 @@ sndio_stream_init(cubeb * context,
27
   if (s == NULL)
28
     return CUBEB_ERROR;
29
   s->context = context;
30
-  s->hdl = sio_open(NULL, SIO_PLAY, 0);
31
+  s->hdl = sio_open(NULL, SIO_PLAY, 1);
32
   if (s->hdl == NULL) {
33
     free(s);
34
     DPR("sndio_stream_init(), sio_open() failed\n");
35
@@ -336,7 +336,7 @@ sndio_stream_get_position(cubeb_stream *s, uint64_t *p
36
 {
37
   pthread_mutex_lock(&s->mtx);
38
   DPR("sndio_stream_get_position() %lld\n", s->rdpos);
39
-  *p = s->rdpos;
40
+  *p = s->rdpos / s->bpf;
41
   pthread_mutex_unlock(&s->mtx);
42
   return CUBEB_OK;
43
 }
44
@@ -356,7 +356,7 @@ sndio_stream_get_latency(cubeb_stream * stm, uint32_t 
45
 {
46
   // http://www.openbsd.org/cgi-bin/man.cgi?query=sio_open
47
   // in the "Measuring the latency and buffers usage" paragraph.
48
-  *latency = stm->wrpos - stm->rdpos;
49
+  *latency = (stm->wrpos - stm->rdpos) / stm->bpf;
50
   return CUBEB_OK;
51
 }
52
 
(-)b/www/seamonkey/Makefile (+3 lines)
Lines 47-52 MOZ_OPTIONS+= --program-transform-name='s/seamonkey/${MOZILLA}/' \ Link Here
47
47
48
USE_MOZILLA=	-opus
48
USE_MOZILLA=	-opus
49
MOZ_PKGCONFIG_FILES=
49
MOZ_PKGCONFIG_FILES=
50
MOZ_SRC=	${WRKSRC}/mozilla
50
51
51
NOT_FOR_ARCHS=	ia64
52
NOT_FOR_ARCHS=	ia64
52
53
Lines 59-64 COMPOSER_DESC?= HTML Composer module Link Here
59
LDAP_DESC?=	LDAP support for Mailnews
60
LDAP_DESC?=	LDAP support for Mailnews
60
MAILNEWS_DESC?=	Mail and News modules
61
MAILNEWS_DESC?=	Mail and News modules
61
62
63
SNDIO_BROKEN=	missing sndio support
64
62
.include "${.CURDIR}/../../www/firefox/Makefile.options"
65
.include "${.CURDIR}/../../www/firefox/Makefile.options"
63
.include <bsd.port.options.mk>
66
.include <bsd.port.options.mk>
64
67

Return to bug 212028