Skip to content
Snippets Groups Projects
Commit 45f79889 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan :ant:
Browse files

gstreamer recipes: Add a helper for disabling plugins

Also stop disabling dvb on Debian Squeeze and Wheezy, they're 6+ years
old and no one is testing this anymore.
parent 90beb928
No related branches found
No related tags found
Loading
......@@ -52,6 +52,21 @@ class GStreamer(recipe.Recipe):
else:
self.meson_options[option] = 'disabled'
def disable_plugin(self, plugin, category, option=None, dep=None):
if option is None:
option = plugin
if dep is not None and dep in self.deps:
self.deps.remove(dep)
plugin = 'lib/gstreamer-1.0/libgst' + plugin
if hasattr(self, 'files_plugins_' + category):
f = getattr(self, 'files_plugins_' + category)
f.remove(plugin + '%(mext)s')
if hasattr(self, 'files_plugins_{}_devel'.format(category)):
d = getattr(self, 'files_plugins_{}_devel'.format(category))
d.remove(plugin + '.a')
d.remove(plugin + '.la')
self.meson_options[option] = 'disabled'
def list_gstreamer_1_0_plugins_by_category(config):
cookbook = CookBook(config)
......
......@@ -413,21 +413,12 @@ class Recipe(custom.GStreamer):
if self.config.target_platform in (Platform.DARWIN, Platform.IOS):
self.meson_options['applemedia'] = 'enabled'
if self.config.target_platform in [ Platform.ANDROID, Platform.IOS ]:
self.deps.remove('libdvdnav')
self.files_plugins_dvd.remove('lib/gstreamer-1.0/libgstresindvd%(mext)s')
self.files_plugins_dvd_devel.remove('lib/gstreamer-1.0/libgstresindvd.a')
self.files_plugins_dvd_devel.remove('lib/gstreamer-1.0/libgstresindvd.la')
self.meson_options['resindvd'] = 'disabled'
if self.config.target_platform in (Platform.ANDROID, Platform.IOS):
self.disable_plugin('resindvd', 'dvd', dep='libdvdnav')
if self.config.variants.nodebug:
self.append_env('CFLAGS', '-DGST_LEVEL_MAX=GST_LEVEL_FIXME')
if self.config.target_distro_version in [DistroVersion.DEBIAN_SQUEEZE, DistroVersion.DEBIAN_WHEEZY]:
self.platform_files_plugins_capture[Platform.LINUX].remove('lib/gstreamer-1.0/libgstdvb%(mext)s')
self.platform_files_plugins_capture_devel[Platform.LINUX].remove('lib/gstreamer-1.0/libgstdvb.a')
self.platform_files_plugins_capture_devel[Platform.LINUX].remove('lib/gstreamer-1.0/libgstdvb.la')
def post_install(self):
LibtoolLibrary('gstphotography-1.0', None, None, None, self.config.libdir,
self.config.target_platform, deps=['gstreamer-1.0']).save()
......
......@@ -48,12 +48,8 @@ class Recipe(custom.GStreamer):
files_lang = ['gst-plugins-ugly-1.0']
def prepare(self):
if self.config.target_platform in [ Platform.ANDROID, Platform.IOS ]:
self.deps.remove('libdvdread')
self.files_plugins_dvd.remove('lib/gstreamer-1.0/libgstdvdread%(mext)s')
self.files_plugins_dvd_devel.remove('lib/gstreamer-1.0/libgstdvdread.la')
self.files_plugins_dvd_devel.remove('lib/gstreamer-1.0/libgstdvdread.a')
self.meson_options['dvdread'] = 'disabled'
if self.config.target_platform in (Platform.ANDROID, Platform.IOS):
self.disable_plugin('dvdread', 'dvd', dep='libdvdread')
if self.config.variants.nodebug:
self.append_env('CFLAGS', '-DGST_LEVEL_MAX=GST_LEVEL_FIXME')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment