From 5a4f2a747d6c8711091d8d73ed41e067e0b0f167 Mon Sep 17 00:00:00 2001 From: Andy Thompson Date: Sun, 21 Jul 2013 10:45:47 +0100 Subject: [PATCH] Add patch to specify exact icu-config file for EL5 --- php-5.5.0-icuconfig.patch | 68 +++++++++++++++++++++++++++++++++++++++ php55.spec | 11 +++++++ 2 files changed, 79 insertions(+) create mode 100644 php-5.5.0-icuconfig.patch diff --git a/php-5.5.0-icuconfig.patch b/php-5.5.0-icuconfig.patch new file mode 100644 index 0000000..ed32999 --- /dev/null +++ b/php-5.5.0-icuconfig.patch @@ -0,0 +1,68 @@ +--- php-5.5.1/acinclude.m4.icuconfig 2013-07-21 10:32:44.000000000 +0100 ++++ php-5.5.1/acinclude.m4 2013-07-21 10:34:50.000000000 +0100 +@@ -2203,17 +2203,23 @@ + AC_DEFUN([PHP_SETUP_ICU],[ + PHP_ARG_WITH(icu-dir,, + [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no) ++ PHP_ARG_WITH(icu-config,, ++ [ --with-icu-config=FILE Specify the path to icu-config], no, no) + +- if test "$PHP_ICU_DIR" = "no"; then +- PHP_ICU_DIR=DEFAULT +- fi ++ if test "$PHP_ICU_CONFIG" = "no"; then ++ if test "$PHP_ICU_DIR" = "no"; then ++ PHP_ICU_DIR=DEFAULT ++ fi + +- if test "$PHP_ICU_DIR" = "DEFAULT"; then +- dnl Try to find icu-config +- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) ++ if test "$PHP_ICU_DIR" = "DEFAULT"; then ++ dnl Try to find icu-config ++ AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) ++ else ++ ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" ++ fi + else +- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" +- fi ++ ICU_CONFIG="$PHP_ICU_CONFIG" ++ fi + + AC_MSG_CHECKING([for location of ICU headers and libraries]) + +--- php-5.5.1/aclocal.m4.icuconfig 2013-07-21 10:32:27.000000000 +0100 ++++ php-5.5.1/aclocal.m4 2013-07-21 10:36:23.000000000 +0100 +@@ -2203,17 +2203,23 @@ + AC_DEFUN([PHP_SETUP_ICU],[ + PHP_ARG_WITH(icu-dir,, + [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no) ++ PHP_ARG_WITH(icu-config,, ++ [ --with-icu-config=FILE Specify the path to icu-config], no, no) + +- if test "$PHP_ICU_DIR" = "no"; then +- PHP_ICU_DIR=DEFAULT +- fi ++ if test "$PHP_ICU_CONFIG" = "no"; then ++ if test "$PHP_ICU_DIR" = "no"; then ++ PHP_ICU_DIR=DEFAULT ++ fi + +- if test "$PHP_ICU_DIR" = "DEFAULT"; then +- dnl Try to find icu-config +- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) ++ if test "$PHP_ICU_DIR" = "DEFAULT"; then ++ dnl Try to find icu-config ++ AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) ++ else ++ ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" ++ fi + else +- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" +- fi ++ ICU_CONFIG="$PHP_ICU_CONFIG" ++ fi + + AC_MSG_CHECKING([for location of ICU headers and libraries]) + diff --git a/php55.spec b/php55.spec index 9820e7d..4ef64bc 100644 --- a/php55.spec +++ b/php55.spec @@ -62,6 +62,7 @@ Patch45: php-5.4.8-ldap_r.patch Patch46: php-5.4.9-fixheader.patch # drop "Configure command" from phpinfo output Patch47: php-5.4.9-phpinfo.patch +Patch48: php-5.5.0-icuconfig.patch # Fixes for tests Patch61: php-5.0.4-tests-wddx.patch @@ -547,7 +548,11 @@ support for using the recode library to PHP. Summary: Internationalization extension for PHP applications Group: System Environment/Libraries Requires: %{name}-common = %{version}-%{release} +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 BuildRequires: libicu-devel >= 4.0 +%else +BuildRequires: libicu42-devel >= 4.0 +%endif Provides: php-intl = %{version}-%{release} %description intl @@ -581,6 +586,7 @@ support for using the enchant library to PHP. %endif %patch46 -p1 -b .fixheader %patch47 -p1 -b .phpinfo +%patch48 -p1 -b .icuconfig %patch61 -p1 -b .tests-wddx @@ -795,7 +801,11 @@ with_shared="--with-imap=shared --with-imap-ssl \ --with-unixODBC=shared,%{_prefix} \ --enable-fileinfo=shared \ --enable-intl=shared \ +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 --with-icu-dir=%{_prefix} \ +%else + --with-icu-config=%{_bindir}/icu42-icu-config +%endif --with-enchant=shared,%{_prefix} \ --with-recode=shared,%{_prefix} \ --enable-opcache" @@ -1234,6 +1244,7 @@ fi - Add mysqlnd-linked mysql, mysqli, pdo_mysql extensions - Add provides for php55w-* for all PHP extensions. - Remove provides for shared extension .so files. +- Add patch to specify exact icu-config file for EL5 * Sat Jun 22 2013 Andy Thompson - 5.5.0-2 - Fix ICU dependency version for EL5