mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
firefox: add sndio build option
This commit is contained in:
parent
aa9ef4d29b
commit
8e07021402
2 changed files with 91 additions and 3 deletions
85
srcpkgs/firefox/patches/sndio.patch
Normal file
85
srcpkgs/firefox/patches/sndio.patch
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
--- 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.
|
|
@ -20,12 +20,13 @@ makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel
|
||||||
libXdamage-devel $(vopt_if alsa alsa-lib-devel)
|
libXdamage-devel $(vopt_if alsa alsa-lib-devel)
|
||||||
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
||||||
$(vopt_if startup_notification startup-notification-devel)
|
$(vopt_if startup_notification startup-notification-devel)
|
||||||
$(vopt_if xscreensaver libXScrnSaver-devel)"
|
$(vopt_if xscreensaver libXScrnSaver-devel)
|
||||||
|
$(vopt_if sndio sndio-devel)"
|
||||||
depends="nss>=3.33 desktop-file-utils hicolor-icon-theme"
|
depends="nss>=3.33 desktop-file-utils hicolor-icon-theme"
|
||||||
conflicts="firefox-esr>=0"
|
conflicts="firefox-esr>=0"
|
||||||
|
|
||||||
build_options="alsa dbus pulseaudio startup_notification xscreensaver"
|
build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio"
|
||||||
build_options_default="alsa dbus pulseaudio startup_notification xscreensaver"
|
build_options_default="alsa dbus pulseaudio startup_notification xscreensaver sndio"
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
@ -90,12 +91,14 @@ do_build() {
|
||||||
ac_add_options --with-google-api-keyfile="${wrksrc}/google-api-key"
|
ac_add_options --with-google-api-keyfile="${wrksrc}/google-api-key"
|
||||||
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
|
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
|
||||||
ac_add_options $(vopt_enable alsa)
|
ac_add_options $(vopt_enable alsa)
|
||||||
|
ac_add_options $(vopt_enable sndio)
|
||||||
ac_add_options $(vopt_enable dbus)
|
ac_add_options $(vopt_enable dbus)
|
||||||
ac_add_options $(vopt_enable dbus necko-wifi)
|
ac_add_options $(vopt_enable dbus necko-wifi)
|
||||||
ac_add_options $(vopt_enable pulseaudio)
|
ac_add_options $(vopt_enable pulseaudio)
|
||||||
ac_add_options $(vopt_enable startup_notification startup-notification)
|
ac_add_options $(vopt_enable startup_notification startup-notification)
|
||||||
!
|
!
|
||||||
|
|
||||||
|
rm -f old-configure
|
||||||
./mach build
|
./mach build
|
||||||
}
|
}
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue