dev-python/matplotlib: require poppler's cairo/png support

It is used for pdftops and pdftocairo. For the latter:

"""
Matplotlib's pgf support requires a recent LaTeX_ installation that includes
the TikZ/PGF packages (such as TeXLive_), preferably with XeLaTeX or LuaLaTeX
installed. If either pdftocairo or ghostscript is present on your system,
figures can optionally be saved to PNG images as well. The executables
for all applications must be located on your :envvar:`PATH`.
"""

This naturally fails if PNG support in poppler is disabled. The failure
is non-obvious -- subprocess.run fails, and stdout (not stderr) simply
contains the pdftocairo --help text. Careful inspection shows it does
not support the `-png` option in its argparse routine, not even to
immediately raise an "error: png support not available".

:/

The cairo support should be enabled too; that has a more obvious failure
mode (pdftocairo won't exist).

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
This commit is contained in:
Eli Schwartz 2025-12-17 17:55:30 -05:00
parent e36e1cdb2a
commit 32e95f2561
No known key found for this signature in database
GPG Key ID: 84A7D12B700D2F57
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ LATEX_DEPEND="
virtual/latex-base
app-text/dvipng
app-text/ghostscript-gpl
app-text/poppler[utils]
app-text/poppler[cairo,png,utils]
dev-texlive/texlive-fontsrecommended
dev-texlive/texlive-latexextra
dev-texlive/texlive-luatex

View File

@ -37,7 +37,7 @@ LATEX_DEPEND="
virtual/latex-base
app-text/dvipng
app-text/ghostscript-gpl
app-text/poppler[utils]
app-text/poppler[cairo,png,utils]
dev-texlive/texlive-fontsrecommended
dev-texlive/texlive-latexextra
dev-texlive/texlive-luatex