summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-06-23 21:13:34 +0000
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-06-25 14:29:42 +0100
commitcdd05c15cce73993441a70f6adb57f11453729b0 (patch)
tree3b77775db73a65bf845ab27da4e3127a6b9a6d23
parentaae5c00f2492996fce8d4d126e130cdbdac7b8ab (diff)
recipe: Work around MetaUniversalRecipe shims not covering Darwin steps
BaseUniversalRecipe's __getattr__ yields over to the proxy recipe for any nonexisting methods. This is no problem for the merge step, as it's defined in the universal recipe directly, but steps such as codesign and relocation are instead executed only in whatever recipe was designated as the proxy. Due to how recipes are loaded (I think it follows filesystem's sort order), this recipe will usually be arm64 -- x86_64 libraries and executables being left out of the relocation, and thus resulting in a half-baked universal binary. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1499>
-rw-r--r--cerbero/build/recipe.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py
index 704e7d20..7c7d08bf 100644
--- a/cerbero/build/recipe.py
+++ b/cerbero/build/recipe.py
@@ -995,6 +995,19 @@ class UniversalFlatRecipe(BaseUniversalRecipe, UniversalFlatFilesProvider):
return []
return self._proxy_recipe.steps[:] + [BuildSteps.MERGE]
+ # The two following steps are not wrapped by the metaclass
+ # because they are not part of the default set.
+ # This prevents getattr() from yielding over to the proxy recipe
+ # (which will only handle arm64 due to alphabetical sorting).
+
+ def code_sign(self):
+ for _arch, recipe in self._recipes.items():
+ recipe.code_sign()
+
+ def relocate_osx_libraries(self):
+ for _arch, recipe in self._recipes.items():
+ recipe.relocate_osx_libraries()
+
async def merge(self):
arch_inputs = {}
for arch, recipe in self._recipes.items():