2013-07-16 11:28:28 +00:00
|
|
|
# vi: ft=python
|
|
|
|
|
|
|
|
import sys, os, re
|
|
|
|
sys.path.insert(0, os.path.join(os.getcwd(), 'waftools'))
|
2013-11-23 09:58:19 +00:00
|
|
|
sys.path.insert(0, os.getcwd())
|
2013-07-16 11:28:28 +00:00
|
|
|
from waflib.Configure import conf
|
|
|
|
from waflib import Utils
|
|
|
|
from waftools.checks.generic import *
|
|
|
|
from waftools.checks.custom import *
|
|
|
|
|
|
|
|
build_options = [
|
|
|
|
{
|
2014-03-11 22:56:19 +00:00
|
|
|
'name': '--libmpv-shared',
|
2014-02-24 10:50:21 +00:00
|
|
|
'desc': 'shared library',
|
2014-02-10 20:25:22 +00:00
|
|
|
'default': 'disable',
|
|
|
|
'func': check_true
|
2014-06-16 09:22:46 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libmpv-static',
|
|
|
|
'desc': 'static library',
|
|
|
|
'default': 'disable',
|
|
|
|
'deps_neg': [ 'libmpv-shared' ],
|
|
|
|
'func': check_true
|
2014-02-10 20:30:55 +00:00
|
|
|
}, {
|
|
|
|
'name': '--client-api-examples',
|
|
|
|
'desc': 'build client API examples',
|
2014-06-16 09:22:46 +00:00
|
|
|
'deps_any': [ 'libmpv-shared', 'libmpv-static' ],
|
2014-02-10 20:30:55 +00:00
|
|
|
'func': check_true
|
2014-02-10 20:25:22 +00:00
|
|
|
}, {
|
2013-07-16 11:28:28 +00:00
|
|
|
'name': '--static-build',
|
|
|
|
'desc': 'static build',
|
|
|
|
'default': 'disable',
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': '--build-date',
|
|
|
|
'desc': 'whether to include binary compile time',
|
|
|
|
'default': 'enable',
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': '--debug-build',
|
|
|
|
'desc': 'whether to compile-in debugging information',
|
|
|
|
'default': 'enable',
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': '--manpage-build',
|
|
|
|
'desc': 'manpage generation',
|
|
|
|
'func': check_ctx_vars('RST2MAN')
|
|
|
|
}, {
|
|
|
|
'name': '--pdf-build',
|
|
|
|
'desc': 'pdf manual generation',
|
2014-01-08 15:00:40 +00:00
|
|
|
'func': check_ctx_vars('RST2PDF'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': 'libdl',
|
|
|
|
'desc': 'dynamic loader',
|
|
|
|
'func': check_libs(['dl'], check_statement('dlfcn.h', 'dlopen("", 0)'))
|
|
|
|
}, {
|
|
|
|
'name': 'dlopen',
|
|
|
|
'desc': 'dlopen',
|
|
|
|
'deps_any': [ 'libdl', 'os-win32', 'os-cygwin' ],
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': '--vf-dlopen-filters',
|
|
|
|
'desc': 'compilation of default filters for vf_dlopen',
|
|
|
|
'deps': [ 'dlopen' ],
|
|
|
|
'default': 'disable',
|
|
|
|
'func': check_true
|
2014-06-08 14:00:43 +00:00
|
|
|
}, {
|
|
|
|
'name': '--zsh-comp',
|
|
|
|
'desc': 'zsh completion',
|
|
|
|
'func': check_true,
|
2014-06-09 13:17:03 +00:00
|
|
|
'default': 'disable',
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--macosx-bundle',
|
|
|
|
'desc': 'compilation of a Mac OS X Application bundle',
|
|
|
|
'deps': [ 'os-darwin' ],
|
|
|
|
'default': 'disable',
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': 'win32-executable',
|
|
|
|
'desc': 'w32 executable',
|
|
|
|
'deps_any': [ 'os-win32', 'os-cygwin'],
|
|
|
|
'func': check_ctx_vars('WINDRES')
|
2013-12-29 16:34:31 +00:00
|
|
|
}, {
|
2014-04-19 15:09:24 +00:00
|
|
|
# does nothing - left for backward and forward compatibility
|
2013-12-29 16:34:31 +00:00
|
|
|
'name': '--asm',
|
2014-04-19 15:09:24 +00:00
|
|
|
'desc': 'inline assembly (currently without effect)',
|
2013-12-29 16:34:31 +00:00
|
|
|
'default': 'enable',
|
|
|
|
'func': check_true,
|
2013-07-16 11:28:28 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
main_dependencies = [
|
|
|
|
{
|
|
|
|
'name': 'noexecstack',
|
|
|
|
'desc': 'compiler support for noexecstack',
|
|
|
|
'func': check_cc(linkflags='-Wl,-z,noexecstack')
|
|
|
|
}, {
|
|
|
|
'name': 'noexecstack',
|
|
|
|
'desc': 'linker support for --nxcompat --no-seh --dynamicbase',
|
|
|
|
'func': check_cc(linkflags=['-Wl,--nxcompat', '-Wl,--no-seh', '-Wl,--dynamicbase'])
|
|
|
|
} , {
|
|
|
|
'name': 'libm',
|
|
|
|
'desc': '-lm',
|
|
|
|
'func': check_cc(lib='m')
|
|
|
|
}, {
|
|
|
|
'name': 'nanosleep',
|
|
|
|
'desc': 'nanosleep',
|
|
|
|
'func': check_statement('time.h', 'nanosleep(0,0)')
|
|
|
|
}, {
|
|
|
|
'name': 'sys-mman-h',
|
|
|
|
'desc': 'mman.h',
|
|
|
|
'func': check_statement('sys/mman.h', 'mmap(0, 0, 0, 0, 0, 0)')
|
|
|
|
}, {
|
2013-11-28 18:28:38 +00:00
|
|
|
'name': 'pthreads',
|
2013-07-16 11:28:28 +00:00
|
|
|
'desc': 'POSIX threads',
|
|
|
|
'func': check_pthreads,
|
2013-11-28 18:28:38 +00:00
|
|
|
'req': True,
|
|
|
|
'fmsg': 'Unable to find pthreads support.'
|
2014-05-20 23:04:47 +00:00
|
|
|
}, {
|
|
|
|
'name': 'stdatomic',
|
|
|
|
'desc': 'stdatomic.h',
|
2014-06-17 18:03:19 +00:00
|
|
|
'func': check_libs(['atomic'],
|
2014-05-20 23:04:47 +00:00
|
|
|
check_statement('stdatomic.h',
|
2014-06-17 18:03:19 +00:00
|
|
|
'atomic_int_least64_t test = ATOMIC_VAR_INIT(123);'
|
|
|
|
'int test2 = atomic_load(&test)'))
|
2013-12-30 15:30:30 +00:00
|
|
|
}, {
|
2014-01-01 19:42:13 +00:00
|
|
|
'name': 'atomic-builtins',
|
2013-12-30 15:30:30 +00:00
|
|
|
'desc': 'compiler support for __atomic built-ins',
|
|
|
|
'func': check_libs(['atomic'],
|
|
|
|
check_statement('stdint.h',
|
|
|
|
'int64_t test = 0;'
|
2014-05-20 23:04:47 +00:00
|
|
|
'test = __atomic_add_fetch(&test, 1, __ATOMIC_SEQ_CST)')),
|
|
|
|
'deps_neg': [ 'stdatomic' ],
|
2014-01-01 19:42:13 +00:00
|
|
|
}, {
|
|
|
|
'name': 'sync-builtins',
|
|
|
|
'desc': 'compiler support for __sync built-ins',
|
|
|
|
'func': check_statement('stdint.h',
|
|
|
|
'int64_t test = 0;'
|
|
|
|
'test = __sync_add_and_fetch(&test, 1)'),
|
2014-05-20 23:04:47 +00:00
|
|
|
'deps_neg': [ 'stdatomic', 'atomic-builtins' ],
|
2014-01-01 19:42:13 +00:00
|
|
|
}, {
|
2014-07-05 15:02:06 +00:00
|
|
|
'name': 'atomics',
|
2014-01-01 19:42:13 +00:00
|
|
|
'desc': 'compiler support for usable thread synchronization built-ins',
|
|
|
|
'func': check_true,
|
2014-05-20 23:04:47 +00:00
|
|
|
'deps_any': ['stdatomic', 'atomic-builtins', 'sync-builtins'],
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': 'librt',
|
|
|
|
'desc': 'linking with -lrt',
|
|
|
|
'deps': [ 'pthreads' ],
|
|
|
|
'func': check_cc(lib='rt')
|
|
|
|
}, {
|
|
|
|
'name': '--iconv',
|
|
|
|
'desc': 'iconv',
|
|
|
|
'func': check_iconv,
|
|
|
|
'req': True,
|
|
|
|
'fmsg': "Unable to find iconv which should be part of a standard \
|
|
|
|
compilation environment. Aborting. If you really mean to compile without \
|
|
|
|
iconv support use --disable-iconv.",
|
|
|
|
}, {
|
|
|
|
'name': 'dos-paths',
|
|
|
|
'desc': 'w32/dos paths',
|
|
|
|
'deps_any': [ 'os-win32', 'os-cygwin' ],
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': 'priority',
|
|
|
|
'desc': 'w32 priority API',
|
|
|
|
'deps_any': [ 'os-win32', 'os-cygwin'],
|
|
|
|
'func': check_true
|
|
|
|
}, {
|
|
|
|
'name': 'videoio',
|
|
|
|
'desc': 'videoio.h',
|
|
|
|
'func': check_headers('sys/videoio.h')
|
|
|
|
}, {
|
|
|
|
'name': '--terminfo',
|
|
|
|
'desc': 'terminfo',
|
|
|
|
'func': check_libs(['ncurses', 'ncursesw'],
|
|
|
|
check_statement('term.h', 'setupterm(0, 1, 0)')),
|
|
|
|
}, {
|
|
|
|
'name': '--termcap',
|
|
|
|
'desc': 'termcap',
|
|
|
|
'deps_neg': ['terminfo'],
|
|
|
|
'func': check_libs(['ncurses', 'tinfo', 'termcap'],
|
|
|
|
check_statement('term.h', 'tgetent(0, 0)')),
|
|
|
|
}, {
|
|
|
|
'name': '--termios',
|
|
|
|
'desc': 'termios',
|
|
|
|
'func': check_headers('termios.h', 'sys/termios.h'),
|
|
|
|
}, {
|
|
|
|
'name': '--shm',
|
|
|
|
'desc': 'shm',
|
2013-12-26 15:57:21 +00:00
|
|
|
'func': check_statement(['sys/types.h', 'sys/ipc.h', 'sys/shm.h'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)')
|
|
|
|
}, {
|
|
|
|
'name': 'posix-select',
|
|
|
|
'desc': 'POSIX select()',
|
|
|
|
'func': check_statement('sys/select.h', """
|
|
|
|
int rc;
|
|
|
|
rc = select(0, (fd_set *)(0), (fd_set *)(0), (fd_set *)(0),
|
|
|
|
(struct timeval *)(0))""")
|
|
|
|
}, {
|
|
|
|
'name': 'glob',
|
|
|
|
'desc': 'glob()',
|
|
|
|
'func': check_statement('glob.h', 'glob("filename", 0, 0, 0)')
|
|
|
|
}, {
|
|
|
|
'name': 'glob-win32-replacement',
|
|
|
|
'desc': 'glob() win32 replacement',
|
|
|
|
'deps_neg': [ 'glob' ],
|
|
|
|
'deps_any': [ 'os-win32', 'os-cygwin' ],
|
|
|
|
'func': check_true
|
2014-02-17 11:51:38 +00:00
|
|
|
}, {
|
|
|
|
'name': 'bsd-fstatfs',
|
|
|
|
'desc': "BSD's fstatfs()",
|
|
|
|
'func': check_statement(['sys/param.h', 'sys/mount.h'],
|
2014-03-11 23:49:16 +00:00
|
|
|
'struct statfs fs; fstatfs(0, &fs); fs.f_fstypename')
|
2014-03-11 19:27:50 +00:00
|
|
|
}, {
|
|
|
|
'name': 'linux-fstatfs',
|
|
|
|
'desc': "Linux's fstatfs()",
|
2014-03-17 02:12:31 +00:00
|
|
|
'deps': [ 'os-linux' ],
|
2014-03-11 19:27:50 +00:00
|
|
|
'func': check_statement('sys/vfs.h',
|
|
|
|
'struct statfs fs; fstatfs(0, &fs); fs.f_namelen')
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libguess',
|
|
|
|
'desc': 'libguess support',
|
|
|
|
'func': check_pkg_config('libguess', '>= 1.0'),
|
|
|
|
}, {
|
|
|
|
'name': '--libsmbclient',
|
|
|
|
'desc': 'Samba support',
|
|
|
|
'deps': [ 'libdl' ],
|
2013-11-30 18:47:09 +00:00
|
|
|
'func': check_pkg_config('smbclient'),
|
2013-07-16 11:28:28 +00:00
|
|
|
'module': 'input',
|
|
|
|
}, {
|
|
|
|
'name': '--libquvi4',
|
|
|
|
'desc': 'libquvi 0.4.x support',
|
2013-11-28 17:15:11 +00:00
|
|
|
'groups': [ 'libquvi' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_pkg_config('libquvi', '>= 0.4.1'),
|
|
|
|
}, {
|
|
|
|
'name': '--libquvi9',
|
|
|
|
'desc': 'libquvi 0.9.x support',
|
2013-11-28 17:15:11 +00:00
|
|
|
'groups': [ 'libquvi' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'deps_neg': [ 'libquvi4' ],
|
|
|
|
'func': check_pkg_config('libquvi-0.9', '>= 0.9.0'),
|
2013-11-28 17:15:11 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libquvi',
|
|
|
|
'desc': 'libquvi support',
|
|
|
|
'deps_any': [ 'libquvi4', 'libquvi9' ],
|
|
|
|
'func': check_true
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libass',
|
|
|
|
'desc': 'SSA/ASS support',
|
|
|
|
'func': check_pkg_config('libass'),
|
|
|
|
'req': True,
|
|
|
|
'fmsg': "Unable to find development files for libass. Aborting. \
|
|
|
|
If you really mean to compile without libass support use --disable-libass."
|
|
|
|
}, {
|
|
|
|
'name': '--libass-osd',
|
|
|
|
'desc': 'libass OSD support',
|
|
|
|
'deps': [ 'libass' ],
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name': 'dummy-osd',
|
|
|
|
'desc': 'dummy OSD support',
|
|
|
|
'deps_neg': [ 'libass-osd' ],
|
|
|
|
'func': check_true,
|
|
|
|
} , {
|
|
|
|
'name': 'zlib',
|
|
|
|
'desc': 'zlib',
|
|
|
|
'func': check_libs(['z'],
|
|
|
|
check_statement('zlib.h', 'inflate(0, Z_NO_FLUSH)')),
|
|
|
|
'req': True,
|
|
|
|
'fmsg': 'Unable to find development files for zlib.'
|
|
|
|
} , {
|
|
|
|
'name' : '--encoding',
|
|
|
|
'desc' : 'Encoding',
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name' : '--joystick',
|
|
|
|
'desc' : 'joystick',
|
|
|
|
'func': check_cc(header_name='linux/joystick.h'),
|
|
|
|
'default': 'disable'
|
|
|
|
}, {
|
|
|
|
'name' : '--lirc',
|
|
|
|
'desc' : 'lirc',
|
|
|
|
'func': check_cc(header_name='lirc/lirc_client.h', lib='lirc_client'),
|
|
|
|
}, {
|
|
|
|
'name': '--libbluray',
|
|
|
|
'desc': 'Bluray support',
|
2014-04-05 15:40:50 +00:00
|
|
|
'func': check_pkg_config('libbluray', '>= 0.3.0'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--dvdread',
|
|
|
|
'desc': 'dvdread support',
|
|
|
|
'func': check_pkg_config('dvdread', '>= 4.1.0'),
|
Add prelimimary (basic, possibly broken) dvdnav support
This readds a more or less completely new dvdnav implementation, though
it's based on the code from before commit 41fbcee. Note that this is
rather basic, and might be broken or not quite usable in many cases.
Most importantly, navigation highlights are not correctly implemented.
This would require changes in the FFmpeg dvdsub decoder (to apply a
different internal CLUT), so supporting it is not really possible right
now. And in fact, I don't think I ever want to support it, because it's
a very small gain for a lot of work. Instead, mpv will display fake
highlights, which are an approximate bounding box around the real
highlights.
Some things like mouse input or switching audio/subtitles stream using
the dvdnav VM are not supported.
Might be quite fragile on transitions: if dvdnav initiates a transition,
and doesn't give us enough mpeg data to initialize video playback, the
player will just quit.
This is added only because some users seem to want it. I don't intend to
make mpv a good DVD player, so the very basic minimum will have to do.
How about you just convert your DVD to proper video files?
2013-12-12 00:44:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--dvdnav',
|
|
|
|
'desc': 'dvdnav support',
|
2013-12-12 07:48:13 +00:00
|
|
|
'deps': [ 'dvdread' ],
|
Add prelimimary (basic, possibly broken) dvdnav support
This readds a more or less completely new dvdnav implementation, though
it's based on the code from before commit 41fbcee. Note that this is
rather basic, and might be broken or not quite usable in many cases.
Most importantly, navigation highlights are not correctly implemented.
This would require changes in the FFmpeg dvdsub decoder (to apply a
different internal CLUT), so supporting it is not really possible right
now. And in fact, I don't think I ever want to support it, because it's
a very small gain for a lot of work. Instead, mpv will display fake
highlights, which are an approximate bounding box around the real
highlights.
Some things like mouse input or switching audio/subtitles stream using
the dvdnav VM are not supported.
Might be quite fragile on transitions: if dvdnav initiates a transition,
and doesn't give us enough mpeg data to initialize video playback, the
player will just quit.
This is added only because some users seem to want it. I don't intend to
make mpv a good DVD player, so the very basic minimum will have to do.
How about you just convert your DVD to proper video files?
2013-12-12 00:44:28 +00:00
|
|
|
'func': check_pkg_config('dvdnav', '>= 4.2.0'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--cdda',
|
|
|
|
'desc': 'cdda support (libcdio)',
|
|
|
|
'func': check_pkg_config('libcdio_paranoia'),
|
2014-05-24 15:09:29 +00:00
|
|
|
'default': 'disable',
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--enca',
|
|
|
|
'desc': 'ENCA support',
|
|
|
|
'func': check_statement('enca.h', 'enca_get_languages(NULL)', lib='enca'),
|
|
|
|
}, {
|
|
|
|
'name': '--mpg123',
|
|
|
|
'desc': 'mpg123 support',
|
2014-02-13 12:26:46 +00:00
|
|
|
'func': check_pkg_config('libmpg123', '>= 1.14.0'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--ladspa',
|
|
|
|
'desc': 'LADSPA plugin support',
|
|
|
|
'func': check_statement('ladspa.h', 'LADSPA_Descriptor ld = {0}'),
|
|
|
|
}, {
|
|
|
|
'name': '--libbs2b',
|
|
|
|
'desc': 'libbs2b audio filter support',
|
|
|
|
'func': check_pkg_config('libbs2b'),
|
|
|
|
}, {
|
|
|
|
'name': '--lcms2',
|
|
|
|
'desc': 'LCMS2 support',
|
2014-06-16 14:57:19 +00:00
|
|
|
'func': check_pkg_config('lcms2', '>= 2.6'),
|
2014-04-12 15:51:19 +00:00
|
|
|
}, {
|
|
|
|
'name': '--vapoursynth',
|
|
|
|
'desc': 'VapourSynth filter bridge',
|
|
|
|
'func': check_pkg_config('vapoursynth >= 23 vapoursynth-script >= 23'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
libav_pkg_config_checks = [
|
2014-03-16 01:14:18 +00:00
|
|
|
'libavutil', '>= 52.48.101',
|
|
|
|
'libavcodec', '>= 55.34.1',
|
|
|
|
'libavformat', '>= 55.12.0',
|
|
|
|
'libswscale', '>= 2.1.2'
|
2013-07-16 11:28:28 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
libav_dependencies = [
|
|
|
|
{
|
|
|
|
'name': 'libav',
|
|
|
|
'desc': 'libav/ffmpeg',
|
|
|
|
'func': check_pkg_config(*libav_pkg_config_checks),
|
|
|
|
'req': True,
|
|
|
|
'fmsg': "Unable to find development files for some of the required \
|
|
|
|
Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
|
|
|
|
}, {
|
|
|
|
'name': '--libavresample',
|
|
|
|
'desc': 'libavresample',
|
2014-03-16 01:14:18 +00:00
|
|
|
'func': check_pkg_config('libavresample', '>= 1.1.0'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libswresample',
|
|
|
|
'desc': 'libswresample',
|
2014-03-16 01:14:18 +00:00
|
|
|
'func': check_pkg_config('libswresample', '>= 0.17.104'),
|
2014-01-05 22:27:14 +00:00
|
|
|
'deps_neg': ['libavresample'],
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': 'resampler',
|
|
|
|
'desc': 'usable resampler found',
|
|
|
|
'deps_any': [ 'libavresample', 'libswresample' ],
|
|
|
|
'func': check_true,
|
|
|
|
'req': True,
|
|
|
|
'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).'
|
|
|
|
}, {
|
|
|
|
'name': 'avcodec-chroma-pos-api',
|
|
|
|
'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
|
|
|
|
'func': check_statement('libavcodec/avcodec.h', """int x, y;
|
|
|
|
avcodec_enum_to_chroma_pos(&x, &y, AVCHROMA_LOC_UNSPECIFIED)""",
|
|
|
|
use='libav')
|
2014-03-25 17:45:08 +00:00
|
|
|
}, {
|
|
|
|
'name': 'avcol-spc-bt2020',
|
|
|
|
'desc': 'libavcodec avcol_spc_bt2020 available',
|
|
|
|
'func': check_statement('libavcodec/avcodec.h',
|
|
|
|
'int x = AVCOL_SPC_BT2020_NCL',
|
|
|
|
use='libav')
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': 'avutil-qp-api',
|
|
|
|
'desc': 'libavutil QP API',
|
|
|
|
'func': check_statement('libavutil/frame.h',
|
|
|
|
'av_frame_get_qp_table(NULL, NULL, NULL)',
|
|
|
|
use='libav')
|
|
|
|
}, {
|
|
|
|
'name': '--libavfilter',
|
|
|
|
'desc': 'libavfilter',
|
2014-03-16 09:25:05 +00:00
|
|
|
'func': check_pkg_config('libavfilter', '>= 3.90.100'),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--libavdevice',
|
|
|
|
'desc': 'libavdevice',
|
|
|
|
'func': check_pkg_config('libavdevice', '>= 54.0.0'),
|
|
|
|
}, {
|
|
|
|
'name': '--libpostproc',
|
|
|
|
'desc': 'libpostproc',
|
2014-04-24 19:25:21 +00:00
|
|
|
'func': check_pkg_config('libpostproc', '>= 52.2.100'),
|
2013-10-19 01:50:08 +00:00
|
|
|
}, {
|
|
|
|
'name': 'avcodec-metadata-update-side-data',
|
|
|
|
'desc': 'libavcodec AV_PKT_DATA_METADATA_UPDATE side data type',
|
|
|
|
'func': check_statement('libavcodec/avcodec.h',
|
|
|
|
'enum AVPacketSideDataType type = AV_PKT_DATA_METADATA_UPDATE',
|
|
|
|
use='libav')
|
2014-03-27 21:31:43 +00:00
|
|
|
}, {
|
|
|
|
'name': 'avcodec-replaygain-side-data',
|
|
|
|
'desc': 'libavcodec AV_PKT_DATA_REPLAYGAIN side data type',
|
|
|
|
'func': check_statement('libavcodec/avcodec.h',
|
|
|
|
'enum AVPacketSideDataType type = AV_PKT_DATA_REPLAYGAIN',
|
|
|
|
use='libav')
|
2014-06-01 15:56:10 +00:00
|
|
|
}, {
|
|
|
|
'name': 'av-displaymatrix',
|
|
|
|
'desc': 'libavutil/libavcodec display matrix side data',
|
|
|
|
'func': check_statement('libavutil/frame.h',
|
|
|
|
'enum AVFrameSideDataType type = AV_FRAME_DATA_DISPLAYMATRIX',
|
|
|
|
use='libav')
|
2014-04-13 14:04:23 +00:00
|
|
|
},{
|
|
|
|
'name': 'avframe-metadata',
|
|
|
|
'desc': 'libavutil AVFrame metadata',
|
|
|
|
'func': check_statement('libavutil/frame.h',
|
|
|
|
'av_frame_get_metadata(NULL)',
|
|
|
|
use='libav')
|
2013-07-16 11:28:28 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
audio_output_features = [
|
|
|
|
{
|
|
|
|
'name': '--sdl2',
|
|
|
|
'desc': 'SDL2',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': ['atomics'],
|
2013-12-29 13:14:09 +00:00
|
|
|
'func': check_pkg_config('sdl2'),
|
|
|
|
'default': 'disable'
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
2014-01-24 23:30:28 +00:00
|
|
|
'name': '--sdl1',
|
2013-07-16 11:28:28 +00:00
|
|
|
'desc': 'SDL (1.x)',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': ['atomics'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'deps_neg': [ 'sdl2' ],
|
2013-12-29 13:14:09 +00:00
|
|
|
'func': check_pkg_config('sdl'),
|
|
|
|
'default': 'disable'
|
2013-12-07 15:58:22 +00:00
|
|
|
}, {
|
|
|
|
'name': 'oss-audio-4front',
|
|
|
|
'desc': 'OSS (implementation from opensound.com)',
|
|
|
|
'func': check_oss_4front,
|
|
|
|
'groups' : [ 'oss-audio' ]
|
2013-11-29 08:01:14 +00:00
|
|
|
}, {
|
|
|
|
'name': 'oss-audio-native',
|
|
|
|
'desc': 'OSS (platform-specific OSS implementation)',
|
|
|
|
'func': check_cc(header_name='sys/soundcard.h',
|
|
|
|
defines=['PATH_DEV_DSP="/dev/dsp"',
|
|
|
|
'PATH_DEV_MIXER="/dev/mixer"'],
|
|
|
|
fragment=load_fragment('oss_audio.c')),
|
2013-12-07 15:58:22 +00:00
|
|
|
'deps_neg': [ 'oss-audio-4front' ],
|
2013-11-29 08:01:14 +00:00
|
|
|
'groups' : [ 'oss-audio' ]
|
|
|
|
}, {
|
|
|
|
'name': 'oss-audio-sunaudio',
|
|
|
|
'desc': 'OSS (emulation on top of SunAudio)',
|
|
|
|
'func': check_cc(header_name='soundcard.h',
|
|
|
|
lib='ossaudio',
|
|
|
|
defines=['PATH_DEV_DSP="/dev/sound"',
|
|
|
|
'PATH_DEV_MIXER="/dev/mixer"'],
|
|
|
|
fragment=load_fragment('oss_audio_sunaudio.c')),
|
2013-12-07 15:58:22 +00:00
|
|
|
'deps_neg': [ 'oss-audio-4front', 'oss-audio-native' ],
|
2013-11-29 08:01:14 +00:00
|
|
|
'groups' : [ 'oss-audio' ]
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--oss-audio',
|
|
|
|
'desc': 'OSS audio output',
|
2013-11-29 08:01:14 +00:00
|
|
|
'func': check_true,
|
|
|
|
'deps_any': [ 'oss-audio-native', 'oss-audio-sunaudio',
|
|
|
|
'oss-audio-4front' ]
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--audio-select',
|
|
|
|
'desc': 'audio select()',
|
|
|
|
'deps': [ 'posix-select', 'oss-audio' ],
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name': '--rsound',
|
|
|
|
'desc': 'RSound audio output',
|
|
|
|
'func': check_statement('rsound.h', 'rsd_init(NULL)', lib='rsound')
|
|
|
|
}, {
|
|
|
|
'name': '--sndio',
|
|
|
|
'desc': 'sndio audio input/output',
|
|
|
|
'func': check_statement('sndio.h',
|
2013-12-01 23:21:59 +00:00
|
|
|
'struct sio_par par; sio_initpar(&par); const char *s = SIO_DEVANY', lib='sndio')
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--pulse',
|
|
|
|
'desc': 'PulseAudio audio output',
|
|
|
|
'func': check_pkg_config('libpulse', '>= 0.9')
|
|
|
|
}, {
|
|
|
|
'name': '--portaudio',
|
|
|
|
'desc': 'PortAudio audio output',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': [ 'atomics' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_pkg_config('portaudio-2.0', '>= 19'),
|
2014-05-29 00:24:21 +00:00
|
|
|
'default': 'disable',
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--jack',
|
|
|
|
'desc': 'JACK audio output',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': ['atomics'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_pkg_config('jack'),
|
|
|
|
}, {
|
|
|
|
'name': '--openal',
|
|
|
|
'desc': 'OpenAL audio output',
|
|
|
|
'func': check_pkg_config('openal', '>= 1.13'),
|
|
|
|
'default': 'disable'
|
|
|
|
}, {
|
|
|
|
'name': '--alsa',
|
|
|
|
'desc': 'ALSA audio output',
|
|
|
|
'func': check_pkg_config('alsa'),
|
|
|
|
}, {
|
|
|
|
'name': '--coreaudio',
|
|
|
|
'desc': 'CoreAudio audio output',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': ['atomics'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_cc(
|
|
|
|
fragment=load_fragment('coreaudio.c'),
|
2013-12-06 09:17:20 +00:00
|
|
|
framework_name=['CoreFoundation', 'CoreAudio', 'AudioUnit', 'AudioToolbox'])
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--dsound',
|
|
|
|
'desc': 'DirectSound audio output',
|
|
|
|
'func': check_cc(header_name='dsound.h'),
|
|
|
|
}, {
|
|
|
|
'name': '--wasapi',
|
|
|
|
'desc': 'WASAPI audio output',
|
2014-07-05 15:02:06 +00:00
|
|
|
'deps': ['atomics'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_cc(fragment=load_fragment('wasapi.c'), lib='ole32'),
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
video_output_features = [
|
|
|
|
{
|
|
|
|
'name': '--cocoa',
|
|
|
|
'desc': 'Cocoa',
|
2014-01-02 19:34:14 +00:00
|
|
|
'func': check_cocoa
|
2013-11-22 19:58:48 +00:00
|
|
|
} , {
|
|
|
|
'name': 'gdi',
|
|
|
|
'desc': 'GDI',
|
|
|
|
'func': check_cc(lib='gdi32')
|
2014-03-09 14:26:31 +00:00
|
|
|
} , {
|
|
|
|
'name': 'winmm',
|
|
|
|
'desc': 'WinMM',
|
|
|
|
'func': check_cc(lib='winmm')
|
|
|
|
} , {
|
|
|
|
'name': 'ole',
|
|
|
|
'desc': 'OLE',
|
|
|
|
'func': check_cc(lib='ole32')
|
|
|
|
} , {
|
|
|
|
'name': 'uuid',
|
|
|
|
'desc': 'UUID',
|
|
|
|
'func': check_cc(lib='uuid')
|
2013-07-16 11:28:28 +00:00
|
|
|
} , {
|
|
|
|
'name': '--wayland',
|
|
|
|
'desc': 'Wayland',
|
2014-02-02 07:46:13 +00:00
|
|
|
'func': check_pkg_config('wayland-client', '>= 1.3.0',
|
|
|
|
'wayland-cursor', '>= 1.3.0',
|
2013-07-16 11:28:28 +00:00
|
|
|
'xkbcommon', '>= 0.3.0'),
|
|
|
|
} , {
|
|
|
|
'name': '--x11',
|
|
|
|
'desc': 'X11',
|
|
|
|
'func': check_pkg_config('x11'),
|
|
|
|
} , {
|
|
|
|
'name': '--xss',
|
|
|
|
'desc': 'Xss screensaver extensions',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_statement('X11/extensions/scrnsaver.h',
|
|
|
|
'XScreenSaverSuspend(NULL, True)', use='x11', lib='Xss'),
|
|
|
|
} , {
|
|
|
|
'name': '--xext',
|
|
|
|
'desc': 'X extensions',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_pkg_config('xext'),
|
|
|
|
} , {
|
|
|
|
'name': '--xv',
|
|
|
|
'desc': 'Xv video output',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_pkg_config('xv'),
|
|
|
|
} , {
|
|
|
|
'name': '--xinerama',
|
|
|
|
'desc': 'Xinerama',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_pkg_config('xinerama'),
|
|
|
|
}, {
|
|
|
|
'name': '--xf86vm',
|
|
|
|
'desc': 'Xxf86vm',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_cc(fragment=load_fragment('xf86vm.c'),
|
|
|
|
lib='Xxf86vm', use='x11')
|
|
|
|
} , {
|
|
|
|
'name': '--xf86xk',
|
|
|
|
'desc': 'XF86keysym',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_cc(fragment=load_fragment('xf86xk.c'))
|
|
|
|
} , {
|
|
|
|
'name': '--gl-cocoa',
|
|
|
|
'desc': 'OpenGL Cocoa Backend',
|
|
|
|
'deps': [ 'cocoa' ],
|
2013-11-28 07:36:41 +00:00
|
|
|
'groups': [ 'gl' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_true
|
|
|
|
} , {
|
|
|
|
'name': '--gl-x11',
|
|
|
|
'desc': 'OpenGL X11 Backend',
|
|
|
|
'deps': [ 'x11' ],
|
2013-11-28 07:36:41 +00:00
|
|
|
'groups': [ 'gl' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_libs(['GL', 'GL Xdamage'],
|
|
|
|
check_cc(fragment=load_fragment('gl_x11.c'),
|
|
|
|
use=['x11', 'libdl', 'pthreads']))
|
|
|
|
} , {
|
|
|
|
'name': '--gl-wayland',
|
|
|
|
'desc': 'OpenGL Wayland Backend',
|
|
|
|
'deps': [ 'wayland' ],
|
2013-11-28 07:36:41 +00:00
|
|
|
'groups': [ 'gl' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_pkg_config('wayland-egl', '>= 9.0.0',
|
|
|
|
'egl', '>= 9.0.0')
|
|
|
|
} , {
|
|
|
|
'name': '--gl-win32',
|
|
|
|
'desc': 'OpenGL Win32 Backend',
|
2014-03-09 14:26:31 +00:00
|
|
|
'deps': [ 'gdi', 'winmm', 'ole', 'uuid' ],
|
2013-11-28 07:36:41 +00:00
|
|
|
'groups': [ 'gl' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_statement('windows.h', 'wglCreateContext(0)',
|
|
|
|
lib='opengl32')
|
|
|
|
} , {
|
|
|
|
'name': '--gl',
|
|
|
|
'desc': 'OpenGL video outputs',
|
|
|
|
'deps_any': [ 'gl-cocoa', 'gl-x11', 'gl-win32', 'gl-wayland' ],
|
|
|
|
'func': check_true
|
|
|
|
} , {
|
|
|
|
'name': '--corevideo',
|
|
|
|
'desc': 'CoreVideo',
|
|
|
|
'deps': [ 'gl', 'gl-cocoa' ],
|
|
|
|
'func': check_statement('QuartzCore/CoreVideo.h',
|
|
|
|
'CVOpenGLTextureCacheCreate(0, 0, 0, 0, 0, 0)',
|
|
|
|
framework_name=['QuartzCore'])
|
|
|
|
} , {
|
|
|
|
'name': '--vdpau',
|
|
|
|
'desc': 'VDPAU acceleration',
|
|
|
|
'deps': [ 'x11' ],
|
|
|
|
'func': check_pkg_config('vdpau', '>= 0.2'),
|
|
|
|
} , {
|
|
|
|
'name': '--vdpau-gl-x11',
|
|
|
|
'desc': 'VDPAU with OpenGL/X11',
|
|
|
|
'deps': [ 'vdpau', 'gl-x11' ],
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name': '--vaapi',
|
|
|
|
'desc': 'VAAPI acceleration',
|
|
|
|
'deps': [ 'x11', 'libdl' ],
|
|
|
|
'func': check_pkg_config(
|
|
|
|
'libva', '>= 0.32.0', 'libva-x11', '>= 0.32.0'),
|
|
|
|
}, {
|
|
|
|
'name': '--vaapi-vpp',
|
|
|
|
'desc': 'VAAPI VPP',
|
|
|
|
'deps': [ 'vaapi' ],
|
|
|
|
'func': check_pkg_config('libva', '>= 0.34.0'),
|
|
|
|
}, {
|
|
|
|
'name': '--vaapi-glx',
|
|
|
|
'desc': 'VAAPI GLX',
|
|
|
|
'deps': [ 'vaapi', 'gl-x11' ],
|
|
|
|
'func': check_pkg_config('libva-glx', '>= 0.32.0'),
|
|
|
|
}, {
|
|
|
|
'name': '--caca',
|
|
|
|
'desc': 'CACA',
|
|
|
|
'func': check_pkg_config('caca', '>= 0.99.beta18'),
|
|
|
|
}, {
|
|
|
|
'name': '--dvb',
|
|
|
|
'desc': 'DVB',
|
|
|
|
'func': check_cc(fragment=load_fragment('dvb.c')),
|
|
|
|
} , {
|
|
|
|
'name': '--dvbin',
|
|
|
|
'desc': 'DVB input module',
|
|
|
|
'deps': [ 'dvb' ],
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name': '--jpeg',
|
|
|
|
'desc': 'JPEG support',
|
|
|
|
'func': check_cc(header_name=['stdio.h', 'jpeglib.h'],
|
|
|
|
lib='jpeg', use='libm'),
|
|
|
|
}, {
|
|
|
|
'name': '--direct3d',
|
|
|
|
'desc': 'Direct3D support',
|
2014-03-09 14:26:31 +00:00
|
|
|
'deps': [ 'gdi', 'winmm', 'ole', 'uuid' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_cc(header_name='d3d9.h'),
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
hwaccel_features = [
|
|
|
|
{
|
|
|
|
'name': '--vaapi-hwaccel',
|
|
|
|
'desc': 'libavcodec VAAPI hwaccel',
|
|
|
|
'deps': [ 'vaapi' ],
|
|
|
|
'func': check_true,
|
|
|
|
} , {
|
|
|
|
'name': '--vda-hwaccel',
|
|
|
|
'desc': 'libavcodec VDA hwaccel',
|
2014-03-16 08:21:21 +00:00
|
|
|
'deps': [ 'corevideo'],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': compose_checks(
|
|
|
|
check_headers('VideoDecodeAcceleration/VDADecoder.h'),
|
|
|
|
check_statement('libavcodec/vda.h',
|
|
|
|
'ff_vda_create_decoder(NULL, NULL, NULL)',
|
|
|
|
framework='IOSurface',
|
|
|
|
use='libav')),
|
|
|
|
} , {
|
|
|
|
'name': 'vda-libavcodec-refcounting',
|
|
|
|
'desc': "libavcodec VDA ref-counted CVPixelBuffers",
|
|
|
|
'deps': [ 'vda-hwaccel' ],
|
|
|
|
'func': check_statement ('libavcodec/vda.h',
|
|
|
|
"""struct vda_context a = (struct vda_context) {
|
|
|
|
.use_ref_buffer = 1 }""", use='libav')
|
2014-03-23 16:56:05 +00:00
|
|
|
}, {
|
|
|
|
'name': 'vda-av-vda-alloc-context',
|
|
|
|
'desc': "libavcodec VDA hwaccel 1.2",
|
|
|
|
'deps': [ 'vda-hwaccel' ],
|
|
|
|
'func': check_statement('libavcodec/vda.h',
|
|
|
|
'av_vda_alloc_context()',
|
|
|
|
use='libav')
|
2013-11-13 20:59:11 +00:00
|
|
|
}, {
|
|
|
|
'name': '--vda-gl',
|
|
|
|
'desc': 'VDA with OpenGL',
|
|
|
|
'deps': [ 'gl-cocoa', 'vda-hwaccel' ],
|
|
|
|
'func': check_true
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--vdpau-hwaccel',
|
2014-03-16 08:21:21 +00:00
|
|
|
'desc': 'libavcodec VDPAU hwaccel',
|
|
|
|
'deps': [ 'vdpau' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_true,
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
radio_and_tv_features = [
|
|
|
|
{
|
|
|
|
'name': '--tv',
|
|
|
|
'desc': 'TV interface',
|
|
|
|
'func': check_true,
|
|
|
|
}, {
|
|
|
|
'name': '--tv-v4l2',
|
|
|
|
'desc': 'Video4Linux2 TV interface',
|
2014-05-22 07:29:41 +00:00
|
|
|
'deps': [ 'tv' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_cc(header_name=['sys/time.h', 'linux/videodev2.h'])
|
|
|
|
}, {
|
|
|
|
'name': '--libv4l2',
|
|
|
|
'desc': 'libv4l2 support',
|
|
|
|
'func': check_pkg_config('libv4l2'),
|
|
|
|
}, {
|
|
|
|
'name': '--pvr',
|
|
|
|
'desc': 'Video4Linux2 MPEG PVR interface',
|
2013-11-22 13:55:19 +00:00
|
|
|
'func': check_cc(fragment=load_fragment('pvr.c')),
|
2013-07-16 11:28:28 +00:00
|
|
|
}, {
|
|
|
|
'name': '--audio-input',
|
|
|
|
'desc': 'audio input support',
|
2014-04-13 16:51:43 +00:00
|
|
|
'deps_any': [ 'tv-v4l2' ],
|
2013-07-16 11:28:28 +00:00
|
|
|
'func': check_true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
scripting_features = [
|
|
|
|
{
|
|
|
|
'name' : '--lua',
|
|
|
|
'desc' : 'Lua',
|
|
|
|
'func': check_lua,
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
_INSTALL_DIRS_LIST = [
|
|
|
|
('bindir', '${PREFIX}/bin', 'binary files'),
|
|
|
|
('libdir', '${PREFIX}/lib', 'library files'),
|
|
|
|
('confdir', '${PREFIX}/etc/mpv', 'configuration files'),
|
|
|
|
|
2014-02-10 20:25:22 +00:00
|
|
|
('incdir', '${PREFIX}/include', 'include files'),
|
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
('datadir', '${PREFIX}/share', 'data files'),
|
|
|
|
('mandir', '${DATADIR}/man', 'man pages '),
|
|
|
|
('docdir', '${DATADIR}/doc/mpv', 'documentation files'),
|
|
|
|
]
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
opt.load('compiler_c')
|
|
|
|
opt.load('waf_customizations')
|
|
|
|
opt.load('features')
|
|
|
|
|
|
|
|
group = opt.get_option_group("build and install options")
|
|
|
|
for ident, default, desc in _INSTALL_DIRS_LIST:
|
|
|
|
group.add_option('--{0}'.format(ident),
|
|
|
|
type = 'string',
|
|
|
|
dest = ident,
|
|
|
|
default = default,
|
|
|
|
help = 'directory for installing {0} [{1}]' \
|
|
|
|
.format(desc, default))
|
|
|
|
|
|
|
|
opt.parse_features('build and install options', build_options)
|
|
|
|
optional_features = main_dependencies + libav_dependencies
|
|
|
|
opt.parse_features('optional feaures', optional_features)
|
|
|
|
opt.parse_features('audio outputs', audio_output_features)
|
|
|
|
opt.parse_features('video outputs', video_output_features)
|
|
|
|
opt.parse_features('hwaccels', hwaccel_features)
|
2014-04-13 16:51:43 +00:00
|
|
|
opt.parse_features('tv features', radio_and_tv_features)
|
2013-07-16 11:28:28 +00:00
|
|
|
opt.parse_features('scripting', scripting_features)
|
|
|
|
|
|
|
|
group = opt.get_option_group("scripting")
|
|
|
|
group.add_option('--lua',
|
|
|
|
type = 'string',
|
|
|
|
dest = 'LUA_VER',
|
2014-01-14 22:49:26 +00:00
|
|
|
help = "select Lua package which should be autodetected. Choices: 51 51deb 51fbsd 52 52deb 52fbsd luajit")
|
2013-07-16 11:28:28 +00:00
|
|
|
|
|
|
|
@conf
|
|
|
|
def is_debug_build(ctx):
|
|
|
|
return getattr(ctx.options, 'enable_debug-build')
|
|
|
|
|
|
|
|
def configure(ctx):
|
2014-06-06 15:13:50 +00:00
|
|
|
ctx.check_waf_version(mini='1.7.15')
|
2013-07-16 11:28:28 +00:00
|
|
|
target = os.environ.get('TARGET')
|
|
|
|
(cc, pkg_config, windres) = ('cc', 'pkg-config', 'windres')
|
|
|
|
|
|
|
|
if target:
|
|
|
|
cc = '-'.join([target, 'gcc'])
|
|
|
|
pkg_config = '-'.join([target, pkg_config])
|
|
|
|
windres = '-'.join([target, windres])
|
|
|
|
|
|
|
|
ctx.find_program(cc, var='CC')
|
|
|
|
ctx.find_program(pkg_config, var='PKG_CONFIG')
|
|
|
|
ctx.find_program('perl', var='BIN_PERL')
|
|
|
|
ctx.find_program('rst2man', var='RST2MAN', mandatory=False)
|
2014-01-08 15:00:40 +00:00
|
|
|
ctx.find_program('rst2pdf', var='RST2PDF', mandatory=False)
|
2013-07-16 11:28:28 +00:00
|
|
|
ctx.find_program(windres, var='WINDRES', mandatory=False)
|
|
|
|
|
|
|
|
for ident, _, _ in _INSTALL_DIRS_LIST:
|
|
|
|
varname = ident.upper()
|
|
|
|
ctx.env[varname] = getattr(ctx.options, ident)
|
|
|
|
|
|
|
|
# keep substituting vars, until the paths are fully expanded
|
|
|
|
while re.match('\$\{([^}]+)\}', ctx.env[varname]):
|
|
|
|
ctx.env[varname] = Utils.subst_vars(ctx.env[varname], ctx.env)
|
|
|
|
|
|
|
|
ctx.load('compiler_c')
|
|
|
|
ctx.load('waf_customizations')
|
|
|
|
ctx.load('dependencies')
|
|
|
|
ctx.load('detections.compiler')
|
|
|
|
ctx.load('detections.devices')
|
|
|
|
|
|
|
|
ctx.parse_dependencies(build_options)
|
|
|
|
ctx.parse_dependencies(main_dependencies)
|
|
|
|
ctx.parse_dependencies(audio_output_features)
|
|
|
|
ctx.parse_dependencies(video_output_features)
|
|
|
|
ctx.parse_dependencies(libav_dependencies)
|
|
|
|
ctx.parse_dependencies(hwaccel_features)
|
|
|
|
ctx.parse_dependencies(radio_and_tv_features)
|
|
|
|
|
|
|
|
if ctx.options.LUA_VER:
|
|
|
|
ctx.options.enable_lua = True
|
|
|
|
|
|
|
|
ctx.parse_dependencies(scripting_features)
|
|
|
|
|
2013-11-29 08:01:14 +00:00
|
|
|
ctx.define('HAVE_SYS_SOUNDCARD_H',
|
|
|
|
'(HAVE_OSS_AUDIO_NATIVE || HAVE_OSS_AUDIO_4FRONT)',
|
|
|
|
quote=False)
|
|
|
|
|
|
|
|
ctx.define('HAVE_SOUNDCARD_H',
|
|
|
|
'HAVE_OSS_AUDIO_SUNAUDIO',
|
|
|
|
quote=False)
|
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
ctx.load('generators.headers')
|
|
|
|
|
|
|
|
if not ctx.dependency_satisfied('build-date'):
|
|
|
|
ctx.env.CFLAGS += ['-DNO_BUILD_TIMESTAMPS']
|
|
|
|
|
2013-11-24 13:22:45 +00:00
|
|
|
ctx.store_dependencies_lists()
|
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
def build(ctx):
|
2013-11-24 13:22:45 +00:00
|
|
|
ctx.unpack_dependencies_lists()
|
2013-07-16 11:28:28 +00:00
|
|
|
ctx.load('wscript_build')
|