Skip to content

Don't link ft2font to zlib by default. #15378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2019
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 4, 2019

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

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added the Build label Oct 4, 2019
@tacaswell tacaswell added this to the v3.3.0 milestone Oct 16, 2019
@tacaswell
Copy link
Member

This needs a re-base, but 👍

@anntzer
Copy link
Contributor Author

anntzer commented Oct 16, 2019

rebased.

@QuLogic
Copy link
Member

QuLogic commented Oct 17, 2019

I'm hesitant to merge while builds are failing.

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.

Not linking zlib explicitly means that the staticbuild option is not
used anymore and can just be stripped out.
TL;DR: set MPLLOCALFREETYPE=1 and call it a day, unless you really know
what you want to do.
@dopplershift dopplershift merged commit 01b5833 into matplotlib:master Oct 21, 2019
@anntzer anntzer deleted the zless branch October 21, 2019 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants