# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python class Recipe(recipe.Recipe): name = 'gst-plugins-bad' version = '0.10.23' licenses = [License.LGPLv2Plus] config_sh = 'sh ./autogen.sh --noconfigure && ./configure' configure_options = "--disable-introspection --disable-gsm --disable-examples --disable-camerabin --disable-festival --disable-freeze --disable-h264parse --disable-inter --disable-legacyresample --disable-mpegvideoparse --disable-videomaxrate --disable-bz2 --disable-decklink --disable-linsys --disable-fbdev --disable-apexsink --disable-celt --disable-curl --disable-dc1394 --disable-directfb --disable-dirac --disable-divx --disable-faac --disable-flite --disable-gme --disable-ladspa --disable-lv2 --disable-mimic --disable-modplug --disable-mpeg2enc --disable-mplex --disable-musepack --disable-musicbrainz --disable-mythtv --disable-nas --disable-neon --disable-ofa --disable-openal --disable-opencv --disable-pvr --disable-sdl --disable-sndfile --disable-spandsp --disable-swfdec --disable-teletextdec --disable-timidity --disable-vdpau --disable-voaacenc --disable-voamrwbenc --disable-wildmidi --disable-xvid --disable-zbar --disable-sdi --disable-cog --with-package-origin='http://www.gstreamer.com' --with-package-name='GStreamer Bad Plugins (GStreamer SDK)' " remotes = {'upstream': 'git://anongit.freedesktop.org/gstreamer/gst-plugins-bad'} deps = ['gstreamer', 'gst-plugins-base', 'bzip2', 'libass', 'faad2', 'libkate', 'libvpx', 'zlib', 'opus', 'schroedinger', 'libdca', 'jasper', 'libmms', 'libdvdnav', 'soundtouch' ] files_lang = ['gst-plugins-bad-0.10'] files_plugins_effects = [ 'lib/gstreamer-0.10/libgstautoconvert%(mext)s', 'lib/gstreamer-0.10/libgstbayer%(mext)s', 'lib/gstreamer-0.10/libgstcoloreffects%(mext)s', 'lib/gstreamer-0.10/libgstfaceoverlay%(mext)s', 'lib/gstreamer-0.10/libgstfieldanalysis%(mext)s', 'lib/gstreamer-0.10/libgstfreeverb%(mext)s', 'lib/gstreamer-0.10/libgstfrei0r%(mext)s', 'lib/gstreamer-0.10/libgstgaudieffects%(mext)s', 'lib/gstreamer-0.10/libgstgeometrictransform%(mext)s', 'lib/gstreamer-0.10/libgstinterlace%(mext)s', 'lib/gstreamer-0.10/libgstjp2kdecimator%(mext)s', 'lib/gstreamer-0.10/libgstliveadder%(mext)s', 'lib/gstreamer-0.10/libgstrawparse%(mext)s', 'lib/gstreamer-0.10/libgstremovesilence%(mext)s', 'lib/gstreamer-0.10/libgstscaletempoplugin%(mext)s', 'lib/gstreamer-0.10/libgstsegmentclip%(mext)s', 'lib/gstreamer-0.10/libgstsmooth%(mext)s', 'lib/gstreamer-0.10/libgstsoundtouch%(mext)s', 'lib/gstreamer-0.10/libgstspeed%(mext)s', 'lib/gstreamer-0.10/libgststereo%(mext)s', 'lib/gstreamer-0.10/libgstvideofiltersbad%(mext)s', 'lib/gstreamer-0.10/libgstvideomeasure%(mext)s', 'lib/gstreamer-0.10/libgstvideosignal%(mext)s', ] files_plugins_codecs = [ 'lib/gstreamer-0.10/libgstadpcmdec%(mext)s', 'lib/gstreamer-0.10/libgstadpcmenc%(mext)s', 'lib/gstreamer-0.10/libgstaiff%(mext)s', 'lib/gstreamer-0.10/libgstcdxaparse%(mext)s', 'lib/gstreamer-0.10/libgstdccp%(mext)s', 'lib/gstreamer-0.10/libgstdtmf%(mext)s', 'lib/gstreamer-0.10/libgstdvbsuboverlay%(mext)s', 'lib/gstreamer-0.10/libgstdvdspu%(mext)s', 'lib/gstreamer-0.10/libgstfragmented%(mext)s', 'lib/gstreamer-0.10/libgsthdvparse%(mext)s', 'lib/gstreamer-0.10/libgstid3tag%(mext)s', 'lib/gstreamer-0.10/libgstivfparse%(mext)s', 'lib/gstreamer-0.10/libgstjp2k%(mext)s', 'lib/gstreamer-0.10/libgstkate%(mext)s', 'lib/gstreamer-0.10/libgstmve%(mext)s', 'lib/gstreamer-0.10/libgstmxf%(mext)s', 'lib/gstreamer-0.10/libgstnsf%(mext)s', 'lib/gstreamer-0.10/libgstnuvdemux%(mext)s', 'lib/gstreamer-0.10/libgstopus%(mext)s', 'lib/gstreamer-0.10/libgstpcapparse%(mext)s', 'lib/gstreamer-0.10/libgstpnm%(mext)s', 'lib/gstreamer-0.10/libgstschro%(mext)s', 'lib/gstreamer-0.10/libgstsiren%(mext)s', 'lib/gstreamer-0.10/libgstsubenc%(mext)s', 'lib/gstreamer-0.10/libgsttta%(mext)s', 'lib/gstreamer-0.10/libgstvideoparsersbad%(mext)s', 'lib/gstreamer-0.10/libgstvmnc%(mext)s', 'lib/gstreamer-0.10/libgstvp8%(mext)s', 'lib/gstreamer-0.10/libgsty4mdec%(mext)s', 'lib/gstreamer-0.10/libgstjpegformat%(mext)s', '%(sdir)s/libgstcodecparsers-0.10%(sext)s', 'lib/libgstcodecparsers-0.10.la', 'lib/libgstcodecparsers-0.10.a', '%(sdir)s/libgstbasevideo-0.10%(sext)s', 'lib/libgstbasevideo-0.10.la', 'lib/libgstbasevideo-0.10.a', ] platform_files_plugins_codecs = { Platform.ANDROID: [ 'lib/gstreamer-0.10/libgstandroidmedia%(mext)s', ] } files_plugins_codecs_gpl = [ 'lib/gstreamer-0.10/libgstassrender%(mext)s', ] files_plugins_codecs_restricted = [ 'lib/gstreamer-0.10/libgstasfmux%(mext)s', 'lib/gstreamer-0.10/libgstdtsdec%(mext)s', 'lib/gstreamer-0.10/libgstfaad%(mext)s', 'lib/gstreamer-0.10/libgstmpegdemux%(mext)s', 'lib/gstreamer-0.10/libgstmpegpsmux%(mext)s', 'lib/gstreamer-0.10/libgstmpegtsdemux%(mext)s', 'lib/gstreamer-0.10/libgstmpegtsmux%(mext)s', ] files_plugins_dvd = [ 'lib/gstreamer-0.10/libresindvd%(mext)s', ] files_plugins_net = [ 'lib/gstreamer-0.10/libgstdataurisrc%(mext)s', 'lib/gstreamer-0.10/libgstrtpmux%(mext)s', 'lib/gstreamer-0.10/libgstrtpvp8%(mext)s', 'lib/gstreamer-0.10/libgstsdpelem%(mext)s', ] files_plugins_net_restricted = [ 'lib/gstreamer-0.10/libgstmms%(mext)s', ] files_plugins_capture = [ 'lib/gstreamer-0.10/libgstcamerabin2%(mext)s', '%(sdir)s/libgstbasecamerabinsrc-0.10%(sext)s', 'lib/libgstbasecamerabinsrc-0.10.la', 'lib/libgstbasecamerabinsrc-0.10.a', '%(sdir)s/libgstphotography-0.10%(sext)s', 'lib/libgstphotography-0.10.la', 'lib/libgstphotography-0.10.a', ] platform_files_plugins_capture = { Platform.LINUX: [ 'lib/gstreamer-0.10/libgstdvb%(mext)s', ], Platform.WINDOWS: [ 'lib/gstreamer-0.10/libgstwinscreencap%(mext)s', ] } files_plugins_vis = [ 'lib/gstreamer-0.10/libgstaudiovisualizers%(mext)s', ] platform_files_plugins_sys = { Platform.LINUX: [ 'lib/gstreamer-0.10/libgstvcdsrc%(mext)s', ], Platform.WINDOWS: [ 'lib/gstreamer-0.10/libgstd3dvideosink%(mext)s', 'lib/gstreamer-0.10/libgstdirectdrawsink%(mext)s', 'lib/gstreamer-0.10/libgstdshowdecwrapper%(mext)s', 'lib/gstreamer-0.10/libgstdshowsrcwrapper%(mext)s', 'lib/gstreamer-0.10/libgstdshowvideosink%(mext)s', 'lib/gstreamer-0.10/libgstwinks%(mext)s', 'lib/gstreamer-0.10/libgstwasapi%(mext)s', ], Platform.DARWIN: [ 'lib/gstreamer-0.10/libgstapplemedia%(mext)s', 'lib/gstreamer-0.10/libgstapplemedia_nonpublic%(mext)s', ], Platform.ANDROID: [ 'lib/gstreamer-0.10/libgsteglglessink%(mext)s', 'lib/gstreamer-0.10/libgstopensles%(mext)s', ], Platform.IOS: [ 'lib/gstreamer-0.10/libgsteglglessink%(mext)s', 'lib/gstreamer-0.10/libgstapplemedia%(mext)s', 'lib/gstreamer-0.10/libgstapplemedia_nonpublic%(mext)s', ] } def prepare(self): if self.config.target_platform != Platform.LINUX: self.configure_options += '--disable-gtk-doc ' if self.config.target_platform == Platform.WINDOWS: self.configure_options += \ ' --disable-cog --disable-sdl '\ '--disable-cdaudio' if self.config.target_platform == Platform.ANDROID: self.configure_options += ' --disable-dccp' self.files_plugins_codecs.remove('lib/gstreamer-0.10/libgstdccp%(mext)s') for d in ['libdvdnav']: self.deps.remove(d) if self.config.target_platform == Platform.IOS: self.configure_options += '--with-egl-window-system=ios' if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' def post_install(self): if self.config.platform == Platform.WINDOWS and\ self.config.target_platform == Platform.WINDOWS: from cerbero.utils.msbuild import MSBuild from cerbero.utils import messages as m solution = os.path.join(self.build_dir, 'win32', 'vs10', 'gst-plugins-bad.sln') root = self.config.prefix msbuild = MSBuild(solution, self.config.target_arch, GSTREAMER_SDK_ROOT=root) try: msbuild.build() except Exception, e: m.error("The Direct Show plugins will not be built.")