Bug #76310 [Opn->Fbk]: with-freetype-dir doesn't work with custom prefix

From: Date: Tue, 08 May 2018 10:44:15 +0000
Subject: Bug #76310 [Opn->Fbk]: with-freetype-dir doesn't work with custom prefix
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215152@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76310&edit=1 ID: 76310 Updated by: cmb@php.net Reported by: fred5 at originsystems dot co dot za Summary: with-freetype-dir doesn't work with custom prefix -Status: Open +Status: Feedback Type: Bug Package: GD related Operating System: CentOS 7 PHP Version: 7.1.17 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: FTR: this bug is not related to <https://bugs.php.net/bug.php?id=73592>. > executes the statement FREETYPE2_CFLAGS=freetype-config > --cflags Hmm, that is not supposed to happen. Looking at the code[1] is should rather be: [custom directory]/bin/freetype-config --cflags Wouldn't that give the appropriate flags? [1] <https://github.com/php/php-src/blob/PHP-7.1.17/ext/gd/config.m4#L192-L207> Previous Comments: ------------------------------------------------------------------------ [2017-01-16 01:23:13] stas@php.net Related To: Bug #73592 ------------------------------------------------------------------------ [2016-11-27 14:13:41] kalle@php.net Related To: Bug #73592 ------------------------------------------------------------------------ [2018-05-08 07:29:26] fred5 at originsystems dot co dot za Description: ------------ I build freetype in a custom location for my PHP build ie. [custom directory]. (which is of course completely unrelated to the freetype version currently running on my CentOS build server) To make sure PHP uses my [custom directory] build, I include: --with-freetype-dir=[custom directory] On build, the PHP configure script does the following: 1. correctly locates the freetype [custom directory] 2. checks that [custom directory]/bin includes freetype-config 3. executes the statement FREETYPE2_CFLAGS=freetype-config --cflags The above all looks fine ...except that step 3 completely ignores [custom directory] and incorrectly results in FREETYPE2_CFLAGS="-I/usr/include" (when it shoudl actually be set as follows FREETYPE2_CFLAGS="-I[custom directory]/include") The statement required in the configure executable that would correct this problem is FREETYPE2_CFLAGS=freetype-config --cflags --prefix=[custom directory] as it tells freetype-config to use the [custom directory] as prefix when looking for the includes folder. The current setup is a real problem as it breaks my build. Test script: --------------- There is no test script possible as this is part of the build process. I do not feel qualified to create a patch for it ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76310&edit=1

« previous php.bugs (#215152) next »