Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subdir('deptree')
- subdir('libavutil')
- subdir('libpostproc')
- subdir('libswresample')
- subdir('libswscale')
- subdir('libavcodec')
- subdir('libavformat')
- subdir('libavfilter')
- subdir('libavdevice')
- subdir('libavresample')
- libavcodec_selected = configuration_data()
- libavcodec_all_depend = configuration_data()
- built_decoder_list = []
- built_encoder_list = []
- built_parser_list = []
- built_bsf_list = []
- libavcodec_extra_sources = []
- libavcodec_optional_deps = []
- libavformat_selected = configuration_data()
- libavformat_all_depend = configuration_data()
- built_muxer_list = []
- built_demuxer_list = []
- built_protocol_list = []
- libavformat_extra_sources = []
- libavformat_optional_deps = []
- libavdevice_selected = configuration_data()
- libavdevice_all_depend = configuration_data()
- built_indev_list = []
- built_outdev_list = []
- libavdevice_extra_sources = []
- libavdevice_optional_deps = []
- libavfilter_selected = configuration_data()
- libavfilter_all_depend = configuration_data()
- built_filter_list = []
- libavfilter_extra_sources = []
- libavfilter_optional_deps = []
- comp_infos = [
- ['decoder', 'libavcodec'],
- ['encoder', 'libavcodec'],
- ['parser', 'libavcodec'],
- ['bsf', 'libavcodec'],
- ['muxer', 'libavformat'],
- ['demuxer', 'libavformat'],
- ['protocol', 'libavformat'],
- ['outdev', 'libavdevice', 'muxer'],
- ['indev', 'libavdevice', 'demuxer'],
- ['filter', 'libavfilter'],
- ]
- foreach comp_info : comp_infos
- comp_type = comp_info[0]
- comp_lib = comp_info[1]
- if comp_info.length() > 2
- thing_name = comp_info[2]
- else
- thing_name = comp_type
- endif
- extra_source_list = []
- built_components_list = []
- optional_deps = []
- selected = get_variable('@0@_selected'.format(comp_lib))
- all_depend = get_variable('@0@_all_depend'.format(comp_lib))
- comp_list = get_variable('@0@_list'.format(comp_type))
- foreach comp_name : comp_list
- depends_satisfied = true
- depends = []
- depends_any = []
- suggests = []
- selects = []
- if is_variable('@0@_@1@_depends'.format(comp_name, comp_type))
- depends += get_variable('@0@_@1@_depends'.format(comp_name, comp_type))
- endif
- if is_variable('@0@_@1@_depends_any'.format(comp_name, comp_type))
- depends_any += [get_variable('@0@_@1@_depends_any'.format(comp_name, comp_type))]
- endif
- if is_variable('@0@_@1@_suggests'.format(comp_name, comp_type))
- suggests += get_variable('@0@_@1@_suggests'.format(comp_name, comp_type))
- endif
- if is_variable('@0@_@1@_selects'.format(comp_name, comp_type))
- selects = get_variable('@0@_@1@_selects'.format(comp_name, comp_type))
- endif
- foreach select_name : selects
- if is_variable('@0@_depends'.format(select_name))
- depends += get_variable('@0@_depends'.format(select_name))
- endif
- if is_variable('@0@_depends_any'.format(select_name))
- depends_any += [get_variable('@0@_depends_any'.format(select_name))]
- endif
- if is_variable('@0@_suggests'.format(select_name))
- suggests += get_variable('@0@_suggests'.format(select_name))
- endif
- endforeach
- foreach depend : depends
- if depends_satisfied
- if conf.has('CONFIG_@0@'.format(depend.to_upper()))
- if conf.get('CONFIG_@0@'.format(depend.to_upper())) == 0
- depends_satisfied = false
- endif
- else
- warning ('Unknown config @0@, skipping @1@'.format(depend.to_upper(), comp_name))
- depends_satisfied = false
- endif
- endif
- endforeach
- foreach any_depend : depends_any
- if depends_satisfied
- any_satisfied = false
- foreach any : any_depend
- if conf.has('CONFIG_@0@'.format(any.to_upper()))
- if conf.get('CONFIG_@0@'.format(any.to_upper())) == 1
- any_satisfied = true
- endif
- else
- warning ('Unknown any config @0@, skipping @1@'.format(any.to_upper(), comp_name))
- depends_satisfied = false
- endif
- endforeach
- if not any_satisfied
- depends_satisfied = false
- endif
- endif
- endforeach
- foreach suggest : suggests
- if conf.has('CONFIG_@0@'.format(suggest.to_upper()))
- if conf.get('CONFIG_@0@'.format(suggest.to_upper())) == 1
- depends += [suggest]
- endif
- else
- warning ('Unknown suggest @0@, skipping @1@'.format(suggest.to_upper(), comp_name))
- depends_satisfied = false
- endif
- endforeach
- if depends_satisfied and is_variable('@0@_@1@_sources'.format(comp_name, comp_type))
- selects += ['@0@_@1@'.format(comp_name, comp_type)]
- built_components_list += ['@0@_@1@'.format(comp_name, thing_name)]
- conf.set('CONFIG_@0@_@1@'.format(comp_name.to_upper(), comp_type.to_upper()), 1)
- foreach select_name : selects
- if not selected.has(select_name)
- if is_variable('@0@_sources'.format(select_name))
- extra_source_list += get_variable('@0@_sources'.format(select_name))
- endif
- selected.set(select_name, true)
- conf.set('CONFIG_@0@'.format(select_name.to_upper()), 1)
- endif
- endforeach
- endif
- if depends_satisfied
- foreach depend : depends
- if not all_depend.has(depend)
- if is_variable('@0@_dep'.format(depend))
- optional_deps += [get_variable('@0@_dep'.format(depend))]
- endif
- all_depend.set(depend, true)
- endif
- endforeach
- endif
- endforeach
- lib_source_list = get_variable('@0@_extra_sources'.format(comp_lib))
- lib_components_list = get_variable('built_@0@_list'.format(comp_type))
- lib_optional_deps = get_variable('@0@_optional_deps'.format(comp_lib))
- set_variable('@0@_extra_sources'.format(comp_lib), lib_source_list + extra_source_list)
- set_variable('built_@0@_list'.format(comp_type), lib_components_list + built_components_list)
- set_variable('@0@_optional_deps'.format(comp_lib), lib_optional_deps + optional_deps)
- endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement