Skip to content

Commit

Permalink
Add patch to specify exact icu-config file for EL5
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson committed Jul 21, 2013
1 parent 31f9a4a commit 5a4f2a7
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
68 changes: 68 additions & 0 deletions 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])

11 changes: 11 additions & 0 deletions php55.spec
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 <andy@webtatic.com> - 5.5.0-2
- Fix ICU dependency version for EL5
Expand Down

0 comments on commit 5a4f2a7

Please sign in to comment.