diff options
-rw-r--r-- | cerbero/config.py | 3 | ||||
-rw-r--r-- | config/android.config | 2 | ||||
-rw-r--r-- | config/cross-lin-arm.cbc | 2 | ||||
-rw-r--r-- | config/ios.config | 2 | ||||
-rw-r--r-- | config/linux.config | 15 | ||||
-rw-r--r-- | packages/gstreamer-1.0-system.package | 4 | ||||
-rw-r--r-- | recipes/cairo.recipe | 10 | ||||
-rw-r--r-- | recipes/gst-plugins-base-1.0-static.recipe | 35 | ||||
-rw-r--r-- | recipes/gst-plugins-base-1.0.recipe | 38 | ||||
-rw-r--r-- | recipes/gst-plugins-good-1.0-static.recipe | 27 | ||||
-rw-r--r-- | recipes/gst-plugins-good-1.0.recipe | 32 | ||||
-rw-r--r-- | recipes/gst-rtsp-server-1.0.recipe | 2 | ||||
-rw-r--r-- | recipes/libdv.recipe | 14 | ||||
-rw-r--r-- | recipes/libmpeg2.recipe | 7 | ||||
-rw-r--r-- | recipes/librsvg.recipe | 9 | ||||
-rw-r--r-- | recipes/pango.recipe | 9 |
16 files changed, 135 insertions, 76 deletions
diff --git a/cerbero/config.py b/cerbero/config.py index ac6873b7..b60ad062 100644 --- a/cerbero/config.py +++ b/cerbero/config.py @@ -48,7 +48,8 @@ License = enums.License class Variants(object): - __enabled_variants = ['debug'] + __disabled_variants = ['x11', 'alsa', 'pulse', 'cdparanoia', 'v4l2', 'sdl'] + __enabled_variants = ['debug', 'gtk', 'clutter', 'python', 'testspackage'] def __init__(self, variants): for v in self.__enabled_variants: diff --git a/config/android.config b/config/android.config index b5690421..c3f4284d 100644 --- a/config/android.config +++ b/config/android.config @@ -8,6 +8,8 @@ from cerbero.config import Architecture, DistroVersion from cerbero.errors import FatalError import cerbero.utils.messages as m +variants += ['nogtk', 'noclutter', 'nopython', 'notestspackage'] + if not toolchain_prefix: toolchain_prefix = os.path.join(home_dir, 'android-ndk-r9') diff --git a/config/cross-lin-arm.cbc b/config/cross-lin-arm.cbc index fe33cebf..808c2d8e 100644 --- a/config/cross-lin-arm.cbc +++ b/config/cross-lin-arm.cbc @@ -4,3 +4,5 @@ from cerbero.config import Platform, Architecture, Distro, DistroVersion target_platform = Platform.LINUX target_distro = Distro.DEBIAN target_arch = Architecture.ARMv7 +variants = ['noalsa', 'nox11', 'nopulse', 'nocdparanoia', 'nosdl', + 'nogtk', 'noclutter', 'nov4l2', 'notestspackage', 'nopython'] diff --git a/config/ios.config b/config/ios.config index 18950ae0..e6264894 100644 --- a/config/ios.config +++ b/config/ios.config @@ -8,6 +8,8 @@ from cerbero.utils import shell from cerbero.config import Architecture, DistroVersion from cerbero.errors import FatalError +variants += ['nogtk', 'noclutter', 'nopython', 'notestspackage'] + # We don't want anything from macports detected in configure and # used later. System libs are passed through the -isysroot option allow_system_libs=False diff --git a/config/linux.config b/config/linux.config index b3186d64..c9878d2a 100644 --- a/config/linux.config +++ b/config/linux.config @@ -6,6 +6,21 @@ import os from cerbero.config import Architecture +if 'noalsa' not in variants: + variants.append('alsa') +if 'nox11' not in variants: + variants.append('x11') +if 'nopulse' not in variants: + variants.append('pulse') +if 'nocdparanoia' not in variants: + variants.append('cdparanoia') +if 'nov4l2' not in variants: + variants.append('v4l2') +if 'nosdl' not in variants: + variants.append('sdl') +if 'nogtk' not in variants: + variants.append('gtk') + for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'LDFLAGS', 'OBJCFLAGS']: os.environ[f] = os.environ.get(f, '') diff --git a/packages/gstreamer-1.0-system.package b/packages/gstreamer-1.0-system.package index f5bf04a2..7a785485 100644 --- a/packages/gstreamer-1.0-system.package +++ b/packages/gstreamer-1.0-system.package @@ -23,4 +23,6 @@ class Package(package.Package): 'gst-plugins-ugly-1.0-static:plugins_sys_devel', 'gst-plugins-bad-1.0-static:plugins_sys_devel'] - platform_files = {Platform.LINUX: ['cdparanoia:libs']} + def prepare(self): + if self.config.variants.cdparanoia: + self.files += ['cdparanoia:libs'] diff --git a/recipes/cairo.recipe b/recipes/cairo.recipe index 456ec95b..89febd0b 100644 --- a/recipes/cairo.recipe +++ b/recipes/cairo.recipe @@ -28,19 +28,19 @@ class Recipe(recipe.Recipe): platform_files_devel = { Platform.WINDOWS: [ 'lib/pkgconfig/cairo-win32-font.pc', 'lib/pkgconfig/cairo-win32.pc'], - Platform.LINUX: ['lib/pkgconfig/cairo-xlib-xrender.pc', - 'lib/pkgconfig/cairo-xlib.pc'], Platform.DARWIN: ['lib/pkgconfig/cairo-quartz-font.pc', 'lib/pkgconfig/cairo-quartz-image.pc', - 'lib/pkgconfig/cairo-quartz.pc', - ] + 'lib/pkgconfig/cairo-quartz.pc'] } # Skipping because it requires a display and documented as randomly failing make_check = None def prepare(self): - if self.config.target_platform != Platform.LINUX: + if self.config.variants.x11: + self.files_devel += ['lib/pkgconfig/cairo-xlib-xrender.pc', + 'lib/pkgconfig/cairo-xlib.pc'] + else: self.configure_options += '--without-x ' if self.config.target_platform == Platform.DARWIN: self.configure_options += ' --enable-quartz-font --enable-quartz-image' diff --git a/recipes/gst-plugins-base-1.0-static.recipe b/recipes/gst-plugins-base-1.0-static.recipe index 90cee332..24d54b59 100644 --- a/recipes/gst-plugins-base-1.0-static.recipe +++ b/recipes/gst-plugins-base-1.0-static.recipe @@ -10,7 +10,7 @@ class Recipe(custom.GStreamerStatic): commit = 'origin/master' deps = ['glib', 'gstreamer-1.0', 'libxml2', 'libogg', 'pango', 'libtheora', 'libvisual', 'libvorbis', 'zlib', 'orc'] - platform_deps = { Platform.LINUX: [ 'cdparanoia' ], Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] } + platform_deps = {Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] } use_system_libs = True files_plugins_core_devel = [ @@ -54,6 +54,8 @@ class Recipe(custom.GStreamerStatic): 'libgsttcp', ] + files_plugins_sys_devel = [] + platform_files_plugins_codecs_devel = { Platform.ANDROID: [ 'libgstivorbisdec', @@ -63,23 +65,32 @@ class Recipe(custom.GStreamerStatic): ] } - platform_files_plugins_sys_devel = { - Platform.LINUX: [ - 'libgstalsa', - 'libgstximagesink', - 'libgstxvimagesink', - 'libgstcdparanoia', - ] - } - def prepare(self): self.append_env['CFLAGS'] = " -Wno-error " self.append_env['CXXFLAGS'] = " -Wno-error " self.append_env['CPPFLAGS'] = " -Wno-error " if self.config.target_platform != Platform.LINUX: self.configure_options += '--disable-gtk-doc ' - if self.config.target_platform in [Platform.ANDROID, Platform.IOS]: - self.configure_options += ' --disable-alsa --disable-x' + + if self.config.variants.cdparanoia: + self.deps.append('cdparanoia') + self.files_plugins_sys_devel += ['libgstcdparanoia'] + else: + self.configure_options += ' --disable-cdparanoia' + + if self.config.variants.x11: + self.files_plugins_sys_devel += [ + 'libgstximagesink', + 'libgstxvimagesink', + ] + else: + self.configure_options += ' --disable-x' + + if self.config.variants.alsa: + self.files_plugins_sys_devel += ['libgstalsa'] + else: + self.configure_options += ' --disable-alsa' + if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' diff --git a/recipes/gst-plugins-base-1.0.recipe b/recipes/gst-plugins-base-1.0.recipe index f700b9eb..a07523e5 100644 --- a/recipes/gst-plugins-base-1.0.recipe +++ b/recipes/gst-plugins-base-1.0.recipe @@ -10,7 +10,7 @@ class Recipe(recipe.Recipe): commit = 'origin/master' deps = ['glib', 'gstreamer-1.0', 'libxml2', 'libogg', 'pango', 'libtheora', 'libvisual', 'libvorbis', 'zlib', 'orc'] - platform_deps = { Platform.LINUX: [ 'cdparanoia' ], Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] } + platform_deps = {Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] } use_system_libs = True files_bins = ['gst-discoverer-1.0'] @@ -86,7 +86,9 @@ class Recipe(recipe.Recipe): files_plugins_net = [ 'lib/gstreamer-1.0/libgsttcp%(mext)s', - ] + ] + files_plugins_sys = [] + platform_files_plugins_codecs = { Platform.ANDROID: [ @@ -97,15 +99,6 @@ class Recipe(recipe.Recipe): ] } - platform_files_plugins_sys = { - Platform.LINUX: [ - 'lib/gstreamer-1.0/libgstalsa%(mext)s', - 'lib/gstreamer-1.0/libgstximagesink%(mext)s', - 'lib/gstreamer-1.0/libgstxvimagesink%(mext)s', - 'lib/gstreamer-1.0/libgstcdparanoia%(mext)s', - ] - } - files_lang = ['gst-plugins-base-1.0'] @@ -118,8 +111,25 @@ class Recipe(recipe.Recipe): self.append_env['CPPFLAGS'] = " -Wno-error " if self.config.target_platform != Platform.LINUX: self.configure_options += '--disable-gtk-doc ' - if self.config.target_platform in [Platform.ANDROID, Platform.IOS, - Platform.WINDOWS]: - self.configure_options += ' --disable-alsa --disable-x' + + if self.config.variants.cdparanoia: + self.deps.append('cdparanoia') + self.files_plugins_sys += ['lib/gstreamer-1.0/libgstcdparanoia%(mext)s'] + else: + self.configure_options += ' --disable-cdparanoia' + + if self.config.variants.x11: + self.files_plugins_sys += [ + 'lib/gstreamer-1.0/libgstximagesink%(mext)s', + 'lib/gstreamer-1.0/libgstxvimagesink%(mext)s', + ] + else: + self.configure_options += ' --disable-x --disable-xvideo ' + + if self.config.variants.alsa: + self.files_plugins_sys += ['lib/gstreamer-1.0/libgstalsa%(mext)s'] + else: + self.configure_options += ' --disable-alsa' + if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' diff --git a/recipes/gst-plugins-good-1.0-static.recipe b/recipes/gst-plugins-good-1.0-static.recipe index 8be26926..87143c86 100644 --- a/recipes/gst-plugins-good-1.0-static.recipe +++ b/recipes/gst-plugins-good-1.0-static.recipe @@ -84,20 +84,14 @@ class Recipe(custom.GStreamerStatic): 'libgstgoom2k1', ] - platform_files_plugins_capture_devel = { - Platform.LINUX: [ - 'libgstvideo4linux2', - 'libgstximagesrc', - ] - } + files_plugins_capture_devel = [] + + files_plugins_sys_devel = [] platform_files_plugins_sys_devel = { Platform.WINDOWS: [ 'libgstdirectsoundsink', ], - Platform.LINUX: [ - 'libgstpulse', - ], Platform.DARWIN: [ 'libgstosxaudio', 'libgstosxvideosink', @@ -115,10 +109,21 @@ class Recipe(custom.GStreamerStatic): self.configure_options += '--disable-gtk-doc ' if self.config.target_platform == Platform.WINDOWS: self.configure_options += '--disable-aalib --disable-esd ' - if self.config.target_platform in [Platform.ANDROID, Platform.IOS]: - self.configure_options += '--disable-pulse --disable-x' if self.config.target_platform == Platform.LINUX: self.use_system_libs = True + if self.config.variants.v4l2: + self.files_plugins_capture_devel += ['libgstvideo4linux2'] + else: + self.configure_options += ' --disable-gst_v4l2 ' + if self.config.variants.x11: + self.files_plugins_capture_devel += ['libgstximagesrc'] + else: + self.configure_options += '--disable-x' + if self.config.variants.pulse: + self.files_plugins_sys_devel += ['libgstpulse'] + else: + self.configure_options += '--disable-pulse' + if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' diff --git a/recipes/gst-plugins-good-1.0.recipe b/recipes/gst-plugins-good-1.0.recipe index 68250d52..875b649f 100644 --- a/recipes/gst-plugins-good-1.0.recipe +++ b/recipes/gst-plugins-good-1.0.recipe @@ -86,20 +86,14 @@ class Recipe(recipe.Recipe): 'lib/gstreamer-1.0/libgstgoom2k1%(mext)s', ] - platform_files_plugins_capture = { - Platform.LINUX: [ - 'lib/gstreamer-1.0/libgstvideo4linux2%(mext)s', - 'lib/gstreamer-1.0/libgstximagesrc%(mext)s', - ] - } + files_plugins_capture = [] + + files_plugins_sys = [] platform_files_plugins_sys = { Platform.WINDOWS: [ 'lib/gstreamer-1.0/libgstdirectsoundsink%(mext)s', ], - Platform.LINUX: [ - 'lib/gstreamer-1.0/libgstpulse%(mext)s', - ], Platform.DARWIN: [ 'lib/gstreamer-1.0/libgstosxaudio%(mext)s', 'lib/gstreamer-1.0/libgstosxvideosink%(mext)s', @@ -117,12 +111,24 @@ class Recipe(recipe.Recipe): self.append_env['CXXFLAGS'] = " -Wno-error " self.append_env['CPPFLAGS'] = " -Wno-error " if self.config.target_platform != Platform.LINUX: - self.configure_options += '--disable-gtk-doc ' + self.configure_options += ' --disable-gtk-doc ' if self.config.target_platform == Platform.WINDOWS: - self.configure_options += '--disable-aalib --disable-esd ' - if self.config.target_platform in [Platform.ANDROID, Platform.IOS]: - self.configure_options += '--disable-pulse --disable-x' + self.configure_options += ' --disable-aalib --disable-esd ' if self.config.target_platform == Platform.LINUX: self.use_system_libs = True + if self.config.variants.v4l2: + self.files_plugins_capture += ['lib/gstreamer-1.0/libgstvideo4linux2%(mext)s'] + else: + self.configure_options += ' --disable-gst_v4l2' + if self.config.variants.x11: + self.files_plugins_capture += ['lib/gstreamer-1.0/libgstximagesrc%(mext)s'] + else: + self.configure_options += ' --disable-x --disable-xvideo' + + if self.config.variants.pulse: + self.files_plugins_sys += ['lib/gstreamer-1.0/libgstpulse%(mext)s'] + else: + self.configure_options += ' --disable-pulse' + if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' diff --git a/recipes/gst-rtsp-server-1.0.recipe b/recipes/gst-rtsp-server-1.0.recipe index 91786fec..7c073c26 100644 --- a/recipes/gst-rtsp-server-1.0.recipe +++ b/recipes/gst-rtsp-server-1.0.recipe @@ -1,5 +1,4 @@ # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python -from cerbero.utils import shell class Recipe(recipe.Recipe): name = 'gst-rtsp-server-1.0' @@ -17,4 +16,3 @@ class Recipe(recipe.Recipe): def prepare(self): self.remotes['origin'] = ('%s/%s' % ('git://anongit.freedesktop.org/gstreamer', 'gst-rtsp-server')) self.remotes['upstream'] = self.remotes['origin'] - diff --git a/recipes/libdv.recipe b/recipes/libdv.recipe index 93bd6db5..c3e610e4 100644 --- a/recipes/libdv.recipe +++ b/recipes/libdv.recipe @@ -11,17 +11,17 @@ class Recipe(recipe.Recipe): files_devel = ['include/libdv', 'lib/pkgconfig/libdv.pc'] def prepare(self): + if self.config.variants.nox11: + self.configure_options += ' --disable-xv --without-x' if self.config.target_platform == Platform.WINDOWS: - self.configure_options = ' --disable-asm --disable-xv --without-x' + self.configure_options += ' --disable-asm' self.append_env = {'LDFLAGS': '-lpthread'} - if self.config.target_platform == Platform.DARWIN: - self.configure_options += ' --disable-asm --disable-xv --without-x' - if self.config.target_platform == Platform.ANDROID: - self.configure_options = ' --disable-xv --without-x' + elif self.config.target_platform == Platform.DARWIN: + self.configure_options += ' --disable-asm' + elif self.config.target_platform == Platform.ANDROID: if self.config.target_arch == Architecture.X86: self.configure_options += ' --disable-asm' self.autoreconf = True - if self.config.target_platform == Platform.IOS: - self.configure_options = ' --disable-xv --without-x' + elif self.config.target_platform == Platform.IOS: if self.config.target_arch == Architecture.X86: self.configure_options += ' --disable-asm' diff --git a/recipes/libmpeg2.recipe b/recipes/libmpeg2.recipe index 5f871f09..553bf65a 100644 --- a/recipes/libmpeg2.recipe +++ b/recipes/libmpeg2.recipe @@ -13,9 +13,10 @@ class Recipe(recipe.Recipe): 'lib/pkgconfig/libmpeg2convert.pc'] def prepare(self): - if self.config.target_platform in [Platform.WINDOWS, Platform.DARWIN, - Platform.ANDROID, Platform.IOS]: - self.configure_options = ' --disable-sdl --without-x' + if self.config.variants.nox11: + self.configure_options += ' --without-x ' + if self.config.variants.nosdl: + self.configure_options += ' --disable-sdl ' if self.config.target_platform == Platform.IOS: if self.config.target_arch in [Architecture.ARM, Architecture.ARMv7]: self.new_env = {'CCAS': os.environ['GAS']} diff --git a/recipes/librsvg.recipe b/recipes/librsvg.recipe index 3abcda68..d573719a 100644 --- a/recipes/librsvg.recipe +++ b/recipes/librsvg.recipe @@ -5,15 +5,20 @@ class Recipe(recipe.Recipe): name = 'librsvg' version = '2.36.1' licenses = [License.LGPLv2] - deps = ['gdk-pixbuf', 'libcroco', 'gtk+'] + deps = ['libcroco'] configure_options = '--enable-introspection=no' files_libs = ['librsvg-2'] files_bins = ['rsvg-convert'] - files_loader = ['lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg%(mext)s'] + files_loader = [] files_devel = ['include/librsvg-2.0/librsvg', 'lib/pkgconfig/librsvg-2.0.pc'] def prepare(self): + if self.config.variants.gtk: + self.deps += ['gdk-pixbuf', 'gtk+'] + self.files_loader += ['lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg%(mext)s'] + else: + self.configure_options += ' --disable-pixbuf-loader --disable-gtk-theme ' if self.config.target_platform == Platform.DARWIN: self.configure_options += ' --disable-Bsymbolic' diff --git a/recipes/pango.recipe b/recipes/pango.recipe index a8ab0767..1ae16e0a 100644 --- a/recipes/pango.recipe +++ b/recipes/pango.recipe @@ -19,15 +19,14 @@ class Recipe(recipe.Recipe): 'lib/pkgconfig/pangocairo.pc'] platform_files_libs = { Platform.WINDOWS: ['libpangowin32-1.0'], - Platform.LINUX: ['libpangox-1.0'], } platform_files_devel = { Platform.WINDOWS: ['lib/pkgconfig/pangowin32.pc'], - Platform.LINUX: ['lib/pkgconfig/pangox.pc'], } def prepare(self): - if self.config.target_platform != Platform.LINUX: - self.configure_options += ' --disable-gtk-doc' - if self.config.target_platform in [Platform.DARWIN, Platform.ANDROID, Platform.IOS]: + if self.config.variants.x11: + self.files_libs += ['libpangox-1.0'] + self.files_devel += ['lib/pkgconfig/pangox.pc'] + else: self.configure_options += ' --without-x ' |