From 86a5ad6d80adb9e4d79f43bf8f63c17307e26fa7 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Sat, 1 Dec 2012 21:17:50 +0100 Subject: [PATCH] Add some PHP support for gettext and gd/freetype needed for zabbix 2.0 --- pkgs/development/interpreters/php/5.3.nix | 13 ++++++++---- pkgs/development/interpreters/php/fix.patch | 22 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix index e073a51c92d..014ce9d3b97 100644 --- a/pkgs/development/interpreters/php/5.3.nix +++ b/pkgs/development/interpreters/php/5.3.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison -, apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql -, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng }: +, apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext +, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype }: composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in { @@ -84,8 +84,8 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) }; gd = { - configureFlags = ["--with-gd=${gd}"]; - buildInputs = [gd libpng libjpeg ]; + configureFlags = ["--with-gd=${gd} --with-freetype-dir=${freetype}"]; + buildInputs = [gd libpng libjpeg freetype]; }; soap = { @@ -105,6 +105,11 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) configureFlags = ["--enable-mbstring"]; }; + gettext = { + configureFlags = ["--with-gettext=${gettext}"]; + buildInputs = [gettext]; + }; + /* php is build within this derivation in order to add the xdebug lines to the php.ini. So both Apache and command line php both use xdebug without having to configure anything. diff --git a/pkgs/development/interpreters/php/fix.patch b/pkgs/development/interpreters/php/fix.patch index 1cec8fea0fe..02f2c9c6c93 100644 --- a/pkgs/development/interpreters/php/fix.patch +++ b/pkgs/development/interpreters/php/fix.patch @@ -54,3 +54,25 @@ if test -z `$APXS -q SYSCONFDIR`; then APACHE_HOOKS_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ +diff -rc php-5.3.18/configure php-5.3.18-new/configure +*** php-5.3.18/configure 2012-10-17 18:29:10.000000000 +0200 +--- php-5.3.18-new/configure 2012-11-13 05:36:24.730136551 +0100 +*************** +*** 45113,45121 **** + + + if test "$PHP_GETTEXT" != "no"; then +! for i in $PHP_GETTEXT /usr/local /usr; do +! test -r $i/include/libintl.h && GETTEXT_DIR=$i && break +! done + + if test -z "$GETTEXT_DIR"; then + { echo "configure: error: Cannot locate header file libintl.h" 1>&2; exit 1; } +--- 45113,45119 ---- + + + if test "$PHP_GETTEXT" != "no"; then +! GETTEXT_DIR=$PHP_GETTEXT + + if test -z "$GETTEXT_DIR"; then + { echo "configure: error: Cannot locate header file libintl.h" 1>&2; exit 1; }