The `generator-macos.yml` workflow was failing on macOS runners due to two main issues:
1. The `sed` commands were using the GNU/Linux `-i -e` syntax, which is not compatible with the BSD `sed` found on macOS. This has been corrected to use the `sed -i '' -e` syntax.
2. The workflow was fetching patches using hardcoded `wget` URLs pointing to the original repository. This has been changed to use dynamic GitHub context variables (`${{ github.repository }}` and `${{ github.ref_name }}`) to ensure the workflow uses the patches from the forked repository it is running in.
These changes should resolve the workflow failures and make it more robust for use in forks.