void-packages/srcpkgs/icecat/patches/sndio.patch
Jürgen Buchmüller 7cec629479 icecat: update to 68.6.1
One has to roll hew own tarball with the IceCat 68 branch.
There are no official release tarballs anymore as it seems.
https://git.savannah.gnu.org/cgit/gnuzilla.git/log/?h=68

The result of me running ./makeicecat is available on my
https://distfiles.voidlinux.de site. It should perhaps be moved
to voidlinux.org distfiles.
2020-04-06 17:36:00 +02:00

98 lines
2.5 KiB
Diff

--- 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
@@ -169,6 +169,7 @@
@old_configure_options(
'--cache-file',
'--datadir',
+ '--enable-sndio',
'--enable-content-sandbox',
'--enable-cookies',
'--enable-cpp-rtti',
--- 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.
--- security/sandbox/linux/moz.build.orig
+++ security/sandbox/linux/moz.build
@@ -81,6 +81,9 @@
if CONFIG['MOZ_ALSA']:
DEFINES['MOZ_ALSA'] = True
+if CONFIG['MOZ_SNDIO']:
+ DEFINES['MOZ_SNDIO'] = True
+
# This copy of SafeSPrintf doesn't need to avoid the Chromium logging
# dependency like the one in libxul does, but this way the behavior is
# consistent. See also the comment in SandboxLogging.h.