diff options
author | Luis de Bethencourt <luis.bg@samsung.com> | 2014-11-07 10:46:09 +0000 |
---|---|---|
committer | Luis de Bethencourt <luis.bg@samsung.com> | 2014-11-07 10:47:35 +0000 |
commit | 495354c5216bd835ea262a04b6611cc59bb140ac (patch) | |
tree | 1aa6e5049b6fc3047638e1e4a27584e915ffd1d8 | |
parent | ab7af4fe07e1ba35c8c2adde4bd93c07e73ff181 (diff) |
Revert "osx: Build for OSX >= 10.8"
This reverts commit 2da32e4cb3e09707b3b1b4d03a13de9b46cbcef8.
Breaks compatibility with older OS X and we supported those in 1.4
-rw-r--r-- | cerbero/bootstrap/osx.py | 13 | ||||
-rw-r--r-- | cerbero/enums.py | 2 | ||||
-rw-r--r-- | cerbero/utils/__init__.py | 4 | ||||
-rw-r--r-- | config/darwin.config | 19 | ||||
-rw-r--r-- | recipes/gst-plugins-bad-1.0-static.recipe | 6 | ||||
-rw-r--r-- | recipes/gst-plugins-bad-1.0.recipe | 6 | ||||
-rw-r--r-- | recipes/libvpx.recipe | 9 |
7 files changed, 54 insertions, 5 deletions
diff --git a/cerbero/bootstrap/osx.py b/cerbero/bootstrap/osx.py index c03a8681..c6ef6c2f 100644 --- a/cerbero/bootstrap/osx.py +++ b/cerbero/bootstrap/osx.py @@ -28,6 +28,12 @@ from cerbero.utils import shell class OSXBootstrapper (BootstrapperBase): + GCC_BASE_URL = 'https://github.com/downloads/kennethreitz/'\ + 'osx-gcc-installer/' + GCC_TAR = { + DistroVersion.OS_X_MOUNTAIN_LION: 'GCC-10.7-v2.pkg', + DistroVersion.OS_X_LION: 'GCC-10.7-v2.pkg', + DistroVersion.OS_X_SNOW_LEOPARD: 'GCC-10.6.pkg'} CPANM_URL = 'https://raw.github.com/miyagawa/cpanminus/master/cpanm' def start(self): @@ -35,6 +41,13 @@ class OSXBootstrapper (BootstrapperBase): if not self.config.distro_packages_install: return self._install_perl_deps() + # FIXME: enable it when buildbots are properly configured + return + tar = self.GCC_TAR[self.config.distro_version] + url = os.path.join(self.GCC_BASE_URL, tar) + pkg = os.path.join(self.config.local_sources, tar) + shell.download(url, pkg, check_cert=False) + shell.call('sudo installer -pkg %s -target /' % pkg) def _install_perl_deps(self): # Install cpan-minus, a zero-conf CPAN wrapper diff --git a/cerbero/enums.py b/cerbero/enums.py index aecee39a..8a80da67 100644 --- a/cerbero/enums.py +++ b/cerbero/enums.py @@ -84,6 +84,8 @@ class DistroVersion: WINDOWS_8 = 'windows_8' OS_X_MAVERICKS = 'osx_mavericks' OS_X_MOUNTAIN_LION = 'osx_mountain_lion' + OS_X_LION = 'osx_lion' + OS_X_SNOW_LEOPARD = 'osx_snow_leopard' OS_X_YOSEMITE = 'osx_yosemite' IOS_6_0 = 'ios_6_0' IOS_6_1 = 'ios_6_1' diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py index e5d95464..3be85f49 100644 --- a/cerbero/utils/__init__.py +++ b/cerbero/utils/__init__.py @@ -210,6 +210,10 @@ def system_info(): distro_version = DistroVersion.OS_X_MAVERICKS elif ver.startswith('10.8'): distro_version = DistroVersion.OS_X_MOUNTAIN_LION + elif ver.startswith('10.7'): + distro_version = DistroVersion.OS_X_LION + elif ver.startswith('10.6'): + distro_version = DistroVersion.OS_X_SNOW_LEOPARD else: raise FatalError("Mac version %s not supported" % ver) diff --git a/config/darwin.config b/config/darwin.config index 211ce6c8..fdfeada4 100644 --- a/config/darwin.config +++ b/config/darwin.config @@ -14,13 +14,17 @@ if 'nogi' not in variants: variants.append('gi') if target_arch == Architecture.X86_64: - build='x86_64-apple-darwin12' + build='x86_64-apple-darwinx' elif target_arch == Architecture.X86: - build='i386-apple-darwin12' + build='i386-apple-darwinx' +elif target_arch == Architecture.PPC: + build='powerpc-apple-darwinx' elif target_arch == Architecture.UNIVERSAL: - build='universal-apple-darwin12' + build='universal-apple-darwinx' SDK_VERSION = { + DistroVersion.OS_X_SNOW_LEOPARD: '10.6', + DistroVersion.OS_X_LION: '10.7', DistroVersion.OS_X_MOUNTAIN_LION: '10.8', DistroVersion.OS_X_MAVERICKS: '10.9', DistroVersion.OS_X_YOSEMITE: '10.10', @@ -35,7 +39,7 @@ sdk_root = '/Developer/SDKs/MacOSX%s.sdk' % sdk_version if not os.path.exists(sdk_root): sdk_root = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX%s.sdk' % sdk_version -min_osx_sdk_version = min_osx_sdk_version or '10.8' +min_osx_sdk_version = min_osx_sdk_version or '10.6' sdk='-mmacosx-version-min=%s -isysroot %s' % (min_osx_sdk_version, sdk_root) for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'LDFLAGS']: @@ -56,6 +60,13 @@ elif target_arch == Architecture.PPC: arch_ldflags += ' -arch ppc -Wl,-arch,ppc' arch_cflags += ' -Wno-error=format-nonliteral ' +if sdk_version in ['10.8', '10.9']: + # silence warnings on clang + arch_cflags += ' -Wno-unused-command-line-argument-hard-error-in-future ' +elif sdk_version in ['10.7']: + # silence warnings on 10.7 osx-universal + arch_cflags += ' -Wno-unused-value ' + incl_dir = os.path.join(prefix, 'include') if not os.path.exists(incl_dir): diff --git a/recipes/gst-plugins-bad-1.0-static.recipe b/recipes/gst-plugins-bad-1.0-static.recipe index 99c12dc3..7b156a1e 100644 --- a/recipes/gst-plugins-bad-1.0-static.recipe +++ b/recipes/gst-plugins-bad-1.0-static.recipe @@ -165,6 +165,12 @@ class Recipe(custom.GStreamerStatic): if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' + if self.config.target_platform == Platform.DARWIN and \ + self.config.target_distro_version in [ DistroVersion.OS_X_SNOW_LEOPARD, DistroVersion.OS_X_LION ]: + # we won't build applemedia plugin because we don't have videotoolbox + self.platform_files_plugins_sys_devel[Platform.DARWIN].remove('libgstapplemedia') + self.platform_files_plugins_sys_devel[Platform.DARWIN].remove('libgstapplemedia_nonpublic') + if self.config.target_distro_version in [DistroVersion.DEBIAN_SQUEEZE, DistroVersion.DEBIAN_WHEEZY]: self.platform_files_plugins_capture_devel[Platform.LINUX].remove("libgstdvb") super(Recipe, self).prepare() diff --git a/recipes/gst-plugins-bad-1.0.recipe b/recipes/gst-plugins-bad-1.0.recipe index 464f0b36..41fa4aab 100644 --- a/recipes/gst-plugins-bad-1.0.recipe +++ b/recipes/gst-plugins-bad-1.0.recipe @@ -179,5 +179,11 @@ class Recipe(recipe.Recipe): if self.config.variants.nodebug: self.configure_options += ' --disable-gst-debug' + if self.config.target_platform == Platform.DARWIN and \ + self.config.target_distro_version in [ DistroVersion.OS_X_SNOW_LEOPARD, DistroVersion.OS_X_LION ]: + # we won't build applemedia plugin because we don't have videotoolbox + self.platform_files_plugins_sys[Platform.DARWIN].remove('lib/gstreamer-1.0/libgstapplemedia%(mext)s') + self.platform_files_plugins_sys[Platform.DARWIN].remove('lib/gstreamer-1.0/libgstapplemedia_nonpublic%(mext)s') + 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') diff --git a/recipes/libvpx.recipe b/recipes/libvpx.recipe index 5ad9a9ca..d1890dbd 100644 --- a/recipes/libvpx.recipe +++ b/recipes/libvpx.recipe @@ -51,7 +51,14 @@ class Recipe(recipe.Recipe): self.new_env['LD'] = os.environ.get('CC', 'gcc') if self.config.target_platform == Platform.DARWIN: - platform = 'darwin12' + if self.config.target_distro_version in [DistroVersion.OS_X_MOUNTAIN_LION, + DistroVersion.OS_X_LION, DistroVersion.OS_X_MAVERICKS, + DistroVersion.OS_X_YOSEMITE] and arch != 'x86': + platform = 'darwin11' + else: + platform = 'darwin10' + if self.config.target_arch == Architecture.PPC: + platform = 'darwin9' elif self.config.target_platform == Platform.IOS: if self.config.target_distro_version in [DistroVersion.IOS_7_0, DistroVersion.IOS_7_1]: platform = 'ios7' |