From cdd05c15cce73993441a70f6adb57f11453729b0 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Sun, 23 Jun 2024 21:13:34 +0000 Subject: 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: --- cerbero/build/recipe.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(): -- cgit v1.2.3