Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions plugins/php/versions/52/gd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,19 @@ Install_lib()
cd $sourcePath/php${version}/ext/${LIBNAME}

$serverPath/php/$version/bin/phpize
FREETYPE_DIR=${serverPath}/lib/freetype_old
if [ ! -d "$FREETYPE_DIR" ] && command -v pkg-config >/dev/null 2>&1; then
if pkg-config --exists freetype2; then
SYS_FREETYPE_DIR=`pkg-config --variable=prefix freetype2 2>/dev/null`
if [ -n "$SYS_FREETYPE_DIR" ]; then
FREETYPE_DIR="$SYS_FREETYPE_DIR"
fi
fi
fi
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=${serverPath}/lib/freetype_old \
--with-freetype-dir=${FREETYPE_DIR} \
--enable-gd-native-ttf

make clean && make && make install && make clean
Expand Down Expand Up @@ -134,4 +143,4 @@ if [ "$actionType" == 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
Uninstall_lib
fi
fi
3 changes: 2 additions & 1 deletion plugins/php/versions/52/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ fi

OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_old.sh
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
fi

IS_64BIT=`getconf LONG_BIT`
Expand Down
3 changes: 2 additions & 1 deletion plugins/php/versions/53/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ fi
OPTIONS='--without-iconv'

if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_old.sh
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
fi

IS_64BIT=`getconf LONG_BIT`
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/54/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi

OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
# OPTIONS="${OPTIONS} --with-pcre-dir=${serverPath}/lib/pcre"
# OPTIONS="${OPTIONS} --with-external-pcre=${serverPath}/lib/pcre"
else
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/55/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi

OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
else
OPTIONS="${OPTIONS} --with-readline"
fi
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/56/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fi

OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-zlib-dir=$(brew --prefix zlib)"
else
OPTIONS="${OPTIONS} --with-readline"
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/70/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi

OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
# OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS="${OPTIONS} --with-readline"
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/71/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fi
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS="${OPTIONS} --with-readline"
Expand Down
16 changes: 12 additions & 4 deletions plugins/php/versions/common/gd_old.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ Install_lib()
OPTIONS="$OPTIONS --with-xpm-dir"
fi

find_ft2=`pkg-config --list-all | grep freetype2`
if [ "$find_ft2" == "" ];then
OPTIONS="$OPTIONS --with-freetype-dir=${serverPath}/lib/freetype_old"
# Old PHP GD must receive an explicit freetype path, otherwise it
# is built without freetype support and CAPTCHA images stop working.
FREETYPE_DIR=${serverPath}/lib/freetype_old
if [ ! -d "$FREETYPE_DIR" ] && command -v pkg-config >/dev/null 2>&1; then
if pkg-config --exists freetype2; then
SYS_FREETYPE_DIR=`pkg-config --variable=prefix freetype2 2>/dev/null`
if [ -n "$SYS_FREETYPE_DIR" ]; then
FREETYPE_DIR="$SYS_FREETYPE_DIR"
fi
fi
fi
OPTIONS="$OPTIONS --with-freetype-dir=${FREETYPE_DIR}"


#--with-xpm
Expand Down Expand Up @@ -147,4 +155,4 @@ if [ "$actionType" == 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
Uninstall_lib
fi
fi
Loading