From 888f0fdd033368e763a1d4eb8dde552fc8f96770 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 23 Nov 2020 12:18:58 +0000 Subject: [PATCH 1/3] Add BigSur distro --- cerbero/enums.py | 1 + cerbero/utils/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cerbero/enums.py b/cerbero/enums.py index 220d37e2d..d2999fe20 100644 --- a/cerbero/enums.py +++ b/cerbero/enums.py @@ -128,6 +128,7 @@ class DistroVersion: OS_X_HIGH_SIERRA = 'osx_high_sierra' OS_X_MOJAVE = 'osx_mojave' OS_X_CATALINA = 'osx_catalina' + OS_X_BIG_SUR = 'osx_big_sur' IOS_8_0 = 'ios_08_0' IOS_8_1 = 'ios_08_1' IOS_8_2 = 'ios_08_2' diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py index ea3d36100..b78e2cf6f 100644 --- a/cerbero/utils/__init__.py +++ b/cerbero/utils/__init__.py @@ -347,7 +347,9 @@ def system_info(): elif platform == Platform.DARWIN: distro = Distro.OS_X ver = pplatform.mac_ver()[0] - if ver.startswith('10.15'): + if ver.startswith('10.16'): + distro_version = DistroVersion.OS_X_BIG_SUR + elif ver.startswith('10.15'): distro_version = DistroVersion.OS_X_CATALINA elif ver.startswith('10.14'): distro_version = DistroVersion.OS_X_MOJAVE From 38834be686844a35489ca1574745fc9caafae5c1 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 23 Nov 2020 12:19:48 +0000 Subject: [PATCH 2/3] zlib: fix build with MacOS 11 SDK --- recipes/zlib.recipe | 3 +- .../0001-macos-fix-build-MacOS-11-Sdk.patch | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 recipes/zlib/0001-macos-fix-build-MacOS-11-Sdk.patch diff --git a/recipes/zlib.recipe b/recipes/zlib.recipe index 2bdc9cf63..dfef2cd22 100644 --- a/recipes/zlib.recipe +++ b/recipes/zlib.recipe @@ -12,7 +12,8 @@ class Recipe(recipe.Recipe): licenses = [{License.BSD_like: ['README']}] patches = ['zlib/0001-win32-fix-dll-name.patch', 'zlib/0001-Fix-test-builds-to-use-the-built-libz-headers-librar.patch', - 'zlib/0001-Add-a-meson-port.patch'] + 'zlib/0001-Add-a-meson-port.patch', + 'zlib/0001-macos-fix-build-MacOS-11-Sdk.patch'] files_libs = ['libz'] files_devel = ['include/zlib.h', 'include/zconf.h', 'lib/pkgconfig/zlib.pc'] diff --git a/recipes/zlib/0001-macos-fix-build-MacOS-11-Sdk.patch b/recipes/zlib/0001-macos-fix-build-MacOS-11-Sdk.patch new file mode 100644 index 000000000..0f0369462 --- /dev/null +++ b/recipes/zlib/0001-macos-fix-build-MacOS-11-Sdk.patch @@ -0,0 +1,36 @@ +From 812aae555c94a55fb0cdcb82ca16d813381b0092 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey +Date: Fri, 20 Nov 2020 15:17:30 +0100 +Subject: [PATCH] macos: fix build MacOS 11 Sdk + +../gzlib.c:252:9: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ + ^ +../gzread.c:35:15: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + ret = read(state->fd, buf + *have, get); + ^ +../gzwrite.c:89:20: error: implicit declaration of function 'write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + writ = write(state->fd, strm->next_in, put); + ^ +../gzwrite.c:661:9: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + if (close(state->fd) == -1) + ^ +--- + gzguts.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gzguts.h b/gzguts.h +index 990a4d2..aefbbd8 100644 +--- a/gzguts.h ++++ b/gzguts.h +@@ -24,6 +24,7 @@ + # include + # include + # include ++# include + #endif + + #ifndef _POSIX_SOURCE +-- +2.23.0 + From f8662d7a8b6425c32471db2ee5c7ecd29829be3d Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 23 Nov 2020 12:20:34 +0000 Subject: [PATCH 3/3] libxml2: disable python in all platforms This fails to build in macOS with the 11.0 SDK, which is the only platform where we are building it. --- recipes/libxml2.recipe | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/recipes/libxml2.recipe b/recipes/libxml2.recipe index 15fc87612..6b6c29a52 100644 --- a/recipes/libxml2.recipe +++ b/recipes/libxml2.recipe @@ -12,6 +12,7 @@ class Recipe(recipe.Recipe): licenses = [{License.MIT: ['COPYING']}] deps = [ 'zlib' ] autoreconf = True + configure_options = '--with-python=no' patches = ['libxml2/0003-configure-fix-python-dir-prefix.patch'] files_libs = ['libxml2'] @@ -20,15 +21,9 @@ class Recipe(recipe.Recipe): def prepare(self): if self.config.target_platform == Platform.WINDOWS: - self.configure_options = '--with-python=no' self.configure_options += ' --without-threads' elif self.config.target_platform == Platform.ANDROID: - self.configure_options = '--with-python=no' v = DistroVersion.get_android_api_version(self.config.target_distro_version) if v < 21: self.append_env('CFLAGS', '-D_FILE_OFFSET_BITS=32') - self.append_env('CPPFLAGS', '-D_FILE_OFFSET_BITS=32') - elif self.config.target_platform == Platform.IOS: - self.configure_options = '--with-python=no' - elif self.config.target_platform == Platform.LINUX: - self.configure_options = '--with-python=no' + self.append_env('CPPFLAGS', '-D_FILE_OFFSET_BITS=32') \ No newline at end of file