FreeBSD Bugzilla – Attachment 173909 Details for
Bug 212028
www/firefox: Add SNDIO option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gecko.diff
gecko.diff (text/plain), 4.63 KB, created by
Tobias Kortkamp
on 2016-08-21 15:28:19 UTC
(
hide
)
Description:
gecko.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2016-08-21 15:28:19 UTC
Size:
4.63 KB
patch
obsolete
>diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk >index 83c18aa..0326806 100644 >--- a/Mk/bsd.gecko.mk >+++ b/Mk/bsd.gecko.mk >@@ -391,6 +391,24 @@ MOZ_OPTIONS+= --enable-pulseaudio > MOZ_OPTIONS+= --disable-pulseaudio > .endif > >+.if ${PORT_OPTIONS:MSNDIO} >+LIB_DEPENDS+= libsndio.so:audio/sndio >+MOZ_OPTIONS+= --enable-sndio >+# In mail/thunderbird and www/seamonky media/libcubeb is in >+# ${WRKSRC}/mozilla instead of ${WRKSRC}. All other gecko-based ports >+# have it in ${WRKSRC}. >+MOZ_SRC?= ${WRKSRC} >+post-patch-SNDIO-on: >+ @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \ >+ ${MOZ_SRC}/media/libcubeb/src/moz.build \ >+ ${MOZ_SRC}/media/libcubeb/tests/moz.build \ >+ ${MOZ_SRC}/toolkit/library/moz.build >+ @${REINPLACE_CMD} -e 's|OS==\"openbsd\"|OS==\"${OPSYS:tl}\"|g' \ >+ ${MOZ_SRC}/media/webrtc/trunk/webrtc/build/common.gypi >+ @${ECHO} "OS_LIBS += ['sndio']" >> \ >+ ${MOZ_SRC}/media/webrtc/signaling/test/common.build >+.endif >+ > .if ${MOZILLA_VER:R:R} >= 40 > .if ${PORT_OPTIONS:MRUST} > BUILD_DEPENDS+= rustc:${RUST_PORT} >diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile >index a5a7edc..66ae7f0 100644 >--- a/mail/thunderbird/Makefile >+++ b/mail/thunderbird/Makefile >@@ -46,6 +46,7 @@ MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ > MOZ_MK_OPTIONS= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 > MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1 > MOZ_PKGCONFIG_FILES= >+MOZ_SRC= ${WRKSRC}/mozilla > > PORTNAME_ICON= ${MOZILLA}.png > PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png >diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options >index 926a192..1dece77 100644 >--- a/www/firefox/Makefile.options >+++ b/www/firefox/Makefile.options >@@ -5,11 +5,11 @@ OPTIONS_DEFINE+= BUNDLED_CAIRO CANBERRA DBUS DEBUG DTRACE FFMPEG GCONF GIO \ > OPTIMIZED_CFLAGS PGO PROFILE TEST > > OPTIONS_DEFAULT+= DBUS DTRACE FFMPEG GIO GSTREAMER LOGGING OPTIMIZED_CFLAGS \ >- ${OPTIONS_MULTI_AUDIO} \ >+ ALSA PULSEAUDIO \ > ${MACHINE_CPU:tu:MSOFTFP:S/SOFTFP/INTEGER_SAMPLES/} > > OPTIONS_MULTI+= AUDIO >-OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO >+OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO SNDIO > > # dragonfly, sparc64, riscv > .if !exists(/usr/sbin/dtrace) >diff --git a/www/firefox/files/patch-media_libcubeb_src_cubeb_sndio.c b/www/firefox/files/patch-media_libcubeb_src_cubeb_sndio.c >new file mode 100644 >index 0000000..6215759 >--- /dev/null >+++ b/www/firefox/files/patch-media_libcubeb_src_cubeb_sndio.c >@@ -0,0 +1,52 @@ >+$OpenBSD: patch-media_libcubeb_src_cubeb_sndio_c,v 1.3 2016/04/27 13:50:27 landry Exp $ >+ >+https://github.com/kinetiknz/cubeb/commit/af33b71675a90b501c7510bb793c10bbc27642b0 >+https://github.com/kinetiknz/cubeb/commit/658d7eba38d4b8de932dba367165834b8ac9c130 >+ >+--- media/libcubeb/src/cubeb_sndio.c.orig Mon Mar 28 19:56:03 2016 >++++ media/libcubeb/src/cubeb_sndio.c Mon Mar 28 19:57:27 2016 >+@@ -67,7 +67,7 @@ sndio_onmove(void *arg, int delta) >+ { >+ cubeb_stream *s = (cubeb_stream *)arg; >+ >+- s->rdpos += delta; >++ s->rdpos += delta * s->bpf; >+ } >+ >+ static void * >+@@ -135,7 +135,7 @@ sndio_mainloop(void *arg) >+ state = CUBEB_STATE_ERROR; >+ break; >+ } >+- s->wrpos = 0; >++ s->wrpos += n; >+ start += n; >+ } >+ } >+@@ -197,7 +197,7 @@ sndio_stream_init(cubeb * context, >+ if (s == NULL) >+ return CUBEB_ERROR; >+ s->context = context; >+- s->hdl = sio_open(NULL, SIO_PLAY, 0); >++ s->hdl = sio_open(NULL, SIO_PLAY, 1); >+ if (s->hdl == NULL) { >+ free(s); >+ DPR("sndio_stream_init(), sio_open() failed\n"); >+@@ -336,7 +336,7 @@ sndio_stream_get_position(cubeb_stream *s, uint64_t *p >+ { >+ pthread_mutex_lock(&s->mtx); >+ DPR("sndio_stream_get_position() %lld\n", s->rdpos); >+- *p = s->rdpos; >++ *p = s->rdpos / s->bpf; >+ pthread_mutex_unlock(&s->mtx); >+ return CUBEB_OK; >+ } >+@@ -356,7 +356,7 @@ sndio_stream_get_latency(cubeb_stream * stm, uint32_t >+ { >+ // http://www.openbsd.org/cgi-bin/man.cgi?query=sio_open >+ // in the "Measuring the latency and buffers usage" paragraph. >+- *latency = stm->wrpos - stm->rdpos; >++ *latency = (stm->wrpos - stm->rdpos) / stm->bpf; >+ return CUBEB_OK; >+ } >+ >diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile >index 9aacf3d..c1f06bf 100644 >--- a/www/seamonkey/Makefile >+++ b/www/seamonkey/Makefile >@@ -47,6 +47,7 @@ MOZ_OPTIONS+= --program-transform-name='s/seamonkey/${MOZILLA}/' \ > > USE_MOZILLA= -opus > MOZ_PKGCONFIG_FILES= >+MOZ_SRC= ${WRKSRC}/mozilla > > NOT_FOR_ARCHS= ia64 > >@@ -59,6 +60,8 @@ COMPOSER_DESC?= HTML Composer module > LDAP_DESC?= LDAP support for Mailnews > MAILNEWS_DESC?= Mail and News modules > >+SNDIO_BROKEN= missing sndio support >+ > .include "${.CURDIR}/../../www/firefox/Makefile.options" > .include <bsd.port.options.mk> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 212028
:
173909
|
174530
|
176619
|
178426