Don't link ft2font to zlib by default. #15378
Merged
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.
PR Summary
First commit:
A default build of freetype (e.g. the one from MPLLOCALFREETYPE=1) uses
its own vendored version of zlib (see FT_CONFIG_OPTION_SYSTEM_ZLIB in
ftoption.h), so we don't need to link to zlib in that case; if we're
linking against a system freetype then we can assume that pkg-config
will list the right libraries to link.
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h#n204
Not linking zlib explicitly means that the staticbuild option is not
used anymore and can just be stripped out.
Second commit:
Update build docs.
TL;DR: set MPLLOCALFREETYPE=1 and call it a day, unless you really know
what you want to do.
PR Checklist