Edit report at https://bugs.php.net/bug.php?id=76324&edit=1
ID: 76324
Comment by: ondrej@php.net
Reported by: eschwartz at archlinux dot org
Summary: [ext/gd] cannot detect recent versions of freetype
with pkg-config
Status: Open
Type: Bug
Package: Compile Failure
Operating System: unix-like
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2018-07-04 12:10:43] fred5 at originsystems dot co dot za
Hi Eli? :o)
At the outset I should acknowledge that I'm very unfamiliar with the patching process as have
never had to do before. I opened bug #76310 because our PHP build - which has always worked
perfectly - "suddenly" started applying the incorrect, older OS native freetype version
2.4.11 (instead of 2.7.1).
I am under some pressure to get this sorted out as we need to release a new build, so have attempted
to use your provided patch as follows:
1. downloaded php-7.2.7.tar.gz release from http://uk3.php.net/distributions
2. extract
3. download your patch (called 0001.patch from now on) to the extracted PHP directory
4. cd to the extracted PHP directory
5. run the command "patch < 0001.patch" (with no switches at all)
.... got the errors shown in previous post.
I acknowledge this may be completely wrong due to my lack of knowledge and am explaining above
simply to make sure the use case is clear when looking at the output. Thanks again for your help on
this.
------------------------------------------------------------------------
[2018-07-03 23:27:13] cmb@php.net
Yeah, I'd prefer a PR for visibility and mergability (I've tried
to git -am the patch, but that failed for PHP-7.1, PHP-7.2 and
master).
Regarding the target branch: if in doubt, target master â this can
still be adjusted. In this case it might have been a good idea to
switch to pkg-config long ago (see also PR 3341[1]), so treating
this as bug fix and targeting PHP-7.1 accordingly, might be
sensible as well.
Anyway, thanks for your efforts, Eli! :)
[1] <https://github.com/php/php-src/pull/3341>
------------------------------------------------------------------------
[2018-07-03 23:04:01] eschwartz at archlinux dot org
@cmb, if you'd prefer a pull request to a patch, I can open a pull request on Github... which
branch should I target? CONTRIBUTING.md suggests, since I'm fixing a bug, I should submit it to
PHP-7.1 and let it be cherry-picked upwards? Or is it an RFC which should be submitted to master?
I'm used to projects where everything is always submitted to master, no matter what, and only
afterward will commits be cherry-picked for older branches, so I'm not really sure what I
should do here as the CONTRIBUTING.md is giving me mixed messages.
------------------------------------------------------------------------
[2018-07-03 22:23:27] eschwartz at archlinux dot org
I have no idea what that was...
------------------------------------------------------------------------
[2018-07-03 22:22:33] eschwartz at archlinux dot org
The patch was generated from git format-patch, and git am should apply it when run from a source
checkout on git master.
Though actually, it does contain some whitespace changes, because my editor auto-cleans trailing
whitespace when saving files... this explains the one rejected hunk in acinclude.m4 (the hunk did
not matter) but does not explain how patch was unable to find some files.
Did you forget to use -p1 which is required when applying git patches (and many others) to remove
the base directories used when diffing two large trees? I'm a bit confused, since patch found
acinclude.m4 but not configure.ac...
------------------------------------------------------------------------
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