Found the issue. All php versions don't support the new change to what FreeType is doing.
Old freetype.h, 2.5.0- :
/usr/local/include/freetype2/freetype/freetype.h
New freetype.h, 2.5.1+ :
/usr/local/include/freetype2/freetype.h
This is the code in all php configure scripts
Code:
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
if test -f "$i/include/freetype2/freetype/freetype.h"; then
FREETYPE2_DIR=$i
FREETYPE2_INC_DIR=$i/include/freetype2
break
fi
done
if test -z "$FREETYPE2_DIR"; then
as_fn_error $? "freetype.h not found." "$LINENO" 5
fi
Where the prefix is /usr/local and it's checking for the old path.
What they need is something like:
Code:
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
if test -f "$i/include/freetype2/freetype/freetype.h"; then
FREETYPE2_DIR=$i
FREETYPE2_INC_DIR=$i/include/freetype2
break
fi
[COLOR=#0000ff]if test -f "$i/include/freetype2/freetype.h"; then
[/COLOR] [COLOR=#0000ff]FREETYPE2_DIR=$i[/COLOR]
[COLOR=#0000ff]FREETYPE2_INC_DIR=$i/include/freetype2[/COLOR]
[COLOR=#0000ff]break[/COLOR]
[COLOR=#0000ff]fi[/COLOR]
done
if test -z "$FREETYPE2_DIR"; then
as_fn_error $? "freetype.h not found." "$LINENO" 5
fi
ANYway.. that's above my pay-grade to actually fix.
Our workaround is to simply create a link if it's missing.
This is the new CB code to address the configure looking in the wrong place:
Code:
if [ -e /usr/local/include/freetype2/freetype.h ] && [ ! -e /usr/local/include/freetype2/freetype/freetype.h ]; then
echo "Linking freetype/freetype.h to freetype.h";
mkdir -p /usr/local/include/freetype2/freetype
ln -s ../freetype.h /usr/local/include/freetype2/freetype/freetype.h
fi
It's in all CB versions now.
Before I change FreeType from 2.5.0 to 2.5.1 again, I'd like a few people to try it out (works on the box I got to test on).
Note that the new build script will take up to 24 hours to rsync to the other mirrors, so if you're testing it, grab it from files1.directadmin.com.
Note the wget url is to CB 2.0. If you're running 1.2, swap 2.0 with 1.2 in the link.
Code:
cd /usr/local/directadmin/custombuild
wget -O build http://files1.directadmin.com/services/custombuild/2.0/custombuild/build
perl -pi -e 's/^freetype:2.5.0:.*/freetype:2.5.1:/' versions.txt
./build freetype
ls -la /usr/local/include/freetype2/freetype/freetype.h
Ensure the ls -la command shows a file or a link. Note an old file should be ok because the issue is with the php configure script itself... not the gcc or linker commands.. they shoud be finding the correct freetype.h because the above $FREETYPE_INC_DIR is set to the proper freetype2 folder, and the new freetype.h will be the first one found.
Once confirmed a /usr/local/include/freetype2/freetype/freetype.h file exists, try building php:
and report back here if it works or if it doesn't work.
If it doesn't, please first confirm that you're using the newer build script by looking at the end of the "doFreeType()" function, to ensure you see my mentioned code (includes a URL back to this thread too)
John