summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-10-17 13:00:52 +0200
committerRemi Collet <remi@remirepo.net>2019-10-17 13:00:52 +0200
commit5da01c77fcdba94df955dd376f5c8ff5860add6b (patch)
tree5b5d81ea419c95f311e99df13aff602f23edad89
parent99ff4885647226513468262059c8323b30614d7e (diff)
- add patch for PHP 7.4 from
https://github.com/horde/Image/pull/3
-rw-r--r--3.patch23
-rw-r--r--php-horde-Horde-Image.spec12
2 files changed, 33 insertions, 2 deletions
diff --git a/3.patch b/3.patch
new file mode 100644
index 0000000..9187080
--- /dev/null
+++ b/3.patch
@@ -0,0 +1,23 @@
+From 5cbb8d0ab64912e56f3152d3b296eef3627e95c6 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 17 Oct 2019 12:53:28 +0200
+Subject: [PATCH] Fix Array and string offset access syntax with curly braces
+ is deprecated
+
+---
+ lib/Horde/Image/Exif/Parser/Gps.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Horde/Image/Exif/Parser/Gps.php b/lib/Horde/Image/Exif/Parser/Gps.php
+index 1b90d94..4357255 100644
+--- a/lib/Horde/Image/Exif/Parser/Gps.php
++++ b/lib/Horde/Image/Exif/Parser/Gps.php
+@@ -152,7 +152,7 @@ protected function _formatData($type, $tag, $intel, $data)
+ case 'ASCII':
+ // Latitude Reference, Longitude Reference
+ if ($tag == '0001' || $tag == '0003') {
+- $data = ($data{1} == $data{2} && $data{1} == $data{3}) ? $data{0} : $data;
++ $data = ($data[1] == $data[2] && $data[1] == $data[3]) ? $data[0] : $data;
+ }
+ break;
+
diff --git a/php-horde-Horde-Image.spec b/php-horde-Horde-Image.spec
index 883e55e..1724abf 100644
--- a/php-horde-Horde-Image.spec
+++ b/php-horde-Horde-Image.spec
@@ -14,13 +14,15 @@
Name: php-horde-Horde-Image
Version: 2.6.0
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Horde Image API
License: GPLv2+ and LGPLv2
URL: http://pear.horde.org
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/horde/Image/pull/3.patch
+
BuildArch: noarch
BuildRequires: gettext
BuildRequires: php(language) >= 5.3.0
@@ -91,11 +93,13 @@ Optional dependency: php-pecl-imagick
%setup -q -c
cd %{pear_name}-%{version}
+%patch0 -p1 -b .pr3
# Don't install .po and .pot files
# Remove checksum for .mo, as we regenerate them
sed -e '/%{pear_name}.po/d' \
-e '/.htaccess/d' \
+ -e '/Gps.php/s/md5sum=.*name=/name=/' \
-e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
touch -r ../package.xml %{name}.xml
@@ -134,7 +138,7 @@ done | tee ../%{pear_name}.lang
%if %{with_tests}
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
ret=0
-for cmd in php php70 php71 php72 php73; do
+for cmd in php php71 php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1
fi
@@ -167,6 +171,10 @@ fi
%changelog
+* Thu Oct 17 2019 Remi Collet <remi@remirepo.net> - 2.6.0-4
+- add patch for PHP 7.4 from
+ https://github.com/horde/Image/pull/3
+
* Mon Jan 14 2019 Remi Collet <remi@remirepo.net> - 2.6.0-1
- update to 2.6.0