summaryrefslogtreecommitdiffstats
path: root/main/php
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-12-17 09:12:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-12-17 09:20:40 +0000
commit96cc70dd096aa896cfcc19e6a7e2a6ab47bc5e5e (patch)
tree0a8e719de2b1ec2dd13ee7c19179e4199622e3de /main/php
parent8bc0f6c54ffcf0f96103b10e570df8f4bc3bee1b (diff)
downloadaports-96cc70dd096aa896cfcc19e6a7e2a6ab47bc5e5e.tar.bz2
aports-96cc70dd096aa896cfcc19e6a7e2a6ab47bc5e5e.tar.xz
main/php: fix build with freetype2
Diffstat (limited to 'main/php')
-rw-r--r--main/php/APKBUILD12
-rw-r--r--main/php/gd-freetype.patch71
2 files changed, 79 insertions, 4 deletions
diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index f99e7f4ff..1a7e78531 100644
--- a/main/php/APKBUILD
+++ b/main/php/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=php
pkgver=5.5.6
-pkgrel=0
+pkgrel=1
pkgdesc="The PHP language runtime engine"
url="http://www.php.net/"
arch="all"
@@ -108,6 +108,7 @@ source="http://php.net/distributions/php-$pkgver.tar.xz
php5-module.conf
php-install-pear-xml.patch
gd-iconv.patch
+ gd-freetype.patch
"
_apiver="20121113"
@@ -489,14 +490,17 @@ md5sums="77ad90035931aacb95d11318b09c12ca php-5.5.6.tar.xz
9ab162ff3428511a68aa9801c746e0d5 php-fpm.initd
67719f428f44ec004da18705cbabe2ee php5-module.conf
483bc0a85c50a9a9aedbe14a19ed4526 php-install-pear-xml.patch
-162d8d079944387eab2bc80edab347ae gd-iconv.patch"
+162d8d079944387eab2bc80edab347ae gd-iconv.patch
+448db98e97fbbc033cca4a1c1a28f1dd gd-freetype.patch"
sha256sums="3235a5c15e8fc55498dd80fe43f4aecc51dba35a7fc916aee7ef12d4e1f8767a php-5.5.6.tar.xz
96e68f7c545adcac56ed1f5824b33041e270680ca884a9cfe27e7f4ac8abfd3b php-fpm.initd
ceec4d5b2a128c6a97e49830af604f0bb555bca1a86a9cd0366b828ba392257f php5-module.conf
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab php-install-pear-xml.patch
-6122bf279cdb7c387dd000761b2426969a73cf63a10a132aa98a79eb1dd259b2 gd-iconv.patch"
+6122bf279cdb7c387dd000761b2426969a73cf63a10a132aa98a79eb1dd259b2 gd-iconv.patch
+2216833e6458c3aad35f8eacc5d61412f452ac06616bcbdef42ec7ecb7db62f0 gd-freetype.patch"
sha512sums="4550c02500ebd203bdb588d73f85bf4449d18a858ede506488efd39a1a26224f4e7af4da8a2cfc52f9e9c4341fc7b891589a752af4e292c83ca5409b957c0cfd php-5.5.6.tar.xz
33247a1c9188eba893bb0be13456eeeec9b971c7f482a4e2bd0f318fb63d8c67d379a021840768bef8e4d630be859c5bdb424c1e90b9b816ec691c078147e915 php-fpm.initd
895e94c791bd82060ad820fef049d366a09c932097faa6b7b9a2c2e9e00a18cb7c0f9b128679c7659b404379266fd0f95dba5c0333f626194cf60f7bf6044102 php5-module.conf
f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 php-install-pear-xml.patch
-59443fb464f49ff7d9b64739df982e7240f9d4792226d96ad1538286945125fc7eb6f0cab88b64d5c81ee3679fd89bffdca59ebd20eca2778ab801ee54529028 gd-iconv.patch"
+59443fb464f49ff7d9b64739df982e7240f9d4792226d96ad1538286945125fc7eb6f0cab88b64d5c81ee3679fd89bffdca59ebd20eca2778ab801ee54529028 gd-iconv.patch
+eaa272e558d38667c66064db53a20a285b7231605472ebda63379c0e951837d2f1e3017b105fd74ba5dc8452f3d2e30feb4c58a2d07486372a0d8dca0677db75 gd-freetype.patch"
diff --git a/main/php/gd-freetype.patch b/main/php/gd-freetype.patch
new file mode 100644
index 000000000..44382925f
--- /dev/null
+++ b/main/php/gd-freetype.patch
@@ -0,0 +1,71 @@
+From a0955f351c7eb1022da7ae36970ffef3b00c8aff Mon Sep 17 00:00:00 2001
+From: Adam Harvey <aharvey@php.net>
+Date: Sat, 7 Dec 2013 19:39:40 -0800
+Subject: [PATCH] Switch to using freetype-config for freetype detection.
+
+This fixes GD compilation against libfreetype 2.5.1 and later after they made
+the rather interesting decision to change their include directory layout in a
+point release.
+
+The original suggestion in the bug was to use pkg-config, but my inclination is
+to use freetype-config instead: we should be able to get the same configuration
+information without actually needing pkg-config installed, since pkg-config is
+by no means guaranteed to exist on many Unices and distros, whereas
+freetype-config should always be present if a libfreetype build environment is
+installed. Let's try it out and see what happens.
+
+Fixes bug #64405 (Use freetype-config for determining freetype2 dir(s)).
+---
+ NEWS | 4 ++++
+ ext/gd/config.m4 | 27 +++++++++++----------------
+ 2 files changed, 15 insertions(+), 16 deletions(-)
+
+diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
+index 0e35ece..732e14c 100644
+--- a/ext/gd/config.m4
++++ b/ext/gd/config.m4
+@@ -193,30 +193,25 @@ 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/include/freetype2/freetype/freetype.h"; then
++ if test -f "$i/bin/freetype-config"; then
+ FREETYPE2_DIR=$i
+- FREETYPE2_INC_DIR=$i/include/freetype2
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
+ break
+ fi
+ done
+
+ if test -z "$FREETYPE2_DIR"; then
+- AC_MSG_ERROR([freetype.h not found.])
++ AC_MSG_ERROR([freetype-config not found.])
+ fi
+
+- PHP_CHECK_LIBRARY(freetype, FT_New_Face,
+- [
+- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
+- PHP_ADD_INCLUDE($FREETYPE2_DIR/include)
+- PHP_ADD_INCLUDE($FREETYPE2_INC_DIR)
+- AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+- AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+- AC_DEFINE(ENABLE_GD_TTF,1,[ ])
+- ],[
+- AC_MSG_ERROR([Problem with freetype.(a|so). Please check config.log for more information.])
+- ],[
+- -L$FREETYPE2_DIR/$PHP_LIBDIR
+- ])
++ 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(USE_GD_IMGSTRTTF, 1, [ ])
++ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
++ AC_DEFINE(ENABLE_GD_TTF,1,[ ])
+ else
+ AC_MSG_RESULT([If configure fails try --with-freetype-dir=<DIR>])
+ fi
+--
+1.8.5.1
+