mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Move --enable-eme out of mozconfigure
This commit is contained in:
parent
43fe9261ea
commit
297f13362a
3 changed files with 34 additions and 45 deletions
|
|
@ -175,6 +175,7 @@ def old_configure_options(*options):
|
|||
'--enable-directshow',
|
||||
'--enable-dtrace',
|
||||
'--enable-dump-painting',
|
||||
'--enable-eme',
|
||||
'--enable-elf-hack',
|
||||
'--enable-extensions',
|
||||
'--enable-faststripe',
|
||||
|
|
|
|||
|
|
@ -3007,6 +3007,35 @@ if test x"$MOZ_WIDGET_TOOLKIT" = x"gonk" -a -n "$MOZ_FMP4" -a -n "$android_versi
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = EME support
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(eme,
|
||||
[ --enable-eme[=widevine] Enable support for Encrypted Media Extensions ],
|
||||
MOZ_EME_ARGS=$enableval)
|
||||
|
||||
if test "$MOZ_EME_ARGS"; then
|
||||
if test "$MOZ_EME_ARGS" = "no"; then
|
||||
dnl EME explicitly disabled with --disable-eme
|
||||
MOZ_EME=
|
||||
elif test "$MOZ_EME_ARGS" = "yes"; then
|
||||
dnl EME explicitly enabled with --enable-eme
|
||||
MOZ_EME=1
|
||||
else
|
||||
dnl EME explicitly enabled with --enable-eme=<args>
|
||||
MOZ_EME=1
|
||||
MOZ_EME_MODULES=`echo $MOZ_EME_ARGS | sed -e 's/,/ /g'`
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST_SET(MOZ_EME_MODULES)
|
||||
if test -n "$MOZ_EME"; then
|
||||
if test -z "$MOZ_FMP4"; then
|
||||
AC_MSG_ERROR([Encrypted Media Extension support requires Fragmented MP4 support])
|
||||
fi
|
||||
AC_DEFINE(MOZ_EME)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable media plugin support
|
||||
|
|
@ -5720,7 +5749,8 @@ AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
|
|||
AC_SUBST(MOZ_VORBIS)
|
||||
AC_SUBST(MOZ_TREMOR)
|
||||
AC_SUBST(MOZ_FFVPX)
|
||||
AC_SUBST_LIST(FFVPX_ASFLAGS)
|
||||
AC_SUBST_LIST(FFVPX_ASFLAGS)
|
||||
AC_SUBST(MOZ_EME)
|
||||
AC_SUBST(MOZ_DIRECTSHOW)
|
||||
AC_SUBST(MOZ_ANDROID_OMX)
|
||||
AC_SUBST(MOZ_OMX_PLUGIN)
|
||||
|
|
|
|||
|
|
@ -405,50 +405,8 @@ set_config('MOZ_FMP4', fmp4)
|
|||
set_define('MOZ_FMP4', fmp4)
|
||||
add_old_configure_assignment('MOZ_FMP4', fmp4)
|
||||
|
||||
# EME Support
|
||||
# Miscellaneous
|
||||
# ==============================================================
|
||||
# Widevine is enabled by default in desktop browser builds.
|
||||
@depends(build_project, '--help')
|
||||
def eme_default(build_project, help):
|
||||
if build_project == 'browser':
|
||||
return 'widevine'
|
||||
|
||||
option('--enable-eme',
|
||||
nargs='*',
|
||||
choices=('adobe','widevine',),
|
||||
default=eme_default,
|
||||
help='Enable support for Encrypted Media Extensions')
|
||||
|
||||
@depends('--enable-eme', target)
|
||||
def enable_eme(value, target):
|
||||
# Widevine EME by default enabled on desktop Windows, MacOS and Linux,
|
||||
# x86 and x64 builds.
|
||||
if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
|
||||
target.os not in ('Android', 'iOS') and
|
||||
target.cpu in ('x86', 'x86_64')):
|
||||
return value
|
||||
elif value and value.origin != 'default':
|
||||
die('%s is not supported on %s' % (value.format('--enable-eme'), target.alias))
|
||||
# Return the same type of OptionValue (Positive or Negative), with an empty tuple.
|
||||
return value.__class__(())
|
||||
|
||||
@depends(enable_eme, fmp4)
|
||||
def eme(value, fmp4):
|
||||
enabled = bool(value)
|
||||
if value.origin == 'default':
|
||||
enabled = enabled or fmp4
|
||||
if enabled and not fmp4:
|
||||
die('Encrypted Media Extension support requires '
|
||||
'Fragmented MP4 support')
|
||||
if enabled:
|
||||
return True
|
||||
|
||||
@depends(enable_eme)
|
||||
def eme_modules(value):
|
||||
return value
|
||||
|
||||
set_config('MOZ_EME_MODULES', eme_modules)
|
||||
|
||||
option(name='--enable-chrome-format',
|
||||
help='Select FORMAT of chrome files during packaging.',
|
||||
nargs=1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue