void-packages/srcpkgs/firefox/patches/sndio.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

52 lines
1.3 KiB
Diff

--- a/old-configure.in
+++ b/old-configure.in
@@ -2818,6 +2818,22 @@
_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
fi
+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 =
dnl = Maintainer debug option (no --enable equivalent)
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -44,11 +44,13 @@
]
DEFINES['USE_JACK'] = True
-if CONFIG['OS_ARCH'] == 'OpenBSD':
+if CONFIG['MOZ_SNDIO']:
SOURCES += [
'cubeb_sndio.c',
]
DEFINES['USE_SNDIO'] = True
+
+if CONFIG['OS_ARCH'] == 'OpenBSD':
DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
if CONFIG['OS_TARGET'] == 'Darwin':
--- a/build/moz.configure/old.configure 2020-06-30 12:17:04.087609070 +0200
+++ b/build/moz.configure/old.configure 2020-06-30 12:17:04.087609070 +0200
@@ -88,6 +88,7 @@
@old_configure_options(
"--cache-file",
"--datadir",
+ "--enable-sndio",
"--enable-crashreporter",
"--enable-dbus",
"--enable-debug-js-modules",