Advertisement
wellthatsucks

Untitled

Apr 25th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 KB | None | 0 0
  1. subdir('deptree')
  2. subdir('libavutil')
  3. subdir('libpostproc')
  4. subdir('libswresample')
  5. subdir('libswscale')
  6. subdir('libavcodec')
  7. subdir('libavformat')
  8. subdir('libavfilter')
  9. subdir('libavdevice')
  10. subdir('libavresample')
  11.  
  12. libavcodec_selected = configuration_data()
  13. libavcodec_all_depend = configuration_data()
  14. built_decoder_list = []
  15. built_encoder_list = []
  16. built_parser_list = []
  17. built_bsf_list = []
  18. libavcodec_extra_sources = []
  19. libavcodec_optional_deps = []
  20.  
  21. libavformat_selected = configuration_data()
  22. libavformat_all_depend = configuration_data()
  23. built_muxer_list = []
  24. built_demuxer_list = []
  25. built_protocol_list = []
  26. libavformat_extra_sources = []
  27. libavformat_optional_deps = []
  28.  
  29. libavdevice_selected = configuration_data()
  30. libavdevice_all_depend = configuration_data()
  31. built_indev_list = []
  32. built_outdev_list = []
  33. libavdevice_extra_sources = []
  34. libavdevice_optional_deps = []
  35.  
  36. libavfilter_selected = configuration_data()
  37. libavfilter_all_depend = configuration_data()
  38. built_filter_list = []
  39. libavfilter_extra_sources = []
  40. libavfilter_optional_deps = []
  41.  
  42. comp_infos = [
  43. ['decoder', 'libavcodec'],
  44. ['encoder', 'libavcodec'],
  45. ['parser', 'libavcodec'],
  46. ['bsf', 'libavcodec'],
  47. ['muxer', 'libavformat'],
  48. ['demuxer', 'libavformat'],
  49. ['protocol', 'libavformat'],
  50. ['outdev', 'libavdevice', 'muxer'],
  51. ['indev', 'libavdevice', 'demuxer'],
  52. ['filter', 'libavfilter'],
  53. ]
  54.  
  55. foreach comp_info : comp_infos
  56. comp_type = comp_info[0]
  57. comp_lib = comp_info[1]
  58.  
  59. if comp_info.length() > 2
  60. thing_name = comp_info[2]
  61. else
  62. thing_name = comp_type
  63. endif
  64.  
  65. extra_source_list = []
  66. built_components_list = []
  67. optional_deps = []
  68. selected = get_variable('@0@_selected'.format(comp_lib))
  69. all_depend = get_variable('@0@_all_depend'.format(comp_lib))
  70.  
  71. comp_list = get_variable('@0@_list'.format(comp_type))
  72. foreach comp_name : comp_list
  73. depends_satisfied = true
  74. depends = []
  75. depends_any = []
  76. suggests = []
  77. selects = []
  78.  
  79. if is_variable('@0@_@1@_depends'.format(comp_name, comp_type))
  80. depends += get_variable('@0@_@1@_depends'.format(comp_name, comp_type))
  81. endif
  82.  
  83. if is_variable('@0@_@1@_depends_any'.format(comp_name, comp_type))
  84. depends_any += [get_variable('@0@_@1@_depends_any'.format(comp_name, comp_type))]
  85. endif
  86.  
  87. if is_variable('@0@_@1@_suggests'.format(comp_name, comp_type))
  88. suggests += get_variable('@0@_@1@_suggests'.format(comp_name, comp_type))
  89. endif
  90.  
  91. if is_variable('@0@_@1@_selects'.format(comp_name, comp_type))
  92. selects = get_variable('@0@_@1@_selects'.format(comp_name, comp_type))
  93. endif
  94.  
  95. foreach select_name : selects
  96. if is_variable('@0@_depends'.format(select_name))
  97. depends += get_variable('@0@_depends'.format(select_name))
  98. endif
  99.  
  100. if is_variable('@0@_depends_any'.format(select_name))
  101. depends_any += [get_variable('@0@_depends_any'.format(select_name))]
  102. endif
  103.  
  104. if is_variable('@0@_suggests'.format(select_name))
  105. suggests += get_variable('@0@_suggests'.format(select_name))
  106. endif
  107. endforeach
  108.  
  109. foreach depend : depends
  110. if depends_satisfied
  111. if conf.has('CONFIG_@0@'.format(depend.to_upper()))
  112. if conf.get('CONFIG_@0@'.format(depend.to_upper())) == 0
  113. depends_satisfied = false
  114. endif
  115. else
  116. warning ('Unknown config @0@, skipping @1@'.format(depend.to_upper(), comp_name))
  117. depends_satisfied = false
  118. endif
  119. endif
  120. endforeach
  121.  
  122. foreach any_depend : depends_any
  123. if depends_satisfied
  124. any_satisfied = false
  125. foreach any : any_depend
  126. if conf.has('CONFIG_@0@'.format(any.to_upper()))
  127. if conf.get('CONFIG_@0@'.format(any.to_upper())) == 1
  128. any_satisfied = true
  129. endif
  130. else
  131. warning ('Unknown any config @0@, skipping @1@'.format(any.to_upper(), comp_name))
  132. depends_satisfied = false
  133. endif
  134. endforeach
  135. if not any_satisfied
  136. depends_satisfied = false
  137. endif
  138. endif
  139. endforeach
  140.  
  141. foreach suggest : suggests
  142. if conf.has('CONFIG_@0@'.format(suggest.to_upper()))
  143. if conf.get('CONFIG_@0@'.format(suggest.to_upper())) == 1
  144. depends += [suggest]
  145. endif
  146. else
  147. warning ('Unknown suggest @0@, skipping @1@'.format(suggest.to_upper(), comp_name))
  148. depends_satisfied = false
  149. endif
  150. endforeach
  151.  
  152. if depends_satisfied and is_variable('@0@_@1@_sources'.format(comp_name, comp_type))
  153. selects += ['@0@_@1@'.format(comp_name, comp_type)]
  154. built_components_list += ['@0@_@1@'.format(comp_name, thing_name)]
  155. conf.set('CONFIG_@0@_@1@'.format(comp_name.to_upper(), comp_type.to_upper()), 1)
  156. foreach select_name : selects
  157. if not selected.has(select_name)
  158. if is_variable('@0@_sources'.format(select_name))
  159. extra_source_list += get_variable('@0@_sources'.format(select_name))
  160. endif
  161. selected.set(select_name, true)
  162. conf.set('CONFIG_@0@'.format(select_name.to_upper()), 1)
  163. endif
  164. endforeach
  165. endif
  166.  
  167. if depends_satisfied
  168. foreach depend : depends
  169. if not all_depend.has(depend)
  170. if is_variable('@0@_dep'.format(depend))
  171. optional_deps += [get_variable('@0@_dep'.format(depend))]
  172. endif
  173. all_depend.set(depend, true)
  174. endif
  175. endforeach
  176. endif
  177. endforeach
  178.  
  179. lib_source_list = get_variable('@0@_extra_sources'.format(comp_lib))
  180. lib_components_list = get_variable('built_@0@_list'.format(comp_type))
  181. lib_optional_deps = get_variable('@0@_optional_deps'.format(comp_lib))
  182.  
  183. set_variable('@0@_extra_sources'.format(comp_lib), lib_source_list + extra_source_list)
  184. set_variable('built_@0@_list'.format(comp_type), lib_components_list + built_components_list)
  185. set_variable('@0@_optional_deps'.format(comp_lib), lib_optional_deps + optional_deps)
  186. endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement