void-packages/srcpkgs/firefox/patches/sndio.patch

86 lines
2.1 KiB
Diff
Raw Normal View History

2017-11-16 04:42:48 +01:00
--- old-configure.in.orig
+++ old-configure.in
@@ -2839,6 +2839,22 @@
AC_SUBST(MOZ_ALSA)
+dnl ==================================
+dnl = Check sndio availability
+dnl ==================================
+
+MOZ_ARG_ENABLE_BOOL(sndio,
+[ --enable-sndio Enable sndio support],
+ MOZ_SNDIO=1,
+ MOZ_SNDIO=)
+
+if test -n "$MOZ_SNDIO"; then
+ MOZ_SNDIO_LIBS="-lsndio"
+ AC_SUBST_LIST(MOZ_SNDIO_LIBS)
+fi
+
+AC_SUBST(MOZ_SNDIO)
+
dnl ========================================================
dnl = Disable PulseAudio
dnl ========================================================
--- toolkit/library/moz.build.orig
+++ toolkit/library/moz.build
@@ -235,10 +235,8 @@
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
OS_LIBS += CONFIG['TK_LIBS']
-if CONFIG['OS_ARCH'] == 'OpenBSD':
- OS_LIBS += [
- 'sndio',
- ]
+if CONFIG['MOZ_SNDIO']:
+ OS_LIBS += CONFIG['MOZ_SNDIO_LIBS']
if CONFIG['MOZ_ENABLE_DBUS']:
OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS']
--- media/libcubeb/src/moz.build.orig
+++ media/libcubeb/src/moz.build
@@ -43,7 +43,7 @@
]
DEFINES['USE_JACK'] = True
-if CONFIG['OS_ARCH'] == 'OpenBSD':
+if CONFIG['MOZ_SNDIO']:
SOURCES += [
'cubeb_sndio.c',
]
--- build/moz.configure/old.configure.orig
+++ build/moz.configure/old.configure
@@ -159,6 +159,7 @@
'--enable-accessibility',
'--enable-address-sanitizer',
'--enable-alsa',
+ '--enable-sndio',
'--enable-bundled-fonts',
'--enable-clang-plugin',
'--enable-content-sandbox',
--- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig
+++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -349,6 +349,21 @@
}
}
}
+
+#ifdef MOZ_SNDIO
+ // ~/.aucat_cookie (sndio)
+ rv = homeDir->Clone(getter_AddRefs(confDir));
+ if (NS_SUCCEEDED(rv)) {
+ rv = confDir->AppendNative(NS_LITERAL_CSTRING(".aucat_cookie"));
+ if (NS_SUCCEEDED(rv)) {
+ nsAutoCString tmpPath;
+ rv = confDir->GetNativePath(tmpPath);
+ if (NS_SUCCEEDED(rv)) {
+ policy->AddPath(rdwrcr, tmpPath.get());
+ }
+ }
+ }
+#endif
}
// Firefox binary dir.