From e184cf15b222a98e9debf475d1652c6f420a9884 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Jun 2016 07:53:00 +0200 Subject: php-horde-Horde-Db: drop dep on ereg --- 0003-drop-ereg-dep-for-php-7-in-Db.patch | 25 +++++++++++++++++++++++++ php-horde-Horde-Db.spec | 15 ++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 0003-drop-ereg-dep-for-php-7-in-Db.patch diff --git a/0003-drop-ereg-dep-for-php-7-in-Db.patch b/0003-drop-ereg-dep-for-php-7-in-Db.patch new file mode 100644 index 0000000..81fa02b --- /dev/null +++ b/0003-drop-ereg-dep-for-php-7-in-Db.patch @@ -0,0 +1,25 @@ +From 70efe638bfe64a09f97758223862efd81d30f301 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 27 Jun 2016 07:45:45 +0200 +Subject: [PATCH 3/3] drop ereg dep for php 7 in Db + +--- + framework/Db/lib/Horde/Db/SearchParser.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/framework/Db/lib/Horde/Db/SearchParser.php b/framework/Db/lib/Horde/Db/SearchParser.php +index fcb5181..d08d1e6 100644 +--- a/framework/Db/lib/Horde/Db/SearchParser.php ++++ b/framework/Db/lib/Horde/Db/SearchParser.php +@@ -156,7 +156,7 @@ class Horde_Db_SearchParser + } + + $val = Horde_String::lower(substr(array_shift($tokens), 1)); +- $val = addslashes(ereg_replace("([\\%])", "\\\\1", $val)); ++ $val = addslashes(str_replace("%", "\\%", $val)); + + return "(LOWER($column) LIKE '%$val%')"; + } +-- +2.5.5 + diff --git a/php-horde-Horde-Db.spec b/php-horde-Horde-Db.spec index 0c8cf62..3df068c 100644 --- a/php-horde-Horde-Db.spec +++ b/php-horde-Horde-Db.spec @@ -13,7 +13,7 @@ Name: php-horde-Horde-Db Version: 2.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Horde Database Libraries Group: Development/Libraries @@ -21,6 +21,9 @@ License: BSD URL: http://pear.horde.org Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +# https://github.com/horde/horde/pull/195 +Patch0: 0003-drop-ereg-dep-for-php-7-in-Db.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: php(language) >= 5.3.0 @@ -33,10 +36,10 @@ BuildRequires: php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0 Requires(post): %{__pear} Requires(postun): %{__pear} Requires: php(language) >= 5.3.0 -Requires: php-ereg +Requires: php-pdo +Requires: php-hash Requires: php-pcre Requires: php-spl -Requires: php-pdo Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(%{pear_channel}) Requires: php-pear(%{pear_channel}/Horde_Date) >= 2.0.0 @@ -66,6 +69,9 @@ Horde database/SQL abstraction layer cd %{pear_name}-%{version} mv ../package.xml %{name}.xml +%patch0 -p3 -b .ereg +sed -e '/SearchParser.php/s/md5sum="[^"]*"//' \ + -i %{name}.xml %build @@ -116,6 +122,9 @@ fi %changelog +* Mon Jun 27 2016 Remi Collet - 2.3.1-2 +- add patch to drop dependency on ereg + * Tue Feb 02 2016 Remi Collet - 2.3.1-1 - Update to 2.3.1 - PHP 7 compatible version -- cgit