Add modifications to support cross-platform builds #542
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds four changes to support cross-platform builds:
PATCH_DIR
is defined, and contains apackagename-version.patch
file that matches the package being unpacked, that patch will be applied to the source tree as part of thefetch_unpack
step. This is required because some libraries haven't accepted Android and iOS compliance patches (most notably, autotools itself, which has repeatedly ignored/ghosted requests to add support for differentiating iOS simulators from iOS devices).HOST_CONFIGURE_FLAGS
option that is a blanket "include these flags in the invocation of./configure
" option.HOST_CMAKE_FLAGS
option. The analog of (2), but for cmake.I've been able to use these options, plus some small patches, to build Pillow's dependencies for iOS - e.g.:
I've added a test for the patching option; but I haven't added any new tests for the
HOST_CONFIGURE_CFLAGS
andHOST_CMAKE_FLAGS
options - partly because they're mostly innocuous changes; but mostly because I'm not sure what testing strategy would make sense here. Adding a full iOS build pass seems excessive; but I can't think of an obvious alternative for testing these new capabilities.