summaryrefslogtreecommitdiff
path: root/dev-lang/php/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-lang/php/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-lang/php/files')
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch12
-rw-r--r--dev-lang/php/files/libressl-compatibility.patch65
-rw-r--r--dev-lang/php/files/mbstring-oniguruma-6.8.patch30
-rw-r--r--dev-lang/php/files/php-5.6-no-bison-warnings.patch42
-rw-r--r--dev-lang/php/files/php-fpm_at-simple.service13
-rw-r--r--dev-lang/php/files/php-fpm_at.service14
-rw-r--r--dev-lang/php/files/php-freetype-2.9.1.patch233
8 files changed, 411 insertions, 0 deletions
diff --git a/dev-lang/php/files/20php5-envd b/dev-lang/php/files/20php5-envd
new file mode 100644
index 000000000000..f6033ae517c7
--- /dev/null
+++ b/dev-lang/php/files/20php5-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php5/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"
diff --git a/dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch b/dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch
new file mode 100644
index 000000000000..642b261950fb
--- /dev/null
+++ b/dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch
@@ -0,0 +1,12 @@
+diff -aurN a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
+--- a/ext/mbstring/php_mbregex.c 2018-03-28 17:28:58.000000000 -0400
++++ b/ext/mbstring/php_mbregex.c 2018-04-04 12:53:23.268296387 -0400
+@@ -454,7 +454,7 @@
+ OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
+
+ found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
+- if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
++ if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
+ if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
+ onig_error_code_to_str(err_str, err_code, &err_info);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);
diff --git a/dev-lang/php/files/libressl-compatibility.patch b/dev-lang/php/files/libressl-compatibility.patch
new file mode 100644
index 000000000000..3b9c39dcc599
--- /dev/null
+++ b/dev-lang/php/files/libressl-compatibility.patch
@@ -0,0 +1,65 @@
+--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000
++++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000
+@@ -73,7 +73,7 @@
+ #ifdef HAVE_OPENSSL_MD2_H
+ #define OPENSSL_ALGO_MD2 4
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define OPENSSL_ALGO_DSS1 5
+ #endif
+ #define OPENSSL_ALGO_SHA224 6
+@@ -560,7 +560,7 @@
+ #endif
+
+ /* {{{ OpenSSL compatibility functions and macros */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
+ #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
+ #define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
+@@ -677,7 +677,7 @@
+ return M_ASN1_STRING_data(asn1);
+ }
+
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+
+ static int X509_get_signature_nid(const X509 *x)
+ {
+@@ -1324,7 +1324,7 @@
+ mdtype = (EVP_MD *) EVP_md2();
+ break;
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ case OPENSSL_ALGO_DSS1:
+ mdtype = (EVP_MD *) EVP_dss1();
+ break;
+@@ -1450,7 +1450,7 @@
+ #ifdef HAVE_OPENSSL_MD2_H
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
+ #endif
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT);
+@@ -3620,7 +3620,7 @@
+ RETURN_FALSE;
+ }
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ /* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
+ * the pub key is not changed after assigning. It means if we pass
+ * a private key, it will be returned including the private part.
+@@ -3631,7 +3631,7 @@
+ /* Retrieve the public key from the CSR */
+ tpubkey = X509_REQ_get_pubkey(csr);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ /* We need to free the CSR as it was duplicated */
+ X509_REQ_free(csr);
+ #endif
diff --git a/dev-lang/php/files/mbstring-oniguruma-6.8.patch b/dev-lang/php/files/mbstring-oniguruma-6.8.patch
new file mode 100644
index 000000000000..c238f88007c5
--- /dev/null
+++ b/dev-lang/php/files/mbstring-oniguruma-6.8.patch
@@ -0,0 +1,30 @@
+From 4072b2787074ee8e247a6639585b49e10c5a55fe Mon Sep 17 00:00:00 2001
+From: "Christoph M. Becker" <cmbecker69@gmx.de>
+Date: Tue, 20 Mar 2018 16:35:39 +0100
+Subject: [PATCH] Fix #76113: mbstring does not build with Oniguruma 6.8.1
+
+As of Oniguruma 6.8.1, the regex structure has been moved from the
+public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
+possible to directly access the struct's members, and actually, there
+is no need to, since there are respective accessor functions available
+at least of 2.3.1.
+---
+ ext/mbstring/php_mbregex.c | 2 +-
+ 1 file changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
+index a5a6cd0..7a70c63 100644
+--- a/ext/mbstring/php_mbregex.c
++++ b/ext/mbstring/php_mbregex.c
+@@ -452,7 +452,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
+ OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
+
+ rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
+- if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
++ if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
+ if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
+ onig_error_code_to_str(err_str, err_code, &err_info);
+ php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
+--
+2.1.4
+
diff --git a/dev-lang/php/files/php-5.6-no-bison-warnings.patch b/dev-lang/php/files/php-5.6-no-bison-warnings.patch
new file mode 100644
index 000000000000..18966599596f
--- /dev/null
+++ b/dev-lang/php/files/php-5.6-no-bison-warnings.patch
@@ -0,0 +1,42 @@
+From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 29 Sep 2016 15:43:06 -0400
+Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1
+ versions.
+
+The PHP configure script will emit a warning if it thinks your bison
+version is insufficient:
+
+ WARNING: This bison version is not supported for regeneration of
+ the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0).
+
+However, there is an error in the test that causes it to treat all
+3.0.x versions as if they were 3.0. The result is that users get
+warned about a perfectly acceptable version of bison.
+
+This patch is meant only for Gentoo, where we can require a working
+version of bison (something newer than 3.0.1). Having done so, this
+patch removes the check and the WARNING.
+
+Gentoo-Bug: 593278
+PHP-Bug: 69055
+---
+ Zend/acinclude.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
+index 7fa8c99..9d6cb1d 100644
+--- a/Zend/acinclude.m4
++++ b/Zend/acinclude.m4
+@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
+ # non-working versions, e.g. "3.0 3.2";
+ # remove "none" when introducing the first incompatible bison version an
+ # separate any following additions by spaces
+- bison_version_exclude="3.0"
++ bison_version_exclude=""
+
+ # for standalone build of Zend Engine
+ test -z "$SED" && SED=sed
+--
+2.7.3
+
diff --git a/dev-lang/php/files/php-fpm_at-simple.service b/dev-lang/php/files/php-fpm_at-simple.service
new file mode 100644
index 000000000000..5f0482e8c263
--- /dev/null
+++ b/dev-lang/php/files/php-fpm_at-simple.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=simple
+PIDFile=/run/php-fpm/php-fpm-%I.pid
+ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-lang/php/files/php-fpm_at.service b/dev-lang/php/files/php-fpm_at.service
new file mode 100644
index 000000000000..152c1abe0438
--- /dev/null
+++ b/dev-lang/php/files/php-fpm_at.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=notify
+PIDFile=/run/php-fpm/php-fpm-%I.pid
+ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-lang/php/files/php-freetype-2.9.1.patch b/dev-lang/php/files/php-freetype-2.9.1.patch
new file mode 100644
index 000000000000..02dfd9ce3cd4
--- /dev/null
+++ b/dev-lang/php/files/php-freetype-2.9.1.patch
@@ -0,0 +1,233 @@
+--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
++++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
+@@ -186,21 +186,36 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ AC_MSG_CHECKING(for freetype2)
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ AC_MSG_ERROR([freetype-config not found.])
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- AC_MSG_ERROR([freetype-config not found.])
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ AC_MSG_RESULT(found via freetype-config)
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+ PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
+ PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+--- a/configure 2018-04-24 11:10:05.000000000 -0400
++++ b/configure 2018-05-04 15:18:45.626367913 -0400
+@@ -34348,21 +34348,79 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
++$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in
+@@ -36019,21 +36076,78 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
++$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in