Edit report at https://bugs.php.net/bug.php?id=76324&edit=1
ID: 76324
Updated by: cmb@php.net
Reported by: eschwartz at archlinux dot org
Summary: [ext/gd] cannot detect recent versions of freetype
with pkg-config
Status: Closed
Type: Bug
Package: Compile Failure
Operating System: unix-like
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Backporting the pkg-config support to PHP 7.3 would require
discussion on the internals mailing[1]; feel free to suggest that
there.
[1] <https://www.php.net/mailing-lists.php#internals>
Previous Comments:
------------------------------------------------------------------------
[2020-04-25 17:28:55] calvin at cmpct dot info
Could this be backported to PHP 7.3? I'm running into this on a platform where freetype got
upgraded.
------------------------------------------------------------------------
[2020-03-21 16:11:10] cmb@php.net
This is already fixed as of PHP 7.4.0.
------------------------------------------------------------------------
[2018-10-22 15:10:28] eschwartz at archlinux dot org
Also https://github.com/php/php-src/commit/cf3b852109a88a11370d0207cd3b72a53b6a64c3
helped to make it easier to submit clean patches that apply. :)
------------------------------------------------------------------------
[2018-10-22 15:02:59] eschwartz at archlinux dot org
My apologies for forgetting about this yet again -- I've submitted https://github.com/php/php-src/pull/3632 as the
original approach, which I believe is superior to ondrej's "simplest patch possible".
Note that the pkg-config program provides battle-tested autotools macros to do this in the proper,
approved way. Using these macros will properly handle e.g. PKG_CONFIG='pkg-config
--static' (handy when downstream builders wish to statically compile a program), which the
simple patch fails on two counts -- it does not do path resolution, and it assumes the content is a
possibly-whitespace-included-path, which prevents the possibility of overriding some obscure
pkg-config behavior via command-line flags.
Using the pkg-config macros is also preferable, because it will add ./configure --help
hints for the PKG_CONFIG* variables available to use, and additionally it will allow using
FREETYPE2_CFLAGS/FREETYPE2_LIBS to override pkg-config detection (and hint about that too).
------------------------------------------------------------------------
[2018-10-22 07:00:39] ondrej@php.net
Ok, so this should be the simplest patch possible to make PHP use pkg-config for FreeType2 if
pkg-config is available:
https://github.com/php/php-src/pull/3630
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76324
--
Edit this bug report at https://bugs.php.net/bug.php?id=76324&edit=1